mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-12-22 19:39:24 +01:00
Moved Recipes to the common package...
This commit is contained in:
parent
615bde1cb8
commit
c945843038
7 changed files with 17 additions and 15 deletions
|
@ -1,4 +1,4 @@
|
|||
package de.ellpeck.actuallyadditions.recipes;
|
||||
package de.ellpeck.actuallyadditions.common.recipes;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.lens.Lens;
|
||||
import net.minecraft.block.BlockState;
|
|
@ -1,9 +1,10 @@
|
|||
package de.ellpeck.actuallyadditions.recipes;
|
||||
package de.ellpeck.actuallyadditions.common.recipes;
|
||||
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonSyntaxException;
|
||||
import com.mojang.datafixers.Dynamic;
|
||||
import com.mojang.datafixers.types.JsonOps;
|
||||
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
|
||||
import de.ellpeck.actuallyadditions.api.lens.Lens;
|
||||
import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.common.items.lens.Lenses;
|
||||
|
@ -33,8 +34,8 @@ public class AtomicReconstructorBlockRecipeFactory extends ForgeRegistryEntry<IR
|
|||
|
||||
if(json.has("lens") && json.get("lens").isJsonObject()){
|
||||
ResourceLocation lensId = new ResourceLocation(json.get("lens").getAsString());
|
||||
if(ActuallyAdditions.LENS_REGISTRY.containsKey(lensId)){
|
||||
lens = ActuallyAdditions.LENS_REGISTRY.getValue(lensId);
|
||||
if(ActuallyAdditionsAPI.LENS_REGISTRY.containsKey(lensId)){
|
||||
lens = ActuallyAdditionsAPI.LENS_REGISTRY.getValue(lensId);
|
||||
} else {
|
||||
throw new JsonSyntaxException(String.format("Lens type is given, but no lens could be found with id '%s'!", lensId));
|
||||
}
|
||||
|
@ -68,8 +69,8 @@ public class AtomicReconstructorBlockRecipeFactory extends ForgeRegistryEntry<IR
|
|||
int energyConsumption = buffer.readVarInt();
|
||||
|
||||
Lens lens;
|
||||
if(ActuallyAdditions.LENS_REGISTRY.containsKey(lensId)){
|
||||
lens = ActuallyAdditions.LENS_REGISTRY.getValue(lensId);
|
||||
if(ActuallyAdditionsAPI.LENS_REGISTRY.containsKey(lensId)){
|
||||
lens = ActuallyAdditionsAPI.LENS_REGISTRY.getValue(lensId);
|
||||
} else {
|
||||
System.out.println(String.format("Lens is not possible to get while reading packet! '%s'", lensId));
|
||||
return null;
|
|
@ -1,4 +1,4 @@
|
|||
package de.ellpeck.actuallyadditions.recipes;
|
||||
package de.ellpeck.actuallyadditions.common.recipes;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.lens.Lens;
|
||||
import net.minecraft.item.ItemStack;
|
|
@ -1,7 +1,8 @@
|
|||
package de.ellpeck.actuallyadditions.recipes;
|
||||
package de.ellpeck.actuallyadditions.common.recipes;
|
||||
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonSyntaxException;
|
||||
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
|
||||
import de.ellpeck.actuallyadditions.api.lens.Lens;
|
||||
import de.ellpeck.actuallyadditions.common.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.common.items.lens.Lenses;
|
||||
|
@ -30,8 +31,8 @@ public class AtomicReconstructorItemRecipeFactory extends ForgeRegistryEntry<IRe
|
|||
|
||||
if(json.has("lens") && json.get("lens").isJsonObject()){
|
||||
ResourceLocation lensId = new ResourceLocation(json.get("lens").getAsString());
|
||||
if(ActuallyAdditions.LENS_REGISTRY.containsKey(lensId)){
|
||||
lens = ActuallyAdditions.LENS_REGISTRY.getValue(lensId);
|
||||
if(ActuallyAdditionsAPI.LENS_REGISTRY.containsKey(lensId)){
|
||||
lens = ActuallyAdditionsAPI.LENS_REGISTRY.getValue(lensId);
|
||||
} else {
|
||||
throw new JsonSyntaxException(String.format("Lens type is given, but no lens could be found with id '%s'!", lensId));
|
||||
}
|
||||
|
@ -65,8 +66,8 @@ public class AtomicReconstructorItemRecipeFactory extends ForgeRegistryEntry<IRe
|
|||
int energyConsumption = buffer.readVarInt();
|
||||
|
||||
Lens lens;
|
||||
if(ActuallyAdditions.LENS_REGISTRY.containsKey(lensId)){
|
||||
lens = ActuallyAdditions.LENS_REGISTRY.getValue(lensId);
|
||||
if(ActuallyAdditionsAPI.LENS_REGISTRY.containsKey(lensId)){
|
||||
lens = ActuallyAdditionsAPI.LENS_REGISTRY.getValue(lensId);
|
||||
} else {
|
||||
System.out.println(String.format("Lens is not possible to get while reading packet! '%s'", lensId));
|
||||
return null;
|
|
@ -1,4 +1,4 @@
|
|||
package de.ellpeck.actuallyadditions.recipes;
|
||||
package de.ellpeck.actuallyadditions.common.recipes;
|
||||
|
||||
import net.minecraft.item.crafting.IRecipeSerializer;
|
||||
import net.minecraft.item.crafting.IRecipeType;
|
|
@ -1,4 +1,4 @@
|
|||
package de.ellpeck.actuallyadditions.recipes;
|
||||
package de.ellpeck.actuallyadditions.common.recipes;
|
||||
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
|
@ -1,4 +1,4 @@
|
|||
package de.ellpeck.actuallyadditions.recipes;
|
||||
package de.ellpeck.actuallyadditions.common.recipes;
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
Loading…
Reference in a new issue