chore: item porting work

This commit is contained in:
Michael Hillcox 2021-02-27 20:24:26 +00:00
parent 7cd34c5360
commit e0391bbf87
116 changed files with 3533 additions and 3561 deletions

View file

@ -11,14 +11,15 @@
package de.ellpeck.actuallyadditions.mod; package de.ellpeck.actuallyadditions.mod;
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
import de.ellpeck.actuallyadditions.mod.booklet.InitBooklet; import de.ellpeck.actuallyadditions.mod.booklet.InitBooklet;
import de.ellpeck.actuallyadditions.mod.config.ConfigurationHandler;
import de.ellpeck.actuallyadditions.mod.crafting.CrusherCrafting; import de.ellpeck.actuallyadditions.mod.crafting.CrusherCrafting;
import de.ellpeck.actuallyadditions.mod.data.WorldData; import de.ellpeck.actuallyadditions.mod.data.WorldData;
import de.ellpeck.actuallyadditions.mod.entity.InitEntities; import de.ellpeck.actuallyadditions.mod.entity.InitEntities;
import de.ellpeck.actuallyadditions.mod.event.CommonEvents; import de.ellpeck.actuallyadditions.mod.event.CommonEvents;
import de.ellpeck.actuallyadditions.mod.fluids.InitFluids; import de.ellpeck.actuallyadditions.mod.fluids.InitFluids;
import de.ellpeck.actuallyadditions.mod.gen.AAWorldGen; import de.ellpeck.actuallyadditions.mod.gen.AAWorldGen;
import de.ellpeck.actuallyadditions.mod.inventory.ActuallyContainers;
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
import de.ellpeck.actuallyadditions.mod.items.InitItems; import de.ellpeck.actuallyadditions.mod.items.InitItems;
import de.ellpeck.actuallyadditions.mod.items.ItemCoffee; import de.ellpeck.actuallyadditions.mod.items.ItemCoffee;
@ -32,40 +33,39 @@ import de.ellpeck.actuallyadditions.mod.misc.DungeonLoot;
import de.ellpeck.actuallyadditions.mod.misc.apiimpl.LaserRelayConnectionHandler; import de.ellpeck.actuallyadditions.mod.misc.apiimpl.LaserRelayConnectionHandler;
import de.ellpeck.actuallyadditions.mod.misc.apiimpl.MethodHandler; import de.ellpeck.actuallyadditions.mod.misc.apiimpl.MethodHandler;
import de.ellpeck.actuallyadditions.mod.network.PacketHandler; import de.ellpeck.actuallyadditions.mod.network.PacketHandler;
import de.ellpeck.actuallyadditions.mod.proxy.IProxy;
import de.ellpeck.actuallyadditions.mod.recipe.EmpowererHandler; import de.ellpeck.actuallyadditions.mod.recipe.EmpowererHandler;
import de.ellpeck.actuallyadditions.mod.recipe.HairyBallHandler; import de.ellpeck.actuallyadditions.mod.recipe.HairyBallHandler;
import de.ellpeck.actuallyadditions.mod.recipe.TreasureChestHandler; import de.ellpeck.actuallyadditions.mod.recipe.TreasureChestHandler;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.ActuallyTiles;
import de.ellpeck.actuallyadditions.mod.update.UpdateChecker; import de.ellpeck.actuallyadditions.mod.update.UpdateChecker;
import de.ellpeck.actuallyadditions.mod.util.compat.CompatUtil; import de.ellpeck.actuallyadditions.mod.util.compat.CompatUtil;
import net.minecraft.item.ItemGroup; import net.minecraft.item.ItemGroup;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.launchwrapper.Launch;
import net.minecraft.server.MinecraftServer;
import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.fml.common.FMLCommonHandler;
import net.minecraftforge.fml.common.Loader;
import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
import net.minecraftforge.fml.common.Mod.Instance; import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.event.server.FMLServerStartedEvent;
import net.minecraftforge.fml.common.event.*; import net.minecraftforge.fml.event.server.FMLServerStoppedEvent;
import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
@Mod(modid = ActuallyAdditions.MODID, name = ActuallyAdditions.NAME, version = ActuallyAdditions.VERSION, guiFactory = ActuallyAdditions.GUIFACTORY, dependencies = ActuallyAdditions.DEPS) //@Mod(modid = ActuallyAdditions.MODID, name = ActuallyAdditions.NAME, version = ActuallyAdditions.VERSION, guiFactory = ActuallyAdditions.GUIFACTORY, dependencies = ActuallyAdditions.DEPS)
@Mod(ActuallyAdditions.MODID)
public class ActuallyAdditions { public class ActuallyAdditions {
public static final String MODID = ActuallyAdditionsAPI.MOD_ID; public static final String MODID = ActuallyAdditionsAPI.MOD_ID;
@Deprecated
public static final String NAME = "Actually Additions"; public static final String NAME = "Actually Additions";
@Deprecated
public static final String VERSION = "@VERSION@"; public static final String VERSION = "@VERSION@";
@Deprecated
public static final String GUIFACTORY = "de.ellpeck.actuallyadditions.mod.config.GuiFactory"; public static final String GUIFACTORY = "de.ellpeck.actuallyadditions.mod.config.GuiFactory";
public static final String DEPS = "required:forge@[14.23.5.2836,);before:craftingtweaks;after:fastbench@[1.3.2,)"; public static final String DEPS = "required:forge@[14.23.5.2836,);before:craftingtweaks;after:fastbench@[1.3.2,)";
public static final boolean DEOBF = (boolean) Launch.blackboard.get("fml.deobfuscatedEnvironment"); // public static final boolean DEOBF = (boolean) Launch.blackboard.get("fml.deobfuscatedEnvironment");
public static final ItemGroup GROUP = new ItemGroup(MODID) { public static final ItemGroup GROUP = new ItemGroup(MODID) {
@Override @Override
@ -74,70 +74,52 @@ public class ActuallyAdditions {
} }
}; };
@Instance @Deprecated
public static ActuallyAdditions INSTANCE; public static ActuallyAdditions INSTANCE;
@SidedProxy(clientSide = "de.ellpeck.actuallyadditions.mod.proxy.ClientProxy", serverSide = "de.ellpeck.actuallyadditions.mod.proxy.ServerProxy")
public static IProxy PROXY;
public static final Logger LOGGER = LogManager.getLogger(NAME); public static final Logger LOGGER = LogManager.getLogger(NAME);
static { // TODO: [port] eval
FluidRegistry.enableUniversalBucket(); // static {
} // FluidRegistry.enableUniversalBucket();
// }
public static boolean commonCapsLoaded; public static boolean commonCapsLoaded;
@EventHandler public ActuallyAdditions() {
public void preInit(FMLPreInitializationEvent event) { IEventBus eventBus = FMLJavaModLoadingContext.get().getModEventBus();
ActuallyAdditions.LOGGER.info("Starting PreInitialization Phase...");
InitBlocks.BLOCKS.register(eventBus);
ActuallyTiles.TILES.register(eventBus);
ActuallyContainers.CONTAINERS.register(eventBus);
MinecraftForge.EVENT_BUS.addListener(this::serverStarted);
MinecraftForge.EVENT_BUS.addListener(this::serverStopped);
MinecraftForge.EVENT_BUS.register(new CommonEvents());
MinecraftForge.EVENT_BUS.register(new DungeonLoot());
eventBus.addListener(this::setup);
eventBus.addListener(this::clientSetup);
}
private void setup(FMLCommonSetupEvent event) {
PacketHandler.init();
ActuallyAdditionsAPI.methodHandler = new MethodHandler(); ActuallyAdditionsAPI.methodHandler = new MethodHandler();
ActuallyAdditionsAPI.connectionHandler = new LaserRelayConnectionHandler(); ActuallyAdditionsAPI.connectionHandler = new LaserRelayConnectionHandler();
Lenses.init(); Lenses.init();
InitBooklet.preInit();
CompatUtil.registerCraftingTweaks(); CompatUtil.registerCraftingTweaks();
commonCapsLoaded = Loader.isModLoaded("commoncapabilities");
MinecraftForge.EVENT_BUS.register(new RegistryHandler()); commonCapsLoaded = false; // Loader.isModLoaded("commoncapabilities");
new ConfigurationHandler(event.getSuggestedConfigurationFile());
PacketHandler.init();
InitToolMaterials.init(); InitToolMaterials.init();
InitArmorMaterials.init(); InitArmorMaterials.init();
InitFluids.init(); InitFluids.init();
new UpdateChecker(); new UpdateChecker();
PROXY.preInit(event);
ActuallyAdditions.LOGGER.info("PreInitialization Finished.");
}
@EventHandler
public void init(FMLInitializationEvent event) {
ActuallyAdditions.LOGGER.info("Starting Initialization Phase...");
BannerHelper.init(); BannerHelper.init();
//InitAchievements.init();
GuiHandler.init(); GuiHandler.init();
InitEntities.init(); // todo: [port] replace
AAWorldGen gen = new AAWorldGen(); AAWorldGen gen = new AAWorldGen();
GameRegistry.registerWorldGenerator(gen, 10000);
MinecraftForge.TERRAIN_GEN_BUS.register(gen);
TileEntityBase.init();
MinecraftForge.EVENT_BUS.register(new CommonEvents());
MinecraftForge.EVENT_BUS.register(new DungeonLoot());
InitEntities.init();
PROXY.init(event);
RegistryHandler.BLOCKS_TO_REGISTER.clear();
ActuallyAdditions.LOGGER.info("Initialization Finished.");
}
@EventHandler
public void postInit(FMLPostInitializationEvent event) {
ActuallyAdditions.LOGGER.info("Starting PostInitialization Phase...");
ItemCoffee.initIngredients(); ItemCoffee.initIngredients();
CrusherCrafting.init(); CrusherCrafting.init();
HairyBallHandler.init(); HairyBallHandler.init();
@ -145,28 +127,26 @@ public class ActuallyAdditions {
LensRecipeHandler.init(); LensRecipeHandler.init();
EmpowererHandler.init(); EmpowererHandler.init();
LensMining.init(); LensMining.init();
InitBooklet.init();
InitBooklet.postInit(); }
PROXY.postInit(event);
private void clientSetup(FMLClientSetupEvent event) {
ConfigurationHandler.redefineConfigs(); ActuallyAdditionsClient.setup();
ActuallyAdditions.LOGGER.info("PostInitialization Finished.");
} }
@EventHandler
public void serverStarted(FMLServerStartedEvent event) { public void serverStarted(FMLServerStartedEvent event) {
MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance(); // TODO: [port] check if this is needed
if (server != null) {
World world = server.getEntityWorld(); // if (event.getServer() != null) {
if (world != null && !world.isRemote) { // World world = event.getServer().getWorld(OVERWORLD);
WorldData.get(world, true).markDirty(); // if (world != null && !world.isRemote) {
} // WorldData.get(world, true).markDirty();
} // }
// }
} }
@EventHandler
public void serverStopped(FMLServerStoppedEvent event) { public void serverStopped(FMLServerStoppedEvent event) {
// TODO: [port] check if this is needed
WorldData.clear(); WorldData.clear();
} }
} }

View file

@ -0,0 +1,67 @@
/*
* This file ("ActuallyAdditions.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.mod;
import de.ellpeck.actuallyadditions.mod.blocks.render.*;
import de.ellpeck.actuallyadditions.mod.entity.InitEntities;
import de.ellpeck.actuallyadditions.mod.entity.RenderWorm;
import de.ellpeck.actuallyadditions.mod.event.ClientEvents;
import de.ellpeck.actuallyadditions.mod.inventory.ActuallyContainers;
import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiBag;
import de.ellpeck.actuallyadditions.mod.misc.special.SpecialRenderInit;
import de.ellpeck.actuallyadditions.mod.tile.ActuallyTiles;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.ScreenManager;
import net.minecraft.client.network.play.ClientPlayNetHandler;
import net.minecraft.network.play.client.CPlayerDiggingPacket;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.client.registry.ClientRegistry;
public class ActuallyAdditionsClient {
public static void setup() {
ScreenManager.registerFactory(ActuallyContainers.BAG_CONTAINER.get(), GuiBag::new);
// From old proxy
InitEntities.initClient();
MinecraftForge.EVENT_BUS.register(new ClientEvents());
MinecraftForge.EVENT_BUS.register(new ClientRegistryHandler());
MinecraftForge.EVENT_BUS.register(new SpecialRenderInit());
setupSpecialRenders();
RenderWorm.fixItemStack();// todo: remove
}
private static void setupSpecialRenders() {
ClientRegistry.bindTileEntityRenderer(ActuallyTiles.ATOMICRECONSTRUCTOR_TILE.get(), RenderReconstructorLens::new);
ClientRegistry.bindTileEntityRenderer(ActuallyTiles.DISPLAYSTAND_TILE.get(), RenderDisplayStand::new);
ClientRegistry.bindTileEntityRenderer(ActuallyTiles.EMPOWERER_TILE.get(), RenderEmpowerer::new);
ClientRegistry.bindTileEntityRenderer(ActuallyTiles.BATTERYBOX_TILE.get(), RenderBatteryBox::new);
ClientRegistry.bindTileEntityRenderer(ActuallyTiles.LASERRELAYENERGY_TILE.get(), RenderLaserRelay::new);
ClientRegistry.bindTileEntityRenderer(ActuallyTiles.LASERRELAYENERGYADVANCED_TILE.get(), RenderLaserRelay::new);
ClientRegistry.bindTileEntityRenderer(ActuallyTiles.LASERRELAYENERGYEXTREME_TILE.get(), RenderLaserRelay::new);
ClientRegistry.bindTileEntityRenderer(ActuallyTiles.LASERRELAYITEM_TILE.get(), RenderLaserRelay::new);
ClientRegistry.bindTileEntityRenderer(ActuallyTiles.LASERRELAYITEMWHITELIST_TILE.get(), RenderLaserRelay::new);
ClientRegistry.bindTileEntityRenderer(ActuallyTiles.LASERRELAYFLUIDS_TILE.get(), RenderLaserRelay::new);
}
// TODO: [port] validate that this works
public void sendBreakPacket(BlockPos pos) {
ClientPlayNetHandler connection = Minecraft.getInstance().getConnection();
assert connection != null;
assert Minecraft.getInstance().objectMouseOver != null;
connection.sendPacket(new CPlayerDiggingPacket(CPlayerDiggingPacket.Action.STOP_DESTROY_BLOCK, pos, ((BlockRayTraceResult) Minecraft.getInstance().objectMouseOver).getFace()));
}
}

View file

@ -1,24 +1,18 @@
package de.ellpeck.actuallyadditions.mod; package de.ellpeck.actuallyadditions.mod;
import de.ellpeck.actuallyadditions.mod.blocks.render.ActualCompostModel; import net.minecraft.client.renderer.model.ModelResourceLocation;
import de.ellpeck.actuallyadditions.mod.blocks.render.CompostModel; import net.minecraft.fluid.Fluid;
import de.ellpeck.actuallyadditions.mod.fluids.InitFluids;
import de.ellpeck.actuallyadditions.mod.util.FluidStateMapper;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.block.model.ModelBakery;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.event.ModelBakeEvent; import net.minecraftforge.client.event.ModelBakeEvent;
import net.minecraftforge.client.event.ModelRegistryEvent; import net.minecraftforge.client.event.ModelRegistryEvent;
import net.minecraftforge.client.model.ModelLoader; import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
/**
* TODO: [port] eval all of this class
*/
public class ClientRegistryHandler { public class ClientRegistryHandler {
public static final Map<ItemStack, ModelResourceLocation> MODEL_LOCATIONS_FOR_REGISTERING = new HashMap<>(); public static final Map<ItemStack, ModelResourceLocation> MODEL_LOCATIONS_FOR_REGISTERING = new HashMap<>();
@ -27,36 +21,36 @@ public class ClientRegistryHandler {
* (Excerpted from Tinkers' Construct with permission, thanks guys!) * (Excerpted from Tinkers' Construct with permission, thanks guys!)
*/ */
private static void registerCustomFluidBlockRenderer(Fluid fluid) { private static void registerCustomFluidBlockRenderer(Fluid fluid) {
Block block = fluid.getBlock(); // Block block = fluid.getBlock();
Item item = Item.getItemFromBlock(block); // Item item = Item.getItemFromBlock(block);
FluidStateMapper mapper = new FluidStateMapper(fluid); // FluidStateMapper mapper = new FluidStateMapper(fluid);
ModelBakery.registerItemVariants(item); // ModelBakery.registerItemVariants(item);
ModelLoader.setCustomMeshDefinition(item, mapper); // ModelLoader.setCustomMeshDefinition(item, mapper);
ModelLoader.setCustomStateMapper(block, mapper); // ModelLoader.setCustomStateMapper(block, mapper);
} }
@SubscribeEvent @SubscribeEvent
public void onModelRegistry(ModelRegistryEvent event) { public void onModelRegistry(ModelRegistryEvent event) {
for (Block block : RegistryHandler.BLOCKS_TO_REGISTER) { // for (Block block : RegistryHandler.BLOCKS_TO_REGISTER) {
if (block instanceof IHasModel) { // if (block instanceof IHasModel) {
((IHasModel) block).registerRendering(); // ((IHasModel) block).registerRendering();
} // }
} // }
//
for (Map.Entry<ItemStack, ModelResourceLocation> entry : MODEL_LOCATIONS_FOR_REGISTERING.entrySet()) { // for (Map.Entry<ItemStack, ModelResourceLocation> entry : MODEL_LOCATIONS_FOR_REGISTERING.entrySet()) {
ModelLoader.setCustomModelResourceLocation(entry.getKey().getItem(), entry.getKey().getItemDamage(), entry.getValue()); // ModelLoader.setCustomModelResourceLocation(entry.getKey().getItem(), entry.getKey().getItemDamage(), entry.getValue());
} // }
//
registerCustomFluidBlockRenderer(InitFluids.fluidCanolaOil); // registerCustomFluidBlockRenderer(InitFluids.fluidCanolaOil);
registerCustomFluidBlockRenderer(InitFluids.fluidRefinedCanolaOil); // registerCustomFluidBlockRenderer(InitFluids.fluidRefinedCanolaOil);
registerCustomFluidBlockRenderer(InitFluids.fluidCrystalOil); // registerCustomFluidBlockRenderer(InitFluids.fluidCrystalOil);
registerCustomFluidBlockRenderer(InitFluids.fluidEmpoweredOil); // registerCustomFluidBlockRenderer(InitFluids.fluidEmpoweredOil);
} }
@SubscribeEvent @SubscribeEvent
public void onModelBake(ModelBakeEvent e) { public void onModelBake(ModelBakeEvent e) {
ModelResourceLocation mrl = new ModelResourceLocation(new ResourceLocation(ActuallyAdditions.MODID, "block_compost"), "normal"); // ModelResourceLocation mrl = new ModelResourceLocation(new ResourceLocation(ActuallyAdditions.MODID, "block_compost"), "normal");
CompostModel.compostBase = e.getModelRegistry().getObject(mrl); // CompostModel.compostBase = e.getModelRegistry().getObject(mrl);
e.getModelRegistry().putObject(mrl, new ActualCompostModel()); // e.getModelRegistry().putObject(mrl, new ActualCompostModel());
} }
} }

View file

@ -1,78 +1,79 @@
package de.ellpeck.actuallyadditions.mod; // TODO: [port] remove all of this
//package de.ellpeck.actuallyadditions.mod;
import java.util.ArrayList; //
import java.util.List; //import java.util.ArrayList;
//import java.util.List;
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; //
import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues; //import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
import de.ellpeck.actuallyadditions.mod.crafting.InitCrafting; //import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues;
import de.ellpeck.actuallyadditions.mod.gen.village.InitVillager; //import de.ellpeck.actuallyadditions.mod.crafting.InitCrafting;
import de.ellpeck.actuallyadditions.mod.items.InitItems; //import de.ellpeck.actuallyadditions.mod.gen.village.InitVillager;
import de.ellpeck.actuallyadditions.mod.misc.SoundHandler; //import de.ellpeck.actuallyadditions.mod.items.InitItems;
import de.ellpeck.actuallyadditions.mod.ore.InitOreDict; //import de.ellpeck.actuallyadditions.mod.misc.SoundHandler;
import net.minecraft.block.Block; //import de.ellpeck.actuallyadditions.mod.ore.InitOreDict;
import net.minecraft.item.Item; //import net.minecraft.block.Block;
import net.minecraft.item.crafting.IRecipe; //import net.minecraft.item.Item;
import net.minecraft.util.SoundEvent; //import net.minecraft.item.crafting.IRecipe;
import net.minecraftforge.event.RegistryEvent.Register; //import net.minecraft.util.SoundEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; //import net.minecraftforge.event.RegistryEvent.Register;
import net.minecraftforge.fml.common.registry.VillagerRegistry.VillagerProfession; //import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
//import net.minecraftforge.fml.common.registry.VillagerRegistry.VillagerProfession;
//Class to wrap around the trainwreck that is the new registry system //
public class RegistryHandler { ////Class to wrap around the trainwreck that is the new registry system
//public class RegistryHandler {
public static final List<Block> BLOCKS_TO_REGISTER = new ArrayList<>(); //
public static final List<Item> ITEMS_TO_REGISTER = new ArrayList<>(); // public static final List<Block> BLOCKS_TO_REGISTER = new ArrayList<>();
public static final List<SoundEvent> SOUNDS_TO_REGISTER = new ArrayList<>(); // public static final List<Item> ITEMS_TO_REGISTER = new ArrayList<>();
public static final List<IRecipe> RECIPES_TO_REGISTER = new ArrayList<>(); // public static final List<SoundEvent> SOUNDS_TO_REGISTER = new ArrayList<>();
// public static final List<IRecipe> RECIPES_TO_REGISTER = new ArrayList<>();
@SubscribeEvent //
public void onBlockRegistry(Register<Block> event) { // @SubscribeEvent
InitBlocks.init(); // public void onBlockRegistry(Register<Block> event) {
// InitBlocks.init();
for (Block block : BLOCKS_TO_REGISTER) { //
event.getRegistry().register(block); // for (Block block : BLOCKS_TO_REGISTER) {
} // event.getRegistry().register(block);
} // }
// }
@SubscribeEvent //
public void onItemRegistry(Register<Item> event) { // @SubscribeEvent
InitItems.init(); // public void onItemRegistry(Register<Item> event) {
// InitItems.init();
for (Item item : ITEMS_TO_REGISTER) { //
event.getRegistry().register(item); // for (Item item : ITEMS_TO_REGISTER) {
} // event.getRegistry().register(item);
ITEMS_TO_REGISTER.clear(); // }
// ITEMS_TO_REGISTER.clear();
//Hack to make this register before recipes :> //
InitOreDict.init(); // //Hack to make this register before recipes :>
} // InitOreDict.init();
// }
@SubscribeEvent //
public void onVillagerRegistry(Register<VillagerProfession> event) { // @SubscribeEvent
InitVillager.init(); // public void onVillagerRegistry(Register<VillagerProfession> event) {
// InitVillager.init();
if (ConfigBoolValues.JAM_VILLAGER_EXISTS.isEnabled()) event.getRegistry().register(InitVillager.jamProfession); //
if (ConfigBoolValues.ENGINEER_VILLAGER_EXISTS.isEnabled()) event.getRegistry().register(InitVillager.engineerProfession); // if (ConfigBoolValues.JAM_VILLAGER_EXISTS.isEnabled()) event.getRegistry().register(InitVillager.jamProfession);
} // if (ConfigBoolValues.ENGINEER_VILLAGER_EXISTS.isEnabled()) event.getRegistry().register(InitVillager.engineerProfession);
// }
@SubscribeEvent //
public void onCraftingRegistry(Register<IRecipe> event) { // @SubscribeEvent
InitCrafting.init(); // public void onCraftingRegistry(Register<IRecipe> event) {
// InitCrafting.init();
for (IRecipe recipe : RECIPES_TO_REGISTER) { //
event.getRegistry().register(recipe); // for (IRecipe recipe : RECIPES_TO_REGISTER) {
} // event.getRegistry().register(recipe);
RECIPES_TO_REGISTER.clear(); // }
} // RECIPES_TO_REGISTER.clear();
// }
@SubscribeEvent //
public void onSoundRegistry(Register<SoundEvent> event) { // @SubscribeEvent
SoundHandler.init(); // public void onSoundRegistry(Register<SoundEvent> event) {
// SoundHandler.init();
for (SoundEvent sound : SOUNDS_TO_REGISTER) { //
event.getRegistry().register(sound); // for (SoundEvent sound : SOUNDS_TO_REGISTER) {
} // event.getRegistry().register(sound);
SOUNDS_TO_REGISTER.clear(); // }
} // SOUNDS_TO_REGISTER.clear();
} // }
//}

View file

@ -10,12 +10,13 @@
package de.ellpeck.actuallyadditions.mod.blocks; package de.ellpeck.actuallyadditions.mod.blocks;
import com.mojang.blaze3d.matrix.MatrixStack;
import de.ellpeck.actuallyadditions.api.lens.ILensItem; import de.ellpeck.actuallyadditions.api.lens.ILensItem;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntValues; import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntValues;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityAtomicReconstructor; import de.ellpeck.actuallyadditions.mod.tile.TileEntityAtomicReconstructor;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import de.ellpeck.actuallyadditions.mod.util.Help;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.block.Block; import net.minecraft.block.Block;
@ -40,6 +41,7 @@ import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult; import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.RayTraceResult; import net.minecraft.util.math.RayTraceResult;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextFormatting; import net.minecraft.util.text.TextFormatting;
import net.minecraft.world.IBlockReader; import net.minecraft.world.IBlockReader;
import net.minecraft.world.World; import net.minecraft.world.World;
@ -116,19 +118,23 @@ public class BlockAtomicReconstructor extends BlockContainerBase implements IHud
@Override @Override
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
public void displayHud(Minecraft minecraft, PlayerEntity player, ItemStack stack, RayTraceResult posHit, MainWindow resolution) { public void displayHud(MatrixStack matrices, Minecraft minecraft, PlayerEntity player, ItemStack stack, RayTraceResult rayCast, MainWindow resolution) {
TileEntity tile = minecraft.world.getTileEntity(posHit.getBlockPos()); if (!(rayCast instanceof BlockRayTraceResult) || minecraft.world == null) {
return;
}
TileEntity tile = minecraft.world.getTileEntity(((BlockRayTraceResult) rayCast).getPos());
if (tile instanceof TileEntityAtomicReconstructor) { if (tile instanceof TileEntityAtomicReconstructor) {
ItemStack slot = ((TileEntityAtomicReconstructor) tile).inv.getStackInSlot(0); ItemStack slot = ((TileEntityAtomicReconstructor) tile).inv.getStackInSlot(0);
String strg; ITextComponent strg;
if (!StackUtil.isValid(slot)) { if (!StackUtil.isValid(slot)) {
strg = StringUtil.localize("info." + ActuallyAdditions.MODID + ".noLens"); strg = Help.Trans("info", "nolens");
} else { } else {
strg = slot.getItem().getItemStackDisplayName(slot); strg = slot.getItem().getDisplayName(slot);
AssetUtil.renderStackToGui(slot, resolution.getScaledWidth() / 2 + 15, resolution.getScaledHeight() / 2 - 19, 1F); AssetUtil.renderStackToGui(slot, resolution.getScaledWidth() / 2 + 15, resolution.getScaledHeight() / 2 - 19, 1F);
} }
minecraft.fontRenderer.drawStringWithShadow(TextFormatting.YELLOW + "" + TextFormatting.ITALIC + strg, resolution.getScaledWidth() / 2 + 35, resolution.getScaledHeight() / 2 - 15, StringUtil.DECIMAL_COLOR_WHITE); minecraft.fontRenderer.drawStringWithShadow(matrices, strg.copyRaw().mergeStyle(TextFormatting.YELLOW).mergeStyle(TextFormatting.ITALIC).getString(), resolution.getScaledWidth() / 2 + 35, resolution.getScaledHeight() / 2f - 15, StringUtil.DECIMAL_COLOR_WHITE);
} }
} }

View file

@ -14,45 +14,41 @@ import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBioReactor; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBioReactor;
import net.minecraft.block.BlockState;
import net.minecraft.block.SoundType; import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.EnumRarity; import net.minecraft.entity.player.ServerPlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Direction; import net.minecraft.util.ActionResultType;
import net.minecraft.util.Hand; import net.minecraft.util.Hand;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.ToolType;
import net.minecraftforge.fml.network.NetworkHooks;
public class BlockBioReactor extends BlockContainerBase { public class BlockBioReactor extends BlockContainerBase {
public BlockBioReactor() { public BlockBioReactor() {
super(Material.ROCK, this.name); super(Properties.create(Material.ROCK).harvestTool(ToolType.PICKAXE).hardnessAndResistance(2.0F, 10.0F).sound(SoundType.STONE));
this.setHarvestLevel("pickaxe", 0);
this.setHardness(2.0F);
this.setResistance(10.0F);
this.setSoundType(SoundType.STONE);
} }
@Override @Override
public TileEntity createNewTileEntity(World worldIn, int meta) { public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileEntityBioReactor(); return new TileEntityBioReactor();
} }
@Override @Override
public boolean onBlockActivated(World world, BlockPos pos, BlockState state, PlayerEntity player, Hand hand, Direction par6, float par7, float par8, float par9) { public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) {
if (!world.isRemote) { if (!world.isRemote) {
if (world.getTileEntity(pos) instanceof TileEntityBioReactor) { TileEntity tileEntity = world.getTileEntity(pos);
if (tileEntity instanceof TileEntityBioReactor) {
NetworkHooks.openGui((ServerPlayerEntity) player, tileEntity, pos);
player.openGui(ActuallyAdditions.INSTANCE, GuiHandler.GuiTypes.BIO_REACTOR.ordinal(), world, pos.getX(), pos.getY(), pos.getZ()); player.openGui(ActuallyAdditions.INSTANCE, GuiHandler.GuiTypes.BIO_REACTOR.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
} }
} }
return true; return true;
} }
@Override
public EnumRarity getRarity(ItemStack stack) {
return EnumRarity.EPIC;
}
} }

View file

@ -10,6 +10,7 @@
package de.ellpeck.actuallyadditions.mod.blocks; package de.ellpeck.actuallyadditions.mod.blocks;
import com.mojang.blaze3d.matrix.MatrixStack;
import de.ellpeck.actuallyadditions.api.recipe.CompostRecipe; import de.ellpeck.actuallyadditions.api.recipe.CompostRecipe;
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityCompost; import de.ellpeck.actuallyadditions.mod.tile.TileEntityCompost;
@ -157,8 +158,8 @@ public class BlockCompost extends BlockContainerBase implements IHudDisplay {
@Override @Override
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
public void displayHud(Minecraft minecraft, PlayerEntity player, ItemStack stack, RayTraceResult posHit, MainWindow resolution) { public void displayHud(MatrixStack matrices, Minecraft minecraft, PlayerEntity player, ItemStack stack, RayTraceResult rayCast, MainWindow resolution) {
TileEntity tile = minecraft.world.getTileEntity(posHit.getBlockPos()); TileEntity tile = minecraft.world.getTileEntity(rayCast.getBlockPos());
if (tile instanceof TileEntityCompost) { if (tile instanceof TileEntityCompost) {
ItemStack slot = ((TileEntityCompost) tile).inv.getStackInSlot(0); ItemStack slot = ((TileEntityCompost) tile).inv.getStackInSlot(0);
String strg; String strg;

View file

@ -10,6 +10,7 @@
package de.ellpeck.actuallyadditions.mod.blocks; package de.ellpeck.actuallyadditions.mod.blocks;
import com.mojang.blaze3d.matrix.MatrixStack;
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
import de.ellpeck.actuallyadditions.api.laser.Network; import de.ellpeck.actuallyadditions.api.laser.Network;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
@ -244,13 +245,13 @@ public class BlockLaserRelay extends BlockContainerBase implements IHudDisplay {
@Override @Override
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
public void displayHud(Minecraft minecraft, PlayerEntity player, ItemStack stack, RayTraceResult posHit, MainWindow resolution) { public void displayHud(MatrixStack matrices, Minecraft minecraft, PlayerEntity player, ItemStack stack, RayTraceResult rayCast, MainWindow resolution) {
if (posHit != null && posHit.getBlockPos() != null && minecraft.world != null) { if (rayCast != null && rayCast.getBlockPos() != null && minecraft.world != null) {
boolean wearing = ItemEngineerGoggles.isWearing(player); boolean wearing = ItemEngineerGoggles.isWearing(player);
if (wearing || StackUtil.isValid(stack)) { if (wearing || StackUtil.isValid(stack)) {
boolean compass = stack.getItem() == ConfigValues.itemCompassConfigurator; boolean compass = stack.getItem() == ConfigValues.itemCompassConfigurator;
if (wearing || compass || stack.getItem() instanceof ItemLaserWrench) { if (wearing || compass || stack.getItem() instanceof ItemLaserWrench) {
TileEntity tile = minecraft.world.getTileEntity(posHit.getBlockPos()); TileEntity tile = minecraft.world.getTileEntity(rayCast.getBlockPos());
if (tile instanceof TileEntityLaserRelay) { if (tile instanceof TileEntityLaserRelay) {
TileEntityLaserRelay relay = (TileEntityLaserRelay) tile; TileEntityLaserRelay relay = (TileEntityLaserRelay) tile;

View file

@ -10,6 +10,7 @@
package de.ellpeck.actuallyadditions.mod.blocks; package de.ellpeck.actuallyadditions.mod.blocks;
import com.mojang.blaze3d.matrix.MatrixStack;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityLavaFactoryController; import de.ellpeck.actuallyadditions.mod.tile.TileEntityLavaFactoryController;
@ -49,8 +50,8 @@ public class BlockLavaFactoryController extends BlockContainerBase implements IH
@Override @Override
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
public void displayHud(Minecraft minecraft, PlayerEntity player, ItemStack stack, RayTraceResult posHit, MainWindow resolution) { public void displayHud(MatrixStack matrices, Minecraft minecraft, PlayerEntity player, ItemStack stack, RayTraceResult rayCast, MainWindow resolution) {
TileEntityLavaFactoryController factory = (TileEntityLavaFactoryController) minecraft.world.getTileEntity(posHit.getBlockPos()); TileEntityLavaFactoryController factory = (TileEntityLavaFactoryController) minecraft.world.getTileEntity(rayCast.getBlockPos());
if (factory != null) { if (factory != null) {
int state = factory.isMultiblock(); int state = factory.isMultiblock();
if (state == TileEntityLavaFactoryController.NOT_MULTI) { if (state == TileEntityLavaFactoryController.NOT_MULTI) {

View file

@ -10,6 +10,7 @@
package de.ellpeck.actuallyadditions.mod.blocks; package de.ellpeck.actuallyadditions.mod.blocks;
import com.mojang.blaze3d.matrix.MatrixStack;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
@ -69,8 +70,8 @@ public class BlockMiner extends BlockContainerBase implements IHudDisplay {
@Override @Override
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
public void displayHud(Minecraft minecraft, PlayerEntity player, ItemStack stack, RayTraceResult posHit, MainWindow resolution) { public void displayHud(MatrixStack matrices, Minecraft minecraft, PlayerEntity player, ItemStack stack, RayTraceResult rayCast, MainWindow resolution) {
TileEntity tile = minecraft.world.getTileEntity(posHit.getBlockPos()); TileEntity tile = minecraft.world.getTileEntity(rayCast.getBlockPos());
if (tile instanceof TileEntityMiner) { if (tile instanceof TileEntityMiner) {
TileEntityMiner miner = (TileEntityMiner) tile; TileEntityMiner miner = (TileEntityMiner) tile;
String info = miner.checkY == 0 String info = miner.checkY == 0

View file

@ -10,6 +10,7 @@
package de.ellpeck.actuallyadditions.mod.blocks; package de.ellpeck.actuallyadditions.mod.blocks;
import com.mojang.blaze3d.matrix.MatrixStack;
import de.ellpeck.actuallyadditions.api.tile.IPhantomTile; import de.ellpeck.actuallyadditions.api.tile.IPhantomTile;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
@ -121,14 +122,14 @@ public class BlockPhantom extends BlockContainerBase implements IHudDisplay {
@Override @Override
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
public void displayHud(Minecraft minecraft, PlayerEntity player, ItemStack stack, RayTraceResult posHit, MainWindow resolution) { public void displayHud(MatrixStack matrices, Minecraft minecraft, PlayerEntity player, ItemStack stack, RayTraceResult rayCast, MainWindow resolution) {
TileEntity tile = minecraft.world.getTileEntity(posHit.getBlockPos()); TileEntity tile = minecraft.world.getTileEntity(rayCast.getBlockPos());
if (tile != null) { if (tile != null) {
if (tile instanceof IPhantomTile) { if (tile instanceof IPhantomTile) {
IPhantomTile phantom = (IPhantomTile) tile; IPhantomTile phantom = (IPhantomTile) tile;
minecraft.fontRenderer.drawStringWithShadow(TextFormatting.GOLD + StringUtil.localize("tooltip." + ActuallyAdditions.MODID + ".blockPhantomRange.desc") + ": " + phantom.getRange(), resolution.getScaledWidth() / 2 + 5, resolution.getScaledHeight() / 2 - 40, StringUtil.DECIMAL_COLOR_WHITE); minecraft.fontRenderer.drawStringWithShadow(TextFormatting.GOLD + StringUtil.localize("tooltip." + ActuallyAdditions.MODID + ".blockPhantomRange.desc") + ": " + phantom.getRange(), resolution.getScaledWidth() / 2 + 5, resolution.getScaledHeight() / 2 - 40, StringUtil.DECIMAL_COLOR_WHITE);
if (phantom.hasBoundPosition()) { if (phantom.hasBoundPosition()) {
int distance = MathHelper.ceil(new Vec3d(posHit.getBlockPos()).distanceTo(new Vec3d(phantom.getBoundPosition()))); int distance = MathHelper.ceil(new Vec3d(rayCast.getBlockPos()).distanceTo(new Vec3d(phantom.getBoundPosition())));
BlockState state = minecraft.world.getBlockState(phantom.getBoundPosition()); BlockState state = minecraft.world.getBlockState(phantom.getBoundPosition());
Block block = state.getBlock(); Block block = state.getBlock();
Item item = Item.getItemFromBlock(block); Item item = Item.getItemFromBlock(block);

View file

@ -10,6 +10,7 @@
package de.ellpeck.actuallyadditions.mod.blocks; package de.ellpeck.actuallyadditions.mod.blocks;
import com.mojang.blaze3d.matrix.MatrixStack;
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityPlayerInterface; import de.ellpeck.actuallyadditions.mod.tile.TileEntityPlayerInterface;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil;
@ -67,8 +68,8 @@ public class BlockPlayerInterface extends BlockContainerBase implements IHudDisp
@Override @Override
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
public void displayHud(Minecraft minecraft, PlayerEntity player, ItemStack stack, RayTraceResult posHit, MainWindow resolution) { public void displayHud(MatrixStack matrices, Minecraft minecraft, PlayerEntity player, ItemStack stack, RayTraceResult rayCast, MainWindow resolution) {
TileEntity tile = minecraft.world.getTileEntity(posHit.getBlockPos()); TileEntity tile = minecraft.world.getTileEntity(rayCast.getBlockPos());
if (tile != null) { if (tile != null) {
if (tile instanceof TileEntityPlayerInterface) { if (tile instanceof TileEntityPlayerInterface) {
TileEntityPlayerInterface face = (TileEntityPlayerInterface) tile; TileEntityPlayerInterface face = (TileEntityPlayerInterface) tile;

View file

@ -10,6 +10,7 @@
package de.ellpeck.actuallyadditions.mod.blocks; package de.ellpeck.actuallyadditions.mod.blocks;
import com.mojang.blaze3d.matrix.MatrixStack;
import net.minecraft.client.MainWindow; import net.minecraft.client.MainWindow;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
@ -21,6 +22,6 @@ import net.minecraftforge.api.distmarker.OnlyIn;
public interface IHudDisplay { public interface IHudDisplay {
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
void displayHud(Minecraft minecraft, PlayerEntity player, ItemStack stack, RayTraceResult posHit, MainWindow resolution); void displayHud(MatrixStack matrices, Minecraft minecraft, PlayerEntity player, ItemStack stack, RayTraceResult rayCast, MainWindow resolution);
} }

View file

@ -10,20 +10,23 @@
package de.ellpeck.actuallyadditions.mod.blocks.render; package de.ellpeck.actuallyadditions.mod.blocks.render;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.platform.GlStateManager;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityDisplayStand; import de.ellpeck.actuallyadditions.mod.tile.TileEntityDisplayStand;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.IRenderTypeBuffer;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.client.renderer.tileentity.TileEntityRenderer;
import net.minecraft.item.ItemBlock; import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.fml.relauncher.OnlyIn;
@OnlyIn(Dist.CLIENT) public class RenderDisplayStand extends TileEntityRenderer<TileEntityDisplayStand> {
public class RenderDisplayStand extends TileEntitySpecialRenderer<TileEntityDisplayStand> {
public RenderDisplayStand(TileEntityRendererDispatcher rendererDispatcherIn) {
super(rendererDispatcherIn);
}
@Override @Override
public void render(TileEntityDisplayStand tile, double x, double y, double z, float par5, int par6, float f) { public void render(TileEntityDisplayStand tile, double x, double y, double z, float par5, int par6, float f) {
@ -53,4 +56,9 @@ public class RenderDisplayStand extends TileEntitySpecialRenderer<TileEntityDisp
GlStateManager.popMatrix(); GlStateManager.popMatrix();
} }
} }
@Override
public void render(TileEntityDisplayStand tileEntityIn, float partialTicks, MatrixStack matrixStackIn, IRenderTypeBuffer bufferIn, int combinedLightIn, int combinedOverlayIn) {
}
} }

View file

@ -10,6 +10,8 @@
package de.ellpeck.actuallyadditions.mod.blocks.render; package de.ellpeck.actuallyadditions.mod.blocks.render;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.platform.GlStateManager;
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
import de.ellpeck.actuallyadditions.api.recipe.EmpowererRecipe; import de.ellpeck.actuallyadditions.api.recipe.EmpowererRecipe;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
@ -17,17 +19,14 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityEmpowerer;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.IRenderTypeBuffer;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.client.renderer.tileentity.TileEntityRenderer;
import net.minecraft.item.ItemBlock; import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.Direction; import net.minecraft.util.Direction;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.fml.relauncher.OnlyIn;
@OnlyIn(Dist.CLIENT) public class RenderEmpowerer extends TileEntityRenderer<TileEntityEmpowerer> {
public class RenderEmpowerer extends TileEntitySpecialRenderer<TileEntityEmpowerer> {
@Override @Override
public void render(TileEntityEmpowerer tile, double x, double y, double z, float par5, int par6, float f) { public void render(TileEntityEmpowerer tile, double x, double y, double z, float par5, int par6, float f) {
@ -70,4 +69,13 @@ public class RenderEmpowerer extends TileEntitySpecialRenderer<TileEntityEmpower
} }
} }
} }
public RenderEmpowerer(TileEntityRendererDispatcher rendererDispatcherIn) {
super(rendererDispatcherIn);
}
@Override
public void render(TileEntityEmpowerer tileEntityIn, float partialTicks, MatrixStack matrixStackIn, IRenderTypeBuffer bufferIn, int combinedLightIn, int combinedOverlayIn) {
}
} }

View file

@ -10,6 +10,8 @@
package de.ellpeck.actuallyadditions.mod.blocks.render; package de.ellpeck.actuallyadditions.mod.blocks.render;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.platform.GlStateManager;
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
import de.ellpeck.actuallyadditions.api.laser.IConnectionPair; import de.ellpeck.actuallyadditions.api.laser.IConnectionPair;
import de.ellpeck.actuallyadditions.api.laser.LaserType; import de.ellpeck.actuallyadditions.api.laser.LaserType;
@ -22,17 +24,15 @@ import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import io.netty.util.internal.ConcurrentSet; import io.netty.util.internal.ConcurrentSet;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.IRenderTypeBuffer;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.client.renderer.tileentity.TileEntityRenderer;
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.fml.relauncher.OnlyIn;
@OnlyIn(Dist.CLIENT) public class RenderLaserRelay extends TileEntityRenderer<TileEntityLaserRelay> {
public class RenderLaserRelay extends TileEntitySpecialRenderer<TileEntityLaserRelay> {
private static final float[] COLOR = new float[]{1F, 0F, 0F}; private static final float[] COLOR = new float[]{1F, 0F, 0F};
private static final float[] COLOR_ITEM = new float[]{0F, 124F / 255F, 16F / 255F}; private static final float[] COLOR_ITEM = new float[]{0F, 124F / 255F, 16F / 255F};
@ -105,6 +105,15 @@ public class RenderLaserRelay extends TileEntitySpecialRenderer<TileEntityLaserR
} }
} }
public RenderLaserRelay(TileEntityRendererDispatcher rendererDispatcherIn) {
super(rendererDispatcherIn);
}
@Override
public void render(TileEntityLaserRelay tileEntityIn, float partialTicks, MatrixStack matrixStackIn, IRenderTypeBuffer bufferIn, int combinedLightIn, int combinedOverlayIn) {
}
@Override @Override
public boolean isGlobalRenderer(TileEntityLaserRelay tile) { public boolean isGlobalRenderer(TileEntityLaserRelay tile) {
return true; return true;

View file

@ -10,18 +10,28 @@
package de.ellpeck.actuallyadditions.mod.blocks.render; package de.ellpeck.actuallyadditions.mod.blocks.render;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.platform.GlStateManager;
import de.ellpeck.actuallyadditions.api.lens.ILensItem; import de.ellpeck.actuallyadditions.api.lens.ILensItem;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityAtomicReconstructor; import de.ellpeck.actuallyadditions.mod.tile.TileEntityAtomicReconstructor;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.block.BlockState;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.client.renderer.IRenderTypeBuffer;
import net.minecraft.client.renderer.tileentity.TileEntityRenderer;
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.fml.relauncher.OnlyIn;
@OnlyIn(Dist.CLIENT) public class RenderReconstructorLens extends TileEntityRenderer<TileEntityAtomicReconstructor> {
public class RenderReconstructorLens extends TileEntitySpecialRenderer<TileEntityAtomicReconstructor> {
public RenderReconstructorLens(TileEntityRendererDispatcher rendererDispatcherIn) {
super(rendererDispatcherIn);
}
@Override
public void render(TileEntityAtomicReconstructor tileEntityIn, float partialTicks, MatrixStack matrixStackIn, IRenderTypeBuffer bufferIn, int combinedLightIn, int combinedOverlayIn) {
}
@Override @Override
public void render(TileEntityAtomicReconstructor tile, double x, double y, double z, float par5, int par6, float f) { public void render(TileEntityAtomicReconstructor tile, double x, double y, double z, float par5, int par6, float f) {

View file

@ -36,7 +36,6 @@ import de.ellpeck.actuallyadditions.mod.items.InitItems;
import de.ellpeck.actuallyadditions.mod.items.ItemWingsOfTheBats; import de.ellpeck.actuallyadditions.mod.items.ItemWingsOfTheBats;
import de.ellpeck.actuallyadditions.mod.items.lens.LensDisenchanting; import de.ellpeck.actuallyadditions.mod.items.lens.LensDisenchanting;
import de.ellpeck.actuallyadditions.mod.items.lens.LensRecipeHandler; import de.ellpeck.actuallyadditions.mod.items.lens.LensRecipeHandler;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheCrystals;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheFoods; import de.ellpeck.actuallyadditions.mod.items.metalists.TheFoods;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems; import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems;
import de.ellpeck.actuallyadditions.mod.recipe.EmpowererHandler; import de.ellpeck.actuallyadditions.mod.recipe.EmpowererHandler;
@ -61,7 +60,7 @@ public final class InitBooklet {
public static BookletChapter[] chaptersIntroduction = new BookletChapter[11]; public static BookletChapter[] chaptersIntroduction = new BookletChapter[11];
public static void preInit() { public static void init() {
ActuallyAdditionsAPI.entryAllAndSearch = new BookletEntryAllItems("allAndSearch").setImportant(); ActuallyAdditionsAPI.entryAllAndSearch = new BookletEntryAllItems("allAndSearch").setImportant();
ActuallyAdditionsAPI.entryTrials = new BookletEntryTrials("trials"); ActuallyAdditionsAPI.entryTrials = new BookletEntryTrials("trials");
@ -75,9 +74,7 @@ public final class InitBooklet {
ActuallyAdditionsAPI.entryItemsRF = new BookletEntry("itemsRF"); ActuallyAdditionsAPI.entryItemsRF = new BookletEntry("itemsRF");
ActuallyAdditionsAPI.entryMisc = new BookletEntry("misc"); ActuallyAdditionsAPI.entryMisc = new BookletEntry("misc");
ActuallyAdditionsAPI.entryUpdatesAndInfos = new BookletEntry("updatesAndInfos").setSpecial(); ActuallyAdditionsAPI.entryUpdatesAndInfos = new BookletEntry("updatesAndInfos").setSpecial();
}
public static void postInit() {
initChapters(); initChapters();
int chapCount = 0; int chapCount = 0;
@ -129,9 +126,9 @@ public final class InitBooklet {
private static void initChapters() { private static void initChapters() {
//Getting Started //Getting Started
chaptersIntroduction[0] = new BookletChapter("bookTutorial", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitItems.itemBooklet), new PageTextOnly(1), new PageTextOnly(2), new PageTextOnly(3), new PageCrafting(4, ItemCrafting.recipeBook).setNoText()); chaptersIntroduction[0] = new BookletChapter("bookTutorial", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitItems.itemBooklet.get()), new PageTextOnly(1), new PageTextOnly(2), new PageTextOnly(3), new PageCrafting(4, ItemCrafting.recipeBook).setNoText());
chaptersIntroduction[1] = new BookletChapter("videoGuide", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.YOUTUBE_ICON.ordinal()), new PageLinkButton(1, "https://www.youtube.com/watch?v=fhjz0Ew56pM"), new PageLinkButton(2, "https://www.youtube.com/playlist?list=PLJeFZ64pT89MrTRZYzD_rtHFajPVlt6cF")).setImportant(); chaptersIntroduction[1] = new BookletChapter("videoGuide", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitItems.itemMisc.get(), 1, TheMiscItems.YOUTUBE_ICON.ordinal()), new PageLinkButton(1, "https://www.youtube.com/watch?v=fhjz0Ew56pM"), new PageLinkButton(2, "https://www.youtube.com/playlist?list=PLJeFZ64pT89MrTRZYzD_rtHFajPVlt6cF")).setImportant();
new BookletChapter("intro", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitItems.itemBooklet), new PageTextOnly(1), new PageTextOnly(2), new PageTextOnly(3)); new BookletChapter("intro", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitItems.itemBooklet.get()), new PageTextOnly(1), new PageTextOnly(2), new PageTextOnly(3));
ArrayList<BookletPage> crystalPages = new ArrayList<>(); ArrayList<BookletPage> crystalPages = new ArrayList<>();
crystalPages.addAll(Arrays.asList(new PageTextOnly(1).addTextReplacement("<rf>", TileEntityAtomicReconstructor.ENERGY_USE), new PageTextOnly(2), new PageTextOnly(3), new PagePicture(4, "page_atomic_reconstructor", 0).setNoText(), new PageTextOnly(5), new PageCrafting(6, BlockCrafting.recipeAtomicReconstructor).setWildcard())); crystalPages.addAll(Arrays.asList(new PageTextOnly(1).addTextReplacement("<rf>", TileEntityAtomicReconstructor.ENERGY_USE), new PageTextOnly(2), new PageTextOnly(3), new PagePicture(4, "page_atomic_reconstructor", 0).setNoText(), new PageTextOnly(5), new PageCrafting(6, BlockCrafting.recipeAtomicReconstructor).setWildcard()));
for (int i = 0; i < LensRecipeHandler.MAIN_PAGE_RECIPES.size(); i++) { for (int i = 0; i < LensRecipeHandler.MAIN_PAGE_RECIPES.size(); i++) {
@ -150,18 +147,18 @@ public final class InitBooklet {
empowererPages.add(new PageCrafting(empowererPages.size() + 1, MiscCrafting.RECIPES_EMPOWERED_CRYSTALS).setNoText()); empowererPages.add(new PageCrafting(empowererPages.size() + 1, MiscCrafting.RECIPES_EMPOWERED_CRYSTALS).setNoText());
empowererPages.add(new PageCrafting(empowererPages.size() + 1, MiscCrafting.RECIPES_EMPOWERED_CRYSTAL_BLOCKS).setNoText()); empowererPages.add(new PageCrafting(empowererPages.size() + 1, MiscCrafting.RECIPES_EMPOWERED_CRYSTAL_BLOCKS).setNoText());
new BookletChapter("empowerer", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitBlocks.blockEmpowerer.get()), empowererPages.toArray(new BookletPage[empowererPages.size()])).setSpecial(); new BookletChapter("empowerer", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitBlocks.blockEmpowerer.get()), empowererPages.toArray(new BookletPage[empowererPages.size()])).setSpecial();
new BookletChapter("craftingIngs", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeCoil).setNoText(), new PageCrafting(3, ItemCrafting.recipeCoilAdvanced).setNoText(), new PageCrafting(4, BlockCrafting.recipeCase).setNoText(), new PageCrafting(5, BlockCrafting.recipeEnderPearlBlock).setNoText(), new PageCrafting(6, BlockCrafting.recipeEnderCase).setNoText(), new PageCrafting(7, ItemCrafting.recipeRing).setNoText(), new PageCrafting(8, ItemCrafting.recipeKnifeHandle).setNoText(), new PageCrafting(9, ItemCrafting.recipeKnifeBlade).setNoText(), new PageCrafting(10, ItemCrafting.recipeKnife).setNoText(), new PageCrafting(11, ItemCrafting.recipeDough).setNoText(), new PageCrafting(12, ItemCrafting.recipeRiceDough).setNoText(), new PageCrafting(13, BlockCrafting.recipeIronCase).setNoText(), new PageCrafting(14, ItemCrafting.recipeLens).setNoText()); new BookletChapter("craftingIngs", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitItems.itemMisc.get(), 1, TheMiscItems.COIL.ordinal()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeCoil).setNoText(), new PageCrafting(3, ItemCrafting.recipeCoilAdvanced).setNoText(), new PageCrafting(4, BlockCrafting.recipeCase).setNoText(), new PageCrafting(5, BlockCrafting.recipeEnderPearlBlock).setNoText(), new PageCrafting(6, BlockCrafting.recipeEnderCase).setNoText(), new PageCrafting(7, ItemCrafting.recipeRing).setNoText(), new PageCrafting(8, ItemCrafting.recipeKnifeHandle).setNoText(), new PageCrafting(9, ItemCrafting.recipeKnifeBlade).setNoText(), new PageCrafting(10, ItemCrafting.recipeKnife).setNoText(), new PageCrafting(11, ItemCrafting.recipeDough).setNoText(), new PageCrafting(12, ItemCrafting.recipeRiceDough).setNoText(), new PageCrafting(13, BlockCrafting.recipeIronCase).setNoText(), new PageCrafting(14, ItemCrafting.recipeLens).setNoText());
chaptersIntroduction[4] = new BookletChapter("rf", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(Items.REDSTONE), new PageTextOnly(1), new PageTextOnly(2)).setImportant(); chaptersIntroduction[4] = new BookletChapter("rf", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(Items.REDSTONE), new PageTextOnly(1), new PageTextOnly(2)).setImportant();
//Miscellaneous //Miscellaneous
new BookletChapter("worms", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitItems.itemWorm), new PageTextOnly(1).addItemsToPage(new ItemStack(InitItems.itemWorm)), new PagePicture(2, "page_worms", 145)).setImportant(); new BookletChapter("worms", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitItems.itemWorm.get()), new PageTextOnly(1).addItemsToPage(new ItemStack(InitItems.itemWorm.get())), new PagePicture(2, "page_worms", 145)).setImportant();
new BookletChapter("lushCaves", ActuallyAdditionsAPI.entryMisc, new ItemStack(Blocks.STONE), new PageTextOnly(1), new PagePicture(2, "page_lush_caves", 0).setNoText()); new BookletChapter("lushCaves", ActuallyAdditionsAPI.entryMisc, new ItemStack(Blocks.STONE), new PageTextOnly(1), new PagePicture(2, "page_lush_caves", 0).setNoText());
new BookletChapter("crystalClusters", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitBlocks.blockCrystalClusterEmerald), new PageTextOnly(1).addItemsToPage(WorldGenLushCaves.CRYSTAL_CLUSTERS), new PageCrafting(2, MiscCrafting.RECIPES_CRYSTAL_SHARDS).setNoText(), new PageCrafting(3, MiscCrafting.RECIPES_CRYSTAL_SHARDS_BACK).setNoText()).setSpecial(); new BookletChapter("crystalClusters", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitBlocks.blockCrystalClusterEmerald), new PageTextOnly(1).addItemsToPage(WorldGenLushCaves.CRYSTAL_CLUSTERS), new PageCrafting(2, MiscCrafting.RECIPES_CRYSTAL_SHARDS).setNoText(), new PageCrafting(3, MiscCrafting.RECIPES_CRYSTAL_SHARDS_BACK).setNoText()).setSpecial();
new BookletChapter("banners", ActuallyAdditionsAPI.entryMisc, new ItemStack(Items.BLUE_BANNER, 1), new PageTextOnly(1)); new BookletChapter("banners", ActuallyAdditionsAPI.entryMisc, new ItemStack(Items.BLUE_BANNER, 1), new PageTextOnly(1));
new BookletChapter("miscDecorStuffsAndThings", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitBlocks.blockTestifiBucksGreenWall), new PageTextOnly(1), new PageReconstructor(2, LensRecipeHandler.recipeWhiteWall).setNoText(), new PageReconstructor(3, LensRecipeHandler.recipeGreenWall).setNoText()); new BookletChapter("miscDecorStuffsAndThings", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitBlocks.blockTestifiBucksGreenWall), new PageTextOnly(1), new PageReconstructor(2, LensRecipeHandler.recipeWhiteWall).setNoText(), new PageReconstructor(3, LensRecipeHandler.recipeGreenWall).setNoText());
chaptersIntroduction[3] = new BookletChapter("quartz", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), new PageTextOnly(1).addItemsToPage(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ORE_QUARTZ.ordinal())).addTextReplacement("<lowest>", AAWorldGen.QUARTZ_MIN).addTextReplacement("<highest>", AAWorldGen.QUARTZ_MAX), new PageTextOnly(2).addItemsToPage(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal())), new PageCrafting(3, BlockCrafting.recipeQuartzBlock).setNoText(), new PageCrafting(4, BlockCrafting.recipeQuartzPillar).setNoText(), new PageCrafting(5, BlockCrafting.recipeQuartzChiseled).setNoText()); chaptersIntroduction[3] = new BookletChapter("quartz", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitItems.itemMisc.get(), 1, TheMiscItems.QUARTZ.ordinal()), new PageTextOnly(1).addItemsToPage(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ORE_QUARTZ.ordinal())).addTextReplacement("<lowest>", AAWorldGen.QUARTZ_MIN).addTextReplacement("<highest>", AAWorldGen.QUARTZ_MAX), new PageTextOnly(2).addItemsToPage(new ItemStack(InitItems.itemMisc.get(), 1, TheMiscItems.QUARTZ.ordinal())), new PageCrafting(3, BlockCrafting.recipeQuartzBlock).setNoText(), new PageCrafting(4, BlockCrafting.recipeQuartzPillar).setNoText(), new PageCrafting(5, BlockCrafting.recipeQuartzChiseled).setNoText());
new BookletChapter("cloud", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitBlocks.blockSmileyCloud), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeSmileyCloud).setWildcard()).setSpecial(); new BookletChapter("cloud", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitBlocks.blockSmileyCloud), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeSmileyCloud).setWildcard()).setSpecial();
new BookletChapter("coalStuff", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.TINY_COAL.ordinal()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeTinyCoal).setNoText(), new PageCrafting(3, ItemCrafting.recipeTinyChar).setNoText(), new PageCrafting(4, BlockCrafting.recipeBlockChar).setNoText()); new BookletChapter("coalStuff", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitItems.itemMisc.get(), 1, TheMiscItems.TINY_COAL.ordinal()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeTinyCoal).setNoText(), new PageCrafting(3, ItemCrafting.recipeTinyChar).setNoText(), new PageCrafting(4, BlockCrafting.recipeBlockChar).setNoText());
ArrayList<BookletPage> lampPages = new ArrayList<>(); ArrayList<BookletPage> lampPages = new ArrayList<>();
lampPages.add(new PageTextOnly(lampPages.size() + 1)); lampPages.add(new PageTextOnly(lampPages.size() + 1));
lampPages.add(new PageTextOnly(lampPages.size() + 1)); lampPages.add(new PageTextOnly(lampPages.size() + 1));
@ -170,35 +167,35 @@ public final class InitBooklet {
lampPages.add(new PageCrafting(lampPages.size() + 1, recipe).setNoText()); lampPages.add(new PageCrafting(lampPages.size() + 1, recipe).setNoText());
} }
new BookletChapter("lamps", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitBlocks.blockColoredLampOn.get(), 1, TheColoredLampColors.GREEN.ordinal()), lampPages.toArray(new BookletPage[lampPages.size()])); new BookletChapter("lamps", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitBlocks.blockColoredLampOn.get(), 1, TheColoredLampColors.GREEN.ordinal()), lampPages.toArray(new BookletPage[lampPages.size()]));
new BookletChapter("enderStar", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.ENDER_STAR.ordinal()), new PageCrafting(1, ItemCrafting.recipeEnderStar)); new BookletChapter("enderStar", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitItems.itemMisc.get(), 1, TheMiscItems.ENDER_STAR.ordinal()), new PageCrafting(1, ItemCrafting.recipeEnderStar));
new BookletChapter("spawnerShard", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.SPAWNER_SHARD.ordinal()), new PageTextOnly(1).addItemsToPage(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.SPAWNER_SHARD.ordinal()))); new BookletChapter("spawnerShard", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitItems.itemMisc.get(), 1, TheMiscItems.SPAWNER_SHARD.ordinal()), new PageTextOnly(1).addItemsToPage(new ItemStack(InitItems.itemMisc.get(), 1, TheMiscItems.SPAWNER_SHARD.ordinal())));
// new BookletChapter("treasureChest", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitBlocks.blockTreasureChest.get()), new PagePicture(1, "page_treasure_chest", 150).addItemsToPage(new ItemStack(InitBlocks.blockTreasureChest.get())), new PageTextOnly(2)).setSpecial(); // new BookletChapter("treasureChest", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitBlocks.blockTreasureChest.get()), new PagePicture(1, "page_treasure_chest", 150).addItemsToPage(new ItemStack(InitBlocks.blockTreasureChest.get())), new PageTextOnly(2)).setSpecial();
new BookletChapter("hairBalls", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitItems.itemHairyBall), new PagePicture(1, "page_fur_balls", 110).addItemsToPage(new ItemStack(InitItems.itemHairyBall)), new PageTextOnly(2)).setSpecial(); new BookletChapter("hairBalls", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitItems.itemHairyBall.get()), new PagePicture(1, "page_fur_balls", 110).addItemsToPage(new ItemStack(InitItems.itemHairyBall.get())), new PageTextOnly(2)).setSpecial();
new BookletChapter("blackLotus", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitBlocks.blockBlackLotus.get()), new PageTextOnly(1).addItemsToPage(new ItemStack(InitBlocks.blockBlackLotus.get())), new PageCrafting(2, ItemCrafting.recipeBlackDye)); new BookletChapter("blackLotus", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitBlocks.blockBlackLotus.get()), new PageTextOnly(1).addItemsToPage(new ItemStack(InitBlocks.blockBlackLotus.get())), new PageCrafting(2, ItemCrafting.recipeBlackDye));
new BookletChapter("waterBowl", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitItems.itemWaterBowl), new PageTextOnly(1).addItemsToPage(new ItemStack(InitItems.itemWaterBowl))); new BookletChapter("waterBowl", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitItems.itemWaterBowl.get()), new PageTextOnly(1).addItemsToPage(new ItemStack(InitItems.itemWaterBowl.get())));
new BookletChapter("tinyTorch", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitBlocks.blockTinyTorch.get()), new PageCrafting(1, BlockCrafting.recipesTinyTorch).setWildcard()).setSpecial(); new BookletChapter("tinyTorch", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitBlocks.blockTinyTorch.get()), new PageCrafting(1, BlockCrafting.recipesTinyTorch).setWildcard()).setSpecial();
//Reconstruction //Reconstruction
chaptersIntroduction[7] = new BookletChapter("reconstructorLenses", ActuallyAdditionsAPI.entryReconstruction, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.LENS.ordinal()), new PageTextOnly(1)).setImportant(); chaptersIntroduction[7] = new BookletChapter("reconstructorLenses", ActuallyAdditionsAPI.entryReconstruction, new ItemStack(InitItems.itemMisc.get(), 1, TheMiscItems.LENS.ordinal()), new PageTextOnly(1)).setImportant();
new BookletChapter("additionalRecipes", ActuallyAdditionsAPI.entryReconstruction, new ItemStack(Items.LEATHER), new PageReconstructor(1, LensRecipeHandler.recipeSoulSand).setNoText(), new PageReconstructor(2, LensRecipeHandler.recipeLeather).setNoText(), new PageReconstructor(3, LensRecipeHandler.recipeNetherWart).setNoText(), new PageReconstructor(4, LensRecipeHandler.recipePrismarine).setNoText()).setSpecial(); new BookletChapter("additionalRecipes", ActuallyAdditionsAPI.entryReconstruction, new ItemStack(Items.LEATHER), new PageReconstructor(1, LensRecipeHandler.recipeSoulSand).setNoText(), new PageReconstructor(2, LensRecipeHandler.recipeLeather).setNoText(), new PageReconstructor(3, LensRecipeHandler.recipeNetherWart).setNoText(), new PageReconstructor(4, LensRecipeHandler.recipePrismarine).setNoText()).setSpecial();
new BookletChapter("bookSplitting", ActuallyAdditionsAPI.entryReconstruction, new ItemStack(Items.ENCHANTED_BOOK), new PageTextOnly(1), new PageReconstructor(2, new LensConversionRecipe(Ingredient.fromItem(Items.ENCHANTED_BOOK), new ItemStack(Items.ENCHANTED_BOOK), 0, ActuallyAdditionsAPI.lensDefaultConversion)).setNoText()); new BookletChapter("bookSplitting", ActuallyAdditionsAPI.entryReconstruction, new ItemStack(Items.ENCHANTED_BOOK), new PageTextOnly(1), new PageReconstructor(2, new LensConversionRecipe(Ingredient.fromItem(Items.ENCHANTED_BOOK), new ItemStack(Items.ENCHANTED_BOOK), 0, ActuallyAdditionsAPI.lensDefaultConversion)).setNoText());
new BookletChapter("lensColor", ActuallyAdditionsAPI.entryReconstruction, new ItemStack(InitItems.itemColorLens), new PageTextOnly(1), new PageReconstructor(2, LensRecipeHandler.recipeColorLens).setNoText()); new BookletChapter("lensColor", ActuallyAdditionsAPI.entryReconstruction, new ItemStack(InitItems.itemColorLens.get()), new PageTextOnly(1), new PageReconstructor(2, LensRecipeHandler.recipeColorLens).setNoText());
new BookletChapter("lensDeath", ActuallyAdditionsAPI.entryReconstruction, new ItemStack(InitItems.itemDamageLens), new PageTextOnly(1), new PageReconstructor(2, LensRecipeHandler.recipeDamageLens).setNoText()); new BookletChapter("lensDeath", ActuallyAdditionsAPI.entryReconstruction, new ItemStack(InitItems.itemDamageLens.get()), new PageTextOnly(1), new PageReconstructor(2, LensRecipeHandler.recipeDamageLens).setNoText());
new BookletChapter("lensMoreDeath", ActuallyAdditionsAPI.entryReconstruction, new ItemStack(InitItems.itemMoreDamageLens), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeLensMoreDeath).setNoText()); new BookletChapter("lensMoreDeath", ActuallyAdditionsAPI.entryReconstruction, new ItemStack(InitItems.itemMoreDamageLens.get()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeLensMoreDeath).setNoText());
new BookletChapter("lensDetonation", ActuallyAdditionsAPI.entryReconstruction, new ItemStack(InitItems.itemExplosionLens), new PageTextOnly(1), new PageReconstructor(2, LensRecipeHandler.recipeExplosionLens).setNoText()); new BookletChapter("lensDetonation", ActuallyAdditionsAPI.entryReconstruction, new ItemStack(InitItems.itemExplosionLens.get()), new PageTextOnly(1), new PageReconstructor(2, LensRecipeHandler.recipeExplosionLens).setNoText());
new BookletChapter("lensDisenchanting", ActuallyAdditionsAPI.entryReconstruction, new ItemStack(InitItems.itemDisenchantingLens), new PageTextOnly(1).addTextReplacement("<energy>", LensDisenchanting.ENERGY_USE), new PageCrafting(2, ItemCrafting.recipeDisenchantingLens).setNoText()).setSpecial(); new BookletChapter("lensDisenchanting", ActuallyAdditionsAPI.entryReconstruction, new ItemStack(InitItems.itemDisenchantingLens.get()), new PageTextOnly(1).addTextReplacement("<energy>", LensDisenchanting.ENERGY_USE), new PageCrafting(2, ItemCrafting.recipeDisenchantingLens).setNoText()).setSpecial();
new BookletChapter("lensMining", ActuallyAdditionsAPI.entryReconstruction, new ItemStack(InitItems.itemMiningLens), new PageTextOnly(1).addTextReplacement("<energy>", ConfigIntValues.MINING_LENS_USE.getValue()), new PageCrafting(2, ItemCrafting.recipeMiningLens).setNoText()).setImportant(); new BookletChapter("lensMining", ActuallyAdditionsAPI.entryReconstruction, new ItemStack(InitItems.itemMiningLens.get()), new PageTextOnly(1).addTextReplacement("<energy>", ConfigIntValues.MINING_LENS_USE.getValue()), new PageCrafting(2, ItemCrafting.recipeMiningLens).setNoText()).setImportant();
//Laser Relays //Laser Relays
chaptersIntroduction[8] = new BookletChapter("laserIntro", ActuallyAdditionsAPI.entryLaserRelays, new ItemStack(InitItems.itemLaserWrench), new PageTextOnly(1), new PageTextOnly(2).addTextReplacement("<range>", TileEntityLaserRelay.MAX_DISTANCE), new PageCrafting(3, ItemCrafting.recipeLaserWrench)).setImportant(); chaptersIntroduction[8] = new BookletChapter("laserIntro", ActuallyAdditionsAPI.entryLaserRelays, new ItemStack(InitItems.itemLaserWrench.get()), new PageTextOnly(1), new PageTextOnly(2).addTextReplacement("<range>", TileEntityLaserRelay.MAX_DISTANCE), new PageCrafting(3, ItemCrafting.recipeLaserWrench)).setImportant();
new BookletChapter("laserRelays", ActuallyAdditionsAPI.entryLaserRelays, new ItemStack(InitBlocks.blockLaserRelay.get()), new PageTextOnly(1), new PageTextOnly(2).addTextReplacement("<cap1>", TileEntityLaserRelayEnergy.CAP).addTextReplacement("<cap2>", TileEntityLaserRelayEnergyAdvanced.CAP).addTextReplacement("<cap3>", TileEntityLaserRelayEnergyExtreme.CAP), new PagePicture(3, "page_laser_relay", 0).setNoText(), new PageCrafting(4, BlockCrafting.recipeLaserRelay).setWildcard().setNoText(), new PageCrafting(5, BlockCrafting.recipeLaserRelayAdvanced).setWildcard().setNoText(), new PageCrafting(6, BlockCrafting.recipeLaserRelayExtreme).setWildcard().setNoText()); new BookletChapter("laserRelays", ActuallyAdditionsAPI.entryLaserRelays, new ItemStack(InitBlocks.blockLaserRelay.get()), new PageTextOnly(1), new PageTextOnly(2).addTextReplacement("<cap1>", TileEntityLaserRelayEnergy.CAP).addTextReplacement("<cap2>", TileEntityLaserRelayEnergyAdvanced.CAP).addTextReplacement("<cap3>", TileEntityLaserRelayEnergyExtreme.CAP), new PagePicture(3, "page_laser_relay", 0).setNoText(), new PageCrafting(4, BlockCrafting.recipeLaserRelay).setWildcard().setNoText(), new PageCrafting(5, BlockCrafting.recipeLaserRelayAdvanced).setWildcard().setNoText(), new PageCrafting(6, BlockCrafting.recipeLaserRelayExtreme).setWildcard().setNoText());
new BookletChapter("fluidLaser", ActuallyAdditionsAPI.entryLaserRelays, new ItemStack(InitBlocks.blockLaserRelayFluids.get()), new PageTextOnly(1), new PageReconstructor(2, LensRecipeHandler.recipeFluidLaser).setWildcard().setNoText()); new BookletChapter("fluidLaser", ActuallyAdditionsAPI.entryLaserRelays, new ItemStack(InitBlocks.blockLaserRelayFluids.get()), new PageTextOnly(1), new PageReconstructor(2, LensRecipeHandler.recipeFluidLaser).setWildcard().setNoText());
new BookletChapter("itemRelays", ActuallyAdditionsAPI.entryLaserRelays, new ItemStack(InitBlocks.blockLaserRelayItem.get()), new PageTextOnly(1), new PageReconstructor(2, LensRecipeHandler.recipeItemLaser).setWildcard().setNoText()).setSpecial(); new BookletChapter("itemRelays", ActuallyAdditionsAPI.entryLaserRelays, new ItemStack(InitBlocks.blockLaserRelayItem.get()), new PageTextOnly(1), new PageReconstructor(2, LensRecipeHandler.recipeItemLaser).setWildcard().setNoText()).setSpecial();
new BookletChapter("itemInterfaces", ActuallyAdditionsAPI.entryLaserRelays, new ItemStack(InitBlocks.blockItemViewer.get()), new PageTextOnly(1), new PageTextOnly(2), new PageCrafting(3, BlockCrafting.recipeItemInterface).setNoText()); new BookletChapter("itemInterfaces", ActuallyAdditionsAPI.entryLaserRelays, new ItemStack(InitBlocks.blockItemViewer.get()), new PageTextOnly(1), new PageTextOnly(2), new PageCrafting(3, BlockCrafting.recipeItemInterface).setNoText());
new BookletChapter("itemRelaysAdvanced", ActuallyAdditionsAPI.entryLaserRelays, new ItemStack(InitBlocks.blockLaserRelayItemWhitelist.get()), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeLaserRelayItemWhitelist).setWildcard()); new BookletChapter("itemRelaysAdvanced", ActuallyAdditionsAPI.entryLaserRelays, new ItemStack(InitBlocks.blockLaserRelayItemWhitelist.get()), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeLaserRelayItemWhitelist).setWildcard());
new BookletChapter("itemInterfacesHopping", ActuallyAdditionsAPI.entryLaserRelays, new ItemStack(InitBlocks.blockItemViewerHopping.get()), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeItemInterfaceHopping).setWildcard().setNoText()); new BookletChapter("itemInterfacesHopping", ActuallyAdditionsAPI.entryLaserRelays, new ItemStack(InitBlocks.blockItemViewerHopping.get()), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeItemInterfaceHopping).setWildcard().setNoText());
new BookletChapter("laserUpgradeInvisibility", ActuallyAdditionsAPI.entryLaserRelays, new ItemStack(InitItems.itemLaserUpgradeInvisibility), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeLaserUpgradeInvisibility).setNoText()).setImportant(); new BookletChapter("laserUpgradeInvisibility", ActuallyAdditionsAPI.entryLaserRelays, new ItemStack(InitItems.itemLaserUpgradeInvisibility.get()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeLaserUpgradeInvisibility).setNoText()).setImportant();
new BookletChapter("laserUpgradeRange", ActuallyAdditionsAPI.entryLaserRelays, new ItemStack(InitItems.itemLaserUpgradeRange), new PageTextOnly(1).addTextReplacement("<def>", TileEntityLaserRelay.MAX_DISTANCE).addTextReplacement("<upgraded>", TileEntityLaserRelay.MAX_DISTANCE_RANGED), new PageCrafting(2, ItemCrafting.recipeLaserUpgradeRange).setNoText()).setImportant(); new BookletChapter("laserUpgradeRange", ActuallyAdditionsAPI.entryLaserRelays, new ItemStack(InitItems.itemLaserUpgradeRange.get()), new PageTextOnly(1).addTextReplacement("<def>", TileEntityLaserRelay.MAX_DISTANCE).addTextReplacement("<upgraded>", TileEntityLaserRelay.MAX_DISTANCE_RANGED), new PageCrafting(2, ItemCrafting.recipeLaserUpgradeRange).setNoText()).setImportant();
//No RF Using Blocks //No RF Using Blocks
new BookletChapter("breaker", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockBreaker.get()), new PageCrafting(1, BlockCrafting.recipeBreaker).setWildcard(), new PageCrafting(2, BlockCrafting.recipePlacer).setWildcard(), new PageCrafting(3, BlockCrafting.recipeLiquidPlacer).setWildcard(), new PageCrafting(4, BlockCrafting.recipeLiquidCollector).setWildcard()); new BookletChapter("breaker", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockBreaker.get()), new PageCrafting(1, BlockCrafting.recipeBreaker).setWildcard(), new PageCrafting(2, BlockCrafting.recipePlacer).setWildcard(), new PageCrafting(3, BlockCrafting.recipeLiquidPlacer).setWildcard(), new PageCrafting(4, BlockCrafting.recipeLiquidCollector).setWildcard());
@ -207,20 +204,20 @@ public final class InitBooklet {
new BookletChapter("phantomRedstoneface", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockPhantomRedstoneface.get()), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipePhantomRedstoneface).setNoText()); new BookletChapter("phantomRedstoneface", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockPhantomRedstoneface.get()), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipePhantomRedstoneface).setNoText());
new BookletChapter("phantomBreaker", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockPhantomBreaker.get()), new PageTextOnly(1).addTextReplacement("<range>", TileEntityPhantomPlacer.RANGE), new PageCrafting(2, BlockCrafting.recipePhantomPlacer).setNoText(), new PageCrafting(3, BlockCrafting.recipePhantomBreaker).setNoText()); new BookletChapter("phantomBreaker", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockPhantomBreaker.get()), new PageTextOnly(1).addTextReplacement("<range>", TileEntityPhantomPlacer.RANGE), new PageCrafting(2, BlockCrafting.recipePhantomPlacer).setNoText(), new PageCrafting(3, BlockCrafting.recipePhantomBreaker).setNoText());
new BookletChapter("esd", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockInputterAdvanced.get()), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeESD).setNoText(), new PageCrafting(3, BlockCrafting.recipeAdvancedESD).setNoText()).setSpecial(); new BookletChapter("esd", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockInputterAdvanced.get()), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeESD).setNoText(), new PageCrafting(3, BlockCrafting.recipeAdvancedESD).setNoText()).setSpecial();
new BookletChapter("xpSolidifier", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockXPSolidifier.get()), new PageTextOnly(1).addItemsToPage(new ItemStack(InitItems.itemSolidifiedExperience)), new PageCrafting(2, BlockCrafting.recipeSolidifier).setNoText()).setImportant(); new BookletChapter("xpSolidifier", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockXPSolidifier.get()), new PageTextOnly(1).addItemsToPage(new ItemStack(InitItems.itemSolidifiedExperience.get())), new PageCrafting(2, BlockCrafting.recipeSolidifier).setNoText()).setImportant();
new BookletChapter("greenhouseGlass", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockGreenhouseGlass.get()), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeGlass)); new BookletChapter("greenhouseGlass", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockGreenhouseGlass.get()), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeGlass));
new BookletChapter("fishingNet", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockFishingNet.get()), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeFisher).setNoText()); new BookletChapter("fishingNet", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockFishingNet.get()), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeFisher).setNoText());
new BookletChapter("feeder", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockFeeder.get()), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeFeeder).setNoText()); new BookletChapter("feeder", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockFeeder.get()), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeFeeder).setNoText());
new BookletChapter("compost", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockCompost.get()), new PageTextOnly(1).addItemsToPage(new ItemStack(InitItems.itemFertilizer)), new PageCrafting(2, BlockCrafting.recipeCompost).setNoText(), new PageTextOnly(3).addItemsToPage(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.MASHED_FOOD.ordinal()))); new BookletChapter("compost", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockCompost.get()), new PageTextOnly(1).addItemsToPage(new ItemStack(InitItems.itemFertilizer.get())), new PageCrafting(2, BlockCrafting.recipeCompost).setNoText(), new PageTextOnly(3).addItemsToPage(new ItemStack(InitItems.itemMisc.get(), 1, TheMiscItems.MASHED_FOOD.ordinal())));
new BookletChapter("crate", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockGiantChest.get()), new PageCrafting(1, BlockCrafting.recipeCrate), new PageCrafting(2, BlockCrafting.recipeCrateMedium).setNoText(), new PageCrafting(3, BlockCrafting.recipeCrateLarge).setNoText(), new PageCrafting(4, ItemCrafting.recipeCrateKeeper), new PageCrafting(5, ItemCrafting.recipeChestToCrateUpgrade), new PageCrafting(6, ItemCrafting.recipeSmallToMediumCrateUpgrade), new PageCrafting(7, ItemCrafting.recipeMediumToLargeCrateUpgrade)); new BookletChapter("crate", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockGiantChest.get()), new PageCrafting(1, BlockCrafting.recipeCrate), new PageCrafting(2, BlockCrafting.recipeCrateMedium).setNoText(), new PageCrafting(3, BlockCrafting.recipeCrateLarge).setNoText(), new PageCrafting(4, ItemCrafting.recipeCrateKeeper), new PageCrafting(5, ItemCrafting.recipeChestToCrateUpgrade), new PageCrafting(6, ItemCrafting.recipeSmallToMediumCrateUpgrade), new PageCrafting(7, ItemCrafting.recipeMediumToLargeCrateUpgrade));
new BookletChapter("rangedCollector", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockRangedCollector.get()), new PageTextOnly(1).addTextReplacement("<range>", TileEntityRangedCollector.RANGE), new PageCrafting(2, BlockCrafting.recipeRangedCollector).setNoText()); new BookletChapter("rangedCollector", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockRangedCollector.get()), new PageTextOnly(1).addTextReplacement("<range>", TileEntityRangedCollector.RANGE), new PageCrafting(2, BlockCrafting.recipeRangedCollector).setNoText());
//RF Using Blocks //RF Using Blocks
new BookletChapter("fireworkBox", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(InitBlocks.blockFireworkBox.get()), new PageTextOnly(1).addTextReplacement("<rf>", TileEntityFireworkBox.USE_PER_SHOT), new PageCrafting(2, BlockCrafting.recipeFireworkBox)).setSpecial(); new BookletChapter("fireworkBox", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(InitBlocks.blockFireworkBox.get()), new PageTextOnly(1).addTextReplacement("<rf>", TileEntityFireworkBox.USE_PER_SHOT), new PageCrafting(2, BlockCrafting.recipeFireworkBox)).setSpecial();
new BookletChapter("batteryBox", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(InitBlocks.blockBatteryBox.get()), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeBatteryBox).setNoText()).setSpecial(); new BookletChapter("batteryBox", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(InitBlocks.blockBatteryBox.get()), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeBatteryBox).setNoText()).setSpecial();
new BookletChapter("farmer", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(InitBlocks.blockFarmer.get()), new PageTextOnly(1), new PagePicture(2, "page_farmer_crops", 95).addItemsToPage(new ItemStack(Items.WHEAT_SEEDS)).addItemsToPage(new ItemStack(InitItems.itemCanolaSeed)), new PagePicture(3, "page_farmer_cactus", 105).addItemsToPage(new ItemStack(Blocks.CACTUS)), new PagePicture(4, "page_farmer_wart", 95).addItemsToPage(new ItemStack(Items.NETHER_WART)), new PagePicture(5, "page_farmer_reeds", 105).addItemsToPage(new ItemStack(Items.REEDS)), new PagePicture(6, "page_farmer_melons", 105).addItemsToPage(new ItemStack(Items.MELON), new ItemStack(Blocks.PUMPKIN), new ItemStack(Blocks.MELON_BLOCK)), new PagePicture(7, "page_farmer_enderlilly", 105), new PagePicture(8, "page_farmer_redorchid", 105), new PageCrafting(4, BlockCrafting.recipeFarmer).setWildcard().setNoText()).setImportant(); new BookletChapter("farmer", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(InitBlocks.blockFarmer.get()), new PageTextOnly(1), new PagePicture(2, "page_farmer_crops", 95).addItemsToPage(new ItemStack(Items.WHEAT_SEEDS)).addItemsToPage(new ItemStack(InitItems.itemCanolaSeed.get())), new PagePicture(3, "page_farmer_cactus", 105).addItemsToPage(new ItemStack(Blocks.CACTUS)), new PagePicture(4, "page_farmer_wart", 95).addItemsToPage(new ItemStack(Items.NETHER_WART)), new PagePicture(5, "page_farmer_reeds", 105).addItemsToPage(new ItemStack(Items.REEDS)), new PagePicture(6, "page_farmer_melons", 105).addItemsToPage(new ItemStack(Items.MELON), new ItemStack(Blocks.PUMPKIN), new ItemStack(Blocks.MELON_BLOCK)), new PagePicture(7, "page_farmer_enderlilly", 105), new PagePicture(8, "page_farmer_redorchid", 105), new PageCrafting(4, BlockCrafting.recipeFarmer).setWildcard().setNoText()).setImportant();
new BookletChapter("miner", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(InitBlocks.blockMiner.get()), new PageTextOnly(1).addTextReplacement("<rf>", TileEntityMiner.ENERGY_USE_PER_BLOCK).addTextReplacement("<range>", TileEntityMiner.DEFAULT_RANGE), new PageCrafting(2, BlockCrafting.recipeMiner)).setSpecial(); new BookletChapter("miner", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(InitBlocks.blockMiner.get()), new PageTextOnly(1).addTextReplacement("<rf>", TileEntityMiner.ENERGY_USE_PER_BLOCK).addTextReplacement("<range>", TileEntityMiner.DEFAULT_RANGE), new PageCrafting(2, BlockCrafting.recipeMiner)).setSpecial();
new BookletChapterCoffee("coffeeMachine", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(InitBlocks.blockCoffeeMachine.get()), new PageTextOnly(1).addItemsToPage(new ItemStack(InitItems.itemCoffeeBean)).addTextReplacement("<rf>", TileEntityCoffeeMachine.ENERGY_USED).addTextReplacement("<coffee>", TileEntityCoffeeMachine.CACHE_USE).addTextReplacement("<water>", TileEntityCoffeeMachine.WATER_USE), new PageTextOnly(2).addItemsToPage(new ItemStack(InitItems.itemCoffee)), new PagePicture(3, "page_coffee_machine", 115), new PageCrafting(4, BlockCrafting.recipeCoffeeMachine).setWildcard().setNoText(), new PageCrafting(5, ItemCrafting.recipeCup).setNoText()).setImportant(); new BookletChapterCoffee("coffeeMachine", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(InitBlocks.blockCoffeeMachine.get()), new PageTextOnly(1).addItemsToPage(new ItemStack(InitItems.itemCoffeeBean.get())).addTextReplacement("<rf>", TileEntityCoffeeMachine.ENERGY_USED).addTextReplacement("<coffee>", TileEntityCoffeeMachine.CACHE_USE).addTextReplacement("<water>", TileEntityCoffeeMachine.WATER_USE), new PageTextOnly(2).addItemsToPage(new ItemStack(InitItems.itemCoffee.get())), new PagePicture(3, "page_coffee_machine", 115), new PageCrafting(4, BlockCrafting.recipeCoffeeMachine).setWildcard().setNoText(), new PageCrafting(5, ItemCrafting.recipeCup).setNoText()).setImportant();
List<IBookletPage> list = new ArrayList<>(); List<IBookletPage> list = new ArrayList<>();
list.add(new PageTextOnly(1).addTextReplacement("<rf>", TileEntityGrinder.ENERGY_USE)); list.add(new PageTextOnly(1).addTextReplacement("<rf>", TileEntityGrinder.ENERGY_USE));
@ -249,56 +246,56 @@ public final class InitBooklet {
//RF Generating Blocks //RF Generating Blocks
new BookletChapter("solarPanel", ActuallyAdditionsAPI.entryGeneratingRF, new ItemStack(InitBlocks.blockFurnaceSolar.get()), new PageTextOnly(1).addTextReplacement("<rf>", TileEntityFurnaceSolar.PRODUCE), new PageCrafting(2, BlockCrafting.recipeSolar).setNoText()); new BookletChapter("solarPanel", ActuallyAdditionsAPI.entryGeneratingRF, new ItemStack(InitBlocks.blockFurnaceSolar.get()), new PageTextOnly(1).addTextReplacement("<rf>", TileEntityFurnaceSolar.PRODUCE), new PageCrafting(2, BlockCrafting.recipeSolar).setNoText());
new BookletChapter("heatCollector", ActuallyAdditionsAPI.entryGeneratingRF, new ItemStack(InitBlocks.blockHeatCollector.get()), new PageTextOnly(1).addTextReplacement("<rf>", TileEntityHeatCollector.ENERGY_PRODUCE).addTextReplacement("<min>", TileEntityHeatCollector.BLOCKS_NEEDED), new PageCrafting(2, BlockCrafting.recipeHeatCollector).setNoText()); new BookletChapter("heatCollector", ActuallyAdditionsAPI.entryGeneratingRF, new ItemStack(InitBlocks.blockHeatCollector.get()), new PageTextOnly(1).addTextReplacement("<rf>", TileEntityHeatCollector.ENERGY_PRODUCE).addTextReplacement("<min>", TileEntityHeatCollector.BLOCKS_NEEDED), new PageCrafting(2, BlockCrafting.recipeHeatCollector).setNoText());
new BookletChapter("canola", ActuallyAdditionsAPI.entryGeneratingRF, new ItemStack(InitBlocks.blockFermentingBarrel.get()), new PageTextOnly(1).addItemsToPage(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CANOLA.ordinal())).addItemsToPage(new ItemStack(InitItems.itemCanolaSeed)).addFluidToPage(InitFluids.fluidCanolaOil), new PageTextOnly(2).addFluidToPage(InitFluids.fluidRefinedCanolaOil).addFluidToPage(InitFluids.fluidCrystalOil).addFluidToPage(InitFluids.fluidEmpoweredOil), new PageCrafting(3, BlockCrafting.recipeCanolaPress).setNoText(), new PageCrafting(4, BlockCrafting.recipeFermentingBarrel), new PageCrafting(5, BlockCrafting.recipeOilGen), new PageReconstructor(6, LensRecipeHandler.recipeCrystallizedCanolaSeed).setNoText(), new PageEmpowerer(7, EmpowererHandler.recipeEmpoweredCanolaSeed).setNoText()); new BookletChapter("canola", ActuallyAdditionsAPI.entryGeneratingRF, new ItemStack(InitBlocks.blockFermentingBarrel.get()), new PageTextOnly(1).addItemsToPage(new ItemStack(InitItems.itemMisc.get(), 1, TheMiscItems.CANOLA.ordinal())).addItemsToPage(new ItemStack(InitItems.itemCanolaSeed.get())).addFluidToPage(InitFluids.fluidCanolaOil), new PageTextOnly(2).addFluidToPage(InitFluids.fluidRefinedCanolaOil).addFluidToPage(InitFluids.fluidCrystalOil).addFluidToPage(InitFluids.fluidEmpoweredOil), new PageCrafting(3, BlockCrafting.recipeCanolaPress).setNoText(), new PageCrafting(4, BlockCrafting.recipeFermentingBarrel), new PageCrafting(5, BlockCrafting.recipeOilGen), new PageReconstructor(6, LensRecipeHandler.recipeCrystallizedCanolaSeed).setNoText(), new PageEmpowerer(7, EmpowererHandler.recipeEmpoweredCanolaSeed).setNoText());
new BookletChapter("leafGen", ActuallyAdditionsAPI.entryGeneratingRF, new ItemStack(InitBlocks.blockLeafGenerator.get()), new PageTextOnly(1).addTextReplacement("<rf>", ConfigIntValues.LEAF_GENERATOR_CF_PER_LEAF.getValue()).addTextReplacement("<range>", ConfigIntValues.LEAF_GENERATOR_AREA.getValue()), new PageCrafting(2, BlockCrafting.recipeLeafGen)).setImportant(); new BookletChapter("leafGen", ActuallyAdditionsAPI.entryGeneratingRF, new ItemStack(InitBlocks.blockLeafGenerator.get()), new PageTextOnly(1).addTextReplacement("<rf>", ConfigIntValues.LEAF_GENERATOR_CF_PER_LEAF.getValue()).addTextReplacement("<range>", ConfigIntValues.LEAF_GENERATOR_AREA.getValue()), new PageCrafting(2, BlockCrafting.recipeLeafGen)).setImportant();
new BookletChapter("bioReactor", ActuallyAdditionsAPI.entryGeneratingRF, new ItemStack(InitBlocks.blockBioReactor.get()), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeBioReactor).setNoText()).setSpecial(); new BookletChapter("bioReactor", ActuallyAdditionsAPI.entryGeneratingRF, new ItemStack(InitBlocks.blockBioReactor.get()), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeBioReactor).setNoText()).setSpecial();
//No RF Using Items //No RF Using Items
chaptersIntroduction[9] = new BookletChapter("goggles", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(InitItems.itemEngineerGoggles), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeGoggles).setNoText(), new PageCrafting(3, ItemCrafting.recipeGogglesAdvanced).setNoText()).setImportant(); chaptersIntroduction[9] = new BookletChapter("goggles", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(InitItems.itemEngineerGoggles.get()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeGoggles).setNoText(), new PageCrafting(3, ItemCrafting.recipeGogglesAdvanced).setNoText()).setImportant();
new BookletChapter("bags", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(InitItems.itemBag), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeBag), new PageCrafting(3, ItemCrafting.recipeVoidBag).setNoText()).setImportant(); new BookletChapter("bags", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(InitItems.itemBag.get()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeBag), new PageCrafting(3, ItemCrafting.recipeVoidBag).setNoText()).setImportant();
new BookletChapter("wings", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(InitItems.itemWingsOfTheBats), new PageTextOnly(1).addItemsToPage(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.BAT_WING.ordinal())).addTextReplacement("<secs>", ItemWingsOfTheBats.MAX_FLY_TIME / 20), new PageCrafting(2, ItemCrafting.recipeWings).setNoText()).setSpecial(); new BookletChapter("wings", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(InitItems.itemWingsOfTheBats.get()), new PageTextOnly(1).addItemsToPage(new ItemStack(InitItems.itemMisc.get(), 1, TheMiscItems.BAT_WING.ordinal())).addTextReplacement("<secs>", ItemWingsOfTheBats.MAX_FLY_TIME / 20), new PageCrafting(2, ItemCrafting.recipeWings).setNoText()).setSpecial();
new BookletChapter("foods", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(InitItems.itemFoods, 1, TheFoods.HAMBURGER.ordinal()), new PageCrafting(1, FoodCrafting.recipeBacon).setNoText(), new PageFurnace(2, new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE_BREAD.ordinal())).setNoText(), new PageCrafting(3, FoodCrafting.recipeHamburger).setNoText(), new PageCrafting(4, FoodCrafting.recipeBigCookie).setNoText(), new PageCrafting(5, FoodCrafting.recipeSubSandwich).setNoText(), new PageCrafting(6, FoodCrafting.recipeFrenchFry).setNoText(), new PageCrafting(7, FoodCrafting.recipeFrenchFries).setNoText(), new PageCrafting(8, FoodCrafting.recipeFishNChips).setNoText(), new PageCrafting(9, FoodCrafting.recipeCheese).setNoText(), new PageCrafting(10, FoodCrafting.recipePumpkinStew).setNoText(), new PageCrafting(11, FoodCrafting.recipeCarrotJuice).setNoText(), new PageCrafting(12, FoodCrafting.recipeSpaghetti).setNoText(), new PageCrafting(13, FoodCrafting.recipeNoodle).setNoText(), new PageCrafting(14, FoodCrafting.recipeChocolate).setNoText(), new PageCrafting(15, FoodCrafting.recipeChocolateCake).setNoText(), new PageCrafting(16, FoodCrafting.recipeToast).setNoText(), new PageFurnace(17, new ItemStack(InitItems.itemFoods, 1, TheFoods.BAGUETTE.ordinal())).setNoText(), new PageCrafting(18, FoodCrafting.recipeChocolateToast).setNoText(), new PageCrafting(1, FoodCrafting.recipePizza).setNoText()); new BookletChapter("foods", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(InitItems.itemFoods.get(), 1, TheFoods.HAMBURGER.ordinal()), new PageCrafting(1, FoodCrafting.recipeBacon).setNoText(), new PageFurnace(2, new ItemStack(InitItems.itemFoods.get(), 1, TheFoods.RICE_BREAD.ordinal())).setNoText(), new PageCrafting(3, FoodCrafting.recipeHamburger).setNoText(), new PageCrafting(4, FoodCrafting.recipeBigCookie).setNoText(), new PageCrafting(5, FoodCrafting.recipeSubSandwich).setNoText(), new PageCrafting(6, FoodCrafting.recipeFrenchFry).setNoText(), new PageCrafting(7, FoodCrafting.recipeFrenchFries).setNoText(), new PageCrafting(8, FoodCrafting.recipeFishNChips).setNoText(), new PageCrafting(9, FoodCrafting.recipeCheese).setNoText(), new PageCrafting(10, FoodCrafting.recipePumpkinStew).setNoText(), new PageCrafting(11, FoodCrafting.recipeCarrotJuice).setNoText(), new PageCrafting(12, FoodCrafting.recipeSpaghetti).setNoText(), new PageCrafting(13, FoodCrafting.recipeNoodle).setNoText(), new PageCrafting(14, FoodCrafting.recipeChocolate).setNoText(), new PageCrafting(15, FoodCrafting.recipeChocolateCake).setNoText(), new PageCrafting(16, FoodCrafting.recipeToast).setNoText(), new PageFurnace(17, new ItemStack(InitItems.itemFoods.get(), 1, TheFoods.BAGUETTE.ordinal())).setNoText(), new PageCrafting(18, FoodCrafting.recipeChocolateToast).setNoText(), new PageCrafting(1, FoodCrafting.recipePizza).setNoText());
new BookletChapter("leafBlower", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(InitItems.itemLeafBlowerAdvanced), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeLeafBlower).setNoText(), new PageCrafting(3, ItemCrafting.recipeLeafBlowerAdvanced).setNoText()).setImportant(); new BookletChapter("leafBlower", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(InitItems.itemLeafBlowerAdvanced.get()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeLeafBlower).setNoText(), new PageCrafting(3, ItemCrafting.recipeLeafBlowerAdvanced).setNoText()).setImportant();
new BookletChapter("playerProbe", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(InitItems.itemPlayerProbe), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipePlayerProbe).setNoText()).setSpecial(); new BookletChapter("playerProbe", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(InitItems.itemPlayerProbe.get()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipePlayerProbe).setNoText()).setSpecial();
ArrayList<BookletPage> aiotPages = new ArrayList<>(); ArrayList<BookletPage> aiotPages = new ArrayList<>();
aiotPages.add(new PageTextOnly(aiotPages.size() + 1)); aiotPages.add(new PageTextOnly(aiotPages.size() + 1));
for (IRecipe recipe : ToolCrafting.RECIPES_PAXELS) { for (IRecipe recipe : ToolCrafting.RECIPES_PAXELS) {
aiotPages.add(new PageCrafting(aiotPages.size() + 1, recipe).setWildcard().setNoText()); aiotPages.add(new PageCrafting(aiotPages.size() + 1, recipe).setWildcard().setNoText());
} }
new BookletChapter("aiots", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(InitItems.emeraldPaxel), aiotPages.toArray(new BookletPage[aiotPages.size()])).setImportant(); new BookletChapter("aiots", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(InitItems.emeraldPaxel.get()), aiotPages.toArray(new BookletPage[aiotPages.size()])).setImportant();
new BookletChapter("jams", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(InitItems.itemJams), new PageTextOnly(1).addItemsToPage(new ItemStack(InitItems.itemJams, 1, Util.WILDCARD)), new PagePicture(2, "page_jam_house", 150), new PageTextOnly(3)); new BookletChapter("jams", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(InitItems.itemJams.get()), new PageTextOnly(1).addItemsToPage(new ItemStack(InitItems.itemJams.get(), 1, Util.WILDCARD)), new PagePicture(2, "page_jam_house", 150), new PageTextOnly(3));
ArrayList<BookletPage> potionRingPages = new ArrayList<>(); ArrayList<BookletPage> potionRingPages = new ArrayList<>();
potionRingPages.add(new PageTextOnly(potionRingPages.size() + 1)); potionRingPages.add(new PageTextOnly(potionRingPages.size() + 1));
for (IRecipe recipe : ItemCrafting.RECIPES_POTION_RINGS) { for (IRecipe recipe : ItemCrafting.RECIPES_POTION_RINGS) {
potionRingPages.add(new PageCrafting(potionRingPages.size() + 1, recipe).setNoText()); potionRingPages.add(new PageCrafting(potionRingPages.size() + 1, recipe).setNoText());
} }
new BookletChapter("potionRings", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(InitItems.itemPotionRing), potionRingPages.toArray(new BookletPage[potionRingPages.size()])); new BookletChapter("potionRings", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(InitItems.itemPotionRing.get()), potionRingPages.toArray(new BookletPage[potionRingPages.size()]));
new BookletChapter("spawnerChanger", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(InitItems.itemSpawnerChanger), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeSpawnerChanger).setNoText()); new BookletChapter("spawnerChanger", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(InitItems.itemSpawnerChanger.get()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeSpawnerChanger).setNoText());
new BookletChapter("itemFilter", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitItems.itemFilter), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeFilter).setNoText()).setImportant(); new BookletChapter("itemFilter", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitItems.itemFilter.get()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeFilter).setNoText()).setImportant();
//RF Using Items //RF Using Items
new BookletChapter("drill", ActuallyAdditionsAPI.entryItemsRF, new ItemStack(InitItems.itemDrill, 1, TheColoredLampColors.LIGHT_BLUE.ordinal()), new PageTextOnly(1), new PageTextOnly(2), new PageCrafting(3, ItemCrafting.recipeDrill).setNoText(), new PageCrafting(4, ItemCrafting.RECIPES_DRILL_COLORING), new PageCrafting(4, ItemCrafting.recipeDrillCore).setNoText(), new PageCrafting(5, ItemCrafting.recipeDrillSpeedI).setNoText(), new PageCrafting(6, ItemCrafting.recipeDrillSpeedII).setNoText(), new PageCrafting(7, ItemCrafting.recipeDrillSpeedIII).setNoText(), new PageCrafting(8, ItemCrafting.recipeDrillFortuneI).setNoText(), new PageCrafting(9, ItemCrafting.recipeDrillFortuneII).setNoText(), new PageCrafting(10, ItemCrafting.recipeDrillSilk).setNoText(), new PageCrafting(11, ItemCrafting.recipeDrillThree).setNoText(), new PageCrafting(12, ItemCrafting.recipeDrillFive).setNoText(), new PageCrafting(13, ItemCrafting.recipeDrillPlacing).setNoText()).setSpecial(); new BookletChapter("drill", ActuallyAdditionsAPI.entryItemsRF, new ItemStack(InitItems.itemDrill.get(), 1, TheColoredLampColors.LIGHT_BLUE.ordinal()), new PageTextOnly(1), new PageTextOnly(2), new PageCrafting(3, ItemCrafting.recipeDrill).setNoText(), new PageCrafting(4, ItemCrafting.RECIPES_DRILL_COLORING), new PageCrafting(4, ItemCrafting.recipeDrillCore).setNoText(), new PageCrafting(5, ItemCrafting.recipeDrillSpeedI).setNoText(), new PageCrafting(6, ItemCrafting.recipeDrillSpeedII).setNoText(), new PageCrafting(7, ItemCrafting.recipeDrillSpeedIII).setNoText(), new PageCrafting(8, ItemCrafting.recipeDrillFortuneI).setNoText(), new PageCrafting(9, ItemCrafting.recipeDrillFortuneII).setNoText(), new PageCrafting(10, ItemCrafting.recipeDrillSilk).setNoText(), new PageCrafting(11, ItemCrafting.recipeDrillThree).setNoText(), new PageCrafting(12, ItemCrafting.recipeDrillFive).setNoText(), new PageCrafting(13, ItemCrafting.recipeDrillPlacing).setNoText()).setSpecial();
new BookletChapter("fillingWand", ActuallyAdditionsAPI.entryItemsRF, new ItemStack(InitItems.itemFillingWand), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeFillingWand).setNoText()).setSpecial(); new BookletChapter("fillingWand", ActuallyAdditionsAPI.entryItemsRF, new ItemStack(InitItems.itemFillingWand.get()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeFillingWand).setNoText()).setSpecial();
new BookletChapter("staff", ActuallyAdditionsAPI.entryItemsRF, new ItemStack(InitItems.itemTeleStaff), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeStaff).setNoText()).setImportant(); new BookletChapter("staff", ActuallyAdditionsAPI.entryItemsRF, new ItemStack(InitItems.itemTeleStaff.get()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeStaff).setNoText()).setImportant();
new BookletChapter("magnetRing", ActuallyAdditionsAPI.entryItemsRF, new ItemStack(InitItems.itemMagnetRing), new PageCrafting(1, ItemCrafting.recipeMagnetRing)); new BookletChapter("magnetRing", ActuallyAdditionsAPI.entryItemsRF, new ItemStack(InitItems.itemMagnetRing.get()), new PageCrafting(1, ItemCrafting.recipeMagnetRing));
new BookletChapter("growthRing", ActuallyAdditionsAPI.entryItemsRF, new ItemStack(InitItems.itemGrowthRing), new PageCrafting(1, ItemCrafting.recipeGrowthRing)); new BookletChapter("growthRing", ActuallyAdditionsAPI.entryItemsRF, new ItemStack(InitItems.itemGrowthRing.get()), new PageCrafting(1, ItemCrafting.recipeGrowthRing));
new BookletChapter("waterRemovalRing", ActuallyAdditionsAPI.entryItemsRF, new ItemStack(InitItems.itemWaterRemovalRing), new PageCrafting(1, ItemCrafting.recipeWaterRing)); new BookletChapter("waterRemovalRing", ActuallyAdditionsAPI.entryItemsRF, new ItemStack(InitItems.itemWaterRemovalRing.get()), new PageCrafting(1, ItemCrafting.recipeWaterRing));
new BookletChapter("batteries", ActuallyAdditionsAPI.entryItemsRF, new ItemStack(InitItems.itemBatteryTriple), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeBattery).setNoText(), new PageCrafting(3, ItemCrafting.recipeBatteryDouble).setNoText(), new PageCrafting(4, ItemCrafting.recipeBatteryTriple).setNoText(), new PageCrafting(5, ItemCrafting.recipeBatteryQuadruple).setNoText(), new PageCrafting(6, ItemCrafting.recipeBatteryQuintuple).setNoText()); new BookletChapter("batteries", ActuallyAdditionsAPI.entryItemsRF, new ItemStack(InitItems.itemBatteryTriple.get()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeBattery).setNoText(), new PageCrafting(3, ItemCrafting.recipeBatteryDouble).setNoText(), new PageCrafting(4, ItemCrafting.recipeBatteryTriple).setNoText(), new PageCrafting(5, ItemCrafting.recipeBatteryQuadruple).setNoText(), new PageCrafting(6, ItemCrafting.recipeBatteryQuintuple).setNoText());
//Updates and infos //Updates and infos
new BookletChapter("changelog", ActuallyAdditionsAPI.entryUpdatesAndInfos, new ItemStack(Items.CLOCK), new PageLinkButton(1, UpdateChecker.CHANGELOG_LINK)); new BookletChapter("changelog", ActuallyAdditionsAPI.entryUpdatesAndInfos, new ItemStack(Items.CLOCK), new PageLinkButton(1, UpdateChecker.CHANGELOG_LINK));
new BookletChapter("curse", ActuallyAdditionsAPI.entryUpdatesAndInfos, new ItemStack(Items.FLINT_AND_STEEL), new PageLinkButton(1, "http://ellpeck.de/actadd")); new BookletChapter("curse", ActuallyAdditionsAPI.entryUpdatesAndInfos, new ItemStack(Items.FLINT_AND_STEEL), new PageLinkButton(1, "http://ellpeck.de/actadd"));
new BookletChapter("patreon", ActuallyAdditionsAPI.entryUpdatesAndInfos, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.EMERALD.ordinal()), new PageLinkButton(1, "http://patreon.com/Ellpeck"), new PagePicture(2, "page_patreon", 153)).setImportant(); new BookletChapter("patreon", ActuallyAdditionsAPI.entryUpdatesAndInfos, new ItemStack(InitItems.EMERADIC_CRYSTAL.get(), 1), new PageLinkButton(1, "http://patreon.com/Ellpeck"), new PagePicture(2, "page_patreon", 153)).setImportant();
new BookletChapter("website", ActuallyAdditionsAPI.entryUpdatesAndInfos, new ItemStack(InitItems.itemBooklet), new PageLinkButton(1, "http://ellpeck.de")); new BookletChapter("website", ActuallyAdditionsAPI.entryUpdatesAndInfos, new ItemStack(InitItems.itemBooklet.get()), new PageLinkButton(1, "http://ellpeck.de"));
//Trials //Trials
chaptersIntroduction[10] = new BookletChapter("trialsIntro", ActuallyAdditionsAPI.entryTrials, new ItemStack(Items.GOLD_INGOT), new PageTextOnly(1), new PageTextOnly(2)).setSpecial(); chaptersIntroduction[10] = new BookletChapter("trialsIntro", ActuallyAdditionsAPI.entryTrials, new ItemStack(Items.GOLD_INGOT), new PageTextOnly(1), new PageTextOnly(2)).setSpecial();
new BookletChapterTrials("crystalProduction", new ItemStack(InitItems.itemCrystal, 1, TheCrystals.EMERALD.ordinal()), false); new BookletChapterTrials("crystalProduction", new ItemStack(InitItems.EMERADIC_CRYSTAL.get()), false);
new BookletChapterTrials("leatherProduction", new ItemStack(Items.LEATHER), false); new BookletChapterTrials("leatherProduction", new ItemStack(Items.LEATHER), false);
new BookletChapterTrials("crystalOil", FluidUtil.getFilledBucket(new FluidStack(InitFluids.fluidCrystalOil, Fluid.BUCKET_VOLUME)), false); new BookletChapterTrials("crystalOil", FluidUtil.getFilledBucket(new FluidStack(InitFluids.fluidCrystalOil, Fluid.BUCKET_VOLUME)), false);
new BookletChapterTrials("autoDisenchanter", new ItemStack(InitItems.itemDisenchantingLens), false); new BookletChapterTrials("autoDisenchanter", new ItemStack(InitItems.itemDisenchantingLens.get()), false);
new BookletChapterTrials("empoweredOil", FluidUtil.getFilledBucket(new FluidStack(InitFluids.fluidEmpoweredOil, Fluid.BUCKET_VOLUME)), false); new BookletChapterTrials("empoweredOil", FluidUtil.getFilledBucket(new FluidStack(InitFluids.fluidEmpoweredOil, Fluid.BUCKET_VOLUME)), false);
new BookletChapterTrials("mobFarm", new ItemStack(Items.ROTTEN_FLESH), false); new BookletChapterTrials("mobFarm", new ItemStack(Items.ROTTEN_FLESH), false);
new BookletChapterTrials("empowererAutomation", new ItemStack(InitBlocks.blockEmpowerer.get()), false); new BookletChapterTrials("empowererAutomation", new ItemStack(InitBlocks.blockEmpowerer.get()), false);

View file

@ -10,415 +10,398 @@
package de.ellpeck.actuallyadditions.mod.crafting; package de.ellpeck.actuallyadditions.mod.crafting;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; // TODO: [port] MOVE TO DATA_GENERATOR
import de.ellpeck.actuallyadditions.mod.blocks.BlockColoredLamp; @Deprecated
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheMiscBlocks;
import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues;
import de.ellpeck.actuallyadditions.mod.items.InitItems;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheCrystals;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems;
import de.ellpeck.actuallyadditions.mod.util.RecipeUtil;
import de.ellpeck.actuallyadditions.mod.util.Util;
import de.ellpeck.actuallyadditions.mod.util.crafting.RecipeHandler;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.item.crafting.Ingredient;
import net.minecraft.util.ResourceLocation;
public final class BlockCrafting { public final class BlockCrafting {
//
public static final IRecipe[] RECIPES_LAMPS = new IRecipe[BlockColoredLamp.ALL_LAMP_TYPES.length]; // public static final IRecipe[] RECIPES_LAMPS = new IRecipe[BlockColoredLamp.ALL_LAMP_TYPES.length];
public static IRecipe recipeSmileyCloud; // public static IRecipe recipeSmileyCloud;
public static IRecipe recipePhantomface; // public static IRecipe recipePhantomface;
public static IRecipe recipeLiquiface; // public static IRecipe recipeLiquiface;
public static IRecipe recipeEnergyface; // public static IRecipe recipeEnergyface;
public static IRecipe recipePhantomBreaker; // public static IRecipe recipePhantomBreaker;
public static IRecipe recipePhantomPlacer; // public static IRecipe recipePhantomPlacer;
public static IRecipe recipeBreaker; // public static IRecipe recipeBreaker;
public static IRecipe recipePlacer; // public static IRecipe recipePlacer;
public static IRecipe recipeLiquidPlacer; // public static IRecipe recipeLiquidPlacer;
public static IRecipe recipeLiquidCollector; // public static IRecipe recipeLiquidCollector;
public static IRecipe recipeCase; // public static IRecipe recipeCase;
public static IRecipe recipeIronCase; // public static IRecipe recipeIronCase;
public static IRecipe recipeEnderCase; // public static IRecipe recipeEnderCase;
public static IRecipe recipeEnderPearlBlock; // public static IRecipe recipeEnderPearlBlock;
public static IRecipe recipeESD; // public static IRecipe recipeESD;
public static IRecipe recipeAdvancedESD; // public static IRecipe recipeAdvancedESD;
public static IRecipe recipePhantomBooster; // public static IRecipe recipePhantomBooster;
public static IRecipe recipeCoffeeMachine; // public static IRecipe recipeCoffeeMachine;
public static IRecipe recipeCrusher; // public static IRecipe recipeCrusher;
public static IRecipe recipeDoubleCrusher; // public static IRecipe recipeDoubleCrusher;
public static IRecipe recipeFurnace; // public static IRecipe recipeFurnace;
public static IRecipe recipeSolidifier; // public static IRecipe recipeSolidifier;
public static IRecipe recipeCasing; // public static IRecipe recipeCasing;
public static IRecipe recipeGlass; // public static IRecipe recipeGlass;
public static IRecipe recipeLavaFactory; // public static IRecipe recipeLavaFactory;
public static IRecipe recipeEnergizer; // public static IRecipe recipeEnergizer;
public static IRecipe recipeEnervator; // public static IRecipe recipeEnervator;
public static IRecipe recipeSolar; // public static IRecipe recipeSolar;
public static IRecipe recipeHeatCollector; // public static IRecipe recipeHeatCollector;
public static IRecipe recipeCoalGen; // public static IRecipe recipeCoalGen;
public static IRecipe recipeOilGen; // public static IRecipe recipeOilGen;
public static IRecipe recipeRepairer; // public static IRecipe recipeRepairer;
public static IRecipe recipeFisher; // public static IRecipe recipeFisher;
public static IRecipe recipeQuartzBlock; // public static IRecipe recipeQuartzBlock;
public static IRecipe recipeQuartzChiseled; // public static IRecipe recipeQuartzChiseled;
public static IRecipe recipeQuartzPillar; // public static IRecipe recipeQuartzPillar;
public static IRecipe recipeBlockChar; // public static IRecipe recipeBlockChar;
public static IRecipe recipeFeeder; // public static IRecipe recipeFeeder;
public static IRecipe recipeCompost; // public static IRecipe recipeCompost;
public static IRecipe recipeCrate; // public static IRecipe recipeCrate;
public static IRecipe recipeCrateMedium; // public static IRecipe recipeCrateMedium;
public static IRecipe recipeCrateLarge; // public static IRecipe recipeCrateLarge;
public static IRecipe recipeFermentingBarrel; // public static IRecipe recipeFermentingBarrel;
public static IRecipe recipeCanolaPress; // public static IRecipe recipeCanolaPress;
public static IRecipe recipePowerer; // public static IRecipe recipePowerer;
public static IRecipe recipeLeafGen; // public static IRecipe recipeLeafGen;
public static IRecipe recipeDirectionalBreaker; // public static IRecipe recipeDirectionalBreaker;
public static IRecipe recipeDropper; // public static IRecipe recipeDropper;
public static IRecipe recipeRangedCollector; // public static IRecipe recipeRangedCollector;
public static IRecipe recipeLaserRelay; // public static IRecipe recipeLaserRelay;
public static IRecipe recipeLaserRelayAdvanced; // public static IRecipe recipeLaserRelayAdvanced;
public static IRecipe recipeLaserRelayExtreme; // public static IRecipe recipeLaserRelayExtreme;
public static IRecipe recipeAtomicReconstructor; // public static IRecipe recipeAtomicReconstructor;
public static IRecipe recipeMiner; // public static IRecipe recipeMiner;
public static IRecipe recipeFireworkBox; // public static IRecipe recipeFireworkBox;
public static IRecipe recipePhantomRedstoneface; // public static IRecipe recipePhantomRedstoneface;
public static IRecipe recipeLaserRelayItemWhitelist; // public static IRecipe recipeLaserRelayItemWhitelist;
public static IRecipe recipeItemInterface; // public static IRecipe recipeItemInterface;
public static IRecipe recipeItemInterfaceHopping; // public static IRecipe recipeItemInterfaceHopping;
public static IRecipe recipePlayerInterface; // public static IRecipe recipePlayerInterface;
public static IRecipe recipeDisplayStand; // public static IRecipe recipeDisplayStand;
public static IRecipe recipeShockSuppressor; // public static IRecipe recipeShockSuppressor;
public static IRecipe recipeEmpowerer; // public static IRecipe recipeEmpowerer;
public static IRecipe[] recipesTinyTorch = new IRecipe[2]; // public static IRecipe[] recipesTinyTorch = new IRecipe[2];
public static IRecipe recipeBioReactor; // public static IRecipe recipeBioReactor;
public static IRecipe recipeFarmer; // public static IRecipe recipeFarmer;
public static IRecipe recipeBatteryBox; // public static IRecipe recipeBatteryBox;
//
private static class FireworkIngredient extends Ingredient { // private static class FireworkIngredient extends Ingredient {
//
ItemStack firework = new ItemStack(Items.FIREWORKS); // ItemStack firework = new ItemStack(Items.FIREWORKS);
ItemStack[] fireworks = new ItemStack[] { this.firework }; // ItemStack[] fireworks = new ItemStack[] { this.firework };
//
@Override // @Override
public ItemStack[] getMatchingStacks() { // public ItemStack[] getMatchingStacks() {
return this.fireworks; // return this.fireworks;
} // }
//
@Override // @Override
public boolean apply(ItemStack stack) { // public boolean apply(ItemStack stack) {
return stack.getItem() == Items.FIREWORKS; // return stack.getItem() == Items.FIREWORKS;
} // }
} // }
//
public static void init() { // public static void init() {
//
Block[] removeNBTBlocks = new Block[] { InitBlocks.blockOilGenerator, InitBlocks.blockFluidPlacer, InitBlocks.blockFluidCollector, InitBlocks.blockCanolaPress, InitBlocks.blockFermentingBarrel }; // Block[] removeNBTBlocks = new Block[] { InitBlocks.blockOilGenerator, InitBlocks.blockFluidPlacer, InitBlocks.blockFluidCollector, InitBlocks.blockCanolaPress, InitBlocks.blockFermentingBarrel };
//
for (Block b : removeNBTBlocks) // for (Block b : removeNBTBlocks)
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(b), new ItemStack(b)); // RecipeHandler.addShapelessOreDictRecipe(new ItemStack(b), new ItemStack(b));
//
//Battery Box // //Battery Box
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitBlocks.blockBatteryBox), new ItemStack(InitBlocks.blockEnergizer), new ItemStack(InitBlocks.blockEnervator), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal())); // RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitBlocks.blockBatteryBox), new ItemStack(InitBlocks.blockEnergizer), new ItemStack(InitBlocks.blockEnervator), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()));
recipeBatteryBox = RecipeUtil.lastIRecipe(); // recipeBatteryBox = RecipeUtil.lastIRecipe();
//
//Farmer // //Farmer
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockFarmer), "ISI", "SCS", "ISI", 'I', new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.IRON.ordinal()), 'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'S', new ItemStack(Items.WHEAT_SEEDS)); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockFarmer), "ISI", "SCS", "ISI", 'I', new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.IRON.ordinal()), 'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'S', new ItemStack(Items.WHEAT_SEEDS));
recipeFarmer = RecipeUtil.lastIRecipe(); // recipeFarmer = RecipeUtil.lastIRecipe();
//
//Empowerer // //Empowerer
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockEmpowerer), " R ", " B ", "CDC", 'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), 'B', new ItemStack(InitItems.itemBatteryDouble, 1, Util.WILDCARD), 'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'D', new ItemStack(InitBlocks.blockDisplayStand)); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockEmpowerer), " R ", " B ", "CDC", 'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), 'B', new ItemStack(InitItems.itemBatteryDouble, 1, Util.WILDCARD), 'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'D', new ItemStack(InitBlocks.blockDisplayStand));
recipeEmpowerer = RecipeUtil.lastIRecipe(); // recipeEmpowerer = RecipeUtil.lastIRecipe();
//
//Tiny Torch // //Tiny Torch
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockTinyTorch, 2), "C", "W", 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.TINY_COAL.ordinal()), 'W', "stickWood"); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockTinyTorch, 2), "C", "W", 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.TINY_COAL.ordinal()), 'W', "stickWood");
recipesTinyTorch[0] = RecipeUtil.lastIRecipe(); // recipesTinyTorch[0] = RecipeUtil.lastIRecipe();
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockTinyTorch, 2), "C", "W", 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.TINY_CHAR.ordinal()), 'W', "stickWood"); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockTinyTorch, 2), "C", "W", 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.TINY_CHAR.ordinal()), 'W', "stickWood");
recipesTinyTorch[1] = RecipeUtil.lastIRecipe(); // recipesTinyTorch[1] = RecipeUtil.lastIRecipe();
//
//Firework Box // //Firework Box
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockFireworkBox), "GFG", "SAS", "CCC", 'G', new ItemStack(Items.GUNPOWDER), 'S', new ItemStack(Items.STICK), 'A', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'F', new FireworkIngredient(), 'C', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockFireworkBox), "GFG", "SAS", "CCC", 'G', new ItemStack(Items.GUNPOWDER), 'S', new ItemStack(Items.STICK), 'A', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'F', new FireworkIngredient(), 'C', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()));
recipeFireworkBox = RecipeUtil.lastIRecipe(); // recipeFireworkBox = RecipeUtil.lastIRecipe();
//
//Shock Suppressor // //Shock Suppressor
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockShockSuppressor), "OAO", "ACA", "OAO", 'A', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.COAL.ordinal()), 'O', new ItemStack(Blocks.OBSIDIAN), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockShockSuppressor), "OAO", "ACA", "OAO", 'A', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.COAL.ordinal()), 'O', new ItemStack(Blocks.OBSIDIAN), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()));
recipeShockSuppressor = RecipeUtil.lastIRecipe(); // recipeShockSuppressor = RecipeUtil.lastIRecipe();
//
//Display Stand // //Display Stand
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockDisplayStand), " R ", "EEE", "GGG", 'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'E', new ItemStack(InitBlocks.blockTestifiBucksGreenWall), 'G', new ItemStack(InitBlocks.blockTestifiBucksWhiteWall)); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockDisplayStand), " R ", "EEE", "GGG", 'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'E', new ItemStack(InitBlocks.blockTestifiBucksGreenWall), 'G', new ItemStack(InitBlocks.blockTestifiBucksWhiteWall));
recipeDisplayStand = RecipeUtil.lastIRecipe(); // recipeDisplayStand = RecipeUtil.lastIRecipe();
//
//Miner // //Miner
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockMiner), "IRI", "RCR", "IDI", 'R', "blockRedstone", 'I', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'C', new ItemStack(InitBlocks.blockCrystalEmpowered, 1, TheCrystals.COAL.ordinal()), 'D', new ItemStack(InitItems.itemDrill, 1, Util.WILDCARD)); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockMiner), "IRI", "RCR", "IDI", 'R', "blockRedstone", 'I', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'C', new ItemStack(InitBlocks.blockCrystalEmpowered, 1, TheCrystals.COAL.ordinal()), 'D', new ItemStack(InitItems.itemDrill, 1, Util.WILDCARD));
recipeMiner = RecipeUtil.lastIRecipe(); // recipeMiner = RecipeUtil.lastIRecipe();
//
//Quartz // //Quartz
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockQuartzWall, 6), "XXX", "XXX", 'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockQuartzWall, 6), "XXX", "XXX", 'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal()));
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockQuartzSlab, 6), "XXX", 'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockQuartzSlab, 6), "XXX", 'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal()));
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockQuartzStair, 6), "X ", "XX ", "XXX", 'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockQuartzStair, 6), "X ", "XX ", "XXX", 'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal()));
//
//PillarQuartz // //PillarQuartz
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockPillarQuartzWall, 6), "XXX", "XXX", 'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ_PILLAR.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockPillarQuartzWall, 6), "XXX", "XXX", 'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ_PILLAR.ordinal()));
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockPillarQuartzSlab, 6), "XXX", 'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ_PILLAR.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockPillarQuartzSlab, 6), "XXX", 'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ_PILLAR.ordinal()));
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockPillarQuartzStair, 6), "X ", "XX ", "XXX", 'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ_PILLAR.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockPillarQuartzStair, 6), "X ", "XX ", "XXX", 'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ_PILLAR.ordinal()));
//
//ChiseledQuartz // //ChiseledQuartz
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockChiseledQuartzWall, 6), "XXX", "XXX", 'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ_CHISELED.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockChiseledQuartzWall, 6), "XXX", "XXX", 'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ_CHISELED.ordinal()));
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockChiseledQuartzSlab, 6), "XXX", 'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ_CHISELED.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockChiseledQuartzSlab, 6), "XXX", 'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ_CHISELED.ordinal()));
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockChiseledQuartzStair, 6), "X ", "XX ", "XXX", 'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ_CHISELED.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockChiseledQuartzStair, 6), "X ", "XX ", "XXX", 'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ_CHISELED.ordinal()));
//
//White Ethetic Blocks // //White Ethetic Blocks
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockTestifiBucksWhiteFence, 6), "XXX", "XXX", 'X', new ItemStack(InitBlocks.blockTestifiBucksWhiteWall)); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockTestifiBucksWhiteFence, 6), "XXX", "XXX", 'X', new ItemStack(InitBlocks.blockTestifiBucksWhiteWall));
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockTestifiBucksWhiteSlab, 6), "XXX", 'X', new ItemStack(InitBlocks.blockTestifiBucksWhiteWall)); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockTestifiBucksWhiteSlab, 6), "XXX", 'X', new ItemStack(InitBlocks.blockTestifiBucksWhiteWall));
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockTestifiBucksWhiteStairs, 6), "X ", "XX ", "XXX", 'X', new ItemStack(InitBlocks.blockTestifiBucksWhiteWall)); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockTestifiBucksWhiteStairs, 6), "X ", "XX ", "XXX", 'X', new ItemStack(InitBlocks.blockTestifiBucksWhiteWall));
//
//Green Ethetic Blocks // //Green Ethetic Blocks
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockTestifiBucksGreenFence, 6), "XXX", "XXX", 'X', new ItemStack(InitBlocks.blockTestifiBucksGreenWall)); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockTestifiBucksGreenFence, 6), "XXX", "XXX", 'X', new ItemStack(InitBlocks.blockTestifiBucksGreenWall));
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockTestifiBucksGreenSlab, 6), "XXX", 'X', new ItemStack(InitBlocks.blockTestifiBucksGreenWall)); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockTestifiBucksGreenSlab, 6), "XXX", 'X', new ItemStack(InitBlocks.blockTestifiBucksGreenWall));
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockTestifiBucksGreenStairs, 6), "X ", "XX ", "XXX", 'X', new ItemStack(InitBlocks.blockTestifiBucksGreenWall)); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockTestifiBucksGreenStairs, 6), "X ", "XX ", "XXX", 'X', new ItemStack(InitBlocks.blockTestifiBucksGreenWall));
//
//Atomic Reconstructor // //Atomic Reconstructor
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockAtomicReconstructor), "IRI", "RCR", "IRI", 'R', "dustRedstone", 'I', "ingotIron", 'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockAtomicReconstructor), "IRI", "RCR", "IRI", 'R', "dustRedstone", 'I', "ingotIron", 'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()));
recipeAtomicReconstructor = RecipeUtil.lastIRecipe(); // recipeAtomicReconstructor = RecipeUtil.lastIRecipe();
//
//Laser Relay // //Laser Relay
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockLaserRelay, 4), "OBO", "RCR", "OBO", 'B', new ItemStack(Blocks.REDSTONE_BLOCK), 'O', new ItemStack(Blocks.OBSIDIAN), 'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockLaserRelay, 4), "OBO", "RCR", "OBO", 'B', new ItemStack(Blocks.REDSTONE_BLOCK), 'O', new ItemStack(Blocks.OBSIDIAN), 'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()));
recipeLaserRelay = RecipeUtil.lastIRecipe(); // recipeLaserRelay = RecipeUtil.lastIRecipe();
//
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockLaserRelayAdvanced), " I ", "XRX", " I ", 'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.IRON.ordinal()), 'R', new ItemStack(InitBlocks.blockLaserRelay), 'X', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockLaserRelayAdvanced), " I ", "XRX", " I ", 'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.IRON.ordinal()), 'R', new ItemStack(InitBlocks.blockLaserRelay), 'X', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()));
recipeLaserRelayAdvanced = RecipeUtil.lastIRecipe(); // recipeLaserRelayAdvanced = RecipeUtil.lastIRecipe();
//
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockLaserRelayExtreme), " I ", "XRX", " I ", 'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()), 'R', new ItemStack(InitBlocks.blockLaserRelayAdvanced), 'X', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockLaserRelayExtreme), " I ", "XRX", " I ", 'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()), 'R', new ItemStack(InitBlocks.blockLaserRelayAdvanced), 'X', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()));
recipeLaserRelayExtreme = RecipeUtil.lastIRecipe(); // recipeLaserRelayExtreme = RecipeUtil.lastIRecipe();
//
//Whitelist Item Laser Relay // //Whitelist Item Laser Relay
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitBlocks.blockLaserRelayItemWhitelist), new ItemStack(InitBlocks.blockLaserRelayItem), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), "gemQuartzBlack", new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal())); // RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitBlocks.blockLaserRelayItemWhitelist), new ItemStack(InitBlocks.blockLaserRelayItem), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), "gemQuartzBlack", new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()));
recipeLaserRelayItemWhitelist = RecipeUtil.lastIRecipe(); // recipeLaserRelayItemWhitelist = RecipeUtil.lastIRecipe();
//
//Item Interface // //Item Interface
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockItemViewer), "OBO", "RCR", "OBO", 'B', new ItemStack(Items.REDSTONE), 'O', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), 'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), 'C', "chestWood"); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockItemViewer), "OBO", "RCR", "OBO", 'B', new ItemStack(Items.REDSTONE), 'O', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), 'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), 'C', "chestWood");
recipeItemInterface = RecipeUtil.lastIRecipe(); // recipeItemInterface = RecipeUtil.lastIRecipe();
//
//Hopping Item Interface // //Hopping Item Interface
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitBlocks.blockItemViewerHopping), new ItemStack(InitBlocks.blockItemViewer), new ItemStack(Blocks.HOPPER)); // RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitBlocks.blockItemViewerHopping), new ItemStack(InitBlocks.blockItemViewer), new ItemStack(Blocks.HOPPER));
recipeItemInterfaceHopping = RecipeUtil.lastIRecipe(); // recipeItemInterfaceHopping = RecipeUtil.lastIRecipe();
//
//Ranged Collector // //Ranged Collector
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockRangedCollector), " A ", "EHE", " C ", 'E', new ItemStack(Items.ENDER_PEARL), 'H', new ItemStack(Blocks.HOPPER), 'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'A', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockRangedCollector), " A ", "EHE", " C ", 'E', new ItemStack(Items.ENDER_PEARL), 'H', new ItemStack(Blocks.HOPPER), 'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'A', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()));
recipeRangedCollector = RecipeUtil.lastIRecipe(); // recipeRangedCollector = RecipeUtil.lastIRecipe();
//
//Directional Breaker // //Directional Breaker
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockDirectionalBreaker), "BBB", " C ", 'C', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()), 'B', new ItemStack(InitBlocks.blockBreaker)); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockDirectionalBreaker), "BBB", " C ", 'C', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()), 'B', new ItemStack(InitBlocks.blockBreaker));
recipeDirectionalBreaker = RecipeUtil.lastIRecipe(); // recipeDirectionalBreaker = RecipeUtil.lastIRecipe();
//
//Smiley Cloud // //Smiley Cloud
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockSmileyCloud), " W ", "WXW", " W ", 'W', new ItemStack(Blocks.WOOL, 1, Util.WILDCARD), 'X', new ItemStack(InitItems.itemSolidifiedExperience)); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockSmileyCloud), " W ", "WXW", " W ", 'W', new ItemStack(Blocks.WOOL, 1, Util.WILDCARD), 'X', new ItemStack(InitItems.itemSolidifiedExperience));
recipeSmileyCloud = RecipeUtil.lastIRecipe(); // recipeSmileyCloud = RecipeUtil.lastIRecipe();
//
//Compost // //Compost
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockCompost), "W W", "W W", "WCW", 'W', "plankWood", 'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.WOOD_CASING.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockCompost), "W W", "W W", "WCW", 'W', "plankWood", 'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.WOOD_CASING.ordinal()));
recipeCompost = RecipeUtil.lastIRecipe(); // recipeCompost = RecipeUtil.lastIRecipe();
//
//XP Solidifier // //XP Solidifier
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockXPSolidifier), "XXX", "DCD", "XXX", 'X', new ItemStack(InitItems.itemSolidifiedExperience), 'D', new ItemStack(InitBlocks.blockCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockXPSolidifier), "XXX", "DCD", "XXX", 'X', new ItemStack(InitItems.itemSolidifiedExperience), 'D', new ItemStack(InitBlocks.blockCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()));
recipeSolidifier = RecipeUtil.lastIRecipe(); // recipeSolidifier = RecipeUtil.lastIRecipe();
//
//Charcoal Block // //Charcoal Block
RecipeHandler.addShapedRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.CHARCOAL_BLOCK.ordinal()), "CCC", "CCC", "CCC", 'C', new ItemStack(Items.COAL, 1, 1)); // RecipeHandler.addShapedRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.CHARCOAL_BLOCK.ordinal()), "CCC", "CCC", "CCC", 'C', new ItemStack(Items.COAL, 1, 1));
recipeBlockChar = RecipeUtil.lastIRecipe(); // recipeBlockChar = RecipeUtil.lastIRecipe();
RecipeHandler.addShapelessRecipe(new ItemStack(Items.COAL, 9, 1), new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.CHARCOAL_BLOCK.ordinal())); // RecipeHandler.addShapelessRecipe(new ItemStack(Items.COAL, 9, 1), new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.CHARCOAL_BLOCK.ordinal()));
//
//Wood Casing // //Wood Casing
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.WOOD_CASING.ordinal()), "WSW", "SRS", "WSW", 'W', "plankWood", 'R', "logWood", 'S', ConfigBoolValues.SUPER_DUPER_HARD_MODE.isEnabled() ? new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal()) : "stickWood"); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.WOOD_CASING.ordinal()), "WSW", "SRS", "WSW", 'W', "plankWood", 'R', "logWood", 'S', ConfigBoolValues.SUPER_DUPER_HARD_MODE.isEnabled() ? new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal()) : "stickWood");
recipeCase = RecipeUtil.lastIRecipe(); // recipeCase = RecipeUtil.lastIRecipe();
//
//Iron Casing // //Iron Casing
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), "WSW", "SQS", "WSW", 'Q', "gemQuartzBlack", 'W', "ingotIron", 'S', ConfigBoolValues.SUPER_DUPER_HARD_MODE.isEnabled() ? new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal()) : "stickWood"); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), "WSW", "SQS", "WSW", 'Q', "gemQuartzBlack", 'W', "ingotIron", 'S', ConfigBoolValues.SUPER_DUPER_HARD_MODE.isEnabled() ? new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal()) : "stickWood");
recipeIronCase = RecipeUtil.lastIRecipe(); // recipeIronCase = RecipeUtil.lastIRecipe();
//
//Ender Casing // //Ender Casing
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal()), "WSW", "SRS", "WSW", 'W', ConfigBoolValues.SUPER_DUPER_HARD_MODE.isEnabled() ? new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.ordinal()) : new ItemStack(Items.ENDER_PEARL), 'R', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal()), 'S', ConfigBoolValues.SUPER_DUPER_HARD_MODE.isEnabled() ? new ItemStack(Blocks.DIAMOND_BLOCK) : new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal()), "WSW", "SRS", "WSW", 'W', ConfigBoolValues.SUPER_DUPER_HARD_MODE.isEnabled() ? new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.ordinal()) : new ItemStack(Items.ENDER_PEARL), 'R', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal()), 'S', ConfigBoolValues.SUPER_DUPER_HARD_MODE.isEnabled() ? new ItemStack(Blocks.DIAMOND_BLOCK) : new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()));
recipeEnderCase = RecipeUtil.lastIRecipe(); // recipeEnderCase = RecipeUtil.lastIRecipe();
//
//Phantom Booster // //Phantom Booster
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockPhantomBooster), "RDR", "DCD", "RDR", 'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), 'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), 'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockPhantomBooster), "RDR", "DCD", "RDR", 'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), 'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), 'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal()));
recipePhantomBooster = RecipeUtil.lastIRecipe(); // recipePhantomBooster = RecipeUtil.lastIRecipe();
//
//Coffee Machine // //Coffee Machine
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockCoffeeMachine), " C ", " S ", "AMA", 'M', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()), 'C', "cropCoffee", 'S', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'A', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockCoffeeMachine), " C ", " S ", "AMA", 'M', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()), 'C', "cropCoffee", 'S', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'A', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()));
recipeCoffeeMachine = RecipeUtil.lastIRecipe(); // recipeCoffeeMachine = RecipeUtil.lastIRecipe();
//
//Energizer // //Energizer
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockEnergizer), "I I", "CAC", "I I", 'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'A', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockEnergizer), "I I", "CAC", "I I", 'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'A', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()));
recipeEnergizer = RecipeUtil.lastIRecipe(); // recipeEnergizer = RecipeUtil.lastIRecipe();
//
//Enervator // //Enervator
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockEnervator), " I ", "CAC", " I ", 'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'A', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockEnervator), " I ", "CAC", " I ", 'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'A', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()));
recipeEnervator = RecipeUtil.lastIRecipe(); // recipeEnervator = RecipeUtil.lastIRecipe();
//
//Lava Factory // //Lava Factory
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockLavaFactoryController), "SCS", "ISI", "LLL", 'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'S', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'I', new ItemStack(InitBlocks.blockCrystalEmpowered, 1, TheCrystals.IRON.ordinal()), 'L', Items.LAVA_BUCKET); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockLavaFactoryController), "SCS", "ISI", "LLL", 'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'S', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'I', new ItemStack(InitBlocks.blockCrystalEmpowered, 1, TheCrystals.IRON.ordinal()), 'L', Items.LAVA_BUCKET);
recipeLavaFactory = RecipeUtil.lastIRecipe(); // recipeLavaFactory = RecipeUtil.lastIRecipe();
//
//Casing // //Casing
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockMisc, 32, TheMiscBlocks.LAVA_FACTORY_CASE.ordinal()), "ICI", 'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'I', new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.IRON.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockMisc, 32, TheMiscBlocks.LAVA_FACTORY_CASE.ordinal()), "ICI", 'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'I', new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.IRON.ordinal()));
recipeCasing = RecipeUtil.lastIRecipe(); // recipeCasing = RecipeUtil.lastIRecipe();
//
//Canola Press // //Canola Press
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockCanolaPress), "CHC", "CDC", "CRC", 'C', "cobblestone", 'H', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), 'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CANOLA.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockCanolaPress), "CHC", "CDC", "CRC", 'C', "cobblestone", 'H', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), 'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CANOLA.ordinal()));
recipeCanolaPress = RecipeUtil.lastIRecipe(); // recipeCanolaPress = RecipeUtil.lastIRecipe();
//
//Fermenting Barrel // //Fermenting Barrel
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockFermentingBarrel), "CHC", "CDC", "CRC", 'C', "logWood", 'H', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), 'R', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.WOOD_CASING.ordinal()), 'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CANOLA.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockFermentingBarrel), "CHC", "CDC", "CRC", 'C', "logWood", 'H', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), 'R', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.WOOD_CASING.ordinal()), 'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CANOLA.ordinal()));
recipeFermentingBarrel = RecipeUtil.lastIRecipe(); // recipeFermentingBarrel = RecipeUtil.lastIRecipe();
//
//Phantomface // //Phantomface
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockPhantomface), " C ", "EBE", " S ", 'E', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()), 'C', "chestWood", 'S', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'B', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockPhantomface), " C ", "EBE", " S ", 'E', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()), 'C', "chestWood", 'S', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'B', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.ordinal()));
recipePhantomface = RecipeUtil.lastIRecipe(); // recipePhantomface = RecipeUtil.lastIRecipe();
//
//Player Interface // //Player Interface
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockPlayerInterface), "BCB", "EBE", "BSB", 'E', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()), 'C', new ItemStack(Items.SKULL, 1, 1), 'S', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'B', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockPlayerInterface), "BCB", "EBE", "BSB", 'E', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()), 'C', new ItemStack(Items.SKULL, 1, 1), 'S', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'B', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal()));
recipePlayerInterface = RecipeUtil.lastIRecipe(); // recipePlayerInterface = RecipeUtil.lastIRecipe();
//
//Phantom Placer // //Phantom Placer
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitBlocks.blockPhantomPlacer), InitBlocks.blockPlacer, InitBlocks.blockPhantomface); // RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitBlocks.blockPhantomPlacer), InitBlocks.blockPlacer, InitBlocks.blockPhantomface);
recipePhantomPlacer = RecipeUtil.lastIRecipe(); // recipePhantomPlacer = RecipeUtil.lastIRecipe();
//
//Phantom Breaker // //Phantom Breaker
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitBlocks.blockPhantomBreaker), InitBlocks.blockBreaker, InitBlocks.blockPhantomface); // RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitBlocks.blockPhantomBreaker), InitBlocks.blockBreaker, InitBlocks.blockPhantomface);
recipePhantomBreaker = RecipeUtil.lastIRecipe(); // recipePhantomBreaker = RecipeUtil.lastIRecipe();
//
//Phantom Energyface // //Phantom Energyface
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockPhantomEnergyface), " R ", "RFR", " R ", 'R', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.REDSTONE.ordinal()), 'F', InitBlocks.blockPhantomface); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockPhantomEnergyface), " R ", "RFR", " R ", 'R', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.REDSTONE.ordinal()), 'F', InitBlocks.blockPhantomface);
recipeEnergyface = RecipeUtil.lastIRecipe(); // recipeEnergyface = RecipeUtil.lastIRecipe();
//
//Phantom Redstoneface // //Phantom Redstoneface
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockPhantomRedstoneface), "SRS", "RFR", "SRS", 'R', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.REDSTONE.ordinal()), 'S', new ItemStack(Items.REDSTONE), 'F', InitBlocks.blockPhantomface); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockPhantomRedstoneface), "SRS", "RFR", "SRS", 'R', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.REDSTONE.ordinal()), 'S', new ItemStack(Items.REDSTONE), 'F', InitBlocks.blockPhantomface);
recipePhantomRedstoneface = RecipeUtil.lastIRecipe(); // recipePhantomRedstoneface = RecipeUtil.lastIRecipe();
//
//Phantom Liquiface // //Phantom Liquiface
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockPhantomLiquiface), "RFR", 'R', Items.BUCKET, 'F', InitBlocks.blockPhantomface); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockPhantomLiquiface), "RFR", 'R', Items.BUCKET, 'F', InitBlocks.blockPhantomface);
recipeLiquiface = RecipeUtil.lastIRecipe(); // recipeLiquiface = RecipeUtil.lastIRecipe();
//
//Liquid Placer // //Liquid Placer
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockFluidPlacer), "RFR", 'R', Items.BUCKET, 'F', InitBlocks.blockPlacer); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockFluidPlacer), "RFR", 'R', Items.BUCKET, 'F', InitBlocks.blockPlacer);
recipeLiquidPlacer = RecipeUtil.lastIRecipe(); // recipeLiquidPlacer = RecipeUtil.lastIRecipe();
//
//Liquid Breaker // //Liquid Breaker
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockFluidCollector), "RFR", 'R', Items.BUCKET, 'F', InitBlocks.blockBreaker); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockFluidCollector), "RFR", 'R', Items.BUCKET, 'F', InitBlocks.blockBreaker);
recipeLiquidCollector = RecipeUtil.lastIRecipe(); // recipeLiquidCollector = RecipeUtil.lastIRecipe();
//
//Oil Generator // //Oil Generator
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockOilGenerator), "CRC", "CBC", "CRC", 'C', "cobblestone", 'R', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'B', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CANOLA.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockOilGenerator), "CRC", "CBC", "CRC", 'C', "cobblestone", 'R', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'B', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CANOLA.ordinal()));
recipeOilGen = RecipeUtil.lastIRecipe(); // recipeOilGen = RecipeUtil.lastIRecipe();
//
//Bio Reactor // //Bio Reactor
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockBioReactor), "CRC", "CBC", "CRC", 'C', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.IRON.ordinal()), 'R', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'B', new ItemStack(Blocks.SAPLING, 1, Util.WILDCARD)); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockBioReactor), "CRC", "CBC", "CRC", 'C', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.IRON.ordinal()), 'R', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'B', new ItemStack(Blocks.SAPLING, 1, Util.WILDCARD));
recipeBioReactor = RecipeUtil.lastIRecipe(); // recipeBioReactor = RecipeUtil.lastIRecipe();
//
//Coal Generator // //Coal Generator
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockCoalGenerator), "CRC", "CBC", "CRC", 'C', "cobblestone", 'B', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'R', new ItemStack(Items.COAL, 1, Util.WILDCARD)); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockCoalGenerator), "CRC", "CBC", "CRC", 'C', "cobblestone", 'B', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'R', new ItemStack(Items.COAL, 1, Util.WILDCARD));
recipeCoalGen = RecipeUtil.lastIRecipe(); // recipeCoalGen = RecipeUtil.lastIRecipe();
//
//Leaf Generator // //Leaf Generator
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockLeafGenerator), "IEI", "GLG", "ICI", 'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), 'G', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.REDSTONE.ordinal()), 'E', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'L', "treeLeaves", 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockLeafGenerator), "IEI", "GLG", "ICI", 'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), 'G', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.REDSTONE.ordinal()), 'E', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'L', "treeLeaves", 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()));
recipeLeafGen = RecipeUtil.lastIRecipe(); // recipeLeafGen = RecipeUtil.lastIRecipe();
//
//Enderpearl Block // //Enderpearl Block
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.ordinal()), "EE", "EE", 'E', Items.ENDER_PEARL); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.ordinal()), "EE", "EE", 'E', Items.ENDER_PEARL);
recipeEnderPearlBlock = RecipeUtil.lastIRecipe(); // recipeEnderPearlBlock = RecipeUtil.lastIRecipe();
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(Items.ENDER_PEARL, 4), new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.ordinal())); // RecipeHandler.addShapelessOreDictRecipe(new ItemStack(Items.ENDER_PEARL, 4), new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.ordinal()));
//
//Quartz Block // //Quartz Block
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal()), "QQ", "QQ", 'Q', "gemQuartzBlack"); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal()), "QQ", "QQ", 'Q', "gemQuartzBlack");
recipeQuartzBlock = RecipeUtil.lastIRecipe(); // recipeQuartzBlock = RecipeUtil.lastIRecipe();
//
//Fishing Net // //Fishing Net
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockFishingNet), "SSS", "SDS", "SSS", 'D', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.EMERALD.ordinal()), 'S', Items.STRING); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockFishingNet), "SSS", "SDS", "SSS", 'D', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.EMERALD.ordinal()), 'S', Items.STRING);
recipeFisher = RecipeUtil.lastIRecipe(); // recipeFisher = RecipeUtil.lastIRecipe();
//
//Repairer // //Repairer
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockItemRepairer), "DID", "OCO", "DID", 'D', new ItemStack(InitBlocks.blockCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()), 'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.IRON.ordinal()), 'O', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), 'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockItemRepairer), "DID", "OCO", "DID", 'D', new ItemStack(InitBlocks.blockCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()), 'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.IRON.ordinal()), 'O', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), 'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal()));
recipeRepairer = RecipeUtil.lastIRecipe(); // recipeRepairer = RecipeUtil.lastIRecipe();
//
//Solar Panel // //Solar Panel
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockFurnaceSolar), "IQI", "CDC", "IBI", 'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), 'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.IRON.ordinal()), 'Q', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'B', new ItemStack(Blocks.IRON_BARS)); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockFurnaceSolar), "IQI", "CDC", "IBI", 'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), 'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.IRON.ordinal()), 'Q', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'B', new ItemStack(Blocks.IRON_BARS));
recipeSolar = RecipeUtil.lastIRecipe(); // recipeSolar = RecipeUtil.lastIRecipe();
//
//Heat Collector // //Heat Collector
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockHeatCollector), "BRB", "CDC", "BQB", 'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), 'R', new ItemStack(Items.REPEATER), 'Q', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'B', new ItemStack(Blocks.IRON_BARS)); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockHeatCollector), "BRB", "CDC", "BQB", 'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), 'R', new ItemStack(Items.REPEATER), 'Q', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'B', new ItemStack(Blocks.IRON_BARS));
recipeHeatCollector = RecipeUtil.lastIRecipe(); // recipeHeatCollector = RecipeUtil.lastIRecipe();
//
//Quartz Pillar // //Quartz Pillar
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ_PILLAR.ordinal()), "Q", "Q", 'Q', "gemQuartzBlack"); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ_PILLAR.ordinal()), "Q", "Q", 'Q', "gemQuartzBlack");
recipeQuartzPillar = RecipeUtil.lastIRecipe(); // recipeQuartzPillar = RecipeUtil.lastIRecipe();
//
//Chiseled Quartz // //Chiseled Quartz
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockMisc, 2, TheMiscBlocks.QUARTZ_CHISELED.ordinal()), "Q", "Q", 'Q', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockMisc, 2, TheMiscBlocks.QUARTZ_CHISELED.ordinal()), "Q", "Q", 'Q', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal()));
recipeQuartzChiseled = RecipeUtil.lastIRecipe(); // recipeQuartzChiseled = RecipeUtil.lastIRecipe();
//
//Inputter // //Inputter
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockInputter), "WWW", "CHC", "WWW", 'W', "plankWood", 'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.WOOD_CASING.ordinal()), 'H', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockInputter), "WWW", "CHC", "WWW", 'W', "plankWood", 'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.WOOD_CASING.ordinal()), 'H', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()));
recipeESD = RecipeUtil.lastIRecipe(); // recipeESD = RecipeUtil.lastIRecipe();
//
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitBlocks.blockInputterAdvanced), InitBlocks.blockInputter, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), "gemQuartzBlack", new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal())); // RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitBlocks.blockInputterAdvanced), InitBlocks.blockInputter, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), "gemQuartzBlack", new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()));
recipeAdvancedESD = RecipeUtil.lastIRecipe(); // recipeAdvancedESD = RecipeUtil.lastIRecipe();
//
//Crusher // //Crusher
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockGrinder), "MFC", "DQD", "CFM", 'M', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), 'C', "cobblestone", 'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), 'Q', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'F', new ItemStack(Items.FLINT)); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockGrinder), "MFC", "DQD", "CFM", 'M', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), 'C', "cobblestone", 'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), 'Q', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'F', new ItemStack(Items.FLINT));
recipeCrusher = RecipeUtil.lastIRecipe(); // recipeCrusher = RecipeUtil.lastIRecipe();
//
//Double Crusher // //Double Crusher
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockGrinderDouble), "CDC", "RFR", "CDC", 'C', "cobblestone", 'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'R', InitBlocks.blockGrinder, 'F', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockGrinderDouble), "CDC", "RFR", "CDC", 'C', "cobblestone", 'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'R', InitBlocks.blockGrinder, 'F', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()));
recipeDoubleCrusher = RecipeUtil.lastIRecipe(); // recipeDoubleCrusher = RecipeUtil.lastIRecipe();
//
//Double Furnace // //Double Furnace
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockFurnaceDouble), "PDC", "RFR", "CDP", 'C', "cobblestone", 'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), 'R', new ItemStack(Blocks.FURNACE), 'F', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'P', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockFurnaceDouble), "PDC", "RFR", "CDP", 'C', "cobblestone", 'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), 'R', new ItemStack(Blocks.FURNACE), 'F', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'P', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()));
recipeFurnace = RecipeUtil.lastIRecipe(); // recipeFurnace = RecipeUtil.lastIRecipe();
//
//Feeder // //Feeder
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockFeeder), "WCW", "DHD", "WCW", 'W', "plankWood", 'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), 'C', new ItemStack(Items.GOLDEN_CARROT), 'H', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.WOOD_CASING.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockFeeder), "WCW", "DHD", "WCW", 'W', "plankWood", 'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), 'C', new ItemStack(Items.GOLDEN_CARROT), 'H', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.WOOD_CASING.ordinal()));
recipeFeeder = RecipeUtil.lastIRecipe(); // recipeFeeder = RecipeUtil.lastIRecipe();
//
//Giant Chest // //Giant Chest
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockGiantChest), "CWC", "WDW", "CWC", 'C', "chestWood", 'D', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.WOOD_CASING.ordinal()), 'W', "plankWood"); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockGiantChest), "CWC", "WDW", "CWC", 'C', "chestWood", 'D', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.WOOD_CASING.ordinal()), 'W', "plankWood");
recipeCrate = RecipeUtil.lastIRecipe(); // recipeCrate = RecipeUtil.lastIRecipe();
//
new RecipeKeepDataShaped(new ResourceLocation(ActuallyAdditions.MODID, "giant_chest_media"), new ItemStack(InitBlocks.blockGiantChestMedium), new ItemStack(InitBlocks.blockGiantChest), "CWC", "WDW", "CWC", 'C', new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.COAL.ordinal()), 'D', new ItemStack(InitBlocks.blockGiantChest), 'W', "plankWood"); // new RecipeKeepDataShaped(new ResourceLocation(ActuallyAdditions.MODID, "giant_chest_media"), new ItemStack(InitBlocks.blockGiantChestMedium), new ItemStack(InitBlocks.blockGiantChest), "CWC", "WDW", "CWC", 'C', new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.COAL.ordinal()), 'D', new ItemStack(InitBlocks.blockGiantChest), 'W', "plankWood");
recipeCrateMedium = RecipeUtil.lastIRecipe(); // recipeCrateMedium = RecipeUtil.lastIRecipe();
//
new RecipeKeepDataShaped(new ResourceLocation(ActuallyAdditions.MODID, "giant_chest_large"), new ItemStack(InitBlocks.blockGiantChestLarge), new ItemStack(InitBlocks.blockGiantChestMedium), "CWC", "WDW", "CWC", 'C', new ItemStack(InitBlocks.blockCrystalEmpowered, 1, TheCrystals.COAL.ordinal()), 'D', new ItemStack(InitBlocks.blockGiantChestMedium), 'W', "plankWood"); // new RecipeKeepDataShaped(new ResourceLocation(ActuallyAdditions.MODID, "giant_chest_large"), new ItemStack(InitBlocks.blockGiantChestLarge), new ItemStack(InitBlocks.blockGiantChestMedium), "CWC", "WDW", "CWC", 'C', new ItemStack(InitBlocks.blockCrystalEmpowered, 1, TheCrystals.COAL.ordinal()), 'D', new ItemStack(InitBlocks.blockGiantChestMedium), 'W', "plankWood");
recipeCrateLarge = RecipeUtil.lastIRecipe(); // recipeCrateLarge = RecipeUtil.lastIRecipe();
//
//Greenhouse Glass // //Greenhouse Glass
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockGreenhouseGlass, 2), "GSG", "SDS", "GSG", 'G', "blockGlass", 'D', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.LAPIS.ordinal()), 'S', "treeSapling"); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockGreenhouseGlass, 2), "GSG", "SDS", "GSG", 'G', "blockGlass", 'D', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.LAPIS.ordinal()), 'S', "treeSapling");
recipeGlass = RecipeUtil.lastIRecipe(); // recipeGlass = RecipeUtil.lastIRecipe();
//
//Placer // //Placer
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockPlacer), "CCC", "CRP", "CCC", 'C', "cobblestone", 'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), 'P', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.LAPIS.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockPlacer), "CCC", "CRP", "CCC", 'C', "cobblestone", 'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), 'P', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.LAPIS.ordinal()));
recipePlacer = RecipeUtil.lastIRecipe(); // recipePlacer = RecipeUtil.lastIRecipe();
//
//Breaker // //Breaker
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockBreaker), "CCC", "CRP", "CCC", 'C', "cobblestone", 'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), 'P', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockBreaker), "CCC", "CRP", "CCC", 'C', "cobblestone", 'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), 'P', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()));
recipeBreaker = RecipeUtil.lastIRecipe(); // recipeBreaker = RecipeUtil.lastIRecipe();
//
//Dropper // //Dropper
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockDropper), "CBC", "CDR", "CBC", 'B', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.LAPIS.ordinal()), 'C', "cobblestone", 'D', Blocks.DROPPER, 'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockDropper), "CBC", "CDR", "CBC", 'B', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.LAPIS.ordinal()), 'C', "cobblestone", 'D', Blocks.DROPPER, 'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()));
recipeDropper = RecipeUtil.lastIRecipe(); // recipeDropper = RecipeUtil.lastIRecipe();
//
for (int i = 0; i < BlockColoredLamp.ALL_LAMP_TYPES.length; i++) { // for (int i = 0; i < BlockColoredLamp.ALL_LAMP_TYPES.length; i++) {
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockColoredLamp, 6, i), "GCG", "DQD", "GCG", 'C', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.LAPIS.ordinal()), 'G', "glowstone", 'D', "dye" + BlockColoredLamp.ALL_LAMP_TYPES[i].oreName, 'Q', "gemQuartzBlack"); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockColoredLamp, 6, i), "GCG", "DQD", "GCG", 'C', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.LAPIS.ordinal()), 'G', "glowstone", 'D', "dye" + BlockColoredLamp.ALL_LAMP_TYPES[i].oreName, 'Q', "gemQuartzBlack");
RECIPES_LAMPS[i] = RecipeUtil.lastIRecipe(); // RECIPES_LAMPS[i] = RecipeUtil.lastIRecipe();
} // }
//
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockLampPowerer, 4), "XXX", "XLX", "XXX", 'X', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), 'L', new ItemStack(InitBlocks.blockColoredLamp, 1, Util.WILDCARD)); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockLampPowerer, 4), "XXX", "XLX", "XXX", 'X', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), 'L', new ItemStack(InitBlocks.blockColoredLamp, 1, Util.WILDCARD));
recipePowerer = RecipeUtil.lastIRecipe(); // recipePowerer = RecipeUtil.lastIRecipe();
//
} // }
} }

View file

@ -10,125 +10,108 @@
package de.ellpeck.actuallyadditions.mod.crafting; package de.ellpeck.actuallyadditions.mod.crafting;
import java.util.ArrayList; // TODO: [port] MOVE TO DATA_GENERATOR
import java.util.List; @Deprecated
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
import de.ellpeck.actuallyadditions.api.recipe.CrusherRecipe;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.items.InitItems;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheDusts;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheFoods;
import de.ellpeck.actuallyadditions.mod.recipe.CrusherRecipeRegistry;
import de.ellpeck.actuallyadditions.mod.util.RecipeUtil;
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList;
import net.minecraftforge.oredict.OreDictionary;
import net.minecraftforge.oredict.OreIngredient;
public final class CrusherCrafting { public final class CrusherCrafting {
//
public static final ArrayList<CrusherRecipe> MISC_RECIPES = new ArrayList<>(); // public static final ArrayList<CrusherRecipe> MISC_RECIPES = new ArrayList<>();
public static CrusherRecipe recipeIronHorseArmor; // public static CrusherRecipe recipeIronHorseArmor;
public static CrusherRecipe recipeGoldHorseArmor; // public static CrusherRecipe recipeGoldHorseArmor;
public static CrusherRecipe recipeDiamondHorseArmor; // public static CrusherRecipe recipeDiamondHorseArmor;
//
public static void init() { // public static void init() {
ActuallyAdditions.LOGGER.info("Initializing Crusher Recipes..."); // ActuallyAdditions.LOGGER.info("Initializing Crusher Recipes...");
//
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Items.BONE), new ItemStack(Items.DYE, 6, 15), StackUtil.getEmpty(), 0); // ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Items.BONE), new ItemStack(Items.DYE, 6, 15), StackUtil.getEmpty(), 0);
MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe()); // MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Items.REEDS), new ItemStack(Items.SUGAR, 3), StackUtil.getEmpty(), 0); // ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Items.REEDS), new ItemStack(Items.SUGAR, 3), StackUtil.getEmpty(), 0);
MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe()); // MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Items.BLAZE_ROD), new ItemStack(Items.BLAZE_POWDER, 4), StackUtil.getEmpty(), 0); // ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Items.BLAZE_ROD), new ItemStack(Items.BLAZE_POWDER, 4), StackUtil.getEmpty(), 0);
MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe()); // MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
//
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.YELLOW_FLOWER), new ItemStack(Items.DYE, 3, 11), StackUtil.getEmpty(), 0); // ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.YELLOW_FLOWER), new ItemStack(Items.DYE, 3, 11), StackUtil.getEmpty(), 0);
MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe()); // MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 0), new ItemStack(Items.DYE, 3, 1), StackUtil.getEmpty(), 0); // ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 0), new ItemStack(Items.DYE, 3, 1), StackUtil.getEmpty(), 0);
MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe()); // MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 1), new ItemStack(Items.DYE, 3, 12), StackUtil.getEmpty(), 0); // ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 1), new ItemStack(Items.DYE, 3, 12), StackUtil.getEmpty(), 0);
MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe()); // MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 2), new ItemStack(Items.DYE, 3, 13), StackUtil.getEmpty(), 0); // ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 2), new ItemStack(Items.DYE, 3, 13), StackUtil.getEmpty(), 0);
MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe()); // MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 3), new ItemStack(Items.DYE, 3, 7), StackUtil.getEmpty(), 0); // ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 3), new ItemStack(Items.DYE, 3, 7), StackUtil.getEmpty(), 0);
MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe()); // MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 4), new ItemStack(Items.DYE, 3, 1), StackUtil.getEmpty(), 0); // ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 4), new ItemStack(Items.DYE, 3, 1), StackUtil.getEmpty(), 0);
MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe()); // MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 5), new ItemStack(Items.DYE, 3, 14), StackUtil.getEmpty(), 0); // ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 5), new ItemStack(Items.DYE, 3, 14), StackUtil.getEmpty(), 0);
MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe()); // MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 6), new ItemStack(Items.DYE, 3, 7), StackUtil.getEmpty(), 0); // ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 6), new ItemStack(Items.DYE, 3, 7), StackUtil.getEmpty(), 0);
MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe()); // MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 7), new ItemStack(Items.DYE, 3, 9), StackUtil.getEmpty(), 0); // ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 7), new ItemStack(Items.DYE, 3, 9), StackUtil.getEmpty(), 0);
MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe()); // MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 8), new ItemStack(Items.DYE, 3, 7), StackUtil.getEmpty(), 0); // ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 8), new ItemStack(Items.DYE, 3, 7), StackUtil.getEmpty(), 0);
MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe()); // MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.DOUBLE_PLANT, 1, 0), new ItemStack(Items.DYE, 4, 11), StackUtil.getEmpty(), 0); // ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.DOUBLE_PLANT, 1, 0), new ItemStack(Items.DYE, 4, 11), StackUtil.getEmpty(), 0);
MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe()); // MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.DOUBLE_PLANT, 1, 1), new ItemStack(Items.DYE, 4, 13), StackUtil.getEmpty(), 0); // ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.DOUBLE_PLANT, 1, 1), new ItemStack(Items.DYE, 4, 13), StackUtil.getEmpty(), 0);
MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe()); // MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.DOUBLE_PLANT, 1, 4), new ItemStack(Items.DYE, 4, 1), StackUtil.getEmpty(), 0); // ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.DOUBLE_PLANT, 1, 4), new ItemStack(Items.DYE, 4, 1), StackUtil.getEmpty(), 0);
MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe()); // MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.DOUBLE_PLANT, 1, 5), new ItemStack(Items.DYE, 4, 9), StackUtil.getEmpty(), 0); // ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.DOUBLE_PLANT, 1, 5), new ItemStack(Items.DYE, 4, 9), StackUtil.getEmpty(), 0);
MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe()); // MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
//
if (!CrusherRecipeRegistry.hasException("oreRedstone")) ActuallyAdditionsAPI.addCrusherRecipe(new OreIngredient("oreRedstone"), new ItemStack(Items.REDSTONE, 10), StackUtil.getEmpty(), 0); // if (!CrusherRecipeRegistry.hasException("oreRedstone")) ActuallyAdditionsAPI.addCrusherRecipe(new OreIngredient("oreRedstone"), new ItemStack(Items.REDSTONE, 10), StackUtil.getEmpty(), 0);
if (!CrusherRecipeRegistry.hasException("oreLapis")) ActuallyAdditionsAPI.addCrusherRecipe(new OreIngredient("oreLapis"), new ItemStack(Items.DYE, 12, 4), StackUtil.getEmpty(), 0); // if (!CrusherRecipeRegistry.hasException("oreLapis")) ActuallyAdditionsAPI.addCrusherRecipe(new OreIngredient("oreLapis"), new ItemStack(Items.DYE, 12, 4), StackUtil.getEmpty(), 0);
if (!CrusherRecipeRegistry.hasException("coal")) ActuallyAdditionsAPI.addCrusherRecipe(new OreIngredient("coal"), new ItemStack(InitItems.itemDust, 1, TheDusts.COAL.ordinal()), StackUtil.getEmpty(), 0); // if (!CrusherRecipeRegistry.hasException("coal")) ActuallyAdditionsAPI.addCrusherRecipe(new OreIngredient("coal"), new ItemStack(InitItems.itemDust, 1, TheDusts.COAL.ordinal()), StackUtil.getEmpty(), 0);
if (!CrusherRecipeRegistry.hasException("oreCoal")) ActuallyAdditionsAPI.addCrusherRecipe(new OreIngredient("oreCoal"), new ItemStack(Items.COAL, 3), StackUtil.getEmpty(), 0); // if (!CrusherRecipeRegistry.hasException("oreCoal")) ActuallyAdditionsAPI.addCrusherRecipe(new OreIngredient("oreCoal"), new ItemStack(Items.COAL, 3), StackUtil.getEmpty(), 0);
if (!CrusherRecipeRegistry.hasException("blockCoal")) ActuallyAdditionsAPI.addCrusherRecipe(new OreIngredient("blockCoal"), new ItemStack(Items.COAL, 9), StackUtil.getEmpty(), 0); // if (!CrusherRecipeRegistry.hasException("blockCoal")) ActuallyAdditionsAPI.addCrusherRecipe(new OreIngredient("blockCoal"), new ItemStack(Items.COAL, 9), StackUtil.getEmpty(), 0);
if (!CrusherRecipeRegistry.hasException("oreQuartz")) ActuallyAdditionsAPI.addCrusherRecipe(new OreIngredient("oreQuartz"), new ItemStack(Items.QUARTZ, 3), StackUtil.getEmpty(), 0); // if (!CrusherRecipeRegistry.hasException("oreQuartz")) ActuallyAdditionsAPI.addCrusherRecipe(new OreIngredient("oreQuartz"), new ItemStack(Items.QUARTZ, 3), StackUtil.getEmpty(), 0);
if (!CrusherRecipeRegistry.hasException("cobblestone")) ActuallyAdditionsAPI.addCrusherRecipe(new OreIngredient("cobblestone"), new ItemStack(Blocks.SAND), StackUtil.getEmpty(), 0); // if (!CrusherRecipeRegistry.hasException("cobblestone")) ActuallyAdditionsAPI.addCrusherRecipe(new OreIngredient("cobblestone"), new ItemStack(Blocks.SAND), StackUtil.getEmpty(), 0);
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.GRAVEL), new ItemStack(Items.FLINT), new ItemStack(Items.FLINT), 50); // ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.GRAVEL), new ItemStack(Items.FLINT), new ItemStack(Items.FLINT), 50);
if (!CrusherRecipeRegistry.hasException("stone")) ActuallyAdditionsAPI.addCrusherRecipes(OreDictionary.getOres("stone", false), OreDictionary.getOres("cobblestone", false), 1, NonNullList.withSize(1, StackUtil.getEmpty()), 0, 0); // if (!CrusherRecipeRegistry.hasException("stone")) ActuallyAdditionsAPI.addCrusherRecipes(OreDictionary.getOres("stone", false), OreDictionary.getOres("cobblestone", false), 1, NonNullList.withSize(1, StackUtil.getEmpty()), 0, 0);
//
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()), new ItemStack(Items.SUGAR, 2), StackUtil.getEmpty(), 0); // ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()), new ItemStack(Items.SUGAR, 2), StackUtil.getEmpty(), 0);
MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe()); // MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
//
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.GLOWSTONE), new ItemStack(Items.GLOWSTONE_DUST, 4), StackUtil.getEmpty(), 0); // ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.GLOWSTONE), new ItemStack(Items.GLOWSTONE_DUST, 4), StackUtil.getEmpty(), 0);
MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe()); // MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
//
if (!CrusherRecipeRegistry.hasException("oreNickel")) ActuallyAdditionsAPI.addCrusherRecipes(OreDictionary.getOres("oreNickel", false), OreDictionary.getOres("dustNickel", false), 2, OreDictionary.getOres("dustPlatinum", false), 1, 15); // if (!CrusherRecipeRegistry.hasException("oreNickel")) ActuallyAdditionsAPI.addCrusherRecipes(OreDictionary.getOres("oreNickel", false), OreDictionary.getOres("dustNickel", false), 2, OreDictionary.getOres("dustPlatinum", false), 1, 15);
if (!CrusherRecipeRegistry.hasException("oreIron")) ActuallyAdditionsAPI.addCrusherRecipes(OreDictionary.getOres("oreIron", false), OreDictionary.getOres("dustIron", false), 2, OreDictionary.getOres("dustGold", false), 1, 20); // if (!CrusherRecipeRegistry.hasException("oreIron")) ActuallyAdditionsAPI.addCrusherRecipes(OreDictionary.getOres("oreIron", false), OreDictionary.getOres("dustIron", false), 2, OreDictionary.getOres("dustGold", false), 1, 20);
//
ItemStack temp = getStack("dustIron"); // ItemStack temp = getStack("dustIron");
if (!temp.isEmpty()) { // if (!temp.isEmpty()) {
temp.setCount(6); // temp.setCount(6);
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Items.IRON_HORSE_ARMOR), temp, StackUtil.getEmpty(), 0); // ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Items.IRON_HORSE_ARMOR), temp, StackUtil.getEmpty(), 0);
recipeIronHorseArmor = RecipeUtil.lastCrusherRecipe(); // recipeIronHorseArmor = RecipeUtil.lastCrusherRecipe();
} // }
//
temp = getStack("dustGold"); // temp = getStack("dustGold");
if (!temp.isEmpty()) { // if (!temp.isEmpty()) {
temp.setCount(6); // temp.setCount(6);
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Items.GOLDEN_HORSE_ARMOR), temp, StackUtil.getEmpty(), 0); // ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Items.GOLDEN_HORSE_ARMOR), temp, StackUtil.getEmpty(), 0);
recipeGoldHorseArmor = RecipeUtil.lastCrusherRecipe(); // recipeGoldHorseArmor = RecipeUtil.lastCrusherRecipe();
} // }
//
temp = getStack("dustDiamond"); // temp = getStack("dustDiamond");
if (!temp.isEmpty()) { // if (!temp.isEmpty()) {
temp.setCount(6); // temp.setCount(6);
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Items.DIAMOND_HORSE_ARMOR), temp, StackUtil.getEmpty(), 0); // ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Items.DIAMOND_HORSE_ARMOR), temp, StackUtil.getEmpty(), 0);
recipeDiamondHorseArmor = RecipeUtil.lastCrusherRecipe(); // recipeDiamondHorseArmor = RecipeUtil.lastCrusherRecipe();
} // }
//
CrusherRecipeRegistry.SEARCH_CASES.add(new CrusherRecipeRegistry.SearchCase("oreNether", 6)); // CrusherRecipeRegistry.SEARCH_CASES.add(new CrusherRecipeRegistry.SearchCase("oreNether", 6));
CrusherRecipeRegistry.SEARCH_CASES.add(new CrusherRecipeRegistry.SearchCase("orePoor", 4, "nugget")); // CrusherRecipeRegistry.SEARCH_CASES.add(new CrusherRecipeRegistry.SearchCase("orePoor", 4, "nugget"));
CrusherRecipeRegistry.SEARCH_CASES.add(new CrusherRecipeRegistry.SearchCase("denseore", 8)); // CrusherRecipeRegistry.SEARCH_CASES.add(new CrusherRecipeRegistry.SearchCase("denseore", 8));
CrusherRecipeRegistry.SEARCH_CASES.add(new CrusherRecipeRegistry.SearchCase("gem", 1)); // CrusherRecipeRegistry.SEARCH_CASES.add(new CrusherRecipeRegistry.SearchCase("gem", 1));
CrusherRecipeRegistry.SEARCH_CASES.add(new CrusherRecipeRegistry.SearchCase("ingot", 1)); // CrusherRecipeRegistry.SEARCH_CASES.add(new CrusherRecipeRegistry.SearchCase("ingot", 1));
CrusherRecipeRegistry.SEARCH_CASES.add(new CrusherRecipeRegistry.SearchCase("ore", 2, "gem")); //Search for gems first so removeDuplicates doesn't clear gem recipes. // CrusherRecipeRegistry.SEARCH_CASES.add(new CrusherRecipeRegistry.SearchCase("ore", 2, "gem")); //Search for gems first so removeDuplicates doesn't clear gem recipes.
CrusherRecipeRegistry.SEARCH_CASES.add(new CrusherRecipeRegistry.SearchCase("ore", 2)); // CrusherRecipeRegistry.SEARCH_CASES.add(new CrusherRecipeRegistry.SearchCase("ore", 2));
//
CrusherRecipeRegistry.registerFinally(); // CrusherRecipeRegistry.registerFinally();
} // }
//
private static ItemStack getStack(String ore) { // private static ItemStack getStack(String ore) {
List<ItemStack> stacks = OreDictionary.getOres(ore); // List<ItemStack> stacks = OreDictionary.getOres(ore);
if (stacks.isEmpty()) return StackUtil.getEmpty(); // if (stacks.isEmpty()) return StackUtil.getEmpty();
return stacks.get(0).copy(); // return stacks.get(0).copy();
} // }
} }

View file

@ -10,116 +10,105 @@
package de.ellpeck.actuallyadditions.mod.crafting; package de.ellpeck.actuallyadditions.mod.crafting;
import de.ellpeck.actuallyadditions.mod.items.InitItems; // TODO: [port] MOVE TO DATA_GENERATOR
import de.ellpeck.actuallyadditions.mod.items.metalists.TheFoods; @Deprecated
import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems;
import de.ellpeck.actuallyadditions.mod.util.RecipeUtil;
import de.ellpeck.actuallyadditions.mod.util.Util;
import de.ellpeck.actuallyadditions.mod.util.crafting.RecipeHandler;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.item.crafting.Ingredient;
import net.minecraftforge.fml.common.registry.GameRegistry;
public final class FoodCrafting { public final class FoodCrafting {
//
public static IRecipe recipePizza; // public static IRecipe recipePizza;
public static IRecipe recipeHamburger; // public static IRecipe recipeHamburger;
public static IRecipe recipeBigCookie; // public static IRecipe recipeBigCookie;
public static IRecipe recipeSubSandwich; // public static IRecipe recipeSubSandwich;
public static IRecipe recipeFrenchFry; // public static IRecipe recipeFrenchFry;
public static IRecipe recipeFrenchFries; // public static IRecipe recipeFrenchFries;
public static IRecipe recipeFishNChips; // public static IRecipe recipeFishNChips;
public static IRecipe recipeCheese; // public static IRecipe recipeCheese;
public static IRecipe recipePumpkinStew; // public static IRecipe recipePumpkinStew;
public static IRecipe recipeCarrotJuice; // public static IRecipe recipeCarrotJuice;
public static IRecipe recipeSpaghetti; // public static IRecipe recipeSpaghetti;
public static IRecipe recipeNoodle; // public static IRecipe recipeNoodle;
public static IRecipe recipeChocolate; // public static IRecipe recipeChocolate;
public static IRecipe recipeChocolateCake; // public static IRecipe recipeChocolateCake;
public static IRecipe recipeToast; // public static IRecipe recipeToast;
public static IRecipe recipeChocolateToast; // public static IRecipe recipeChocolateToast;
public static IRecipe recipeBacon; // public static IRecipe recipeBacon;
//
public static void init() { // public static void init() {
//
Ingredient knife = Ingredient.fromItem(InitItems.itemKnife); // Ingredient knife = Ingredient.fromItem(InitItems.itemKnife);
//
//Rice Bread // //Rice Bread
GameRegistry.addSmelting(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RICE_DOUGH.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE_BREAD.ordinal()), 1F); // GameRegistry.addSmelting(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RICE_DOUGH.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE_BREAD.ordinal()), 1F);
//
//Bacon // //Bacon
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemFoods, 3, TheFoods.BACON.ordinal()), knife, new ItemStack(Items.COOKED_PORKCHOP)); // RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemFoods, 3, TheFoods.BACON.ordinal()), knife, new ItemStack(Items.COOKED_PORKCHOP));
recipeBacon = RecipeUtil.lastIRecipe(); // recipeBacon = RecipeUtil.lastIRecipe();
//
//Baguette // //Baguette
GameRegistry.addSmelting(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DOUGH.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.BAGUETTE.ordinal()), 1F); // GameRegistry.addSmelting(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DOUGH.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.BAGUETTE.ordinal()), 1F);
//
//Pizza // //Pizza
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.PIZZA.ordinal()), "HKH", "MCF", " D ", 'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DOUGH.ordinal()), 'M', new ItemStack(Blocks.BROWN_MUSHROOM), 'C', "cropCarrot", 'F', new ItemStack(Items.COOKED_FISH, 1, Util.WILDCARD), 'K', knife, 'H', new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.PIZZA.ordinal()), "HKH", "MCF", " D ", 'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DOUGH.ordinal()), 'M', new ItemStack(Blocks.BROWN_MUSHROOM), 'C', "cropCarrot", 'F', new ItemStack(Items.COOKED_FISH, 1, Util.WILDCARD), 'K', knife, 'H', new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()));
recipePizza = RecipeUtil.lastIRecipe(); // recipePizza = RecipeUtil.lastIRecipe();
//
//Hamburger // //Hamburger
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.HAMBURGER.ordinal()), "KT ", "CB ", " T ", 'T', new ItemStack(InitItems.itemFoods, 1, TheFoods.TOAST.ordinal()), 'C', new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()), 'K', knife, 'B', new ItemStack(Items.COOKED_BEEF)); // RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.HAMBURGER.ordinal()), "KT ", "CB ", " T ", 'T', new ItemStack(InitItems.itemFoods, 1, TheFoods.TOAST.ordinal()), 'C', new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()), 'K', knife, 'B', new ItemStack(Items.COOKED_BEEF));
recipeHamburger = RecipeUtil.lastIRecipe(); // recipeHamburger = RecipeUtil.lastIRecipe();
//
//Big Cookie // //Big Cookie
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.BIG_COOKIE.ordinal()), "DCD", "CDC", "DCD", 'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DOUGH.ordinal()), 'C', new ItemStack(Items.DYE, 1, 3)); // RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.BIG_COOKIE.ordinal()), "DCD", "CDC", "DCD", 'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DOUGH.ordinal()), 'C', new ItemStack(Items.DYE, 1, 3));
recipeBigCookie = RecipeUtil.lastIRecipe(); // recipeBigCookie = RecipeUtil.lastIRecipe();
//
//Sub Sandwich // //Sub Sandwich
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.SUBMARINE_SANDWICH.ordinal()), "KCP", "FB ", "PCP", 'P', new ItemStack(Items.PAPER), 'C', new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()), 'F', new ItemStack(Items.COOKED_BEEF, 1, Util.WILDCARD), 'B', new ItemStack(InitItems.itemFoods, 1, TheFoods.BAGUETTE.ordinal()), 'K', knife); // RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.SUBMARINE_SANDWICH.ordinal()), "KCP", "FB ", "PCP", 'P', new ItemStack(Items.PAPER), 'C', new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()), 'F', new ItemStack(Items.COOKED_BEEF, 1, Util.WILDCARD), 'B', new ItemStack(InitItems.itemFoods, 1, TheFoods.BAGUETTE.ordinal()), 'K', knife);
recipeSubSandwich = RecipeUtil.lastIRecipe(); // recipeSubSandwich = RecipeUtil.lastIRecipe();
//
//French Fry // //French Fry
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemFoods, 2, TheFoods.FRENCH_FRY.ordinal()), new ItemStack(Items.BAKED_POTATO), knife); // RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemFoods, 2, TheFoods.FRENCH_FRY.ordinal()), new ItemStack(Items.BAKED_POTATO), knife);
recipeFrenchFry = RecipeUtil.lastIRecipe(); // recipeFrenchFry = RecipeUtil.lastIRecipe();
//
//French Fries // //French Fries
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.FRENCH_FRIES.ordinal()), "FFF", " P ", 'P', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.PAPER_CONE.ordinal()), 'F', new ItemStack(InitItems.itemFoods, 1, TheFoods.FRENCH_FRY.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.FRENCH_FRIES.ordinal()), "FFF", " P ", 'P', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.PAPER_CONE.ordinal()), 'F', new ItemStack(InitItems.itemFoods, 1, TheFoods.FRENCH_FRY.ordinal()));
recipeFrenchFries = RecipeUtil.lastIRecipe(); // recipeFrenchFries = RecipeUtil.lastIRecipe();
//
//Fish N Chips // //Fish N Chips
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.FISH_N_CHIPS.ordinal()), "FIF", " P ", 'I', new ItemStack(Items.COOKED_FISH, 1, Util.WILDCARD), 'P', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.PAPER_CONE.ordinal()), 'F', new ItemStack(InitItems.itemFoods, 1, TheFoods.FRENCH_FRY.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.FISH_N_CHIPS.ordinal()), "FIF", " P ", 'I', new ItemStack(Items.COOKED_FISH, 1, Util.WILDCARD), 'P', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.PAPER_CONE.ordinal()), 'F', new ItemStack(InitItems.itemFoods, 1, TheFoods.FRENCH_FRY.ordinal()));
recipeFishNChips = RecipeUtil.lastIRecipe(); // recipeFishNChips = RecipeUtil.lastIRecipe();
//
//Cheese // //Cheese
RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()), new ItemStack(Items.MILK_BUCKET), new ItemStack(Items.EGG)); //I don't know if this makes any actual sense, but whatever // RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()), new ItemStack(Items.MILK_BUCKET), new ItemStack(Items.EGG)); //I don't know if this makes any actual sense, but whatever
recipeCheese = RecipeUtil.lastIRecipe(); // recipeCheese = RecipeUtil.lastIRecipe();
//
//Pumpkin Stew // //Pumpkin Stew
RecipeHandler.addShapedRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.PUMPKIN_STEW.ordinal()), "P", "B", 'P', new ItemStack(Blocks.PUMPKIN), 'B', new ItemStack(Items.BOWL)); // RecipeHandler.addShapedRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.PUMPKIN_STEW.ordinal()), "P", "B", 'P', new ItemStack(Blocks.PUMPKIN), 'B', new ItemStack(Items.BOWL));
recipePumpkinStew = RecipeUtil.lastIRecipe(); // recipePumpkinStew = RecipeUtil.lastIRecipe();
//
//Carrot Juice // //Carrot Juice
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.CARROT_JUICE.ordinal()), new ItemStack(Items.GLASS_BOTTLE), "cropCarrot", knife); // RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.CARROT_JUICE.ordinal()), new ItemStack(Items.GLASS_BOTTLE), "cropCarrot", knife);
recipeCarrotJuice = RecipeUtil.lastIRecipe(); // recipeCarrotJuice = RecipeUtil.lastIRecipe();
//
//Spaghetti // //Spaghetti
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.SPAGHETTI.ordinal()), "NNN", " B ", 'N', new ItemStack(InitItems.itemFoods, 1, TheFoods.NOODLE.ordinal()), 'B', new ItemStack(Items.BOWL)); // RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.SPAGHETTI.ordinal()), "NNN", " B ", 'N', new ItemStack(InitItems.itemFoods, 1, TheFoods.NOODLE.ordinal()), 'B', new ItemStack(Items.BOWL));
recipeSpaghetti = RecipeUtil.lastIRecipe(); // recipeSpaghetti = RecipeUtil.lastIRecipe();
//
//Noodle // //Noodle
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.NOODLE.ordinal()), "cropWheat", knife); // RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.NOODLE.ordinal()), "cropWheat", knife);
recipeNoodle = RecipeUtil.lastIRecipe(); // recipeNoodle = RecipeUtil.lastIRecipe();
//
//Chocolate // //Chocolate
RecipeHandler.addShapedRecipe(new ItemStack(InitItems.itemFoods, 3, TheFoods.CHOCOLATE.ordinal()), "C C", "CMC", "C C", 'C', new ItemStack(Items.DYE, 1, 3), 'M', new ItemStack(Items.MILK_BUCKET)); // RecipeHandler.addShapedRecipe(new ItemStack(InitItems.itemFoods, 3, TheFoods.CHOCOLATE.ordinal()), "C C", "CMC", "C C", 'C', new ItemStack(Items.DYE, 1, 3), 'M', new ItemStack(Items.MILK_BUCKET));
recipeChocolate = RecipeUtil.lastIRecipe(); // recipeChocolate = RecipeUtil.lastIRecipe();
//
//Chocolate Cake // //Chocolate Cake
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.CHOCOLATE_CAKE.ordinal()), "MMM", "CCC", "EDS", 'M', new ItemStack(Items.MILK_BUCKET), 'E', new ItemStack(Items.EGG), 'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DOUGH.ordinal()), 'S', new ItemStack(Items.SUGAR), 'C', new ItemStack(Items.DYE, 1, 3)); // RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.CHOCOLATE_CAKE.ordinal()), "MMM", "CCC", "EDS", 'M', new ItemStack(Items.MILK_BUCKET), 'E', new ItemStack(Items.EGG), 'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DOUGH.ordinal()), 'S', new ItemStack(Items.SUGAR), 'C', new ItemStack(Items.DYE, 1, 3));
recipeChocolateCake = RecipeUtil.lastIRecipe(); // recipeChocolateCake = RecipeUtil.lastIRecipe();
//
//Toast // //Toast
RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemFoods, 2, TheFoods.TOAST.ordinal()), new ItemStack(Items.BREAD)); // RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemFoods, 2, TheFoods.TOAST.ordinal()), new ItemStack(Items.BREAD));
recipeToast = RecipeUtil.lastIRecipe(); // recipeToast = RecipeUtil.lastIRecipe();
//
//Chocolate Toast // //Chocolate Toast
RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.CHOCOLATE_TOAST.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.TOAST.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.CHOCOLATE.ordinal())); // RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.CHOCOLATE_TOAST.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.TOAST.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.CHOCOLATE.ordinal()));
recipeChocolateToast = RecipeUtil.lastIRecipe(); // recipeChocolateToast = RecipeUtil.lastIRecipe();
} // }
} }

View file

@ -16,28 +16,24 @@ import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntListValues;
import de.ellpeck.actuallyadditions.mod.fluids.InitFluids; import de.ellpeck.actuallyadditions.mod.fluids.InitFluids;
import de.ellpeck.actuallyadditions.mod.items.InitItems; import de.ellpeck.actuallyadditions.mod.items.InitItems;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems; import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems;
import de.ellpeck.actuallyadditions.mod.misc.apiimpl.farmer.CactusFarmerBehavior; import de.ellpeck.actuallyadditions.mod.misc.apiimpl.farmer.*;
import de.ellpeck.actuallyadditions.mod.misc.apiimpl.farmer.DefaultFarmerBehavior;
import de.ellpeck.actuallyadditions.mod.misc.apiimpl.farmer.MelonPumpkinFarmerBehavior;
import de.ellpeck.actuallyadditions.mod.misc.apiimpl.farmer.NetherWartFarmerBehavior;
import de.ellpeck.actuallyadditions.mod.misc.apiimpl.farmer.ReedFarmerBehavior;
import de.ellpeck.actuallyadditions.mod.misc.apiimpl.farmer.exu.EnderlillyFarmerBehavior;
import de.ellpeck.actuallyadditions.mod.misc.apiimpl.farmer.exu.RedOrchidFarmerBehavior;
import net.minecraft.init.Blocks; import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.Ingredient; import net.minecraft.item.crafting.Ingredient;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
// TODO: [port] MOVE TO DATA_GENERATOR
@Deprecated
public final class InitCrafting { public final class InitCrafting {
public static void init() { public static void init() {
ActuallyAdditions.LOGGER.info("Initializing Crafting Recipes..."); ActuallyAdditions.LOGGER.info("Initializing Crafting Recipes...");
ItemCrafting.init(); // ItemCrafting.init();
BlockCrafting.init(); // BlockCrafting.init();
MiscCrafting.init(); // MiscCrafting.init();
FoodCrafting.init(); // FoodCrafting.init();
ToolCrafting.init(); // ToolCrafting.init();
ActuallyAdditionsAPI.addCompostRecipe(Ingredient.fromStacks(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.MASHED_FOOD.ordinal())), Blocks.LEAVES.getDefaultState(), new ItemStack(InitItems.itemFertilizer), Blocks.DIRT.getDefaultState()); ActuallyAdditionsAPI.addCompostRecipe(Ingredient.fromStacks(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.MASHED_FOOD.ordinal())), Blocks.LEAVES.getDefaultState(), new ItemStack(InitItems.itemFertilizer), Blocks.DIRT.getDefaultState());
ActuallyAdditionsAPI.addCompostRecipe(Ingredient.fromItems(InitItems.itemCanolaSeed), Blocks.DIRT.getDefaultState(), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.BIOMASS.ordinal()), Blocks.SOUL_SAND.getDefaultState()); ActuallyAdditionsAPI.addCompostRecipe(Ingredient.fromItems(InitItems.itemCanolaSeed), Blocks.DIRT.getDefaultState(), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.BIOMASS.ordinal()), Blocks.SOUL_SAND.getDefaultState());
@ -54,8 +50,8 @@ public final class InitCrafting {
ActuallyAdditionsAPI.addFarmerBehavior(new NetherWartFarmerBehavior()); ActuallyAdditionsAPI.addFarmerBehavior(new NetherWartFarmerBehavior());
ActuallyAdditionsAPI.addFarmerBehavior(new ReedFarmerBehavior()); ActuallyAdditionsAPI.addFarmerBehavior(new ReedFarmerBehavior());
ActuallyAdditionsAPI.addFarmerBehavior(new MelonPumpkinFarmerBehavior()); ActuallyAdditionsAPI.addFarmerBehavior(new MelonPumpkinFarmerBehavior());
ActuallyAdditionsAPI.addFarmerBehavior(new EnderlillyFarmerBehavior()); // ActuallyAdditionsAPI.addFarmerBehavior(new EnderlillyFarmerBehavior());
ActuallyAdditionsAPI.addFarmerBehavior(new RedOrchidFarmerBehavior()); // ActuallyAdditionsAPI.addFarmerBehavior(new RedOrchidFarmerBehavior());
new RecipePotionRingCharging(new ResourceLocation(ActuallyAdditions.MODID, "potion_ring_charging")); new RecipePotionRingCharging(new ResourceLocation(ActuallyAdditions.MODID, "potion_ring_charging"));
new RecipeBioMash(new ResourceLocation(ActuallyAdditions.MODID, "bio_mash")); new RecipeBioMash(new ResourceLocation(ActuallyAdditions.MODID, "bio_mash"));

View file

@ -10,377 +10,350 @@
package de.ellpeck.actuallyadditions.mod.crafting; package de.ellpeck.actuallyadditions.mod.crafting;
import java.util.ArrayList; // TODO: [port] MOVE TO DATA_GENERATOR
@Deprecated
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheColoredLampColors;
import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheMiscBlocks;
import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues;
import de.ellpeck.actuallyadditions.mod.items.InitItems;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheCrystals;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheDusts;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheFoods;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems;
import de.ellpeck.actuallyadditions.mod.items.metalists.ThePotionRings;
import de.ellpeck.actuallyadditions.mod.util.RecipeUtil;
import de.ellpeck.actuallyadditions.mod.util.Util;
import de.ellpeck.actuallyadditions.mod.util.crafting.RecipeHandler;
import net.minecraft.enchantment.EnchantmentData;
import net.minecraft.init.Blocks;
import net.minecraft.init.Enchantments;
import net.minecraft.init.Items;
import net.minecraft.init.PotionTypes;
import net.minecraft.item.ItemEnchantedBook;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.potion.PotionUtils;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.oredict.OreDictionary;
public final class ItemCrafting { public final class ItemCrafting {
//
public static final ArrayList<IRecipe> RECIPES_POTION_RINGS = new ArrayList<>(); // public static final ArrayList<IRecipe> RECIPES_POTION_RINGS = new ArrayList<>();
public static final ArrayList<IRecipe> RECIPES_DRILL_COLORING = new ArrayList<>(); // public static final ArrayList<IRecipe> RECIPES_DRILL_COLORING = new ArrayList<>();
public static IRecipe recipePhantomConnector; // public static IRecipe recipePhantomConnector;
public static IRecipe recipeCoil; // public static IRecipe recipeCoil;
public static IRecipe recipeCoilAdvanced; // public static IRecipe recipeCoilAdvanced;
public static IRecipe recipeBook; // public static IRecipe recipeBook;
public static IRecipe recipeTinyCoal; // public static IRecipe recipeTinyCoal;
public static IRecipe recipeTinyChar; // public static IRecipe recipeTinyChar;
public static IRecipe recipeDrill; // public static IRecipe recipeDrill;
public static IRecipe recipeDrillSpeedI; // public static IRecipe recipeDrillSpeedI;
public static IRecipe recipeDrillSpeedII; // public static IRecipe recipeDrillSpeedII;
public static IRecipe recipeDrillSpeedIII; // public static IRecipe recipeDrillSpeedIII;
public static IRecipe recipeDrillFortuneI; // public static IRecipe recipeDrillFortuneI;
public static IRecipe recipeDrillFortuneII; // public static IRecipe recipeDrillFortuneII;
public static IRecipe recipeDrillSilk; // public static IRecipe recipeDrillSilk;
public static IRecipe recipeDrillPlacing; // public static IRecipe recipeDrillPlacing;
public static IRecipe recipeDrillThree; // public static IRecipe recipeDrillThree;
public static IRecipe recipeDrillFive; // public static IRecipe recipeDrillFive;
public static IRecipe recipeBattery; // public static IRecipe recipeBattery;
public static IRecipe recipeBatteryDouble; // public static IRecipe recipeBatteryDouble;
public static IRecipe recipeBatteryTriple; // public static IRecipe recipeBatteryTriple;
public static IRecipe recipeBatteryQuadruple; // public static IRecipe recipeBatteryQuadruple;
public static IRecipe recipeBatteryQuintuple; // public static IRecipe recipeBatteryQuintuple;
public static IRecipe recipeStaff; // public static IRecipe recipeStaff;
public static IRecipe recipeGrowthRing; // public static IRecipe recipeGrowthRing;
public static IRecipe recipeMagnetRing; // public static IRecipe recipeMagnetRing;
public static IRecipe recipeWaterRing; // public static IRecipe recipeWaterRing;
public static IRecipe recipeWings; // public static IRecipe recipeWings;
public static IRecipe recipeCup; // public static IRecipe recipeCup;
public static IRecipe recipeKnifeHandle; // public static IRecipe recipeKnifeHandle;
public static IRecipe recipeKnifeBlade; // public static IRecipe recipeKnifeBlade;
public static IRecipe recipeKnife; // public static IRecipe recipeKnife;
public static IRecipe recipeRing; // public static IRecipe recipeRing;
public static IRecipe recipeDough; // public static IRecipe recipeDough;
public static IRecipe recipeRiceDough; // public static IRecipe recipeRiceDough;
public static IRecipe recipeLeafBlower; // public static IRecipe recipeLeafBlower;
public static IRecipe recipeLeafBlowerAdvanced; // public static IRecipe recipeLeafBlowerAdvanced;
public static IRecipe recipeChestToCrateUpgrade; // public static IRecipe recipeChestToCrateUpgrade;
public static IRecipe recipeSmallToMediumCrateUpgrade; // public static IRecipe recipeSmallToMediumCrateUpgrade;
public static IRecipe recipeMediumToLargeCrateUpgrade; // public static IRecipe recipeMediumToLargeCrateUpgrade;
public static IRecipe recipeLaserWrench; // public static IRecipe recipeLaserWrench;
public static IRecipe recipeDrillCore; // public static IRecipe recipeDrillCore;
public static IRecipe recipeBlackDye; // public static IRecipe recipeBlackDye;
public static IRecipe recipeLens; // public static IRecipe recipeLens;
public static IRecipe recipeCrateKeeper; // public static IRecipe recipeCrateKeeper;
public static IRecipe recipeEnderStar; // public static IRecipe recipeEnderStar;
public static IRecipe recipeSpawnerChanger; // public static IRecipe recipeSpawnerChanger;
public static IRecipe recipeFilter; // public static IRecipe recipeFilter;
public static IRecipe recipePlayerProbe; // public static IRecipe recipePlayerProbe;
public static IRecipe recipeDisenchantingLens; // public static IRecipe recipeDisenchantingLens;
public static IRecipe recipeMiningLens; // public static IRecipe recipeMiningLens;
public static IRecipe recipeBag; // public static IRecipe recipeBag;
public static IRecipe recipeVoidBag; // public static IRecipe recipeVoidBag;
public static IRecipe recipeLensMoreDeath; // public static IRecipe recipeLensMoreDeath;
public static IRecipe recipeFillingWand; // public static IRecipe recipeFillingWand;
public static IRecipe recipeLaserUpgradeInvisibility; // public static IRecipe recipeLaserUpgradeInvisibility;
public static IRecipe recipeLaserUpgradeRange; // public static IRecipe recipeLaserUpgradeRange;
public static IRecipe recipeGoggles; // public static IRecipe recipeGoggles;
public static IRecipe recipeGogglesAdvanced; // public static IRecipe recipeGogglesAdvanced;
//
public static void init() { // public static void init() {
//
//Advanced Goggles // //Advanced Goggles
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemEngineerGogglesAdvanced), " R ", "IGI", 'R', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.REDSTONE.ordinal()), 'I', new ItemStack(Blocks.IRON_BARS), 'G', new ItemStack(InitItems.itemEngineerGoggles)); // RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemEngineerGogglesAdvanced), " R ", "IGI", 'R', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.REDSTONE.ordinal()), 'I', new ItemStack(Blocks.IRON_BARS), 'G', new ItemStack(InitItems.itemEngineerGoggles));
recipeGogglesAdvanced = RecipeUtil.lastIRecipe(); // recipeGogglesAdvanced = RecipeUtil.lastIRecipe();
//
//Goggles // //Goggles
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemEngineerGoggles), " R ", "IGI", 'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), 'I', new ItemStack(Blocks.IRON_BARS), 'G', "blockGlass"); // RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemEngineerGoggles), " R ", "IGI", 'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), 'I', new ItemStack(Blocks.IRON_BARS), 'G', "blockGlass");
recipeGoggles = RecipeUtil.lastIRecipe(); // recipeGoggles = RecipeUtil.lastIRecipe();
//
//Laser Invis Upgrade // //Laser Invis Upgrade
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemLaserUpgradeInvisibility, 4), "GGG", "RCR", "GGG", 'G', "blockGlassBlack", 'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemLaserUpgradeInvisibility, 4), "GGG", "RCR", "GGG", 'G', "blockGlassBlack", 'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()));
recipeLaserUpgradeInvisibility = RecipeUtil.lastIRecipe(); // recipeLaserUpgradeInvisibility = RecipeUtil.lastIRecipe();
//
//Laser Range Upgrade // //Laser Range Upgrade
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemLaserUpgradeRange, 2), "GGC", "RCR", "CGG", 'R', new ItemStack(Items.COMPASS), 'G', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemLaserUpgradeRange, 2), "GGC", "RCR", "CGG", 'R', new ItemStack(Items.COMPASS), 'G', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()));
recipeLaserUpgradeRange = RecipeUtil.lastIRecipe(); // recipeLaserUpgradeRange = RecipeUtil.lastIRecipe();
//
//Filling Wand // //Filling Wand
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemFillingWand), "IPI", "DCD", " B ", 'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.IRON.ordinal()), 'P', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.LAPIS.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), 'B', new ItemStack(InitItems.itemBatteryTriple)); // RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemFillingWand), "IPI", "DCD", " B ", 'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.IRON.ordinal()), 'P', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.LAPIS.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), 'B', new ItemStack(InitItems.itemBatteryTriple));
recipeFillingWand = RecipeUtil.lastIRecipe(); // recipeFillingWand = RecipeUtil.lastIRecipe();
//
//Bag // //Bag
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemBag), "SLS", "SCS", "LVL", 'S', new ItemStack(Items.STRING), 'L', new ItemStack(Items.LEATHER), 'C', "chestWood", 'V', new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.COAL.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemBag), "SLS", "SCS", "LVL", 'S', new ItemStack(Items.STRING), 'L', new ItemStack(Items.LEATHER), 'C', "chestWood", 'V', new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.COAL.ordinal()));
recipeBag = RecipeUtil.lastIRecipe(); // recipeBag = RecipeUtil.lastIRecipe();
//
//Void Bag // //Void Bag
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemVoidBag), new ItemStack(InitItems.itemBag), new ItemStack(Items.ENDER_PEARL), new ItemStack(Blocks.OBSIDIAN), new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.COAL.ordinal())); // RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemVoidBag), new ItemStack(InitItems.itemBag), new ItemStack(Items.ENDER_PEARL), new ItemStack(Blocks.OBSIDIAN), new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.COAL.ordinal()));
recipeVoidBag = RecipeUtil.lastIRecipe(); // recipeVoidBag = RecipeUtil.lastIRecipe();
//
//Lens // //Lens
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.LENS.ordinal()), "GGG", "GBG", "GGG", 'G', "blockGlass", 'B', "gemQuartzBlack"); // RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.LENS.ordinal()), "GGG", "GBG", "GGG", 'G', "blockGlass", 'B', "gemQuartzBlack");
recipeLens = RecipeUtil.lastIRecipe(); // recipeLens = RecipeUtil.lastIRecipe();
//
//Black Dye // //Black Dye
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemMisc, 2, TheMiscItems.BLACK_DYE.ordinal()), new ItemStack(InitBlocks.blockBlackLotus)); // RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemMisc, 2, TheMiscItems.BLACK_DYE.ordinal()), new ItemStack(InitBlocks.blockBlackLotus));
recipeBlackDye = RecipeUtil.lastIRecipe(); // recipeBlackDye = RecipeUtil.lastIRecipe();
//
//Booklet // //Booklet
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemBooklet), new ItemStack(InitItems.itemCanolaSeed), new ItemStack(Items.PAPER)); // RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemBooklet), new ItemStack(InitItems.itemCanolaSeed), new ItemStack(Items.PAPER));
recipeBook = RecipeUtil.lastIRecipe(); // recipeBook = RecipeUtil.lastIRecipe();
//
//Clearing NBT Storage // //Clearing NBT Storage
RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemLaserWrench), new ItemStack(InitItems.itemLaserWrench)); // RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemLaserWrench), new ItemStack(InitItems.itemLaserWrench));
RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemPhantomConnector), new ItemStack(InitItems.itemPhantomConnector)); // RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemPhantomConnector), new ItemStack(InitItems.itemPhantomConnector));
RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemSpawnerChanger), new ItemStack(InitItems.itemSpawnerChanger)); // RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemSpawnerChanger), new ItemStack(InitItems.itemSpawnerChanger));
//
//Chest To Crate Upgrade // //Chest To Crate Upgrade
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemChestToCrateUpgrade), " W ", "WCW", " W ", 'C', new ItemStack(InitBlocks.blockGiantChest), 'W', "plankWood"); // RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemChestToCrateUpgrade), " W ", "WCW", " W ", 'C', new ItemStack(InitBlocks.blockGiantChest), 'W', "plankWood");
recipeChestToCrateUpgrade = RecipeUtil.lastIRecipe(); // recipeChestToCrateUpgrade = RecipeUtil.lastIRecipe();
//
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemSmallToMediumCrateUpgrade), " W ", "WCW", " W ", 'C', new ItemStack(InitBlocks.blockGiantChestMedium), 'W', "plankWood"); // RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemSmallToMediumCrateUpgrade), " W ", "WCW", " W ", 'C', new ItemStack(InitBlocks.blockGiantChestMedium), 'W', "plankWood");
recipeSmallToMediumCrateUpgrade = RecipeUtil.lastIRecipe(); // recipeSmallToMediumCrateUpgrade = RecipeUtil.lastIRecipe();
//
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMediumToLargeCrateUpgrade), " W ", "WCW", " W ", 'C', new ItemStack(InitBlocks.blockGiantChestLarge), 'W', "plankWood"); // RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMediumToLargeCrateUpgrade), " W ", "WCW", " W ", 'C', new ItemStack(InitBlocks.blockGiantChestLarge), 'W', "plankWood");
recipeMediumToLargeCrateUpgrade = RecipeUtil.lastIRecipe(); // recipeMediumToLargeCrateUpgrade = RecipeUtil.lastIRecipe();
//
//Disenchanting Lens // //Disenchanting Lens
ItemStack crystal = new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()); // ItemStack crystal = new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal());
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemDisenchantingLens), new ItemStack(Blocks.ENCHANTING_TABLE), crystal.copy(), crystal.copy(), crystal.copy(), crystal.copy(), crystal.copy(), crystal.copy(), crystal.copy(), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.LENS.ordinal())); // RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemDisenchantingLens), new ItemStack(Blocks.ENCHANTING_TABLE), crystal.copy(), crystal.copy(), crystal.copy(), crystal.copy(), crystal.copy(), crystal.copy(), crystal.copy(), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.LENS.ordinal()));
recipeDisenchantingLens = RecipeUtil.lastIRecipe(); // recipeDisenchantingLens = RecipeUtil.lastIRecipe();
//
//Mining Lens // //Mining Lens
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMiningLens), "DGI", "CLB", "QPE", 'D', "gemDiamond", 'G', "ingotGold", 'I', "ingotIron", 'C', "coal", 'L', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.LENS.ordinal()), 'B', "gemQuartzBlack", 'Q', "gemQuartz", 'P', "gemLapis", 'E', "gemEmerald"); // RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMiningLens), "DGI", "CLB", "QPE", 'D', "gemDiamond", 'G', "ingotGold", 'I', "ingotIron", 'C', "coal", 'L', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.LENS.ordinal()), 'B', "gemQuartzBlack", 'Q', "gemQuartz", 'P', "gemLapis", 'E', "gemEmerald");
recipeMiningLens = RecipeUtil.lastIRecipe(); // recipeMiningLens = RecipeUtil.lastIRecipe();
//
//Killer Lens // //Killer Lens
ItemStack enchBook = new ItemStack(Items.ENCHANTED_BOOK); // ItemStack enchBook = new ItemStack(Items.ENCHANTED_BOOK);
ItemEnchantedBook.addEnchantment(enchBook, new EnchantmentData(Enchantments.SHARPNESS, 5)); // ItemEnchantedBook.addEnchantment(enchBook, new EnchantmentData(Enchantments.SHARPNESS, 5));
//
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemMoreDamageLens), new ItemStack(Items.DIAMOND_SWORD), new ItemStack(InitItems.itemDamageLens), enchBook); // RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemMoreDamageLens), new ItemStack(Items.DIAMOND_SWORD), new ItemStack(InitItems.itemDamageLens), enchBook);
recipeLensMoreDeath = RecipeUtil.lastIRecipe(); // recipeLensMoreDeath = RecipeUtil.lastIRecipe();
//
//Filter // //Filter
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemFilter), "III", "IQI", "III", 'I', new ItemStack(Blocks.IRON_BARS), 'Q', "gemQuartzBlack"); // RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemFilter), "III", "IQI", "III", 'I', new ItemStack(Blocks.IRON_BARS), 'Q', "gemQuartzBlack");
recipeFilter = RecipeUtil.lastIRecipe(); // recipeFilter = RecipeUtil.lastIRecipe();
//
//Crate Keeper // //Crate Keeper
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemCrateKeeper), "WIW", "IQI", "WIW", 'I', "ingotIron", 'W', "plankWood", 'Q', "gemQuartzBlack"); // RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemCrateKeeper), "WIW", "IQI", "WIW", 'I', "ingotIron", 'W', "plankWood", 'Q', "gemQuartzBlack");
recipeCrateKeeper = RecipeUtil.lastIRecipe(); // recipeCrateKeeper = RecipeUtil.lastIRecipe();
//
//Spawner Changer // //Spawner Changer
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemSpawnerChanger), "MSM", "SDS", "MSM", 'M', new ItemStack(Items.MAGMA_CREAM), 'S', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.SPAWNER_SHARD.ordinal()), 'D', new ItemStack(InitBlocks.blockCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemSpawnerChanger), "MSM", "SDS", "MSM", 'M', new ItemStack(Items.MAGMA_CREAM), 'S', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.SPAWNER_SHARD.ordinal()), 'D', new ItemStack(InitBlocks.blockCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()));
recipeSpawnerChanger = RecipeUtil.lastIRecipe(); // recipeSpawnerChanger = RecipeUtil.lastIRecipe();
//
//Laser Wrench // //Laser Wrench
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemLaserWrench), "C ", " S ", " S", 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'S', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemLaserWrench), "C ", " S ", " S", 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'S', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()));
recipeLaserWrench = RecipeUtil.lastIRecipe(); // recipeLaserWrench = RecipeUtil.lastIRecipe();
//
//Rice Stuff // //Rice Stuff
RecipeHandler.addOreDictRecipe(new ItemStack(Items.PAPER, 3), "R ", " R ", " R", 'R', new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(Items.PAPER, 3), "R ", " R ", " R", 'R', new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()));
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMisc, 4, TheMiscItems.RICE_SLIME.ordinal()), " R ", "RBR", " R ", 'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RICE_DOUGH.ordinal()), 'B', Items.WATER_BUCKET); // RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMisc, 4, TheMiscItems.RICE_SLIME.ordinal()), " R ", "RBR", " R ", 'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RICE_DOUGH.ordinal()), 'B', Items.WATER_BUCKET);
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMisc, 4, TheMiscItems.RICE_SLIME.ordinal()), " R ", "RBR", " R ", 'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RICE_DOUGH.ordinal()), 'B', new ItemStack(Items.POTIONITEM)); // RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMisc, 4, TheMiscItems.RICE_SLIME.ordinal()), " R ", "RBR", " R ", 'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RICE_DOUGH.ordinal()), 'B', new ItemStack(Items.POTIONITEM));
//
//Leaf Blower // //Leaf Blower
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemLeafBlower), " F", "IP", "IC", 'F', new ItemStack(Items.FLINT), 'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), 'P', new ItemStack(Blocks.PISTON), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemLeafBlower), " F", "IP", "IC", 'F', new ItemStack(Items.FLINT), 'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), 'P', new ItemStack(Blocks.PISTON), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()));
recipeLeafBlower = RecipeUtil.lastIRecipe(); // recipeLeafBlower = RecipeUtil.lastIRecipe();
//
//Drill // //Drill
ItemStack lightBlueDrill = new ItemStack(InitItems.itemDrill, 1, TheColoredLampColors.LIGHT_BLUE.ordinal()); // ItemStack lightBlueDrill = new ItemStack(InitItems.itemDrill, 1, TheColoredLampColors.LIGHT_BLUE.ordinal());
RecipeHandler.addOreDictRecipe(lightBlueDrill.copy(), "DDD", "CRC", "III", 'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DRILL_CORE.ordinal()), 'I', new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.IRON.ordinal())); // RecipeHandler.addOreDictRecipe(lightBlueDrill.copy(), "DDD", "CRC", "III", 'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DRILL_CORE.ordinal()), 'I', new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.IRON.ordinal()));
recipeDrill = RecipeUtil.lastIRecipe(); // recipeDrill = RecipeUtil.lastIRecipe();
//
for (int i = 0; i < 16; i++) { // for (int i = 0; i < 16; i++) {
if (i != TheColoredLampColors.LIGHT_BLUE.ordinal()) { // if (i != TheColoredLampColors.LIGHT_BLUE.ordinal()) {
new RecipeKeepDataShapeless(new ResourceLocation(ActuallyAdditions.MODID, "dril_color_change" + i), new ItemStack(InitItems.itemDrill, 1, i), new ItemStack(InitItems.itemDrill, 1, Util.WILDCARD), lightBlueDrill.copy(), "dye" + TheColoredLampColors.values()[i].oreName); // new RecipeKeepDataShapeless(new ResourceLocation(ActuallyAdditions.MODID, "dril_color_change" + i), new ItemStack(InitItems.itemDrill, 1, i), new ItemStack(InitItems.itemDrill, 1, Util.WILDCARD), lightBlueDrill.copy(), "dye" + TheColoredLampColors.values()[i].oreName);
RECIPES_DRILL_COLORING.add(RecipeUtil.lastIRecipe()); // RECIPES_DRILL_COLORING.add(RecipeUtil.lastIRecipe());
} // }
} // }
//
//Drill Core // //Drill Core
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DRILL_CORE.ordinal()), "ICI", "CRC", "ICI", 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), 'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), 'I', new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.IRON.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DRILL_CORE.ordinal()), "ICI", "CRC", "ICI", 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), 'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), 'I', new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.IRON.ordinal()));
recipeDrillCore = RecipeUtil.lastIRecipe(); // recipeDrillCore = RecipeUtil.lastIRecipe();
//
//Tele Staff // //Tele Staff
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemTeleStaff), " FE", " S ", "SB ", 'F', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()), 'E', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.ordinal()), 'S', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal()), 'B', new ItemStack(InitItems.itemBattery, 1, Util.WILDCARD)); // RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemTeleStaff), " FE", " S ", "SB ", 'F', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()), 'E', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.ordinal()), 'S', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal()), 'B', new ItemStack(InitItems.itemBattery, 1, Util.WILDCARD));
recipeStaff = RecipeUtil.lastIRecipe(); // recipeStaff = RecipeUtil.lastIRecipe();
//
//Drill Speed // //Drill Speed
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemDrillUpgradeSpeed), "ISI", "SRS", "ISI", 'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), 'S', Items.SUGAR, 'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemDrillUpgradeSpeed), "ISI", "SRS", "ISI", 'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), 'S', Items.SUGAR, 'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()));
recipeDrillSpeedI = RecipeUtil.lastIRecipe(); // recipeDrillSpeedI = RecipeUtil.lastIRecipe();
//
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemDrillUpgradeSpeedII), "ISI", "SCS", "ISI", 'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), 'S', Items.SUGAR, 'C', Items.CAKE); // RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemDrillUpgradeSpeedII), "ISI", "SCS", "ISI", 'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), 'S', Items.SUGAR, 'C', Items.CAKE);
recipeDrillSpeedII = RecipeUtil.lastIRecipe(); // recipeDrillSpeedII = RecipeUtil.lastIRecipe();
//
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemDrillUpgradeSpeedIII), "ISI", "SFS", "ISI", 'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.IRON.ordinal()), 'S', Items.SUGAR, 'F', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemDrillUpgradeSpeedIII), "ISI", "SFS", "ISI", 'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.IRON.ordinal()), 'S', Items.SUGAR, 'F', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()));
recipeDrillSpeedIII = RecipeUtil.lastIRecipe(); // recipeDrillSpeedIII = RecipeUtil.lastIRecipe();
//
//Drill Fortune // //Drill Fortune
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemDrillUpgradeFortune), "ISI", "SRS", "ISI", 'I', Blocks.GLOWSTONE, 'S', Items.REDSTONE, 'R', new ItemStack(InitBlocks.blockCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemDrillUpgradeFortune), "ISI", "SRS", "ISI", 'I', Blocks.GLOWSTONE, 'S', Items.REDSTONE, 'R', new ItemStack(InitBlocks.blockCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()));
recipeDrillFortuneI = RecipeUtil.lastIRecipe(); // recipeDrillFortuneI = RecipeUtil.lastIRecipe();
//
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemDrillUpgradeFortuneII), "ISI", "SRS", "ISI", 'I', Blocks.GLOWSTONE, 'S', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.REDSTONE.ordinal()), 'R', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemDrillUpgradeFortuneII), "ISI", "SRS", "ISI", 'I', Blocks.GLOWSTONE, 'S', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.REDSTONE.ordinal()), 'R', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal()));
recipeDrillFortuneII = RecipeUtil.lastIRecipe(); // recipeDrillFortuneII = RecipeUtil.lastIRecipe();
//
//Drill Size // //Drill Size
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemDrillUpgradeThreeByThree), "DID", "ICI", "DID", 'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), 'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemDrillUpgradeThreeByThree), "DID", "ICI", "DID", 'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), 'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()));
recipeDrillThree = RecipeUtil.lastIRecipe(); // recipeDrillThree = RecipeUtil.lastIRecipe();
//
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemDrillUpgradeFiveByFive), "DID", "ICI", "DID", 'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.IRON.ordinal()), 'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemDrillUpgradeFiveByFive), "DID", "ICI", "DID", 'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.IRON.ordinal()), 'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()));
recipeDrillFive = RecipeUtil.lastIRecipe(); // recipeDrillFive = RecipeUtil.lastIRecipe();
//
//Drill Silk Touch // //Drill Silk Touch
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemDrillUpgradeSilkTouch), "DSD", "SCS", "DSD", 'D', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.EMERALD.ordinal()), 'S', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemDrillUpgradeSilkTouch), "DSD", "SCS", "DSD", 'D', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.EMERALD.ordinal()), 'S', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()));
recipeDrillSilk = RecipeUtil.lastIRecipe(); // recipeDrillSilk = RecipeUtil.lastIRecipe();
//
//Drill Placing // //Drill Placing
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemDrillUpgradeBlockPlacing), "CEC", "RAR", "CEC", 'C', "cobblestone", 'E', Items.PAPER, 'A', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), 'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemDrillUpgradeBlockPlacing), "CEC", "RAR", "CEC", 'C', "cobblestone", 'E', Items.PAPER, 'A', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), 'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()));
recipeDrillPlacing = RecipeUtil.lastIRecipe(); // recipeDrillPlacing = RecipeUtil.lastIRecipe();
//
//Battery // //Battery
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemBattery), " R ", "ICI", "III", 'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), 'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemBattery), " R ", "ICI", "III", 'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), 'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()));
recipeBattery = RecipeUtil.lastIRecipe(); // recipeBattery = RecipeUtil.lastIRecipe();
//
//Double Battery // //Double Battery
new RecipeKeepDataShaped(new ResourceLocation(ActuallyAdditions.MODID, "double_battery"), new ItemStack(InitItems.itemBatteryDouble), new ItemStack(InitItems.itemBattery), " R ", "ICI", "III", 'R', new ItemStack(InitItems.itemBattery), 'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())); // new RecipeKeepDataShaped(new ResourceLocation(ActuallyAdditions.MODID, "double_battery"), new ItemStack(InitItems.itemBatteryDouble), new ItemStack(InitItems.itemBattery), " R ", "ICI", "III", 'R', new ItemStack(InitItems.itemBattery), 'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()));
recipeBatteryDouble = RecipeUtil.lastIRecipe(); // recipeBatteryDouble = RecipeUtil.lastIRecipe();
//
//Magnet Ring // //Magnet Ring
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMagnetRing), "RIB", "IOI", "BIR", 'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), 'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), 'B', new ItemStack(Items.DYE, 1, 4), 'O', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RING.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMagnetRing), "RIB", "IOI", "BIR", 'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), 'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), 'B', new ItemStack(Items.DYE, 1, 4), 'O', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RING.ordinal()));
recipeMagnetRing = RecipeUtil.lastIRecipe(); // recipeMagnetRing = RecipeUtil.lastIRecipe();
//
//Growth Ring // //Growth Ring
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemGrowthRing), "SIS", "IOI", "SIS", 'S', new ItemStack(Items.WHEAT_SEEDS), 'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.IRON.ordinal()), 'O', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RING.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemGrowthRing), "SIS", "IOI", "SIS", 'S', new ItemStack(Items.WHEAT_SEEDS), 'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.IRON.ordinal()), 'O', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RING.ordinal()));
recipeGrowthRing = RecipeUtil.lastIRecipe(); // recipeGrowthRing = RecipeUtil.lastIRecipe();
//
//Water Ring // //Water Ring
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemWaterRemovalRing), "BIB", "IOI", "BIB", 'B', new ItemStack(Items.WATER_BUCKET), 'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()), 'O', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RING.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemWaterRemovalRing), "BIB", "IOI", "BIB", 'B', new ItemStack(Items.WATER_BUCKET), 'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()), 'O', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RING.ordinal()));
recipeWaterRing = RecipeUtil.lastIRecipe(); // recipeWaterRing = RecipeUtil.lastIRecipe();
//
//Triple Battery // //Triple Battery
new RecipeKeepDataShaped(new ResourceLocation(ActuallyAdditions.MODID, "triple_battery"), new ItemStack(InitItems.itemBatteryTriple), new ItemStack(InitItems.itemBatteryDouble), " R ", "ICI", "III", 'R', new ItemStack(InitItems.itemBatteryDouble), 'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.IRON.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())); // new RecipeKeepDataShaped(new ResourceLocation(ActuallyAdditions.MODID, "triple_battery"), new ItemStack(InitItems.itemBatteryTriple), new ItemStack(InitItems.itemBatteryDouble), " R ", "ICI", "III", 'R', new ItemStack(InitItems.itemBatteryDouble), 'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.IRON.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()));
recipeBatteryTriple = RecipeUtil.lastIRecipe(); // recipeBatteryTriple = RecipeUtil.lastIRecipe();
//
//Quadruple Battery // //Quadruple Battery
new RecipeKeepDataShaped(new ResourceLocation(ActuallyAdditions.MODID, "quadruple_battery"), new ItemStack(InitItems.itemBatteryQuadruple), new ItemStack(InitItems.itemBatteryTriple), " R ", "ICI", "III", 'R', new ItemStack(InitItems.itemBatteryTriple), 'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.IRON.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())); // new RecipeKeepDataShaped(new ResourceLocation(ActuallyAdditions.MODID, "quadruple_battery"), new ItemStack(InitItems.itemBatteryQuadruple), new ItemStack(InitItems.itemBatteryTriple), " R ", "ICI", "III", 'R', new ItemStack(InitItems.itemBatteryTriple), 'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.IRON.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()));
recipeBatteryQuadruple = RecipeUtil.lastIRecipe(); // recipeBatteryQuadruple = RecipeUtil.lastIRecipe();
//
//Quintuple Battery // //Quintuple Battery
new RecipeKeepDataShaped(new ResourceLocation(ActuallyAdditions.MODID, "quintuple_battery"), new ItemStack(InitItems.itemBatteryQuintuple), new ItemStack(InitItems.itemBatteryQuadruple), " R ", "ICI", "III", 'R', new ItemStack(InitItems.itemBatteryQuadruple), 'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())); // new RecipeKeepDataShaped(new ResourceLocation(ActuallyAdditions.MODID, "quintuple_battery"), new ItemStack(InitItems.itemBatteryQuintuple), new ItemStack(InitItems.itemBatteryQuadruple), " R ", "ICI", "III", 'R', new ItemStack(InitItems.itemBatteryQuadruple), 'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()));
recipeBatteryQuintuple = RecipeUtil.lastIRecipe(); // recipeBatteryQuintuple = RecipeUtil.lastIRecipe();
//
//Bat Wings // //Bat Wings
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemWingsOfTheBats), "WNW", "WDW", "WNW", 'W', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.BAT_WING.ordinal()), 'N', new ItemStack(InitBlocks.blockCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()), 'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.ENDER_STAR.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemWingsOfTheBats), "WNW", "WDW", "WNW", 'W', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.BAT_WING.ordinal()), 'N', new ItemStack(InitBlocks.blockCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()), 'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.ENDER_STAR.ordinal()));
recipeWings = RecipeUtil.lastIRecipe(); // recipeWings = RecipeUtil.lastIRecipe();
//
//Coil // //Coil
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), " R ", "RIR", " R ", 'I', ConfigBoolValues.SUPER_DUPER_HARD_MODE.isEnabled() ? new ItemStack(InitItems.itemMisc, 1, TheMiscItems.ENDER_STAR.ordinal()) : "gemQuartzBlack", 'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), " R ", "RIR", " R ", 'I', ConfigBoolValues.SUPER_DUPER_HARD_MODE.isEnabled() ? new ItemStack(InitItems.itemMisc, 1, TheMiscItems.ENDER_STAR.ordinal()) : "gemQuartzBlack", 'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()));
recipeCoil = RecipeUtil.lastIRecipe(); // recipeCoil = RecipeUtil.lastIRecipe();
//
//Cup // //Cup
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CUP.ordinal()), "S S", "SCS", "SSS", 'S', "stone", 'C', "cropCoffee"); // RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CUP.ordinal()), "S S", "SCS", "SSS", 'S', "stone", 'C', "cropCoffee");
recipeCup = RecipeUtil.lastIRecipe(); // recipeCup = RecipeUtil.lastIRecipe();
//
//Resonant Rice // //Resonant Rice
if (!OreDictionary.getOres("nuggetEnderium", false).isEmpty()) { // if (!OreDictionary.getOres("nuggetEnderium", false).isEmpty()) {
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemResonantRice), new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()), "nuggetEnderium", Items.GUNPOWDER); // RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemResonantRice), new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()), "nuggetEnderium", Items.GUNPOWDER);
} // }
//
//Advanced Coil // //Advanced Coil
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), "GGG", "GCG", "GGG", 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), 'G', "nuggetGold"); // RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), "GGG", "GCG", "GGG", 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), 'G', "nuggetGold");
recipeCoilAdvanced = RecipeUtil.lastIRecipe(); // recipeCoilAdvanced = RecipeUtil.lastIRecipe();
//
//Advanced Leaf Blower // //Advanced Leaf Blower
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemLeafBlowerAdvanced), " F", "DP", "DC", 'F', new ItemStack(Items.FLINT), 'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), 'P', new ItemStack(Blocks.PISTON), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemLeafBlowerAdvanced), " F", "DP", "DC", 'F', new ItemStack(Items.FLINT), 'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), 'P', new ItemStack(Blocks.PISTON), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()));
recipeLeafBlowerAdvanced = RecipeUtil.lastIRecipe(); // recipeLeafBlowerAdvanced = RecipeUtil.lastIRecipe();
//
//Phantom Connector // //Phantom Connector
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemPhantomConnector), "YE", "EY", "S ", 'Y', Items.ENDER_EYE, 'E', Items.ENDER_PEARL, 'S', "stickWood"); // RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemPhantomConnector), "YE", "EY", "S ", 'Y', Items.ENDER_EYE, 'E', Items.ENDER_PEARL, 'S', "stickWood");
recipePhantomConnector = RecipeUtil.lastIRecipe(); // recipePhantomConnector = RecipeUtil.lastIRecipe();
//
//Player Probe // //Player Probe
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemPlayerProbe), "A A", "AIA", "RHR", 'A', new ItemStack(Blocks.IRON_BARS), 'R', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.REDSTONE.ordinal()), 'H', new ItemStack(Items.SKULL, 1, 1), 'I', new ItemStack(Items.IRON_HELMET)); // RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemPlayerProbe), "A A", "AIA", "RHR", 'A', new ItemStack(Blocks.IRON_BARS), 'R', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.REDSTONE.ordinal()), 'H', new ItemStack(Items.SKULL, 1, 1), 'I', new ItemStack(Items.IRON_HELMET));
recipePlayerProbe = RecipeUtil.lastIRecipe(); // recipePlayerProbe = RecipeUtil.lastIRecipe();
//
//Quartz // //Quartz
GameRegistry.addSmelting(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ORE_QUARTZ.ordinal()), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), 1F); // GameRegistry.addSmelting(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ORE_QUARTZ.ordinal()), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), 1F);
//
//Knife // //Knife
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemKnife), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_BLADE.ordinal()), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_HANDLE.ordinal())); // RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemKnife), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_BLADE.ordinal()), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_HANDLE.ordinal()));
recipeKnife = RecipeUtil.lastIRecipe(); // recipeKnife = RecipeUtil.lastIRecipe();
//
//Crafter on a Stick // //Crafter on a Stick
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemCrafterOnAStick), new ItemStack(Blocks.CRAFTING_TABLE), new ItemStack(Items.SIGN)); // RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemCrafterOnAStick), new ItemStack(Blocks.CRAFTING_TABLE), new ItemStack(Items.SIGN));
//
//Tiny Coal // //Tiny Coal
if (ConfigBoolValues.TINY_COAL_STUFF.isEnabled()) { // if (ConfigBoolValues.TINY_COAL_STUFF.isEnabled()) {
RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemMisc, 8, TheMiscItems.TINY_COAL.ordinal()), new ItemStack(Items.COAL)); // RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemMisc, 8, TheMiscItems.TINY_COAL.ordinal()), new ItemStack(Items.COAL));
recipeTinyCoal = RecipeUtil.lastIRecipe(); // recipeTinyCoal = RecipeUtil.lastIRecipe();
RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemMisc, 8, TheMiscItems.TINY_CHAR.ordinal()), new ItemStack(Items.COAL, 1, 1)); // RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemMisc, 8, TheMiscItems.TINY_CHAR.ordinal()), new ItemStack(Items.COAL, 1, 1));
recipeTinyChar = RecipeUtil.lastIRecipe(); // recipeTinyChar = RecipeUtil.lastIRecipe();
RecipeHandler.addOreDictRecipe(new ItemStack(Items.COAL), "CCC", "C C", "CCC", 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.TINY_COAL.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(Items.COAL), "CCC", "C C", "CCC", 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.TINY_COAL.ordinal()));
RecipeHandler.addOreDictRecipe(new ItemStack(Items.COAL, 1, 1), "CCC", "C C", "CCC", 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.TINY_CHAR.ordinal())); // RecipeHandler.addOreDictRecipe(new ItemStack(Items.COAL, 1, 1), "CCC", "C C", "CCC", 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.TINY_CHAR.ordinal()));
} // }
//
//Rice Seeds // //Rice Seeds
RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemRiceSeed), new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal())); // RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemRiceSeed), new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()));
//
//Canola Seeds // //Canola Seeds
RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemCanolaSeed), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CANOLA.ordinal())); // RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemCanolaSeed), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CANOLA.ordinal()));
//
//Rings // //Rings
initPotionRingRecipes(); // initPotionRingRecipes();
//
//Ingots from Dusts // //Ingots from Dusts
GameRegistry.addSmelting(new ItemStack(InitItems.itemDust, 1, TheDusts.IRON.ordinal()), new ItemStack(Items.IRON_INGOT), 1F); // GameRegistry.addSmelting(new ItemStack(InitItems.itemDust, 1, TheDusts.IRON.ordinal()), new ItemStack(Items.IRON_INGOT), 1F);
GameRegistry.addSmelting(new ItemStack(InitItems.itemDust, 1, TheDusts.GOLD.ordinal()), new ItemStack(Items.GOLD_INGOT), 1F); // GameRegistry.addSmelting(new ItemStack(InitItems.itemDust, 1, TheDusts.GOLD.ordinal()), new ItemStack(Items.GOLD_INGOT), 1F);
GameRegistry.addSmelting(new ItemStack(InitItems.itemDust, 1, TheDusts.DIAMOND.ordinal()), new ItemStack(Items.DIAMOND), 1F); // GameRegistry.addSmelting(new ItemStack(InitItems.itemDust, 1, TheDusts.DIAMOND.ordinal()), new ItemStack(Items.DIAMOND), 1F);
GameRegistry.addSmelting(new ItemStack(InitItems.itemDust, 1, TheDusts.EMERALD.ordinal()), new ItemStack(Items.EMERALD), 1F); // GameRegistry.addSmelting(new ItemStack(InitItems.itemDust, 1, TheDusts.EMERALD.ordinal()), new ItemStack(Items.EMERALD), 1F);
GameRegistry.addSmelting(new ItemStack(InitItems.itemDust, 1, TheDusts.LAPIS.ordinal()), new ItemStack(Items.DYE, 1, 4), 1F); // GameRegistry.addSmelting(new ItemStack(InitItems.itemDust, 1, TheDusts.LAPIS.ordinal()), new ItemStack(Items.DYE, 1, 4), 1F);
GameRegistry.addSmelting(new ItemStack(InitItems.itemDust, 1, TheDusts.QUARTZ_BLACK.ordinal()), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), 1F); // GameRegistry.addSmelting(new ItemStack(InitItems.itemDust, 1, TheDusts.QUARTZ_BLACK.ordinal()), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), 1F);
GameRegistry.addSmelting(new ItemStack(InitItems.itemDust, 1, TheDusts.QUARTZ.ordinal()), new ItemStack(Items.QUARTZ), 1F); // GameRegistry.addSmelting(new ItemStack(InitItems.itemDust, 1, TheDusts.QUARTZ.ordinal()), new ItemStack(Items.QUARTZ), 1F);
GameRegistry.addSmelting(new ItemStack(InitItems.itemDust, 1, TheDusts.COAL.ordinal()), new ItemStack(Items.COAL), 1F); // GameRegistry.addSmelting(new ItemStack(InitItems.itemDust, 1, TheDusts.COAL.ordinal()), new ItemStack(Items.COAL), 1F);
//
} // }
//
public static void initPotionRingRecipes() { // public static void initPotionRingRecipes() {
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RING.ordinal()), "IGI", "GDG", "IGI", 'G', "ingotGold", 'I', "ingotIron", 'D', "dustGlowstone"); // RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RING.ordinal()), "IGI", "GDG", "IGI", 'G', "ingotGold", 'I', "ingotIron", 'D', "dustGlowstone");
recipeRing = RecipeUtil.lastIRecipe(); // recipeRing = RecipeUtil.lastIRecipe();
//
addRingRecipeWithStack(ThePotionRings.SPEED.craftingItem, ThePotionRings.SPEED.ordinal()); // addRingRecipeWithStack(ThePotionRings.SPEED.craftingItem, ThePotionRings.SPEED.ordinal());
addRingRecipeWithStack(ThePotionRings.HASTE.craftingItem, ThePotionRings.HASTE.ordinal()); // addRingRecipeWithStack(ThePotionRings.HASTE.craftingItem, ThePotionRings.HASTE.ordinal());
addRingRecipeWithStack(ThePotionRings.STRENGTH.craftingItem, ThePotionRings.STRENGTH.ordinal()); // addRingRecipeWithStack(ThePotionRings.STRENGTH.craftingItem, ThePotionRings.STRENGTH.ordinal());
addRingRecipeWithStack(ThePotionRings.JUMP_BOOST.craftingItem, ThePotionRings.JUMP_BOOST.ordinal()); // addRingRecipeWithStack(ThePotionRings.JUMP_BOOST.craftingItem, ThePotionRings.JUMP_BOOST.ordinal());
addRingRecipeWithStack(ThePotionRings.REGEN.craftingItem, ThePotionRings.REGEN.ordinal()); // addRingRecipeWithStack(ThePotionRings.REGEN.craftingItem, ThePotionRings.REGEN.ordinal());
addRingRecipeWithStack(ThePotionRings.RESISTANCE.craftingItem, ThePotionRings.RESISTANCE.ordinal()); // addRingRecipeWithStack(ThePotionRings.RESISTANCE.craftingItem, ThePotionRings.RESISTANCE.ordinal());
addRingRecipeWithStack(ThePotionRings.FIRE_RESISTANCE.craftingItem, ThePotionRings.FIRE_RESISTANCE.ordinal()); // addRingRecipeWithStack(ThePotionRings.FIRE_RESISTANCE.craftingItem, ThePotionRings.FIRE_RESISTANCE.ordinal());
addRingRecipeWithStack(ThePotionRings.WATER_BREATHING.craftingItem, ThePotionRings.WATER_BREATHING.ordinal()); // addRingRecipeWithStack(ThePotionRings.WATER_BREATHING.craftingItem, ThePotionRings.WATER_BREATHING.ordinal());
addRingRecipeWithStack(ThePotionRings.INVISIBILITY.craftingItem, ThePotionRings.INVISIBILITY.ordinal()); // addRingRecipeWithStack(ThePotionRings.INVISIBILITY.craftingItem, ThePotionRings.INVISIBILITY.ordinal());
addRingRecipeWithStack(ThePotionRings.NIGHT_VISION.craftingItem, ThePotionRings.NIGHT_VISION.ordinal()); // addRingRecipeWithStack(ThePotionRings.NIGHT_VISION.craftingItem, ThePotionRings.NIGHT_VISION.ordinal());
} // }
//
public static void addRingRecipeWithStack(ItemStack mainStack, int meta) { // public static void addRingRecipeWithStack(ItemStack mainStack, int meta) {
ItemStack potion = new ItemStack(Items.POTIONITEM); // ItemStack potion = new ItemStack(Items.POTIONITEM);
PotionUtils.addPotionToItemStack(potion, PotionTypes.AWKWARD); // PotionUtils.addPotionToItemStack(potion, PotionTypes.AWKWARD);
//
RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemPotionRing, 1, meta), mainStack, mainStack, mainStack, mainStack, new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.DIAMOND.ordinal()), new ItemStack(Items.NETHER_WART), potion, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RING.ordinal())); // RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemPotionRing, 1, meta), mainStack, mainStack, mainStack, mainStack, new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.DIAMOND.ordinal()), new ItemStack(Items.NETHER_WART), potion, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RING.ordinal()));
RECIPES_POTION_RINGS.add(RecipeUtil.lastIRecipe()); // RECIPES_POTION_RINGS.add(RecipeUtil.lastIRecipe());
//
RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemPotionRingAdvanced, 1, meta), new ItemStack(InitItems.itemPotionRing, 1, meta), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.ENDER_STAR.ordinal())); // RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemPotionRingAdvanced, 1, meta), new ItemStack(InitItems.itemPotionRing, 1, meta), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.ENDER_STAR.ordinal()));
RECIPES_POTION_RINGS.add(RecipeUtil.lastIRecipe()); // RECIPES_POTION_RINGS.add(RecipeUtil.lastIRecipe());
} // }
} }

View file

@ -10,77 +10,67 @@
package de.ellpeck.actuallyadditions.mod.crafting; package de.ellpeck.actuallyadditions.mod.crafting;
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; // TODO: [port] MOVE TO DATA_GENERATOR
import de.ellpeck.actuallyadditions.mod.items.InitItems; @Deprecated
import de.ellpeck.actuallyadditions.mod.items.metalists.TheCrystals;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheFoods;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems;
import de.ellpeck.actuallyadditions.mod.util.RecipeUtil;
import de.ellpeck.actuallyadditions.mod.util.crafting.RecipeHandler;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe;
import net.minecraftforge.fml.common.registry.GameRegistry;
public final class MiscCrafting { public final class MiscCrafting {
//
public static final IRecipe[] RECIPES_CRYSTAL_SHARDS = new IRecipe[TheCrystals.values().length]; // public static final IRecipe[] RECIPES_CRYSTAL_SHARDS = new IRecipe[TheCrystals.values().length];
public static final IRecipe[] RECIPES_CRYSTAL_SHARDS_BACK = new IRecipe[TheCrystals.values().length]; // public static final IRecipe[] RECIPES_CRYSTAL_SHARDS_BACK = new IRecipe[TheCrystals.values().length];
//
public static final IRecipe[] RECIPES_CRYSTALS = new IRecipe[TheCrystals.values().length]; // public static final IRecipe[] RECIPES_CRYSTALS = new IRecipe[TheCrystals.values().length];
public static final IRecipe[] RECIPES_CRYSTAL_BLOCKS = new IRecipe[TheCrystals.values().length]; // public static final IRecipe[] RECIPES_CRYSTAL_BLOCKS = new IRecipe[TheCrystals.values().length];
//
public static final IRecipe[] RECIPES_EMPOWERED_CRYSTALS = new IRecipe[TheCrystals.values().length]; // public static final IRecipe[] RECIPES_EMPOWERED_CRYSTALS = new IRecipe[TheCrystals.values().length];
public static final IRecipe[] RECIPES_EMPOWERED_CRYSTAL_BLOCKS = new IRecipe[TheCrystals.values().length]; // public static final IRecipe[] RECIPES_EMPOWERED_CRYSTAL_BLOCKS = new IRecipe[TheCrystals.values().length];
//
public static void init() { // public static void init() {
//
//Bio Coal // //Bio Coal
GameRegistry.addSmelting(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.BIOMASS.ordinal()), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.BIOCOAL.ordinal()), 1.0F); // GameRegistry.addSmelting(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.BIOMASS.ordinal()), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.BIOCOAL.ordinal()), 1.0F);
//
//Crystals // //Crystals
for (int i = 0; i < TheCrystals.values().length; i++) { // for (int i = 0; i < TheCrystals.values().length; i++) {
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockCrystal, 1, i), "XXX", "XXX", "XXX", 'X', new ItemStack(InitItems.itemCrystal, 1, i)); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockCrystal, 1, i), "XXX", "XXX", "XXX", 'X', new ItemStack(InitItems.itemCrystal, 1, i));
RECIPES_CRYSTAL_BLOCKS[i] = RecipeUtil.lastIRecipe(); // RECIPES_CRYSTAL_BLOCKS[i] = RecipeUtil.lastIRecipe();
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemCrystal, 9, i), new ItemStack(InitBlocks.blockCrystal, 1, i)); // RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemCrystal, 9, i), new ItemStack(InitBlocks.blockCrystal, 1, i));
RECIPES_CRYSTALS[i] = RecipeUtil.lastIRecipe(); // RECIPES_CRYSTALS[i] = RecipeUtil.lastIRecipe();
//
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockCrystalEmpowered, 1, i), "XXX", "XXX", "XXX", 'X', new ItemStack(InitItems.itemCrystalEmpowered, 1, i)); // RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockCrystalEmpowered, 1, i), "XXX", "XXX", "XXX", 'X', new ItemStack(InitItems.itemCrystalEmpowered, 1, i));
RECIPES_EMPOWERED_CRYSTAL_BLOCKS[i] = RecipeUtil.lastIRecipe(); // RECIPES_EMPOWERED_CRYSTAL_BLOCKS[i] = RecipeUtil.lastIRecipe();
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemCrystalEmpowered, 9, i), new ItemStack(InitBlocks.blockCrystalEmpowered, 1, i)); // RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemCrystalEmpowered, 9, i), new ItemStack(InitBlocks.blockCrystalEmpowered, 1, i));
RECIPES_EMPOWERED_CRYSTALS[i] = RecipeUtil.lastIRecipe(); // RECIPES_EMPOWERED_CRYSTALS[i] = RecipeUtil.lastIRecipe();
//
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemCrystal, 1, i), "XXX", "XXX", "XXX", 'X', new ItemStack(InitItems.itemCrystalShard, 1, i)); // RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemCrystal, 1, i), "XXX", "XXX", "XXX", 'X', new ItemStack(InitItems.itemCrystalShard, 1, i));
RECIPES_CRYSTAL_SHARDS[i] = RecipeUtil.lastIRecipe(); // RECIPES_CRYSTAL_SHARDS[i] = RecipeUtil.lastIRecipe();
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemCrystalShard, 9, i), new ItemStack(InitItems.itemCrystal, 1, i)); // RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemCrystalShard, 9, i), new ItemStack(InitItems.itemCrystal, 1, i));
RECIPES_CRYSTAL_SHARDS_BACK[i] = RecipeUtil.lastIRecipe(); // RECIPES_CRYSTAL_SHARDS_BACK[i] = RecipeUtil.lastIRecipe();
} // }
//
//Dough // //Dough
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemMisc, 2, TheMiscItems.DOUGH.ordinal()), "cropWheat", "cropWheat"); // RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemMisc, 2, TheMiscItems.DOUGH.ordinal()), "cropWheat", "cropWheat");
ItemCrafting.recipeDough = RecipeUtil.lastIRecipe(); // ItemCrafting.recipeDough = RecipeUtil.lastIRecipe();
//
//Rice Dough // //Rice Dough
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemMisc, 2, TheMiscItems.RICE_DOUGH.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal())); // RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemMisc, 2, TheMiscItems.RICE_DOUGH.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()));
ItemCrafting.recipeRiceDough = RecipeUtil.lastIRecipe(); // ItemCrafting.recipeRiceDough = RecipeUtil.lastIRecipe();
//
//Paper Cone // //Paper Cone
RecipeHandler.addShapedRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.PAPER_CONE.ordinal()), "P P", " P ", 'P', new ItemStack(Items.PAPER)); // RecipeHandler.addShapedRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.PAPER_CONE.ordinal()), "P P", " P ", 'P', new ItemStack(Items.PAPER));
//
//Knife Handle // //Knife Handle
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_HANDLE.ordinal()), "stickWood", new ItemStack(Items.LEATHER)); // RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_HANDLE.ordinal()), "stickWood", new ItemStack(Items.LEATHER));
ItemCrafting.recipeKnifeHandle = RecipeUtil.lastIRecipe(); // ItemCrafting.recipeKnifeHandle = RecipeUtil.lastIRecipe();
//
//Knife Blade // //Knife Blade
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_BLADE.ordinal()), "K", "K", "F", 'K', "ingotIron", 'F', new ItemStack(Items.FLINT)); // RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_BLADE.ordinal()), "K", "K", "F", 'K', "ingotIron", 'F', new ItemStack(Items.FLINT));
ItemCrafting.recipeKnifeBlade = RecipeUtil.lastIRecipe(); // ItemCrafting.recipeKnifeBlade = RecipeUtil.lastIRecipe();
//
//Ender Star // //Ender Star
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.ENDER_STAR.ordinal()), new ItemStack(Items.NETHER_STAR), new ItemStack(Items.DRAGON_BREATH), "gemQuartzBlack", new ItemStack(Items.PRISMARINE_SHARD)); // RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.ENDER_STAR.ordinal()), new ItemStack(Items.NETHER_STAR), new ItemStack(Items.DRAGON_BREATH), "gemQuartzBlack", new ItemStack(Items.PRISMARINE_SHARD));
ItemCrafting.recipeEnderStar = RecipeUtil.lastIRecipe(); // ItemCrafting.recipeEnderStar = RecipeUtil.lastIRecipe();
//
//Spawner Shard -> ingot // //Spawner Shard -> ingot
GameRegistry.addSmelting(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.SPAWNER_SHARD.ordinal()), new ItemStack(Items.IRON_INGOT, 2), 5F); // GameRegistry.addSmelting(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.SPAWNER_SHARD.ordinal()), new ItemStack(Items.IRON_INGOT, 2), 5F);
} // }
} }

View file

@ -10,89 +10,78 @@
package de.ellpeck.actuallyadditions.mod.crafting; package de.ellpeck.actuallyadditions.mod.crafting;
import de.ellpeck.actuallyadditions.mod.items.InitItems;
import de.ellpeck.actuallyadditions.mod.items.ItemKnife;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems;
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import de.ellpeck.actuallyadditions.mod.util.crafting.RecipeHelper;
import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe; import net.minecraft.item.crafting.IRecipe;
import net.minecraft.util.NonNullList;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.MathHelper;
import net.minecraft.world.World;
import net.minecraftforge.common.ForgeHooks;
import net.minecraftforge.registries.IForgeRegistryEntry; import net.minecraftforge.registries.IForgeRegistryEntry;
// TODO: [port] MOVE TO DATA_GENERATOR
@Deprecated
public class RecipeBioMash extends IForgeRegistryEntry.Impl<IRecipe> implements IRecipe { public class RecipeBioMash extends IForgeRegistryEntry.Impl<IRecipe> implements IRecipe {
//
public RecipeBioMash(ResourceLocation location) { // public RecipeBioMash(ResourceLocation location) {
RecipeHelper.addRecipe(location.getPath(), this); // RecipeHelper.addRecipe(location.getPath(), this);
} // }
//
@Override // @Override
public boolean matches(InventoryCrafting inv, World world) { // public boolean matches(InventoryCrafting inv, World world) {
boolean foundFood = false; // boolean foundFood = false;
boolean hasKnife = false; // boolean hasKnife = false;
//
for (int i = 0; i < inv.getSizeInventory(); i++) { // for (int i = 0; i < inv.getSizeInventory(); i++) {
ItemStack stack = inv.getStackInSlot(i); // ItemStack stack = inv.getStackInSlot(i);
if (StackUtil.isValid(stack)) { // if (StackUtil.isValid(stack)) {
if (stack.getItem() instanceof ItemKnife) { // if (stack.getItem() instanceof ItemKnife) {
if (hasKnife) { // if (hasKnife) {
return false; // return false;
} else { // } else {
hasKnife = true; // hasKnife = true;
} // }
} else if (stack.getItem() instanceof ItemFood) { // } else if (stack.getItem() instanceof ItemFood) {
foundFood = true; // foundFood = true;
} else { // } else {
return false; // return false;
} // }
} // }
} // }
//
return foundFood && hasKnife; // return foundFood && hasKnife;
} // }
//
@Override // @Override
public ItemStack getCraftingResult(InventoryCrafting inv) { // public ItemStack getCraftingResult(InventoryCrafting inv) {
int amount = 0; // int amount = 0;
//
for (int i = 0; i < inv.getSizeInventory(); i++) { // for (int i = 0; i < inv.getSizeInventory(); i++) {
ItemStack stack = inv.getStackInSlot(i); // ItemStack stack = inv.getStackInSlot(i);
if (StackUtil.isValid(stack)) { // if (StackUtil.isValid(stack)) {
if (stack.getItem() instanceof ItemFood) { // if (stack.getItem() instanceof ItemFood) {
ItemFood food = (ItemFood) stack.getItem(); // ItemFood food = (ItemFood) stack.getItem();
float heal = food.getHealAmount(stack); // float heal = food.getHealAmount(stack);
float sat = food.getSaturationModifier(stack); // float sat = food.getSaturationModifier(stack);
//
amount += MathHelper.ceil(heal * sat); // amount += MathHelper.ceil(heal * sat);
} // }
} // }
} // }
//
if (amount > 0 && amount <= 64) { // if (amount > 0 && amount <= 64) {
return new ItemStack(InitItems.itemMisc, amount, TheMiscItems.MASHED_FOOD.ordinal()); // return new ItemStack(InitItems.itemMisc, amount, TheMiscItems.MASHED_FOOD.ordinal());
} else { // } else {
return StackUtil.getEmpty(); // return StackUtil.getEmpty();
} // }
} // }
//
@Override // @Override
public boolean canFit(int width, int height) { // public boolean canFit(int width, int height) {
return width * height > 5; // return width * height > 5;
} // }
//
@Override // @Override
public ItemStack getRecipeOutput() { // public ItemStack getRecipeOutput() {
return StackUtil.getEmpty(); // return StackUtil.getEmpty();
} // }
//
@Override // @Override
public NonNullList<ItemStack> getRemainingItems(InventoryCrafting inv) { // public NonNullList<ItemStack> getRemainingItems(InventoryCrafting inv) {
return ForgeHooks.defaultRecipeGetRemainingItems(inv); // return ForgeHooks.defaultRecipeGetRemainingItems(inv);
} // }
} }

View file

@ -10,38 +10,34 @@
package de.ellpeck.actuallyadditions.mod.crafting; package de.ellpeck.actuallyadditions.mod.crafting;
import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import de.ellpeck.actuallyadditions.mod.util.crafting.RecipeHelper;
import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.oredict.ShapedOreRecipe; import net.minecraftforge.oredict.ShapedOreRecipe;
// TODO: [port] MOVE TO DATA_GENERATOR
@Deprecated
public class RecipeKeepDataShaped extends ShapedOreRecipe { public class RecipeKeepDataShaped extends ShapedOreRecipe {
//
private final ItemStack nbtCopyStack; // private final ItemStack nbtCopyStack;
//
public RecipeKeepDataShaped(ResourceLocation group, ItemStack result, ItemStack nbtCopyStack, Object... recipe) { // public RecipeKeepDataShaped(ResourceLocation group, ItemStack result, ItemStack nbtCopyStack, Object... recipe) {
super(group, result, recipe); // super(group, result, recipe);
this.nbtCopyStack = nbtCopyStack; // this.nbtCopyStack = nbtCopyStack;
//
RecipeHelper.addRecipe(group.getPath(), this); // RecipeHelper.addRecipe(group.getPath(), this);
} // }
//
@Override // @Override
public ItemStack getCraftingResult(InventoryCrafting inventory) { // public ItemStack getCraftingResult(InventoryCrafting inventory) {
ItemStack stack = super.getCraftingResult(inventory); // ItemStack stack = super.getCraftingResult(inventory);
if (StackUtil.isValid(stack)) { // if (StackUtil.isValid(stack)) {
for (int i = 0; i < inventory.getSizeInventory(); i++) { // for (int i = 0; i < inventory.getSizeInventory(); i++) {
ItemStack input = inventory.getStackInSlot(i); // ItemStack input = inventory.getStackInSlot(i);
if (ItemUtil.areItemsEqual(this.nbtCopyStack, input, true)) { // if (ItemUtil.areItemsEqual(this.nbtCopyStack, input, true)) {
stack.setTagCompound(input.getTagCompound()); // stack.setTagCompound(input.getTagCompound());
break; // break;
} // }
} // }
} // }
return stack; // return stack;
} // }
} }

View file

@ -10,37 +10,33 @@
package de.ellpeck.actuallyadditions.mod.crafting; package de.ellpeck.actuallyadditions.mod.crafting;
import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import de.ellpeck.actuallyadditions.mod.util.crafting.RecipeHelper;
import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.oredict.ShapelessOreRecipe; import net.minecraftforge.oredict.ShapelessOreRecipe;
// TODO: [port] MOVE TO DATA_GENERATOR
@Deprecated
public class RecipeKeepDataShapeless extends ShapelessOreRecipe { public class RecipeKeepDataShapeless extends ShapelessOreRecipe {
//
private final ItemStack nbtCopyStack; // private final ItemStack nbtCopyStack;
//
public RecipeKeepDataShapeless(ResourceLocation group, ItemStack result, ItemStack nbtCopyStack, Object... recipe) { // public RecipeKeepDataShapeless(ResourceLocation group, ItemStack result, ItemStack nbtCopyStack, Object... recipe) {
super(group, result, recipe); // super(group, result, recipe);
this.nbtCopyStack = nbtCopyStack; // this.nbtCopyStack = nbtCopyStack;
//
RecipeHelper.addRecipe(group.getPath(), this); // RecipeHelper.addRecipe(group.getPath(), this);
} // }
//
@Override // @Override
public ItemStack getCraftingResult(InventoryCrafting inventory) { // public ItemStack getCraftingResult(InventoryCrafting inventory) {
ItemStack stack = super.getCraftingResult(inventory); // ItemStack stack = super.getCraftingResult(inventory);
if (StackUtil.isValid(stack)) { // if (StackUtil.isValid(stack)) {
for (int i = 0; i < inventory.getSizeInventory(); i++) { // for (int i = 0; i < inventory.getSizeInventory(); i++) {
ItemStack input = inventory.getStackInSlot(i); // ItemStack input = inventory.getStackInSlot(i);
if (ItemUtil.areItemsEqual(this.nbtCopyStack, input, true)) { // if (ItemUtil.areItemsEqual(this.nbtCopyStack, input, true)) {
stack.setTagCompound(input.getTagCompound()); // stack.setTagCompound(input.getTagCompound());
break; // break;
} // }
} // }
} // }
return stack; // return stack;
} // }
} }

View file

@ -10,86 +10,78 @@
package de.ellpeck.actuallyadditions.mod.crafting; package de.ellpeck.actuallyadditions.mod.crafting;
import de.ellpeck.actuallyadditions.mod.items.ItemPotionRing;
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import de.ellpeck.actuallyadditions.mod.util.crafting.RecipeHelper;
import net.minecraft.init.Items;
import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe; import net.minecraft.item.crafting.IRecipe;
import net.minecraft.util.NonNullList;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
import net.minecraftforge.common.ForgeHooks;
import net.minecraftforge.registries.IForgeRegistryEntry; import net.minecraftforge.registries.IForgeRegistryEntry;
// TODO: [port] MOVE TO DATA_GENERATOR
@Deprecated
public class RecipePotionRingCharging extends IForgeRegistryEntry.Impl<IRecipe> implements IRecipe { public class RecipePotionRingCharging extends IForgeRegistryEntry.Impl<IRecipe> implements IRecipe {
//
public RecipePotionRingCharging(ResourceLocation location) { // public RecipePotionRingCharging(ResourceLocation location) {
RecipeHelper.addRecipe(location.getPath(), this); // RecipeHelper.addRecipe(location.getPath(), this);
} // }
//
@Override // @Override
public boolean matches(InventoryCrafting inv, World worldIn) { // public boolean matches(InventoryCrafting inv, World worldIn) {
boolean hasRing = false; // boolean hasRing = false;
//
for (int i = 0; i < inv.getSizeInventory(); i++) { // for (int i = 0; i < inv.getSizeInventory(); i++) {
ItemStack stack = inv.getStackInSlot(i); // ItemStack stack = inv.getStackInSlot(i);
if (StackUtil.isValid(stack)) { // if (StackUtil.isValid(stack)) {
if (stack.getItem() instanceof ItemPotionRing) { // if (stack.getItem() instanceof ItemPotionRing) {
if (!hasRing) { // if (!hasRing) {
hasRing = true; // hasRing = true;
} else { // } else {
return false; // return false;
} // }
} else if (stack.getItem() != Items.BLAZE_POWDER) { return false; } // } else if (stack.getItem() != Items.BLAZE_POWDER) { return false; }
} // }
} // }
//
return hasRing; // return hasRing;
} // }
//
@Override // @Override
public ItemStack getCraftingResult(InventoryCrafting inv) { // public ItemStack getCraftingResult(InventoryCrafting inv) {
ItemStack inputRing = StackUtil.getEmpty(); // ItemStack inputRing = StackUtil.getEmpty();
int totalBlaze = 0; // int totalBlaze = 0;
//
for (int i = 0; i < inv.getSizeInventory(); i++) { // for (int i = 0; i < inv.getSizeInventory(); i++) {
ItemStack stack = inv.getStackInSlot(i); // ItemStack stack = inv.getStackInSlot(i);
if (StackUtil.isValid(stack)) { // if (StackUtil.isValid(stack)) {
if (stack.getItem() instanceof ItemPotionRing) { // if (stack.getItem() instanceof ItemPotionRing) {
inputRing = stack; // inputRing = stack;
} else if (stack.getItem() == Items.BLAZE_POWDER) { // } else if (stack.getItem() == Items.BLAZE_POWDER) {
totalBlaze += 20; // totalBlaze += 20;
} // }
} // }
} // }
//
if (StackUtil.isValid(inputRing) && totalBlaze > 0) { // if (StackUtil.isValid(inputRing) && totalBlaze > 0) {
ItemStack copy = inputRing.copy(); // ItemStack copy = inputRing.copy();
//
int total = ItemPotionRing.getStoredBlaze(copy) + totalBlaze; // int total = ItemPotionRing.getStoredBlaze(copy) + totalBlaze;
if (total <= ItemPotionRing.MAX_BLAZE) { // if (total <= ItemPotionRing.MAX_BLAZE) {
ItemPotionRing.setStoredBlaze(copy, total); // ItemPotionRing.setStoredBlaze(copy, total);
return copy; // return copy;
} // }
} // }
//
return StackUtil.getEmpty(); // return StackUtil.getEmpty();
} // }
//
@Override // @Override
public boolean canFit(int width, int height) { // public boolean canFit(int width, int height) {
return width * height > 3; // return width * height > 3;
} // }
//
@Override // @Override
public ItemStack getRecipeOutput() { // public ItemStack getRecipeOutput() {
return StackUtil.getEmpty(); // return StackUtil.getEmpty();
} // }
//
@Override // @Override
public NonNullList<ItemStack> getRemainingItems(InventoryCrafting inv) { // public NonNullList<ItemStack> getRemainingItems(InventoryCrafting inv) {
return ForgeHooks.defaultRecipeGetRemainingItems(inv); // return ForgeHooks.defaultRecipeGetRemainingItems(inv);
} // }
} }

View file

@ -10,93 +10,83 @@
package de.ellpeck.actuallyadditions.mod.crafting; package de.ellpeck.actuallyadditions.mod.crafting;
import java.util.ArrayList; // TODO: [port] MOVE TO DATA_GENERATOR
@Deprecated
import de.ellpeck.actuallyadditions.mod.items.InitItems;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheCrystals;
import de.ellpeck.actuallyadditions.mod.util.RecipeUtil;
import de.ellpeck.actuallyadditions.mod.util.crafting.RecipeHandler;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe;
public final class ToolCrafting { public final class ToolCrafting {
//
public static final ArrayList<IRecipe> RECIPES_PAXELS = new ArrayList<>(); // public static final ArrayList<IRecipe> RECIPES_PAXELS = new ArrayList<>();
//
public static void init() { // public static void init() {
//
addToolAndArmorRecipes(new ItemStack(Items.EMERALD), InitItems.itemPickaxeEmerald, InitItems.itemSwordEmerald, InitItems.itemAxeEmerald, InitItems.itemShovelEmerald, InitItems.itemHoeEmerald, InitItems.itemHelmEmerald, InitItems.itemChestEmerald, InitItems.itemPantsEmerald, InitItems.itemBootsEmerald); // addToolAndArmorRecipes(new ItemStack(Items.EMERALD), InitItems.itemPickaxeEmerald, InitItems.itemSwordEmerald, InitItems.itemAxeEmerald, InitItems.itemShovelEmerald, InitItems.itemHoeEmerald, InitItems.itemHelmEmerald, InitItems.itemChestEmerald, InitItems.itemPantsEmerald, InitItems.itemBootsEmerald);
addToolAndArmorRecipes("gemQuartzBlack", InitItems.itemPickaxeQuartz, InitItems.itemSwordQuartz, InitItems.itemAxeQuartz, InitItems.itemShovelQuartz, InitItems.itemHoeQuartz, InitItems.itemHelmQuartz, InitItems.itemChestQuartz, InitItems.itemPantsQuartz, InitItems.itemBootsQuartz); // addToolAndArmorRecipes("gemQuartzBlack", InitItems.itemPickaxeQuartz, InitItems.itemSwordQuartz, InitItems.itemAxeQuartz, InitItems.itemShovelQuartz, InitItems.itemHoeQuartz, InitItems.itemHelmQuartz, InitItems.itemChestQuartz, InitItems.itemPantsQuartz, InitItems.itemBootsQuartz);
addToolAndArmorRecipes(new ItemStack(Blocks.OBSIDIAN), InitItems.itemPickaxeObsidian, InitItems.itemSwordObsidian, InitItems.itemAxeObsidian, InitItems.itemShovelObsidian, InitItems.itemHoeObsidian, InitItems.itemHelmObsidian, InitItems.itemChestObsidian, InitItems.itemPantsObsidian, InitItems.itemBootsObsidian); // addToolAndArmorRecipes(new ItemStack(Blocks.OBSIDIAN), InitItems.itemPickaxeObsidian, InitItems.itemSwordObsidian, InitItems.itemAxeObsidian, InitItems.itemShovelObsidian, InitItems.itemHoeObsidian, InitItems.itemHelmObsidian, InitItems.itemChestObsidian, InitItems.itemPantsObsidian, InitItems.itemBootsObsidian);
//
addToolAndArmorRecipes(new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), InitItems.itemPickaxeCrystalRed, InitItems.itemSwordCrystalRed, InitItems.itemAxeCrystalRed, InitItems.itemShovelCrystalRed, InitItems.itemHoeCrystalRed, InitItems.itemHelmCrystalRed, InitItems.itemChestCrystalRed, InitItems.itemPantsCrystalRed, InitItems.itemBootsCrystalRed); // addToolAndArmorRecipes(new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), InitItems.itemPickaxeCrystalRed, InitItems.itemSwordCrystalRed, InitItems.itemAxeCrystalRed, InitItems.itemShovelCrystalRed, InitItems.itemHoeCrystalRed, InitItems.itemHelmCrystalRed, InitItems.itemChestCrystalRed, InitItems.itemPantsCrystalRed, InitItems.itemBootsCrystalRed);
addToolAndArmorRecipes(new ItemStack(InitItems.itemCrystal, 1, TheCrystals.EMERALD.ordinal()), InitItems.itemPickaxeCrystalGreen, InitItems.itemSwordCrystalGreen, InitItems.itemAxeCrystalGreen, InitItems.itemShovelCrystalGreen, InitItems.itemHoeCrystalGreen, InitItems.itemHelmCrystalGreen, InitItems.itemChestCrystalGreen, InitItems.itemPantsCrystalGreen, InitItems.itemBootsCrystalGreen); // addToolAndArmorRecipes(new ItemStack(InitItems.itemCrystal, 1, TheCrystals.EMERALD.ordinal()), InitItems.itemPickaxeCrystalGreen, InitItems.itemSwordCrystalGreen, InitItems.itemAxeCrystalGreen, InitItems.itemShovelCrystalGreen, InitItems.itemHoeCrystalGreen, InitItems.itemHelmCrystalGreen, InitItems.itemChestCrystalGreen, InitItems.itemPantsCrystalGreen, InitItems.itemBootsCrystalGreen);
addToolAndArmorRecipes(new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), InitItems.itemPickaxeCrystalWhite, InitItems.itemSwordCrystalWhite, InitItems.itemAxeCrystalWhite, InitItems.itemShovelCrystalWhite, InitItems.itemHoeCrystalWhite, InitItems.itemHelmCrystalWhite, InitItems.itemChestCrystalWhite, InitItems.itemPantsCrystalWhite, InitItems.itemBootsCrystalWhite); // addToolAndArmorRecipes(new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), InitItems.itemPickaxeCrystalWhite, InitItems.itemSwordCrystalWhite, InitItems.itemAxeCrystalWhite, InitItems.itemShovelCrystalWhite, InitItems.itemHoeCrystalWhite, InitItems.itemHelmCrystalWhite, InitItems.itemChestCrystalWhite, InitItems.itemPantsCrystalWhite, InitItems.itemBootsCrystalWhite);
addToolAndArmorRecipes(new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), InitItems.itemPickaxeCrystalLightBlue, InitItems.itemSwordCrystalLightBlue, InitItems.itemAxeCrystalLightBlue, InitItems.itemShovelCrystalLightBlue, InitItems.itemHoeCrystalLightBlue, InitItems.itemHelmCrystalLightBlue, InitItems.itemChestCrystalLightBlue, InitItems.itemPantsCrystalLightBlue, InitItems.itemBootsCrystalLightBlue); // addToolAndArmorRecipes(new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), InitItems.itemPickaxeCrystalLightBlue, InitItems.itemSwordCrystalLightBlue, InitItems.itemAxeCrystalLightBlue, InitItems.itemShovelCrystalLightBlue, InitItems.itemHoeCrystalLightBlue, InitItems.itemHelmCrystalLightBlue, InitItems.itemChestCrystalLightBlue, InitItems.itemPantsCrystalLightBlue, InitItems.itemBootsCrystalLightBlue);
addToolAndArmorRecipes(new ItemStack(InitItems.itemCrystal, 1, TheCrystals.LAPIS.ordinal()), InitItems.itemPickaxeCrystalBlue, InitItems.itemSwordCrystalBlue, InitItems.itemAxeCrystalBlue, InitItems.itemShovelCrystalBlue, InitItems.itemHoeCrystalBlue, InitItems.itemHelmCrystalBlue, InitItems.itemChestCrystalBlue, InitItems.itemPantsCrystalBlue, InitItems.itemBootsCrystalBlue); // addToolAndArmorRecipes(new ItemStack(InitItems.itemCrystal, 1, TheCrystals.LAPIS.ordinal()), InitItems.itemPickaxeCrystalBlue, InitItems.itemSwordCrystalBlue, InitItems.itemAxeCrystalBlue, InitItems.itemShovelCrystalBlue, InitItems.itemHoeCrystalBlue, InitItems.itemHelmCrystalBlue, InitItems.itemChestCrystalBlue, InitItems.itemPantsCrystalBlue, InitItems.itemBootsCrystalBlue);
addToolAndArmorRecipes(new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()), InitItems.itemPickaxeCrystalBlack, InitItems.itemSwordCrystalBlack, InitItems.itemAxeCrystalBlack, InitItems.itemShovelCrystalBlack, InitItems.itemHoeCrystalBlack, InitItems.itemHelmCrystalBlack, InitItems.itemChestCrystalBlack, InitItems.itemPantsCrystalBlack, InitItems.itemBootsCrystalBlack); // addToolAndArmorRecipes(new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()), InitItems.itemPickaxeCrystalBlack, InitItems.itemSwordCrystalBlack, InitItems.itemAxeCrystalBlack, InitItems.itemShovelCrystalBlack, InitItems.itemHoeCrystalBlack, InitItems.itemHelmCrystalBlack, InitItems.itemChestCrystalBlack, InitItems.itemPantsCrystalBlack, InitItems.itemBootsCrystalBlack);
//
//Paxels // //Paxels
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.woodenPaxel), new ItemStack(Items.WOODEN_AXE), new ItemStack(Items.WOODEN_PICKAXE), new ItemStack(Items.WOODEN_SHOVEL), new ItemStack(Items.WOODEN_SWORD), new ItemStack(Items.WOODEN_HOE)); // RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.woodenPaxel), new ItemStack(Items.WOODEN_AXE), new ItemStack(Items.WOODEN_PICKAXE), new ItemStack(Items.WOODEN_SHOVEL), new ItemStack(Items.WOODEN_SWORD), new ItemStack(Items.WOODEN_HOE));
RECIPES_PAXELS.add(RecipeUtil.lastIRecipe()); // RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.stonePaxel), new ItemStack(Items.STONE_AXE), new ItemStack(Items.STONE_PICKAXE), new ItemStack(Items.STONE_SHOVEL), new ItemStack(Items.STONE_SWORD), new ItemStack(Items.STONE_HOE)); // RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.stonePaxel), new ItemStack(Items.STONE_AXE), new ItemStack(Items.STONE_PICKAXE), new ItemStack(Items.STONE_SHOVEL), new ItemStack(Items.STONE_SWORD), new ItemStack(Items.STONE_HOE));
RECIPES_PAXELS.add(RecipeUtil.lastIRecipe()); // RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.ironPaxel), new ItemStack(Items.IRON_AXE), new ItemStack(Items.IRON_PICKAXE), new ItemStack(Items.IRON_SHOVEL), new ItemStack(Items.IRON_SWORD), new ItemStack(Items.IRON_HOE)); // RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.ironPaxel), new ItemStack(Items.IRON_AXE), new ItemStack(Items.IRON_PICKAXE), new ItemStack(Items.IRON_SHOVEL), new ItemStack(Items.IRON_SWORD), new ItemStack(Items.IRON_HOE));
RECIPES_PAXELS.add(RecipeUtil.lastIRecipe()); // RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.goldPaxel), new ItemStack(Items.GOLDEN_AXE), new ItemStack(Items.GOLDEN_PICKAXE), new ItemStack(Items.GOLDEN_SHOVEL), new ItemStack(Items.GOLDEN_SWORD), new ItemStack(Items.GOLDEN_HOE)); // RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.goldPaxel), new ItemStack(Items.GOLDEN_AXE), new ItemStack(Items.GOLDEN_PICKAXE), new ItemStack(Items.GOLDEN_SHOVEL), new ItemStack(Items.GOLDEN_SWORD), new ItemStack(Items.GOLDEN_HOE));
RECIPES_PAXELS.add(RecipeUtil.lastIRecipe()); // RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.diamondPaxel), new ItemStack(Items.DIAMOND_AXE), new ItemStack(Items.DIAMOND_PICKAXE), new ItemStack(Items.DIAMOND_SHOVEL), new ItemStack(Items.DIAMOND_SWORD), new ItemStack(Items.DIAMOND_HOE)); // RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.diamondPaxel), new ItemStack(Items.DIAMOND_AXE), new ItemStack(Items.DIAMOND_PICKAXE), new ItemStack(Items.DIAMOND_SHOVEL), new ItemStack(Items.DIAMOND_SWORD), new ItemStack(Items.DIAMOND_HOE));
RECIPES_PAXELS.add(RecipeUtil.lastIRecipe()); // RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.emeraldPaxel), new ItemStack(InitItems.itemAxeEmerald), new ItemStack(InitItems.itemPickaxeEmerald), new ItemStack(InitItems.itemSwordEmerald), new ItemStack(InitItems.itemShovelEmerald), new ItemStack(InitItems.itemHoeEmerald)); // RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.emeraldPaxel), new ItemStack(InitItems.itemAxeEmerald), new ItemStack(InitItems.itemPickaxeEmerald), new ItemStack(InitItems.itemSwordEmerald), new ItemStack(InitItems.itemShovelEmerald), new ItemStack(InitItems.itemHoeEmerald));
RECIPES_PAXELS.add(RecipeUtil.lastIRecipe()); // RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.obsidianPaxel), new ItemStack(InitItems.itemAxeObsidian), new ItemStack(InitItems.itemPickaxeObsidian), new ItemStack(InitItems.itemSwordObsidian), new ItemStack(InitItems.itemShovelObsidian), new ItemStack(InitItems.itemHoeObsidian)); // RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.obsidianPaxel), new ItemStack(InitItems.itemAxeObsidian), new ItemStack(InitItems.itemPickaxeObsidian), new ItemStack(InitItems.itemSwordObsidian), new ItemStack(InitItems.itemShovelObsidian), new ItemStack(InitItems.itemHoeObsidian));
RECIPES_PAXELS.add(RecipeUtil.lastIRecipe()); // RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.quartzPaxel), new ItemStack(InitItems.itemAxeQuartz), new ItemStack(InitItems.itemPickaxeQuartz), new ItemStack(InitItems.itemSwordQuartz), new ItemStack(InitItems.itemShovelQuartz), new ItemStack(InitItems.itemHoeQuartz)); // RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.quartzPaxel), new ItemStack(InitItems.itemAxeQuartz), new ItemStack(InitItems.itemPickaxeQuartz), new ItemStack(InitItems.itemSwordQuartz), new ItemStack(InitItems.itemShovelQuartz), new ItemStack(InitItems.itemHoeQuartz));
RECIPES_PAXELS.add(RecipeUtil.lastIRecipe()); // RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
//
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemPaxelCrystalRed), new ItemStack(InitItems.itemAxeCrystalRed), new ItemStack(InitItems.itemPickaxeCrystalRed), new ItemStack(InitItems.itemSwordCrystalRed), new ItemStack(InitItems.itemShovelCrystalRed), new ItemStack(InitItems.itemHoeCrystalRed)); // RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemPaxelCrystalRed), new ItemStack(InitItems.itemAxeCrystalRed), new ItemStack(InitItems.itemPickaxeCrystalRed), new ItemStack(InitItems.itemSwordCrystalRed), new ItemStack(InitItems.itemShovelCrystalRed), new ItemStack(InitItems.itemHoeCrystalRed));
RECIPES_PAXELS.add(RecipeUtil.lastIRecipe()); // RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemPaxelCrystalGreen), new ItemStack(InitItems.itemAxeCrystalGreen), new ItemStack(InitItems.itemPickaxeCrystalGreen), new ItemStack(InitItems.itemSwordCrystalGreen), new ItemStack(InitItems.itemShovelCrystalGreen), new ItemStack(InitItems.itemHoeCrystalGreen)); // RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemPaxelCrystalGreen), new ItemStack(InitItems.itemAxeCrystalGreen), new ItemStack(InitItems.itemPickaxeCrystalGreen), new ItemStack(InitItems.itemSwordCrystalGreen), new ItemStack(InitItems.itemShovelCrystalGreen), new ItemStack(InitItems.itemHoeCrystalGreen));
RECIPES_PAXELS.add(RecipeUtil.lastIRecipe()); // RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemPaxelCrystalBlue), new ItemStack(InitItems.itemAxeCrystalBlue), new ItemStack(InitItems.itemPickaxeCrystalBlue), new ItemStack(InitItems.itemSwordCrystalBlue), new ItemStack(InitItems.itemShovelCrystalBlue), new ItemStack(InitItems.itemHoeCrystalBlue)); // RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemPaxelCrystalBlue), new ItemStack(InitItems.itemAxeCrystalBlue), new ItemStack(InitItems.itemPickaxeCrystalBlue), new ItemStack(InitItems.itemSwordCrystalBlue), new ItemStack(InitItems.itemShovelCrystalBlue), new ItemStack(InitItems.itemHoeCrystalBlue));
RECIPES_PAXELS.add(RecipeUtil.lastIRecipe()); // RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemPaxelCrystalLightBlue), new ItemStack(InitItems.itemAxeCrystalLightBlue), new ItemStack(InitItems.itemPickaxeCrystalLightBlue), new ItemStack(InitItems.itemSwordCrystalLightBlue), new ItemStack(InitItems.itemShovelCrystalLightBlue), new ItemStack(InitItems.itemHoeCrystalLightBlue)); // RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemPaxelCrystalLightBlue), new ItemStack(InitItems.itemAxeCrystalLightBlue), new ItemStack(InitItems.itemPickaxeCrystalLightBlue), new ItemStack(InitItems.itemSwordCrystalLightBlue), new ItemStack(InitItems.itemShovelCrystalLightBlue), new ItemStack(InitItems.itemHoeCrystalLightBlue));
RECIPES_PAXELS.add(RecipeUtil.lastIRecipe()); // RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemPaxelCrystalBlack), new ItemStack(InitItems.itemAxeCrystalBlack), new ItemStack(InitItems.itemPickaxeCrystalBlack), new ItemStack(InitItems.itemSwordCrystalBlack), new ItemStack(InitItems.itemShovelCrystalBlack), new ItemStack(InitItems.itemHoeCrystalBlack)); // RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemPaxelCrystalBlack), new ItemStack(InitItems.itemAxeCrystalBlack), new ItemStack(InitItems.itemPickaxeCrystalBlack), new ItemStack(InitItems.itemSwordCrystalBlack), new ItemStack(InitItems.itemShovelCrystalBlack), new ItemStack(InitItems.itemHoeCrystalBlack));
RECIPES_PAXELS.add(RecipeUtil.lastIRecipe()); // RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemPaxelCrystalWhite), new ItemStack(InitItems.itemAxeCrystalWhite), new ItemStack(InitItems.itemPickaxeCrystalWhite), new ItemStack(InitItems.itemSwordCrystalWhite), new ItemStack(InitItems.itemShovelCrystalWhite), new ItemStack(InitItems.itemHoeCrystalWhite)); // RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemPaxelCrystalWhite), new ItemStack(InitItems.itemAxeCrystalWhite), new ItemStack(InitItems.itemPickaxeCrystalWhite), new ItemStack(InitItems.itemSwordCrystalWhite), new ItemStack(InitItems.itemShovelCrystalWhite), new ItemStack(InitItems.itemHoeCrystalWhite));
RECIPES_PAXELS.add(RecipeUtil.lastIRecipe()); // RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
} // }
//
public static void addToolAndArmorRecipes(Object base, Item pickaxe, Item sword, Item axe, Item shovel, Item hoe, Item helm, Item chest, Item pants, Item boots) { // public static void addToolAndArmorRecipes(Object base, Item pickaxe, Item sword, Item axe, Item shovel, Item hoe, Item helm, Item chest, Item pants, Item boots) {
//Pickaxe // //Pickaxe
RecipeHandler.addOreDictRecipe(new ItemStack(pickaxe), "EEE", " S ", " S ", 'E', base, 'S', new ItemStack(Items.STICK)); // RecipeHandler.addOreDictRecipe(new ItemStack(pickaxe), "EEE", " S ", " S ", 'E', base, 'S', new ItemStack(Items.STICK));
//
//Sword // //Sword
RecipeHandler.addOreDictRecipe(new ItemStack(sword), "E", "E", "S", 'E', base, 'S', new ItemStack(Items.STICK)); // RecipeHandler.addOreDictRecipe(new ItemStack(sword), "E", "E", "S", 'E', base, 'S', new ItemStack(Items.STICK));
//
//Axe // //Axe
RecipeHandler.addOreDictRecipe(new ItemStack(axe), "EE", "ES", " S", 'E', base, 'S', new ItemStack(Items.STICK)); // RecipeHandler.addOreDictRecipe(new ItemStack(axe), "EE", "ES", " S", 'E', base, 'S', new ItemStack(Items.STICK));
//
//Shovel // //Shovel
RecipeHandler.addOreDictRecipe(new ItemStack(shovel), "E", "S", "S", 'E', base, 'S', new ItemStack(Items.STICK)); // RecipeHandler.addOreDictRecipe(new ItemStack(shovel), "E", "S", "S", 'E', base, 'S', new ItemStack(Items.STICK));
//
//Hoe // //Hoe
RecipeHandler.addOreDictRecipe(new ItemStack(hoe), "EE", " S", " S", 'E', base, 'S', new ItemStack(Items.STICK)); // RecipeHandler.addOreDictRecipe(new ItemStack(hoe), "EE", " S", " S", 'E', base, 'S', new ItemStack(Items.STICK));
//
//Helm // //Helm
RecipeHandler.addShapedRecipe(new ItemStack(helm), "OOO", "O O", 'O', base); // RecipeHandler.addShapedRecipe(new ItemStack(helm), "OOO", "O O", 'O', base);
//
//Chest // //Chest
RecipeHandler.addShapedRecipe(new ItemStack(chest), "O O", "OOO", "OOO", 'O', base); // RecipeHandler.addShapedRecipe(new ItemStack(chest), "O O", "OOO", "OOO", 'O', base);
//
//Legs // //Legs
RecipeHandler.addShapedRecipe(new ItemStack(pants), "OOO", "O O", "O O", 'O', base); // RecipeHandler.addShapedRecipe(new ItemStack(pants), "OOO", "O O", "O O", 'O', base);
//
//Boots // //Boots
RecipeHandler.addShapedRecipe(new ItemStack(boots), "O O", "O O", 'O', base); // RecipeHandler.addShapedRecipe(new ItemStack(boots), "O O", "O O", 'O', base);
} // }
} }

View file

@ -34,7 +34,6 @@ import net.minecraft.util.text.TextFormatting;
import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.client.event.RenderGameOverlayEvent; import net.minecraftforge.client.event.RenderGameOverlayEvent;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.TickEvent; import net.minecraftforge.event.TickEvent;
import net.minecraftforge.event.entity.player.ItemTooltipEvent; import net.minecraftforge.event.entity.player.ItemTooltipEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.eventbus.api.SubscribeEvent;
@ -47,10 +46,6 @@ public class ClientEvents {
private static EnergyDisplay energyDisplay; private static EnergyDisplay energyDisplay;
public ClientEvents() {
MinecraftForge.EVENT_BUS.register(this);
}
// TODO: [port] the fuck? // TODO: [port] the fuck?
@SubscribeEvent @SubscribeEvent
public void onClientTick(TickEvent.ClientTickEvent event) { public void onClientTick(TickEvent.ClientTickEvent event) {
@ -179,7 +174,7 @@ public class ClientEvents {
if (StackUtil.isValid(stack)) { if (StackUtil.isValid(stack)) {
if (stack.getItem() instanceof IHudDisplay) { if (stack.getItem() instanceof IHudDisplay) {
((IHudDisplay) stack.getItem()).displayHud(minecraft, player, stack, posHit, event.getWindow()); ((IHudDisplay) stack.getItem()).displayHud(event.getMatrixStack(), minecraft, player, stack, posHit, event.getWindow());
} }
} }
@ -189,7 +184,7 @@ public class ClientEvents {
TileEntity tileHit = minecraft.world.getTileEntity(rayCast.getPos()); TileEntity tileHit = minecraft.world.getTileEntity(rayCast.getPos());
if (blockHit instanceof IHudDisplay) { if (blockHit instanceof IHudDisplay) {
((IHudDisplay) blockHit).displayHud(minecraft, player, stack, posHit, event.getWindow()); ((IHudDisplay) blockHit).displayHud(event.getMatrixStack(), minecraft, player, stack, posHit, event.getWindow());
} }
if (tileHit instanceof TileEntityBase) { if (tileHit instanceof TileEntityBase) {

View file

@ -10,79 +10,59 @@
package de.ellpeck.actuallyadditions.mod.gen.village; package de.ellpeck.actuallyadditions.mod.gen.village;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; // TODO: [port] ADD BACK
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheMiscBlocks;
import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues;
import de.ellpeck.actuallyadditions.mod.gen.village.component.VillageComponentCustomCropField;
import de.ellpeck.actuallyadditions.mod.gen.village.component.VillageComponentEngineerHouse;
import de.ellpeck.actuallyadditions.mod.gen.village.component.VillageComponentJamHouse;
import de.ellpeck.actuallyadditions.mod.gen.village.component.handler.VillageCustomCropFieldHandler;
import de.ellpeck.actuallyadditions.mod.gen.village.component.handler.VillageEngineerHouseHandler;
import de.ellpeck.actuallyadditions.mod.gen.village.component.handler.VillageJamHouseHandler;
import de.ellpeck.actuallyadditions.mod.items.InitItems;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheCrystals;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheJams;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems;
import net.minecraft.entity.passive.EntityVillager.PriceInfo;
import net.minecraft.item.ItemStack;
import net.minecraft.world.gen.structure.MapGenStructureIO;
import net.minecraftforge.fml.common.registry.VillagerRegistry;
import net.minecraftforge.fml.common.registry.VillagerRegistry.VillagerCareer;
import net.minecraftforge.fml.common.registry.VillagerRegistry.VillagerProfession;
public final class InitVillager { public final class InitVillager {
//
public static VillagerProfession jamProfession; // public static VillagerProfession jamProfession;
public static VillagerProfession engineerProfession; // public static VillagerProfession engineerProfession;
//
public static void init() { // public static void init() {
ActuallyAdditions.LOGGER.info("Initializing Village Addons..."); // ActuallyAdditions.LOGGER.info("Initializing Village Addons...");
//
if (ConfigBoolValues.JAM_VILLAGER_EXISTS.isEnabled()) { // if (ConfigBoolValues.JAM_VILLAGER_EXISTS.isEnabled()) {
initJamVillagePart(); // initJamVillagePart();
} // }
if (ConfigBoolValues.CROP_FIELD_EXISTS.isEnabled()) { // if (ConfigBoolValues.CROP_FIELD_EXISTS.isEnabled()) {
initCustomCropFieldPart(); // initCustomCropFieldPart();
} // }
if (ConfigBoolValues.ENGINEER_VILLAGER_EXISTS.isEnabled()) { // if (ConfigBoolValues.ENGINEER_VILLAGER_EXISTS.isEnabled()) {
initEngineerVillagePart(); // initEngineerVillagePart();
} // }
} // }
//
private static void initEngineerVillagePart() { // private static void initEngineerVillagePart() {
VillagerRegistry.instance().registerVillageCreationHandler(new VillageEngineerHouseHandler()); // VillagerRegistry.instance().registerVillageCreationHandler(new VillageEngineerHouseHandler());
MapGenStructureIO.registerStructureComponent(VillageComponentEngineerHouse.class, ActuallyAdditions.MODID + ":engineerHouseStructure"); // MapGenStructureIO.registerStructureComponent(VillageComponentEngineerHouse.class, ActuallyAdditions.MODID + ":engineerHouseStructure");
//
engineerProfession = new VillagerProfession(ActuallyAdditions.MODID + ":engineer", ActuallyAdditions.MODID + ":textures/entity/villager/engineer_villager.png", ActuallyAdditions.MODID + ":textures/entity/villager/engineer_villager_zombie.png"); // engineerProfession = new VillagerProfession(ActuallyAdditions.MODID + ":engineer", ActuallyAdditions.MODID + ":textures/entity/villager/engineer_villager.png", ActuallyAdditions.MODID + ":textures/entity/villager/engineer_villager_zombie.png");
//
VillagerCareer crystallizer = new VillagerCareer(engineerProfession, ActuallyAdditions.MODID + ".crystallizer"); // VillagerCareer crystallizer = new VillagerCareer(engineerProfession, ActuallyAdditions.MODID + ".crystallizer");
crystallizer.addTrade(1, new BasicTradeList(new PriceInfo(1, 2), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()), new PriceInfo(2, 8)), new BasicTradeList(new PriceInfo(1, 3), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), new PriceInfo(2, 6)), new BasicTradeList(new PriceInfo(1, 3), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), new PriceInfo(1, 4)), new BasicTradeList(new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()), new PriceInfo(10, 16), new PriceInfo(1, 1))); // crystallizer.addTrade(1, new BasicTradeList(new PriceInfo(1, 2), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()), new PriceInfo(2, 8)), new BasicTradeList(new PriceInfo(1, 3), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), new PriceInfo(2, 6)), new BasicTradeList(new PriceInfo(1, 3), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), new PriceInfo(1, 4)), new BasicTradeList(new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()), new PriceInfo(10, 16), new PriceInfo(1, 1)));
crystallizer.addTrade(2, new BasicTradeList(new PriceInfo(2, 3), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.EMERALD.ordinal()), new PriceInfo(2, 4)), new BasicTradeList(new PriceInfo(1, 3), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.LAPIS.ordinal()), new PriceInfo(2, 6)), new BasicTradeList(new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), new PriceInfo(8, 12), new PriceInfo(1, 1)), new BasicTradeList(new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), new PriceInfo(8, 16), new PriceInfo(1, 2))); // crystallizer.addTrade(2, new BasicTradeList(new PriceInfo(2, 3), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.EMERALD.ordinal()), new PriceInfo(2, 4)), new BasicTradeList(new PriceInfo(1, 3), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.LAPIS.ordinal()), new PriceInfo(2, 6)), new BasicTradeList(new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), new PriceInfo(8, 12), new PriceInfo(1, 1)), new BasicTradeList(new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), new PriceInfo(8, 16), new PriceInfo(1, 2)));
crystallizer.addTrade(3, new BasicTradeList(new PriceInfo(2, 4), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), new PriceInfo(2, 3)), new BasicTradeList(new ItemStack(InitItems.itemCrystal, 1, TheCrystals.LAPIS.ordinal()), new PriceInfo(6, 10), new PriceInfo(1, 1)), new BasicTradeList(new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), new PriceInfo(4, 6), new PriceInfo(1, 1)), new BasicTradeList(new ItemStack(InitItems.itemCrystal, 1, TheCrystals.EMERALD.ordinal()), new PriceInfo(6, 12), new PriceInfo(1, 2))); // crystallizer.addTrade(3, new BasicTradeList(new PriceInfo(2, 4), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), new PriceInfo(2, 3)), new BasicTradeList(new ItemStack(InitItems.itemCrystal, 1, TheCrystals.LAPIS.ordinal()), new PriceInfo(6, 10), new PriceInfo(1, 1)), new BasicTradeList(new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), new PriceInfo(4, 6), new PriceInfo(1, 1)), new BasicTradeList(new ItemStack(InitItems.itemCrystal, 1, TheCrystals.EMERALD.ordinal()), new PriceInfo(6, 12), new PriceInfo(1, 2)));
//
VillagerCareer engineer = new VillagerCareer(engineerProfession, ActuallyAdditions.MODID + ".engineer"); // VillagerCareer engineer = new VillagerCareer(engineerProfession, ActuallyAdditions.MODID + ".engineer");
engineer.addTrade(1, new BasicTradeList(new PriceInfo(1, 2), new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ORE_QUARTZ.ordinal()), new PriceInfo(2, 3)), new BasicTradeList(new PriceInfo(1, 2), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), new PriceInfo(6, 8)), new BasicTradeList(new PriceInfo(1, 3), new ItemStack(InitItems.itemLaserWrench), new PriceInfo(1, 1))); // engineer.addTrade(1, new BasicTradeList(new PriceInfo(1, 2), new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ORE_QUARTZ.ordinal()), new PriceInfo(2, 3)), new BasicTradeList(new PriceInfo(1, 2), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), new PriceInfo(6, 8)), new BasicTradeList(new PriceInfo(1, 3), new ItemStack(InitItems.itemLaserWrench), new PriceInfo(1, 1)));
engineer.addTrade(2, new BasicTradeList(new ItemStack(InitItems.itemCoffeeBean), new PriceInfo(20, 30), new PriceInfo(1, 2)), new BasicTradeList(new PriceInfo(3, 5), new ItemStack(InitItems.itemPhantomConnector), new PriceInfo(1, 1)), new BasicTradeList(new PriceInfo(10, 20), new ItemStack(InitBlocks.blockLaserRelay), new PriceInfo(1, 2))); // engineer.addTrade(2, new BasicTradeList(new ItemStack(InitItems.itemCoffeeBean), new PriceInfo(20, 30), new PriceInfo(1, 2)), new BasicTradeList(new PriceInfo(3, 5), new ItemStack(InitItems.itemPhantomConnector), new PriceInfo(1, 1)), new BasicTradeList(new PriceInfo(10, 20), new ItemStack(InitBlocks.blockLaserRelay), new PriceInfo(1, 2)));
engineer.addTrade(3, new BasicTradeList(new ItemStack(InitBlocks.blockTinyTorch), new PriceInfo(30, 40), new PriceInfo(1, 2)), new BasicTradeList(new PriceInfo(1, 2), new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.WOOD_CASING.ordinal()), new PriceInfo(1, 2))); // engineer.addTrade(3, new BasicTradeList(new ItemStack(InitBlocks.blockTinyTorch), new PriceInfo(30, 40), new PriceInfo(1, 2)), new BasicTradeList(new PriceInfo(1, 2), new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.WOOD_CASING.ordinal()), new PriceInfo(1, 2)));
engineer.addTrade(4, new BasicTradeList(new PriceInfo(3, 5), new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), new PriceInfo(1, 2)), new BasicTradeList(new ItemStack(InitBlocks.blockEmpowerer), new PriceInfo(1, 1), new PriceInfo(15, 20)), new BasicTradeList(new PriceInfo(30, 40), new ItemStack(InitBlocks.blockLaserRelayExtreme), new PriceInfo(1, 1))); // engineer.addTrade(4, new BasicTradeList(new PriceInfo(3, 5), new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), new PriceInfo(1, 2)), new BasicTradeList(new ItemStack(InitBlocks.blockEmpowerer), new PriceInfo(1, 1), new PriceInfo(15, 20)), new BasicTradeList(new PriceInfo(30, 40), new ItemStack(InitBlocks.blockLaserRelayExtreme), new PriceInfo(1, 1)));
} // }
//
private static void initJamVillagePart() { // private static void initJamVillagePart() {
jamProfession = new VillagerProfession(ActuallyAdditions.MODID + ":jamGuy", ActuallyAdditions.MODID + ":textures/entity/villager/jam_villager.png", ActuallyAdditions.MODID + ":textures/entity/villager/jam_villager_zombie.png"); // jamProfession = new VillagerProfession(ActuallyAdditions.MODID + ":jamGuy", ActuallyAdditions.MODID + ":textures/entity/villager/jam_villager.png", ActuallyAdditions.MODID + ":textures/entity/villager/jam_villager_zombie.png");
//
VillagerCareer career = new VillagerCareer(jamProfession, ActuallyAdditions.MODID + ".jammer"); // VillagerCareer career = new VillagerCareer(jamProfession, ActuallyAdditions.MODID + ".jammer");
career.addTrade(1, new BasicTradeList(new PriceInfo(1, 4), new ItemStack(InitItems.itemJams, 1, TheJams.CU_BA_RA.ordinal()), new PriceInfo(1, 3)), new BasicTradeList(new PriceInfo(1, 4), new ItemStack(InitItems.itemJams, 1, TheJams.GRA_KI_BA.ordinal()), new PriceInfo(1, 3))); // career.addTrade(1, new BasicTradeList(new PriceInfo(1, 4), new ItemStack(InitItems.itemJams, 1, TheJams.CU_BA_RA.ordinal()), new PriceInfo(1, 3)), new BasicTradeList(new PriceInfo(1, 4), new ItemStack(InitItems.itemJams, 1, TheJams.GRA_KI_BA.ordinal()), new PriceInfo(1, 3)));
career.addTrade(2, new BasicTradeList(new PriceInfo(1, 4), new ItemStack(InitItems.itemJams, 1, TheJams.PL_AP_LE.ordinal()), new PriceInfo(1, 3)), new BasicTradeList(new PriceInfo(1, 4), new ItemStack(InitItems.itemJams, 1, TheJams.CH_AP_CI.ordinal()), new PriceInfo(1, 3)), new BasicTradeList(new PriceInfo(1, 4), new ItemStack(InitItems.itemJams, 1, TheJams.HO_ME_KI.ordinal()), new PriceInfo(1, 3))); // career.addTrade(2, new BasicTradeList(new PriceInfo(1, 4), new ItemStack(InitItems.itemJams, 1, TheJams.PL_AP_LE.ordinal()), new PriceInfo(1, 3)), new BasicTradeList(new PriceInfo(1, 4), new ItemStack(InitItems.itemJams, 1, TheJams.CH_AP_CI.ordinal()), new PriceInfo(1, 3)), new BasicTradeList(new PriceInfo(1, 4), new ItemStack(InitItems.itemJams, 1, TheJams.HO_ME_KI.ordinal()), new PriceInfo(1, 3)));
career.addTrade(3, new BasicTradeList(new PriceInfo(1, 4), new ItemStack(InitItems.itemJams, 1, TheJams.HO_ME_CO.ordinal()), new PriceInfo(1, 3)), new BasicTradeList(new PriceInfo(1, 4), new ItemStack(InitItems.itemJams, 1, TheJams.PI_CO.ordinal()), new PriceInfo(1, 3))); // career.addTrade(3, new BasicTradeList(new PriceInfo(1, 4), new ItemStack(InitItems.itemJams, 1, TheJams.HO_ME_CO.ordinal()), new PriceInfo(1, 3)), new BasicTradeList(new PriceInfo(1, 4), new ItemStack(InitItems.itemJams, 1, TheJams.PI_CO.ordinal()), new PriceInfo(1, 3)));
//
VillagerRegistry.instance().registerVillageCreationHandler(new VillageJamHouseHandler()); // VillagerRegistry.instance().registerVillageCreationHandler(new VillageJamHouseHandler());
MapGenStructureIO.registerStructureComponent(VillageComponentJamHouse.class, ActuallyAdditions.MODID + ":jamHouseStructure"); // MapGenStructureIO.registerStructureComponent(VillageComponentJamHouse.class, ActuallyAdditions.MODID + ":jamHouseStructure");
} // }
//
private static void initCustomCropFieldPart() { // private static void initCustomCropFieldPart() {
VillagerRegistry.instance().registerVillageCreationHandler(new VillageCustomCropFieldHandler()); // VillagerRegistry.instance().registerVillageCreationHandler(new VillageCustomCropFieldHandler());
MapGenStructureIO.registerStructureComponent(VillageComponentCustomCropField.class, ActuallyAdditions.MODID + ":customCropFieldStructure"); // MapGenStructureIO.registerStructureComponent(VillageComponentCustomCropField.class, ActuallyAdditions.MODID + ":customCropFieldStructure");
} // }
} }

View file

@ -0,0 +1,19 @@
package de.ellpeck.actuallyadditions.mod.inventory;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import net.minecraft.inventory.container.ContainerType;
import net.minecraftforge.common.extensions.IForgeContainerType;
import net.minecraftforge.fml.RegistryObject;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;
public class ActuallyContainers {
public static final DeferredRegister<ContainerType<?>> CONTAINERS = DeferredRegister.create(ForgeRegistries.CONTAINERS, ActuallyAdditions.MODID);
public static final RegistryObject<ContainerType<ContainerBag>> BAG_CONTAINER
= CONTAINERS.register("bag_container", () -> IForgeContainerType.create(ContainerBag::fromNetwork));
public static final RegistryObject<ContainerType<ContainerBioReactor>> BIO_REACTOR_CONTAINER
= CONTAINERS.register("bioreactor_container", () -> IForgeContainerType.create(ContainerBioReactor::fromNetwork));
}

View file

@ -31,6 +31,7 @@ import net.minecraft.inventory.container.Slot;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundNBT; import net.minecraft.nbt.CompoundNBT;
import net.minecraft.network.PacketBuffer;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.OnlyIn;
@ -44,24 +45,30 @@ public class ContainerBag extends Container implements IButtonReactor {
public final FilterSettings filter = new FilterSettings(4, false, true, false, false, 0, -1000); public final FilterSettings filter = new FilterSettings(4, false, true, false, false, 0, -1000);
private final ItemStackHandlerAA bagInventory; private final ItemStackHandlerAA bagInventory;
private final InventoryPlayer inventory; private final PlayerInventory inventory;
private final boolean isVoid; public final boolean isVoid;
public boolean autoInsert; public boolean autoInsert;
private boolean oldAutoInsert; private boolean oldAutoInsert;
private final ItemStack sack; private final ItemStack sack;
public ContainerBag(ItemStack sack, PlayerInventory inventory, boolean isVoid) { public static ContainerBag fromNetwork(int windowId, PlayerInventory inv, PacketBuffer data) {
return new ContainerBag(windowId, inv, data.readItemStack(), data.readBoolean());
}
public ContainerBag(int windowId, PlayerInventory inventory, ItemStack sack, boolean isVoid) {
super(ActuallyContainers.BAG_CONTAINER.get(), windowId);
this.inventory = inventory; this.inventory = inventory;
this.bagInventory = new ItemStackHandlerAA(getSlotAmount(isVoid), (slot, stack, automation) -> !isBlacklisted(stack), ItemStackHandlerAA.REMOVE_TRUE); this.bagInventory = new ItemStackHandlerAA(getSlotAmount(isVoid), (slot, stack, automation) -> !isBlacklisted(stack), ItemStackHandlerAA.REMOVE_TRUE);
this.isVoid = isVoid; this.isVoid = isVoid;
this.sack = sack; this.sack = sack;
for (int i = 0; i < 4; i++) { for (int i = 0; i < 4; i++) {
this.addSlotToContainer(new SlotFilter(this.filter, i, 155, 10 + i * 18)); this.addSlot(new SlotFilter(this.filter, i, 155, 10 + i * 18));
} }
if (this.isVoid) { if (this.isVoid) {
this.addSlotToContainer(new SlotDeletion(this.bagInventory, 0, 64, 65) { this.addSlot(new SlotDeletion(this.bagInventory, 0, 64, 65) {
@Override @Override
public boolean isItemValid(ItemStack stack) { public boolean isItemValid(ItemStack stack) {
return ContainerBag.this.filter.check(stack); return ContainerBag.this.filter.check(stack);
@ -70,7 +77,7 @@ public class ContainerBag extends Container implements IButtonReactor {
} else { } else {
for (int i = 0; i < 4; i++) { for (int i = 0; i < 4; i++) {
for (int j = 0; j < 7; j++) { for (int j = 0; j < 7; j++) {
this.addSlotToContainer(new SlotItemHandlerUnconditioned(this.bagInventory, j + i * 7, 10 + j * 18, 10 + i * 18) { this.addSlot(new SlotItemHandlerUnconditioned(this.bagInventory, j + i * 7, 10 + j * 18, 10 + i * 18) {
@Override @Override
public boolean isItemValid(ItemStack stack) { public boolean isItemValid(ItemStack stack) {
return !isBlacklisted(stack) && ContainerBag.this.filter.check(stack); return !isBlacklisted(stack) && ContainerBag.this.filter.check(stack);
@ -82,22 +89,22 @@ public class ContainerBag extends Container implements IButtonReactor {
for (int i = 0; i < 3; i++) { for (int i = 0; i < 3; i++) {
for (int j = 0; j < 9; j++) { for (int j = 0; j < 9; j++) {
this.addSlotToContainer(new Slot(inventory, j + i * 9 + 9, 8 + j * 18, 94 + i * 18)); this.addSlot(new Slot(inventory, j + i * 9 + 9, 8 + j * 18, 94 + i * 18));
} }
} }
for (int i = 0; i < 9; i++) { for (int i = 0; i < 9; i++) {
if (i == inventory.currentItem) { if (i == inventory.currentItem) {
this.addSlotToContainer(new SlotImmovable(inventory, i, 8 + i * 18, 152)); this.addSlot(new SlotImmovable(inventory, i, 8 + i * 18, 152));
} else { } else {
this.addSlotToContainer(new Slot(inventory, i, 8 + i * 18, 152)); this.addSlot(new Slot(inventory, i, 8 + i * 18, 152));
} }
} }
ItemStack stack = inventory.getCurrentItem(); ItemStack stack = inventory.getCurrentItem();
if (StackUtil.isValid(stack) && stack.getItem() instanceof ItemBag) { if (StackUtil.isValid(stack) && stack.getItem() instanceof ItemBag) {
ItemDrill.loadSlotsFromNBT(this.bagInventory, inventory.getCurrentItem()); ItemDrill.loadSlotsFromNBT(this.bagInventory, inventory.getCurrentItem());
if (stack.hasTagCompound()) { if (stack.hasTag()) {
CompoundNBT compound = stack.getTagCompound(); CompoundNBT compound = stack.getOrCreateTag();
this.filter.readFromNBT(compound, "Filter"); this.filter.readFromNBT(compound, "Filter");
this.autoInsert = compound.getBoolean("AutoInsert"); this.autoInsert = compound.getBoolean("AutoInsert");
} }
@ -219,7 +226,7 @@ public class ContainerBag extends Container implements IButtonReactor {
ItemStack stack = this.inventory.getCurrentItem(); ItemStack stack = this.inventory.getCurrentItem();
if (StackUtil.isValid(stack) && stack.getItem() instanceof ItemBag) { if (StackUtil.isValid(stack) && stack.getItem() instanceof ItemBag) {
ItemDrill.writeSlotsToNBT(this.bagInventory, this.inventory.getCurrentItem()); ItemDrill.writeSlotsToNBT(this.bagInventory, this.inventory.getCurrentItem());
CompoundNBT compound = stack.getTagCompound(); CompoundNBT compound = stack.getOrCreateTag();
this.filter.writeToNBT(compound, "Filter"); this.filter.writeToNBT(compound, "Filter");
compound.putBoolean("AutoInsert", this.autoInsert); compound.putBoolean("AutoInsert", this.autoInsert);
} }
@ -244,6 +251,7 @@ public class ContainerBag extends Container implements IButtonReactor {
private static boolean runOnce = false; private static boolean runOnce = false;
// TODO: [port] FIX THIS
public static boolean isBlacklisted(ItemStack stack) { public static boolean isBlacklisted(ItemStack stack) {
if (!runOnce) { if (!runOnce) {
runOnce = true; runOnce = true;
@ -261,6 +269,6 @@ public class ContainerBag extends Container implements IButtonReactor {
} }
} }
} }
return BLACKLIST.contains(Pair.of(stack.getItem(), stack.getMetadata())); return BLACKLIST.contains(Pair.of(stack.getItem(), 0));
} }
} }

View file

@ -11,35 +11,42 @@
package de.ellpeck.actuallyadditions.mod.inventory; package de.ellpeck.actuallyadditions.mod.inventory;
import de.ellpeck.actuallyadditions.mod.inventory.slot.SlotItemHandlerUnconditioned; import de.ellpeck.actuallyadditions.mod.inventory.slot.SlotItemHandlerUnconditioned;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBioReactor; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBioReactor;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.Container; import net.minecraft.inventory.container.Container;
import net.minecraft.inventory.Slot; import net.minecraft.inventory.container.Slot;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.network.PacketBuffer;
import java.util.Objects;
public class ContainerBioReactor extends Container { public class ContainerBioReactor extends Container {
private final TileEntityBioReactor tile; private final TileEntityBioReactor tile;
public ContainerBioReactor(InventoryPlayer inventory, TileEntityBase tile) { public static ContainerBioReactor fromNetwork(int windowId, PlayerInventory inv, PacketBuffer data) {
this.tile = (TileEntityBioReactor) tile; return new ContainerBioReactor(windowId, inv, (TileEntityBioReactor) Objects.requireNonNull(inv.player.world.getTileEntity(data.readBlockPos())));
}
public ContainerBioReactor(int windowId, PlayerInventory inventory, TileEntityBioReactor tile) {
super(ActuallyContainers.BIO_REACTOR_CONTAINER.get(), windowId);
this.tile = tile;
for (int i = 0; i < 4; i++) { for (int i = 0; i < 4; i++) {
for (int j = 0; j < 2; j++) { for (int j = 0; j < 2; j++) {
this.addSlotToContainer(new SlotItemHandlerUnconditioned(this.tile.inv, j + i * 2, 50 + j * 18, 13 + i * 18)); this.addSlot(new SlotItemHandlerUnconditioned(this.tile.inv, j + i * 2, 50 + j * 18, 13 + i * 18));
} }
} }
for (int i = 0; i < 3; i++) { for (int i = 0; i < 3; i++) {
for (int j = 0; j < 9; j++) { for (int j = 0; j < 9; j++) {
this.addSlotToContainer(new Slot(inventory, j + i * 9 + 9, 8 + j * 18, 97 + i * 18)); this.addSlot(new Slot(inventory, j + i * 9 + 9, 8 + j * 18, 97 + i * 18));
} }
} }
for (int i = 0; i < 9; i++) { for (int i = 0; i < 9; i++) {
this.addSlotToContainer(new Slot(inventory, i, 8 + i * 18, 155)); this.addSlot(new Slot(inventory, i, 8 + i * 18, 155));
} }
} }
@ -60,14 +67,22 @@ public class ContainerBioReactor extends Container {
if (slot >= inventoryStart) { if (slot >= inventoryStart) {
//Shift from Inventory //Shift from Inventory
if (TileEntityBioReactor.isValidItem(newStack)) { if (TileEntityBioReactor.isValidItem(newStack)) {
if (!this.mergeItemStack(newStack, 0, 8, false)) { return StackUtil.getEmpty(); } if (!this.mergeItemStack(newStack, 0, 8, false)) {
return StackUtil.getEmpty();
}
} }
// //
else if (slot >= inventoryStart && slot <= inventoryEnd) { else if (slot >= inventoryStart && slot <= inventoryEnd) {
if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); } if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) {
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) { return StackUtil.getEmpty(); } return StackUtil.getEmpty();
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); } }
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) {
return StackUtil.getEmpty();
}
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) {
return StackUtil.getEmpty();
}
if (!StackUtil.isValid(newStack)) { if (!StackUtil.isValid(newStack)) {
theSlot.putStack(StackUtil.getEmpty()); theSlot.putStack(StackUtil.getEmpty());
@ -75,7 +90,9 @@ public class ContainerBioReactor extends Container {
theSlot.onSlotChanged(); theSlot.onSlotChanged();
} }
if (newStack.getCount() == currentStack.getCount()) { return StackUtil.getEmpty(); } if (newStack.getCount() == currentStack.getCount()) {
return StackUtil.getEmpty();
}
theSlot.onTake(player, newStack); theSlot.onTake(player, newStack);
return currentStack; return currentStack;

View file

@ -15,7 +15,7 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBreaker; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBreaker;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.Container; import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot; import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -24,7 +24,7 @@ public class ContainerBreaker extends Container {
private final TileEntityBreaker breaker; private final TileEntityBreaker breaker;
public ContainerBreaker(InventoryPlayer inventory, TileEntityBase tile) { public ContainerBreaker(PlayerInventory inventory, TileEntityBase tile) {
this.breaker = (TileEntityBreaker) tile; this.breaker = (TileEntityBreaker) tile;
for (int i = 0; i < 3; i++) { for (int i = 0; i < 3; i++) {
@ -62,10 +62,16 @@ public class ContainerBreaker extends Container {
if (!this.mergeItemStack(newStack, 0, 9, false)) { if (!this.mergeItemStack(newStack, 0, 9, false)) {
// //
if (slot >= inventoryStart && slot <= inventoryEnd) { if (slot >= inventoryStart && slot <= inventoryEnd) {
if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); } if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) {
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) { return StackUtil.getEmpty(); } return StackUtil.getEmpty();
}
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) {
return StackUtil.getEmpty();
}
}
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) {
return StackUtil.getEmpty();
} }
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); }
if (!StackUtil.isValid(newStack)) { if (!StackUtil.isValid(newStack)) {
theSlot.putStack(StackUtil.getEmpty()); theSlot.putStack(StackUtil.getEmpty());
@ -73,7 +79,9 @@ public class ContainerBreaker extends Container {
theSlot.onSlotChanged(); theSlot.onSlotChanged();
} }
if (newStack.getCount() == currentStack.getCount()) { return StackUtil.getEmpty(); } if (newStack.getCount() == currentStack.getCount()) {
return StackUtil.getEmpty();
}
theSlot.onTake(player, newStack); theSlot.onTake(player, newStack);
return currentStack; return currentStack;

View file

@ -17,7 +17,7 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityCanolaPress; import de.ellpeck.actuallyadditions.mod.tile.TileEntityCanolaPress;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.Container; import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot; import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -26,7 +26,7 @@ public class ContainerCanolaPress extends Container {
private final TileEntityCanolaPress press; private final TileEntityCanolaPress press;
public ContainerCanolaPress(InventoryPlayer inventory, TileEntityBase tile) { public ContainerCanolaPress(PlayerInventory inventory, TileEntityBase tile) {
this.press = (TileEntityCanolaPress) tile; this.press = (TileEntityCanolaPress) tile;
this.addSlotToContainer(new SlotItemHandlerUnconditioned(this.press.inv, 0, 81, 10)); this.addSlotToContainer(new SlotItemHandlerUnconditioned(this.press.inv, 0, 81, 10));
@ -58,14 +58,22 @@ public class ContainerCanolaPress extends Container {
if (slot >= inventoryStart) { if (slot >= inventoryStart) {
//Shift from Inventory //Shift from Inventory
if (newStack.getItem() == InitItems.itemMisc && newStack.getItemDamage() == TheMiscItems.CANOLA.ordinal()) { if (newStack.getItem() == InitItems.itemMisc && newStack.getItemDamage() == TheMiscItems.CANOLA.ordinal()) {
if (!this.mergeItemStack(newStack, 0, 1, false)) { return StackUtil.getEmpty(); } if (!this.mergeItemStack(newStack, 0, 1, false)) {
return StackUtil.getEmpty();
}
} }
// //
else if (slot >= inventoryStart && slot <= inventoryEnd) { else if (slot >= inventoryStart && slot <= inventoryEnd) {
if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); } if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) {
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) { return StackUtil.getEmpty(); } return StackUtil.getEmpty();
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); } }
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) {
return StackUtil.getEmpty();
}
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) {
return StackUtil.getEmpty();
}
if (!StackUtil.isValid(newStack)) { if (!StackUtil.isValid(newStack)) {
theSlot.putStack(StackUtil.getEmpty()); theSlot.putStack(StackUtil.getEmpty());
@ -73,7 +81,9 @@ public class ContainerCanolaPress extends Container {
theSlot.onSlotChanged(); theSlot.onSlotChanged();
} }
if (newStack.getCount() == currentStack.getCount()) { return StackUtil.getEmpty(); } if (newStack.getCount() == currentStack.getCount()) {
return StackUtil.getEmpty();
}
theSlot.onTake(player, newStack); theSlot.onTake(player, newStack);
return currentStack; return currentStack;

View file

@ -15,7 +15,7 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoalGenerator; import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoalGenerator;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.Container; import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot; import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -25,7 +25,7 @@ public class ContainerCoalGenerator extends Container {
private final TileEntityCoalGenerator generator; private final TileEntityCoalGenerator generator;
public ContainerCoalGenerator(InventoryPlayer inventory, TileEntityBase tile) { public ContainerCoalGenerator(PlayerInventory inventory, TileEntityBase tile) {
this.generator = (TileEntityCoalGenerator) tile; this.generator = (TileEntityCoalGenerator) tile;
this.addSlotToContainer(new SlotItemHandlerUnconditioned(this.generator.inv, 0, 87, 43)); this.addSlotToContainer(new SlotItemHandlerUnconditioned(this.generator.inv, 0, 87, 43));
@ -57,14 +57,22 @@ public class ContainerCoalGenerator extends Container {
if (slot >= inventoryStart) { if (slot >= inventoryStart) {
//Shift from Inventory //Shift from Inventory
if (TileEntityFurnace.getItemBurnTime(newStack) > 0) { if (TileEntityFurnace.getItemBurnTime(newStack) > 0) {
if (!this.mergeItemStack(newStack, 0, 1, false)) { return StackUtil.getEmpty(); } if (!this.mergeItemStack(newStack, 0, 1, false)) {
return StackUtil.getEmpty();
}
} }
// //
else if (slot >= inventoryStart && slot <= inventoryEnd) { else if (slot >= inventoryStart && slot <= inventoryEnd) {
if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); } if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) {
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) { return StackUtil.getEmpty(); } return StackUtil.getEmpty();
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); } }
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) {
return StackUtil.getEmpty();
}
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) {
return StackUtil.getEmpty();
}
if (!StackUtil.isValid(newStack)) { if (!StackUtil.isValid(newStack)) {
theSlot.putStack(StackUtil.getEmpty()); theSlot.putStack(StackUtil.getEmpty());
@ -72,7 +80,9 @@ public class ContainerCoalGenerator extends Container {
theSlot.onSlotChanged(); theSlot.onSlotChanged();
} }
if (newStack.getCount() == currentStack.getCount()) { return StackUtil.getEmpty(); } if (newStack.getCount() == currentStack.getCount()) {
return StackUtil.getEmpty();
}
theSlot.onTake(player, newStack); theSlot.onTake(player, newStack);
return currentStack; return currentStack;

View file

@ -19,8 +19,8 @@ import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoffeeMachine; import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoffeeMachine;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.Container; import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot; import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -29,7 +29,7 @@ public class ContainerCoffeeMachine extends Container {
private final TileEntityCoffeeMachine machine; private final TileEntityCoffeeMachine machine;
public ContainerCoffeeMachine(InventoryPlayer inventory, TileEntityBase tile) { public ContainerCoffeeMachine(PlayerInventory inventory, TileEntityBase tile) {
this.machine = (TileEntityCoffeeMachine) tile; this.machine = (TileEntityCoffeeMachine) tile;
this.addSlotToContainer(new SlotItemHandlerUnconditioned(this.machine.inv, TileEntityCoffeeMachine.SLOT_COFFEE_BEANS, 37, 6)); this.addSlotToContainer(new SlotItemHandlerUnconditioned(this.machine.inv, TileEntityCoffeeMachine.SLOT_COFFEE_BEANS, 37, 6));

View file

@ -15,7 +15,7 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityDirectionalBreaker; import de.ellpeck.actuallyadditions.mod.tile.TileEntityDirectionalBreaker;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.Container; import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot; import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -24,7 +24,7 @@ public class ContainerDirectionalBreaker extends Container {
private final TileEntityDirectionalBreaker breaker; private final TileEntityDirectionalBreaker breaker;
public ContainerDirectionalBreaker(InventoryPlayer inventory, TileEntityBase tile) { public ContainerDirectionalBreaker(PlayerInventory inventory, TileEntityBase tile) {
this.breaker = (TileEntityDirectionalBreaker) tile; this.breaker = (TileEntityDirectionalBreaker) tile;
for (int i = 0; i < 3; i++) { for (int i = 0; i < 3; i++) {
@ -62,10 +62,16 @@ public class ContainerDirectionalBreaker extends Container {
if (!this.mergeItemStack(newStack, 0, 9, false)) { if (!this.mergeItemStack(newStack, 0, 9, false)) {
// //
if (slot >= inventoryStart && slot <= inventoryEnd) { if (slot >= inventoryStart && slot <= inventoryEnd) {
if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); } if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) {
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) { return StackUtil.getEmpty(); } return StackUtil.getEmpty();
}
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) {
return StackUtil.getEmpty();
}
}
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) {
return StackUtil.getEmpty();
} }
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); }
if (!StackUtil.isValid(newStack)) { if (!StackUtil.isValid(newStack)) {
theSlot.putStack(StackUtil.getEmpty()); theSlot.putStack(StackUtil.getEmpty());
@ -73,7 +79,9 @@ public class ContainerDirectionalBreaker extends Container {
theSlot.onSlotChanged(); theSlot.onSlotChanged();
} }
if (newStack.getCount() == currentStack.getCount()) { return StackUtil.getEmpty(); } if (newStack.getCount() == currentStack.getCount()) {
return StackUtil.getEmpty();
}
theSlot.onTake(player, newStack); theSlot.onTake(player, newStack);
return currentStack; return currentStack;

View file

@ -17,7 +17,7 @@ import de.ellpeck.actuallyadditions.mod.items.ItemDrillUpgrade;
import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.ClickType; import net.minecraft.inventory.ClickType;
import net.minecraft.inventory.Container; import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot; import net.minecraft.inventory.Slot;
@ -28,9 +28,9 @@ public class ContainerDrill extends Container {
public static final int SLOT_AMOUNT = 5; public static final int SLOT_AMOUNT = 5;
private final ItemStackHandlerAA drillInventory = new ItemStackHandlerAA(SLOT_AMOUNT); private final ItemStackHandlerAA drillInventory = new ItemStackHandlerAA(SLOT_AMOUNT);
private final InventoryPlayer inventory; private final PlayerInventory inventory;
public ContainerDrill(InventoryPlayer inventory) { public ContainerDrill(PlayerInventory inventory) {
this.inventory = inventory; this.inventory = inventory;
for (int i = 0; i < SLOT_AMOUNT; i++) { for (int i = 0; i < SLOT_AMOUNT; i++) {
@ -78,14 +78,22 @@ public class ContainerDrill extends Container {
if (slot >= inventoryStart) { if (slot >= inventoryStart) {
//Shift from Inventory //Shift from Inventory
if (newStack.getItem() instanceof ItemDrillUpgrade) { if (newStack.getItem() instanceof ItemDrillUpgrade) {
if (!this.mergeItemStack(newStack, 0, 5, false)) { return StackUtil.getEmpty(); } if (!this.mergeItemStack(newStack, 0, 5, false)) {
return StackUtil.getEmpty();
}
} }
// //
else if (slot >= inventoryStart && slot <= inventoryEnd) { else if (slot >= inventoryStart && slot <= inventoryEnd) {
if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); } if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) {
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) { return StackUtil.getEmpty(); } return StackUtil.getEmpty();
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); } }
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) {
return StackUtil.getEmpty();
}
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) {
return StackUtil.getEmpty();
}
if (!StackUtil.isValid(newStack)) { if (!StackUtil.isValid(newStack)) {
theSlot.putStack(StackUtil.getEmpty()); theSlot.putStack(StackUtil.getEmpty());
@ -93,7 +101,9 @@ public class ContainerDrill extends Container {
theSlot.onSlotChanged(); theSlot.onSlotChanged();
} }
if (newStack.getCount() == currentStack.getCount()) { return StackUtil.getEmpty(); } if (newStack.getCount() == currentStack.getCount()) {
return StackUtil.getEmpty();
}
theSlot.onTake(player, newStack); theSlot.onTake(player, newStack);
return currentStack; return currentStack;

View file

@ -16,7 +16,7 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityDropper; import de.ellpeck.actuallyadditions.mod.tile.TileEntityDropper;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.Container; import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot; import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -29,7 +29,7 @@ public class ContainerDropper extends Container {
public ContainerDropper(PlayerEntity player, TileEntityBase tile) { public ContainerDropper(PlayerEntity player, TileEntityBase tile) {
this.dropper = (TileEntityDropper) tile; this.dropper = (TileEntityDropper) tile;
this.player = player; this.player = player;
InventoryPlayer inventory = player.inventory; PlayerInventory inventory = player.inventory;
for (int i = 0; i < 3; i++) { for (int i = 0; i < 3; i++) {
for (int j = 0; j < 3; j++) { for (int j = 0; j < 3; j++) {
this.addSlotToContainer(new SlotItemHandlerUnconditioned(this.dropper.inv, j + i * 3, 62 + j * 18, 21 + i * 18)); this.addSlotToContainer(new SlotItemHandlerUnconditioned(this.dropper.inv, j + i * 3, 62 + j * 18, 21 + i * 18));
@ -65,10 +65,16 @@ public class ContainerDropper extends Container {
if (!this.mergeItemStack(newStack, 0, 9, false)) { if (!this.mergeItemStack(newStack, 0, 9, false)) {
// //
if (slot >= inventoryStart && slot <= inventoryEnd) { if (slot >= inventoryStart && slot <= inventoryEnd) {
if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); } if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) {
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) { return StackUtil.getEmpty(); } return StackUtil.getEmpty();
}
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) {
return StackUtil.getEmpty();
}
}
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) {
return StackUtil.getEmpty();
} }
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); }
if (!StackUtil.isValid(newStack)) { if (!StackUtil.isValid(newStack)) {
theSlot.putStack(StackUtil.getEmpty()); theSlot.putStack(StackUtil.getEmpty());
@ -76,7 +82,9 @@ public class ContainerDropper extends Container {
theSlot.onSlotChanged(); theSlot.onSlotChanged();
} }
if (newStack.getCount() == currentStack.getCount()) { return StackUtil.getEmpty(); } if (newStack.getCount() == currentStack.getCount()) {
return StackUtil.getEmpty();
}
theSlot.onTake(player, newStack); theSlot.onTake(player, newStack);
return currentStack; return currentStack;
@ -92,6 +100,8 @@ public class ContainerDropper extends Container {
@Override @Override
public void onContainerClosed(PlayerEntity playerIn) { public void onContainerClosed(PlayerEntity playerIn) {
super.onContainerClosed(playerIn); super.onContainerClosed(playerIn);
if (!this.player.isSpectator()) this.dropper.getWorld().notifyNeighborsOfStateChange(this.dropper.getPos(), InitBlocks.blockDropper, false); if (!this.player.isSpectator()) {
this.dropper.getWorld().notifyNeighborsOfStateChange(this.dropper.getPos(), InitBlocks.blockDropper, false);
}
} }
} }

View file

@ -17,14 +17,13 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityEnergizer;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.Container; import net.minecraft.inventory.Container;
import net.minecraft.inventory.EntityEquipmentSlot; import net.minecraft.inventory.EntityEquipmentSlot;
import net.minecraft.inventory.Slot; import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraftforge.energy.CapabilityEnergy; import net.minecraftforge.energy.CapabilityEnergy;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.OnlyIn; import net.minecraftforge.fml.relauncher.OnlyIn;
public class ContainerEnergizer extends Container { public class ContainerEnergizer extends Container {
@ -32,9 +31,9 @@ public class ContainerEnergizer extends Container {
public static final EntityEquipmentSlot[] VALID_EQUIPMENT_SLOTS = new EntityEquipmentSlot[]{EntityEquipmentSlot.HEAD, EntityEquipmentSlot.CHEST, EntityEquipmentSlot.LEGS, EntityEquipmentSlot.FEET}; public static final EntityEquipmentSlot[] VALID_EQUIPMENT_SLOTS = new EntityEquipmentSlot[]{EntityEquipmentSlot.HEAD, EntityEquipmentSlot.CHEST, EntityEquipmentSlot.LEGS, EntityEquipmentSlot.FEET};
private final TileEntityEnergizer energizer; private final TileEntityEnergizer energizer;
public ContainerEnergizer(final PlayerEntity player, TileEntityBase tile) { public ContainerEnergizer(PlayerEntity player, TileEntityBase tile) {
this.energizer = (TileEntityEnergizer) tile; this.energizer = (TileEntityEnergizer) tile;
InventoryPlayer inventory = player.inventory; PlayerInventory inventory = player.inventory;
this.addSlotToContainer(new SlotItemHandlerUnconditioned(this.energizer.inv, 0, 76, 73) { this.addSlotToContainer(new SlotItemHandlerUnconditioned(this.energizer.inv, 0, 76, 73) {
@Override @Override
@ -54,7 +53,7 @@ public class ContainerEnergizer extends Container {
} }
for (int k = 0; k < 4; ++k) { for (int k = 0; k < 4; ++k) {
final EntityEquipmentSlot slot = VALID_EQUIPMENT_SLOTS[k]; EntityEquipmentSlot slot = VALID_EQUIPMENT_SLOTS[k];
this.addSlotToContainer(new Slot(player.inventory, 36 + 3 - k, 102, 19 + k * 18) { this.addSlotToContainer(new Slot(player.inventory, 36 + 3 - k, 102, 19 + k * 18) {
@Override @Override
public int getSlotStackLimit() { public int getSlotStackLimit() {
@ -69,7 +68,9 @@ public class ContainerEnergizer extends Container {
@Override @Override
public boolean canTakeStack(PlayerEntity player) { public boolean canTakeStack(PlayerEntity player) {
ItemStack itemstack = this.getStack(); ItemStack itemstack = this.getStack();
return !itemstack.isEmpty() && !player.isCreative() && EnchantmentHelper.hasBindingCurse(itemstack) ? false : super.canTakeStack(player); return !itemstack.isEmpty() && !player.isCreative() && EnchantmentHelper.hasBindingCurse(itemstack)
? false
: super.canTakeStack(player);
} }
@Override @Override
@ -96,21 +97,31 @@ public class ContainerEnergizer extends Container {
//Slots in Inventory to shift from //Slots in Inventory to shift from
if (slot == 1) { if (slot == 1) {
if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, true)) { return StackUtil.getEmpty(); } if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, true)) {
return StackUtil.getEmpty();
}
theSlot.onSlotChange(newStack, currentStack); theSlot.onSlotChange(newStack, currentStack);
} }
//Other Slots in Inventory excluded //Other Slots in Inventory excluded
else if (slot >= inventoryStart) { else if (slot >= inventoryStart) {
//Shift from Inventory //Shift from Inventory
if (newStack.hasCapability(CapabilityEnergy.ENERGY, null)) { if (newStack.hasCapability(CapabilityEnergy.ENERGY, null)) {
if (!this.mergeItemStack(newStack, 0, 1, false)) { return StackUtil.getEmpty(); } if (!this.mergeItemStack(newStack, 0, 1, false)) {
return StackUtil.getEmpty();
}
} }
// //
else if (slot >= inventoryStart && slot <= inventoryEnd) { else if (slot >= inventoryStart && slot <= inventoryEnd) {
if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); } if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) {
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) { return StackUtil.getEmpty(); } return StackUtil.getEmpty();
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); } }
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) {
return StackUtil.getEmpty();
}
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) {
return StackUtil.getEmpty();
}
if (!StackUtil.isValid(newStack)) { if (!StackUtil.isValid(newStack)) {
theSlot.putStack(StackUtil.getEmpty()); theSlot.putStack(StackUtil.getEmpty());
@ -118,7 +129,9 @@ public class ContainerEnergizer extends Container {
theSlot.onSlotChanged(); theSlot.onSlotChanged();
} }
if (newStack.getCount() == currentStack.getCount()) { return StackUtil.getEmpty(); } if (newStack.getCount() == currentStack.getCount()) {
return StackUtil.getEmpty();
}
theSlot.onTake(player, newStack); theSlot.onTake(player, newStack);
return currentStack; return currentStack;

View file

@ -16,23 +16,22 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityEnervator; import de.ellpeck.actuallyadditions.mod.tile.TileEntityEnervator;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.Container; import net.minecraft.inventory.Container;
import net.minecraft.inventory.EntityEquipmentSlot; import net.minecraft.inventory.EntityEquipmentSlot;
import net.minecraft.inventory.Slot; import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraftforge.energy.CapabilityEnergy; import net.minecraftforge.energy.CapabilityEnergy;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.OnlyIn; import net.minecraftforge.fml.relauncher.OnlyIn;
public class ContainerEnervator extends Container { public class ContainerEnervator extends Container {
private final TileEntityEnervator enervator; private final TileEntityEnervator enervator;
public ContainerEnervator(final PlayerEntity player, TileEntityBase tile) { public ContainerEnervator(PlayerEntity player, TileEntityBase tile) {
this.enervator = (TileEntityEnervator) tile; this.enervator = (TileEntityEnervator) tile;
InventoryPlayer inventory = player.inventory; PlayerInventory inventory = player.inventory;
this.addSlotToContainer(new SlotItemHandlerUnconditioned(this.enervator.inv, 0, 76, 73)); this.addSlotToContainer(new SlotItemHandlerUnconditioned(this.enervator.inv, 0, 76, 73));
this.addSlotToContainer(new SlotOutput(this.enervator.inv, 1, 76, 42)); this.addSlotToContainer(new SlotOutput(this.enervator.inv, 1, 76, 42));
@ -47,7 +46,7 @@ public class ContainerEnervator extends Container {
} }
for (int k = 0; k < 4; ++k) { for (int k = 0; k < 4; ++k) {
final EntityEquipmentSlot slot = ContainerEnergizer.VALID_EQUIPMENT_SLOTS[k]; EntityEquipmentSlot slot = ContainerEnergizer.VALID_EQUIPMENT_SLOTS[k];
this.addSlotToContainer(new Slot(player.inventory, 36 + 3 - k, 102, 19 + k * 18) { this.addSlotToContainer(new Slot(player.inventory, 36 + 3 - k, 102, 19 + k * 18) {
@Override @Override
public int getSlotStackLimit() { public int getSlotStackLimit() {
@ -83,21 +82,31 @@ public class ContainerEnervator extends Container {
//Slots in Inventory to shift from //Slots in Inventory to shift from
if (slot == 1) { if (slot == 1) {
if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, true)) { return StackUtil.getEmpty(); } if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, true)) {
return StackUtil.getEmpty();
}
theSlot.onSlotChange(newStack, currentStack); theSlot.onSlotChange(newStack, currentStack);
} }
//Other Slots in Inventory excluded //Other Slots in Inventory excluded
else if (slot >= inventoryStart) { else if (slot >= inventoryStart) {
//Shift from Inventory //Shift from Inventory
if (newStack.hasCapability(CapabilityEnergy.ENERGY, null)) { if (newStack.hasCapability(CapabilityEnergy.ENERGY, null)) {
if (!this.mergeItemStack(newStack, 0, 1, false)) { return StackUtil.getEmpty(); } if (!this.mergeItemStack(newStack, 0, 1, false)) {
return StackUtil.getEmpty();
}
} }
// //
else if (slot >= inventoryStart && slot <= inventoryEnd) { else if (slot >= inventoryStart && slot <= inventoryEnd) {
if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); } if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) {
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) { return StackUtil.getEmpty(); } return StackUtil.getEmpty();
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); } }
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) {
return StackUtil.getEmpty();
}
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) {
return StackUtil.getEmpty();
}
if (!StackUtil.isValid(newStack)) { if (!StackUtil.isValid(newStack)) {
theSlot.putStack(StackUtil.getEmpty()); theSlot.putStack(StackUtil.getEmpty());
@ -105,7 +114,9 @@ public class ContainerEnervator extends Container {
theSlot.onSlotChanged(); theSlot.onSlotChanged();
} }
if (newStack.getCount() == currentStack.getCount()) { return StackUtil.getEmpty(); } if (newStack.getCount() == currentStack.getCount()) {
return StackUtil.getEmpty();
}
theSlot.onTake(player, newStack); theSlot.onTake(player, newStack);
return currentStack; return currentStack;

View file

@ -15,7 +15,7 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityFarmer; import de.ellpeck.actuallyadditions.mod.tile.TileEntityFarmer;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.Container; import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot; import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -24,7 +24,7 @@ public class ContainerFarmer extends Container {
private final TileEntityFarmer farmer; private final TileEntityFarmer farmer;
public ContainerFarmer(InventoryPlayer inventory, TileEntityBase tile) { public ContainerFarmer(PlayerInventory inventory, TileEntityBase tile) {
this.farmer = (TileEntityFarmer) tile; this.farmer = (TileEntityFarmer) tile;
for (int i = 0; i < 3; i++) { for (int i = 0; i < 3; i++) {
@ -67,10 +67,16 @@ public class ContainerFarmer extends Container {
if (!this.mergeItemStack(newStack, 0, 6, false)) { if (!this.mergeItemStack(newStack, 0, 6, false)) {
// //
if (slot >= inventoryStart && slot <= inventoryEnd) { if (slot >= inventoryStart && slot <= inventoryEnd) {
if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); } if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) {
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) { return StackUtil.getEmpty(); } return StackUtil.getEmpty();
}
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) {
return StackUtil.getEmpty();
}
}
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) {
return StackUtil.getEmpty();
} }
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); }
if (!StackUtil.isValid(newStack)) { if (!StackUtil.isValid(newStack)) {
theSlot.putStack(StackUtil.getEmpty()); theSlot.putStack(StackUtil.getEmpty());
@ -78,7 +84,9 @@ public class ContainerFarmer extends Container {
theSlot.onSlotChanged(); theSlot.onSlotChanged();
} }
if (newStack.getCount() == currentStack.getCount()) { return StackUtil.getEmpty(); } if (newStack.getCount() == currentStack.getCount()) {
return StackUtil.getEmpty();
}
theSlot.onTake(player, newStack); theSlot.onTake(player, newStack);
return currentStack; return currentStack;

View file

@ -15,7 +15,7 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityFeeder; import de.ellpeck.actuallyadditions.mod.tile.TileEntityFeeder;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.Container; import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot; import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -24,7 +24,7 @@ public class ContainerFeeder extends Container {
private final TileEntityFeeder tileFeeder; private final TileEntityFeeder tileFeeder;
public ContainerFeeder(InventoryPlayer inventory, TileEntityBase tile) { public ContainerFeeder(PlayerInventory inventory, TileEntityBase tile) {
this.tileFeeder = (TileEntityFeeder) tile; this.tileFeeder = (TileEntityFeeder) tile;
this.addSlotToContainer(new SlotItemHandlerUnconditioned(this.tileFeeder.inv, 0, 80, 45)); this.addSlotToContainer(new SlotItemHandlerUnconditioned(this.tileFeeder.inv, 0, 80, 45));
@ -57,10 +57,16 @@ public class ContainerFeeder extends Container {
if (!this.mergeItemStack(newStack, 0, 1, false)) { if (!this.mergeItemStack(newStack, 0, 1, false)) {
// //
if (slot >= inventoryStart && slot <= inventoryEnd) { if (slot >= inventoryStart && slot <= inventoryEnd) {
if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); } if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) {
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) { return StackUtil.getEmpty(); } return StackUtil.getEmpty();
}
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) {
return StackUtil.getEmpty();
}
}
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) {
return StackUtil.getEmpty();
} }
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); }
if (!StackUtil.isValid(newStack)) { if (!StackUtil.isValid(newStack)) {
theSlot.putStack(StackUtil.getEmpty()); theSlot.putStack(StackUtil.getEmpty());
@ -68,7 +74,9 @@ public class ContainerFeeder extends Container {
theSlot.onSlotChanged(); theSlot.onSlotChanged();
} }
if (newStack.getCount() == currentStack.getCount()) { return StackUtil.getEmpty(); } if (newStack.getCount() == currentStack.getCount()) {
return StackUtil.getEmpty();
}
theSlot.onTake(player, newStack); theSlot.onTake(player, newStack);
return currentStack; return currentStack;

View file

@ -14,7 +14,7 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityFermentingBarrel; import de.ellpeck.actuallyadditions.mod.tile.TileEntityFermentingBarrel;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.Container; import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot; import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -23,7 +23,7 @@ public class ContainerFermentingBarrel extends Container {
private final TileEntityFermentingBarrel barrel; private final TileEntityFermentingBarrel barrel;
public ContainerFermentingBarrel(InventoryPlayer inventory, TileEntityBase tile) { public ContainerFermentingBarrel(PlayerInventory inventory, TileEntityBase tile) {
this.barrel = (TileEntityFermentingBarrel) tile; this.barrel = (TileEntityFermentingBarrel) tile;
for (int i = 0; i < 3; i++) { for (int i = 0; i < 3; i++) {
@ -52,9 +52,15 @@ public class ContainerFermentingBarrel extends Container {
//Other Slots in Inventory excluded //Other Slots in Inventory excluded
if (slot >= inventoryStart) { if (slot >= inventoryStart) {
if (slot >= inventoryStart && slot <= inventoryEnd) { if (slot >= inventoryStart && slot <= inventoryEnd) {
if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); } if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) {
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) { return StackUtil.getEmpty(); } return StackUtil.getEmpty();
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); } }
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) {
return StackUtil.getEmpty();
}
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) {
return StackUtil.getEmpty();
}
if (!StackUtil.isValid(newStack)) { if (!StackUtil.isValid(newStack)) {
theSlot.putStack(StackUtil.getEmpty()); theSlot.putStack(StackUtil.getEmpty());
@ -62,7 +68,9 @@ public class ContainerFermentingBarrel extends Container {
theSlot.onSlotChanged(); theSlot.onSlotChanged();
} }
if (newStack.getCount() == currentStack.getCount()) { return StackUtil.getEmpty(); } if (newStack.getCount() == currentStack.getCount()) {
return StackUtil.getEmpty();
}
theSlot.onTake(player, newStack); theSlot.onTake(player, newStack);
return currentStack; return currentStack;

View file

@ -16,7 +16,7 @@ import de.ellpeck.actuallyadditions.mod.items.ItemDrill;
import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.ClickType; import net.minecraft.inventory.ClickType;
import net.minecraft.inventory.Container; import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot; import net.minecraft.inventory.Slot;
@ -27,9 +27,9 @@ public class ContainerFilter extends Container {
public static final int SLOT_AMOUNT = 24; public static final int SLOT_AMOUNT = 24;
private final ItemStackHandlerAA filterInventory = new ItemStackHandlerAA(SLOT_AMOUNT); private final ItemStackHandlerAA filterInventory = new ItemStackHandlerAA(SLOT_AMOUNT);
private final InventoryPlayer inventory; private final PlayerInventory inventory;
public ContainerFilter(InventoryPlayer inventory) { public ContainerFilter(PlayerInventory inventory) {
this.inventory = inventory; this.inventory = inventory;
for (int i = 0; i < 4; i++) { for (int i = 0; i < 4; i++) {
@ -75,9 +75,15 @@ public class ContainerFilter extends Container {
//Shift from Inventory //Shift from Inventory
// //
if (slot >= inventoryStart && slot <= inventoryEnd) { if (slot >= inventoryStart && slot <= inventoryEnd) {
if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); } if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) {
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) { return StackUtil.getEmpty(); } return StackUtil.getEmpty();
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); } }
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) {
return StackUtil.getEmpty();
}
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) {
return StackUtil.getEmpty();
}
if (!StackUtil.isValid(newStack)) { if (!StackUtil.isValid(newStack)) {
theSlot.putStack(StackUtil.getEmpty()); theSlot.putStack(StackUtil.getEmpty());
@ -85,7 +91,9 @@ public class ContainerFilter extends Container {
theSlot.onSlotChanged(); theSlot.onSlotChanged();
} }
if (newStack.getCount() == currentStack.getCount()) { return StackUtil.getEmpty(); } if (newStack.getCount() == currentStack.getCount()) {
return StackUtil.getEmpty();
}
theSlot.onTake(player, newStack); theSlot.onTake(player, newStack);
return currentStack; return currentStack;

View file

@ -14,7 +14,7 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityFluidCollector; import de.ellpeck.actuallyadditions.mod.tile.TileEntityFluidCollector;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.Container; import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot; import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -23,7 +23,7 @@ public class ContainerFluidCollector extends Container {
private final TileEntityFluidCollector collector; private final TileEntityFluidCollector collector;
public ContainerFluidCollector(InventoryPlayer inventory, TileEntityBase tile) { public ContainerFluidCollector(PlayerInventory inventory, TileEntityBase tile) {
this.collector = (TileEntityFluidCollector) tile; this.collector = (TileEntityFluidCollector) tile;
for (int i = 0; i < 3; i++) { for (int i = 0; i < 3; i++) {
@ -51,15 +51,23 @@ public class ContainerFluidCollector extends Container {
//Slots in Inventory to shift from //Slots in Inventory to shift from
if (slot == 1) { if (slot == 1) {
if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, true)) { return StackUtil.getEmpty(); } if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, true)) {
return StackUtil.getEmpty();
}
theSlot.onSlotChange(newStack, currentStack); theSlot.onSlotChange(newStack, currentStack);
} }
//Other Slots in Inventory excluded //Other Slots in Inventory excluded
else if (slot >= inventoryStart) { else if (slot >= inventoryStart) {
if (slot >= inventoryStart && slot <= inventoryEnd) { if (slot >= inventoryStart && slot <= inventoryEnd) {
if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); } if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) {
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) { return StackUtil.getEmpty(); } return StackUtil.getEmpty();
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); } }
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) {
return StackUtil.getEmpty();
}
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) {
return StackUtil.getEmpty();
}
if (!StackUtil.isValid(newStack)) { if (!StackUtil.isValid(newStack)) {
theSlot.putStack(StackUtil.getEmpty()); theSlot.putStack(StackUtil.getEmpty());
@ -67,7 +75,9 @@ public class ContainerFluidCollector extends Container {
theSlot.onSlotChanged(); theSlot.onSlotChanged();
} }
if (newStack.getCount() == currentStack.getCount()) { return StackUtil.getEmpty(); } if (newStack.getCount() == currentStack.getCount()) {
return StackUtil.getEmpty();
}
theSlot.onTake(player, newStack); theSlot.onTake(player, newStack);
return currentStack; return currentStack;

View file

@ -16,7 +16,7 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityFurnaceDouble; import de.ellpeck.actuallyadditions.mod.tile.TileEntityFurnaceDouble;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.Container; import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot; import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -26,7 +26,7 @@ public class ContainerFurnaceDouble extends Container {
private final TileEntityFurnaceDouble tileFurnace; private final TileEntityFurnaceDouble tileFurnace;
public ContainerFurnaceDouble(InventoryPlayer inventory, TileEntityBase tile) { public ContainerFurnaceDouble(PlayerInventory inventory, TileEntityBase tile) {
this.tileFurnace = (TileEntityFurnaceDouble) tile; this.tileFurnace = (TileEntityFurnaceDouble) tile;
this.addSlotToContainer(new SlotItemHandlerUnconditioned(this.tileFurnace.inv, TileEntityFurnaceDouble.SLOT_INPUT_1, 51, 21)); this.addSlotToContainer(new SlotItemHandlerUnconditioned(this.tileFurnace.inv, TileEntityFurnaceDouble.SLOT_INPUT_1, 51, 21));
@ -59,7 +59,9 @@ public class ContainerFurnaceDouble extends Container {
//Slots in Inventory to shift from //Slots in Inventory to shift from
if (slot == TileEntityFurnaceDouble.SLOT_OUTPUT_1 || slot == TileEntityFurnaceDouble.SLOT_OUTPUT_2) { if (slot == TileEntityFurnaceDouble.SLOT_OUTPUT_1 || slot == TileEntityFurnaceDouble.SLOT_OUTPUT_2) {
if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, true)) { return StackUtil.getEmpty(); } if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, true)) {
return StackUtil.getEmpty();
}
theSlot.onSlotChange(newStack, currentStack); theSlot.onSlotChange(newStack, currentStack);
} }
//Other Slots in Inventory excluded //Other Slots in Inventory excluded
@ -67,15 +69,23 @@ public class ContainerFurnaceDouble extends Container {
//Shift from Inventory //Shift from Inventory
if (StackUtil.isValid(FurnaceRecipes.instance().getSmeltingResult(newStack))) { if (StackUtil.isValid(FurnaceRecipes.instance().getSmeltingResult(newStack))) {
if (!this.mergeItemStack(newStack, TileEntityFurnaceDouble.SLOT_INPUT_1, TileEntityFurnaceDouble.SLOT_INPUT_1 + 1, false)) { if (!this.mergeItemStack(newStack, TileEntityFurnaceDouble.SLOT_INPUT_1, TileEntityFurnaceDouble.SLOT_INPUT_1 + 1, false)) {
if (!this.mergeItemStack(newStack, TileEntityFurnaceDouble.SLOT_INPUT_2, TileEntityFurnaceDouble.SLOT_INPUT_2 + 1, false)) { return StackUtil.getEmpty(); } if (!this.mergeItemStack(newStack, TileEntityFurnaceDouble.SLOT_INPUT_2, TileEntityFurnaceDouble.SLOT_INPUT_2 + 1, false)) {
return StackUtil.getEmpty();
}
} }
} }
// //
else if (slot >= inventoryStart && slot <= inventoryEnd) { else if (slot >= inventoryStart && slot <= inventoryEnd) {
if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); } if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) {
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) { return StackUtil.getEmpty(); } return StackUtil.getEmpty();
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); } }
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) {
return StackUtil.getEmpty();
}
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) {
return StackUtil.getEmpty();
}
if (!StackUtil.isValid(newStack)) { if (!StackUtil.isValid(newStack)) {
theSlot.putStack(StackUtil.getEmpty()); theSlot.putStack(StackUtil.getEmpty());
@ -83,7 +93,9 @@ public class ContainerFurnaceDouble extends Container {
theSlot.onSlotChanged(); theSlot.onSlotChanged();
} }
if (newStack.getCount() == currentStack.getCount()) { return StackUtil.getEmpty(); } if (newStack.getCount() == currentStack.getCount()) {
return StackUtil.getEmpty();
}
theSlot.onTake(player, newStack); theSlot.onTake(player, newStack);
return currentStack; return currentStack;

View file

@ -16,7 +16,7 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityGiantChest;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import invtweaks.api.container.ChestContainer; import invtweaks.api.container.ChestContainer;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.Container; import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot; import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -26,7 +26,7 @@ public class ContainerGiantChest extends Container {
public final TileEntityGiantChest tileChest; public final TileEntityGiantChest tileChest;
public ContainerGiantChest(InventoryPlayer inventory, TileEntityBase tile, int page) { public ContainerGiantChest(PlayerInventory inventory, TileEntityBase tile, int page) {
this.tileChest = (TileEntityGiantChest) tile; this.tileChest = (TileEntityGiantChest) tile;
for (int i = 0; i < 9; i++) { for (int i = 0; i < 9; i++) {
@ -64,10 +64,16 @@ public class ContainerGiantChest extends Container {
if (!this.mergeItemStack(newStack, 0, 117, false)) { if (!this.mergeItemStack(newStack, 0, 117, false)) {
// //
if (slot >= inventoryStart && slot <= inventoryEnd) { if (slot >= inventoryStart && slot <= inventoryEnd) {
if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); } if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) {
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) { return StackUtil.getEmpty(); } return StackUtil.getEmpty();
}
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) {
return StackUtil.getEmpty();
}
}
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, true)) {
return StackUtil.getEmpty();
} }
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, true)) { return StackUtil.getEmpty(); }
if (!StackUtil.isValid(newStack)) { if (!StackUtil.isValid(newStack)) {
theSlot.putStack(StackUtil.getEmpty()); theSlot.putStack(StackUtil.getEmpty());
@ -75,7 +81,9 @@ public class ContainerGiantChest extends Container {
theSlot.onSlotChanged(); theSlot.onSlotChanged();
} }
if (newStack.getCount() == currentStack.getCount()) { return StackUtil.getEmpty(); } if (newStack.getCount() == currentStack.getCount()) {
return StackUtil.getEmpty();
}
theSlot.onTake(player, newStack); theSlot.onTake(player, newStack);
return currentStack; return currentStack;

View file

@ -17,7 +17,7 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityInputter; import de.ellpeck.actuallyadditions.mod.tile.TileEntityInputter;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.ClickType; import net.minecraft.inventory.ClickType;
import net.minecraft.inventory.Container; import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot; import net.minecraft.inventory.Slot;
@ -29,17 +29,21 @@ public class ContainerInputter extends Container {
private final boolean isAdvanced; private final boolean isAdvanced;
public ContainerInputter(InventoryPlayer inventory, TileEntityBase tile, boolean isAdvanced) { public ContainerInputter(PlayerInventory inventory, TileEntityBase tile, boolean isAdvanced) {
this.tileInputter = (TileEntityInputter) tile; this.tileInputter = (TileEntityInputter) tile;
this.isAdvanced = isAdvanced; this.isAdvanced = isAdvanced;
this.addSlotToContainer(new SlotItemHandlerUnconditioned(this.tileInputter.inv, 0, 80, 21 + (isAdvanced ? 12 : 0))); this.addSlotToContainer(new SlotItemHandlerUnconditioned(this.tileInputter.inv, 0, 80, 21 + (isAdvanced
? 12
: 0)));
if (isAdvanced) { if (isAdvanced) {
for (int i = 0; i < 2; i++) { for (int i = 0; i < 2; i++) {
for (int x = 0; x < 3; x++) { for (int x = 0; x < 3; x++) {
for (int y = 0; y < 4; y++) { for (int y = 0; y < 4; y++) {
this.addSlotToContainer(new SlotFilter(i == 0 ? this.tileInputter.leftFilter : this.tileInputter.rightFilter, y + x * 4, 20 + i * 84 + x * 18, 6 + y * 18)); this.addSlotToContainer(new SlotFilter(i == 0
? this.tileInputter.leftFilter
: this.tileInputter.rightFilter, y + x * 4, 20 + i * 84 + x * 18, 6 + y * 18));
} }
} }
} }
@ -47,17 +51,23 @@ public class ContainerInputter extends Container {
for (int i = 0; i < 3; i++) { for (int i = 0; i < 3; i++) {
for (int j = 0; j < 9; j++) { for (int j = 0; j < 9; j++) {
this.addSlotToContainer(new Slot(inventory, j + i * 9 + 9, 8 + j * 18, 101 + i * 18 + (isAdvanced ? GuiInputter.OFFSET_ADVANCED : 0))); this.addSlotToContainer(new Slot(inventory, j + i * 9 + 9, 8 + j * 18, 101 + i * 18 + (isAdvanced
? GuiInputter.OFFSET_ADVANCED
: 0)));
} }
} }
for (int i = 0; i < 9; i++) { for (int i = 0; i < 9; i++) {
this.addSlotToContainer(new Slot(inventory, i, 8 + i * 18, 159 + (isAdvanced ? GuiInputter.OFFSET_ADVANCED : 0))); this.addSlotToContainer(new Slot(inventory, i, 8 + i * 18, 159 + (isAdvanced
? GuiInputter.OFFSET_ADVANCED
: 0)));
} }
} }
@Override @Override
public ItemStack transferStackInSlot(PlayerEntity player, int slot) { public ItemStack transferStackInSlot(PlayerEntity player, int slot) {
int inventoryStart = this.isAdvanced ? 25 : 1; int inventoryStart = this.isAdvanced
? 25
: 1;
int inventoryEnd = inventoryStart + 26; int inventoryEnd = inventoryStart + 26;
int hotbarStart = inventoryEnd + 1; int hotbarStart = inventoryEnd + 1;
int hotbarEnd = hotbarStart + 8; int hotbarEnd = hotbarStart + 8;
@ -74,10 +84,16 @@ public class ContainerInputter extends Container {
if (!this.mergeItemStack(newStack, 0, 1, false)) { if (!this.mergeItemStack(newStack, 0, 1, false)) {
// //
if (slot >= inventoryStart && slot <= inventoryEnd) { if (slot >= inventoryStart && slot <= inventoryEnd) {
if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); } if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) {
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) { return StackUtil.getEmpty(); } return StackUtil.getEmpty();
}
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) {
return StackUtil.getEmpty();
}
}
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) {
return StackUtil.getEmpty();
} }
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); }
if (!StackUtil.isValid(newStack)) { if (!StackUtil.isValid(newStack)) {
theSlot.putStack(StackUtil.getEmpty()); theSlot.putStack(StackUtil.getEmpty());
@ -85,7 +101,9 @@ public class ContainerInputter extends Container {
theSlot.onSlotChanged(); theSlot.onSlotChanged();
} }
if (newStack.getCount() == currentStack.getCount()) { return StackUtil.getEmpty(); } if (newStack.getCount() == currentStack.getCount()) {
return StackUtil.getEmpty();
}
theSlot.onTake(player, newStack); theSlot.onTake(player, newStack);
return currentStack; return currentStack;

View file

@ -15,7 +15,7 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelayItemWhitelist; import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelayItemWhitelist;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.ClickType; import net.minecraft.inventory.ClickType;
import net.minecraft.inventory.Container; import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot; import net.minecraft.inventory.Slot;
@ -25,13 +25,15 @@ public class ContainerLaserRelayItemWhitelist extends Container {
private final TileEntityLaserRelayItemWhitelist tile; private final TileEntityLaserRelayItemWhitelist tile;
public ContainerLaserRelayItemWhitelist(InventoryPlayer inventory, TileEntityBase tile) { public ContainerLaserRelayItemWhitelist(PlayerInventory inventory, TileEntityBase tile) {
this.tile = (TileEntityLaserRelayItemWhitelist) tile; this.tile = (TileEntityLaserRelayItemWhitelist) tile;
for (int i = 0; i < 2; i++) { for (int i = 0; i < 2; i++) {
for (int x = 0; x < 3; x++) { for (int x = 0; x < 3; x++) {
for (int y = 0; y < 4; y++) { for (int y = 0; y < 4; y++) {
this.addSlotToContainer(new SlotFilter(i == 0 ? this.tile.leftFilter : this.tile.rightFilter, y + x * 4, 20 + i * 84 + x * 18, 6 + y * 18)); this.addSlotToContainer(new SlotFilter(i == 0
? this.tile.leftFilter
: this.tile.rightFilter, y + x * 4, 20 + i * 84 + x * 18, 6 + y * 18));
} }
} }
} }
@ -62,9 +64,15 @@ public class ContainerLaserRelayItemWhitelist extends Container {
//Other Slots in Inventory excluded //Other Slots in Inventory excluded
if (slot >= inventoryStart) { if (slot >= inventoryStart) {
if (slot >= inventoryStart && slot <= inventoryEnd) { if (slot >= inventoryStart && slot <= inventoryEnd) {
if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); } if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) {
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) { return StackUtil.getEmpty(); } return StackUtil.getEmpty();
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); } }
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) {
return StackUtil.getEmpty();
}
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) {
return StackUtil.getEmpty();
}
if (!StackUtil.isValid(newStack)) { if (!StackUtil.isValid(newStack)) {
theSlot.putStack(StackUtil.getEmpty()); theSlot.putStack(StackUtil.getEmpty());
@ -72,7 +80,9 @@ public class ContainerLaserRelayItemWhitelist extends Container {
theSlot.onSlotChanged(); theSlot.onSlotChanged();
} }
if (newStack.getCount() == currentStack.getCount()) { return StackUtil.getEmpty(); } if (newStack.getCount() == currentStack.getCount()) {
return StackUtil.getEmpty();
}
theSlot.onTake(player, newStack); theSlot.onTake(player, newStack);
return currentStack; return currentStack;

View file

@ -15,7 +15,7 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityMiner; import de.ellpeck.actuallyadditions.mod.tile.TileEntityMiner;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.Container; import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot; import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -24,7 +24,7 @@ public class ContainerMiner extends Container {
private final TileEntityMiner miner; private final TileEntityMiner miner;
public ContainerMiner(InventoryPlayer inventory, TileEntityBase tile) { public ContainerMiner(PlayerInventory inventory, TileEntityBase tile) {
this.miner = (TileEntityMiner) tile; this.miner = (TileEntityMiner) tile;
for (int i = 0; i < 3; i++) { for (int i = 0; i < 3; i++) {
@ -62,10 +62,16 @@ public class ContainerMiner extends Container {
if (!this.mergeItemStack(newStack, 0, 9, false)) { if (!this.mergeItemStack(newStack, 0, 9, false)) {
// //
if (slot >= inventoryStart && slot <= inventoryEnd) { if (slot >= inventoryStart && slot <= inventoryEnd) {
if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); } if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) {
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) { return StackUtil.getEmpty(); } return StackUtil.getEmpty();
}
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) {
return StackUtil.getEmpty();
}
}
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) {
return StackUtil.getEmpty();
} }
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); }
if (!StackUtil.isValid(newStack)) { if (!StackUtil.isValid(newStack)) {
theSlot.putStack(StackUtil.getEmpty()); theSlot.putStack(StackUtil.getEmpty());
@ -73,7 +79,9 @@ public class ContainerMiner extends Container {
theSlot.onSlotChanged(); theSlot.onSlotChanged();
} }
if (newStack.getCount() == currentStack.getCount()) { return StackUtil.getEmpty(); } if (newStack.getCount() == currentStack.getCount()) {
return StackUtil.getEmpty();
}
theSlot.onTake(player, newStack); theSlot.onTake(player, newStack);
return currentStack; return currentStack;

View file

@ -14,7 +14,7 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityOilGenerator; import de.ellpeck.actuallyadditions.mod.tile.TileEntityOilGenerator;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.Container; import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot; import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -23,7 +23,7 @@ public class ContainerOilGenerator extends Container {
private final TileEntityOilGenerator generator; private final TileEntityOilGenerator generator;
public ContainerOilGenerator(InventoryPlayer inventory, TileEntityBase tile) { public ContainerOilGenerator(PlayerInventory inventory, TileEntityBase tile) {
this.generator = (TileEntityOilGenerator) tile; this.generator = (TileEntityOilGenerator) tile;
for (int i = 0; i < 3; i++) { for (int i = 0; i < 3; i++) {
@ -52,9 +52,15 @@ public class ContainerOilGenerator extends Container {
//Other Slots in Inventory excluded //Other Slots in Inventory excluded
if (slot >= inventoryStart) { if (slot >= inventoryStart) {
if (slot >= inventoryStart && slot <= inventoryEnd) { if (slot >= inventoryStart && slot <= inventoryEnd) {
if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); } if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) {
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) { return StackUtil.getEmpty(); } return StackUtil.getEmpty();
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); } }
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) {
return StackUtil.getEmpty();
}
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) {
return StackUtil.getEmpty();
}
if (!StackUtil.isValid(newStack)) { if (!StackUtil.isValid(newStack)) {
theSlot.putStack(StackUtil.getEmpty()); theSlot.putStack(StackUtil.getEmpty());
@ -62,7 +68,9 @@ public class ContainerOilGenerator extends Container {
theSlot.onSlotChanged(); theSlot.onSlotChanged();
} }
if (newStack.getCount() == currentStack.getCount()) { return StackUtil.getEmpty(); } if (newStack.getCount() == currentStack.getCount()) {
return StackUtil.getEmpty();
}
theSlot.onTake(player, newStack); theSlot.onTake(player, newStack);
return currentStack; return currentStack;

View file

@ -15,7 +15,7 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityPhantomPlacer; import de.ellpeck.actuallyadditions.mod.tile.TileEntityPhantomPlacer;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.Container; import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot; import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -24,7 +24,7 @@ public class ContainerPhantomPlacer extends Container {
private final TileEntityPhantomPlacer placer; private final TileEntityPhantomPlacer placer;
public ContainerPhantomPlacer(InventoryPlayer inventory, TileEntityBase tile) { public ContainerPhantomPlacer(PlayerInventory inventory, TileEntityBase tile) {
this.placer = (TileEntityPhantomPlacer) tile; this.placer = (TileEntityPhantomPlacer) tile;
for (int i = 0; i < 3; i++) { for (int i = 0; i < 3; i++) {
@ -62,10 +62,16 @@ public class ContainerPhantomPlacer extends Container {
if (!this.mergeItemStack(newStack, 0, 9, false)) { if (!this.mergeItemStack(newStack, 0, 9, false)) {
// //
if (slot >= inventoryStart && slot <= inventoryEnd) { if (slot >= inventoryStart && slot <= inventoryEnd) {
if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); } if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) {
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) { return StackUtil.getEmpty(); } return StackUtil.getEmpty();
}
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) {
return StackUtil.getEmpty();
}
}
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) {
return StackUtil.getEmpty();
} }
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); }
if (!StackUtil.isValid(newStack)) { if (!StackUtil.isValid(newStack)) {
theSlot.putStack(StackUtil.getEmpty()); theSlot.putStack(StackUtil.getEmpty());
@ -73,7 +79,9 @@ public class ContainerPhantomPlacer extends Container {
theSlot.onSlotChanged(); theSlot.onSlotChanged();
} }
if (newStack.getCount() == currentStack.getCount()) { return StackUtil.getEmpty(); } if (newStack.getCount() == currentStack.getCount()) {
return StackUtil.getEmpty();
}
theSlot.onTake(player, newStack); theSlot.onTake(player, newStack);
return currentStack; return currentStack;

View file

@ -16,7 +16,7 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityRangedCollector; import de.ellpeck.actuallyadditions.mod.tile.TileEntityRangedCollector;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.ClickType; import net.minecraft.inventory.ClickType;
import net.minecraft.inventory.Container; import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot; import net.minecraft.inventory.Slot;
@ -26,7 +26,7 @@ public class ContainerRangedCollector extends Container {
private final TileEntityRangedCollector collector; private final TileEntityRangedCollector collector;
public ContainerRangedCollector(InventoryPlayer inventory, TileEntityBase tile) { public ContainerRangedCollector(PlayerInventory inventory, TileEntityBase tile) {
this.collector = (TileEntityRangedCollector) tile; this.collector = (TileEntityRangedCollector) tile;
for (int i = 0; i < 2; i++) { for (int i = 0; i < 2; i++) {
@ -69,10 +69,16 @@ public class ContainerRangedCollector extends Container {
if (!this.mergeItemStack(newStack, 0, 6, false)) { if (!this.mergeItemStack(newStack, 0, 6, false)) {
// //
if (slot >= inventoryStart && slot <= inventoryEnd) { if (slot >= inventoryStart && slot <= inventoryEnd) {
if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); } if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) {
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) { return StackUtil.getEmpty(); } return StackUtil.getEmpty();
}
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) {
return StackUtil.getEmpty();
}
}
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) {
return StackUtil.getEmpty();
} }
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); }
if (!StackUtil.isValid(newStack)) { if (!StackUtil.isValid(newStack)) {
theSlot.putStack(StackUtil.getEmpty()); theSlot.putStack(StackUtil.getEmpty());
@ -80,7 +86,9 @@ public class ContainerRangedCollector extends Container {
theSlot.onSlotChanged(); theSlot.onSlotChanged();
} }
if (newStack.getCount() == currentStack.getCount()) { return StackUtil.getEmpty(); } if (newStack.getCount() == currentStack.getCount()) {
return StackUtil.getEmpty();
}
theSlot.onTake(player, newStack); theSlot.onTake(player, newStack);
return currentStack; return currentStack;

View file

@ -16,7 +16,7 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityItemRepairer; import de.ellpeck.actuallyadditions.mod.tile.TileEntityItemRepairer;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.Container; import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot; import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -25,7 +25,7 @@ public class ContainerRepairer extends Container {
private final TileEntityItemRepairer tileRepairer; private final TileEntityItemRepairer tileRepairer;
public ContainerRepairer(InventoryPlayer inventory, TileEntityBase tile) { public ContainerRepairer(PlayerInventory inventory, TileEntityBase tile) {
this.tileRepairer = (TileEntityItemRepairer) tile; this.tileRepairer = (TileEntityItemRepairer) tile;
this.addSlotToContainer(new SlotItemHandlerUnconditioned(this.tileRepairer.inv, TileEntityItemRepairer.SLOT_INPUT, 47, 53)); this.addSlotToContainer(new SlotItemHandlerUnconditioned(this.tileRepairer.inv, TileEntityItemRepairer.SLOT_INPUT, 47, 53));
@ -58,14 +58,22 @@ public class ContainerRepairer extends Container {
if (slot >= inventoryStart) { if (slot >= inventoryStart) {
//Shift from Inventory //Shift from Inventory
if (TileEntityItemRepairer.canBeRepaired(newStack)) { if (TileEntityItemRepairer.canBeRepaired(newStack)) {
if (!this.mergeItemStack(newStack, TileEntityItemRepairer.SLOT_INPUT, TileEntityItemRepairer.SLOT_INPUT + 1, false)) { return StackUtil.getEmpty(); } if (!this.mergeItemStack(newStack, TileEntityItemRepairer.SLOT_INPUT, TileEntityItemRepairer.SLOT_INPUT + 1, false)) {
return StackUtil.getEmpty();
}
} }
// //
else if (slot >= inventoryStart && slot <= inventoryEnd) { else if (slot >= inventoryStart && slot <= inventoryEnd) {
if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); } if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) {
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) { return StackUtil.getEmpty(); } return StackUtil.getEmpty();
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); } }
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) {
return StackUtil.getEmpty();
}
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) {
return StackUtil.getEmpty();
}
if (!StackUtil.isValid(newStack)) { if (!StackUtil.isValid(newStack)) {
theSlot.putStack(StackUtil.getEmpty()); theSlot.putStack(StackUtil.getEmpty());
@ -73,7 +81,9 @@ public class ContainerRepairer extends Container {
theSlot.onSlotChanged(); theSlot.onSlotChanged();
} }
if (newStack.getCount() == currentStack.getCount()) { return StackUtil.getEmpty(); } if (newStack.getCount() == currentStack.getCount()) {
return StackUtil.getEmpty();
}
theSlot.onTake(player, newStack); theSlot.onTake(player, newStack);
return currentStack; return currentStack;

View file

@ -17,7 +17,7 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityXPSolidifier; import de.ellpeck.actuallyadditions.mod.tile.TileEntityXPSolidifier;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.Container; import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot; import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -26,7 +26,7 @@ public class ContainerXPSolidifier extends Container {
private final TileEntityXPSolidifier solidifier; private final TileEntityXPSolidifier solidifier;
public ContainerXPSolidifier(InventoryPlayer inventory, TileEntityBase tile) { public ContainerXPSolidifier(PlayerInventory inventory, TileEntityBase tile) {
this.solidifier = (TileEntityXPSolidifier) tile; this.solidifier = (TileEntityXPSolidifier) tile;
this.addSlotToContainer(new SlotOutput(this.solidifier.inv, 0, 95, 8)); this.addSlotToContainer(new SlotOutput(this.solidifier.inv, 0, 95, 8));
@ -58,11 +58,19 @@ public class ContainerXPSolidifier extends Container {
//Other Slots in Inventory excluded //Other Slots in Inventory excluded
if (slot >= inventoryStart) { if (slot >= inventoryStart) {
if (newStack.getItem() instanceof ItemSolidifiedExperience) { if (newStack.getItem() instanceof ItemSolidifiedExperience) {
if (!this.mergeItemStack(newStack, 1, 2, false)) { return StackUtil.getEmpty(); } if (!this.mergeItemStack(newStack, 1, 2, false)) {
return StackUtil.getEmpty();
}
} else if (slot >= inventoryStart && slot <= inventoryEnd) { } else if (slot >= inventoryStart && slot <= inventoryEnd) {
if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); } if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) {
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) { return StackUtil.getEmpty(); } return StackUtil.getEmpty();
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); } }
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) {
return StackUtil.getEmpty();
}
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) {
return StackUtil.getEmpty();
}
if (!StackUtil.isValid(newStack)) { if (!StackUtil.isValid(newStack)) {
theSlot.putStack(StackUtil.getEmpty()); theSlot.putStack(StackUtil.getEmpty());
@ -70,7 +78,9 @@ public class ContainerXPSolidifier extends Container {
theSlot.onSlotChanged(); theSlot.onSlotChanged();
} }
if (newStack.getCount() == currentStack.getCount()) { return StackUtil.getEmpty(); } if (newStack.getCount() == currentStack.getCount()) {
return StackUtil.getEmpty();
}
theSlot.onTake(player, newStack); theSlot.onTake(player, newStack);
return currentStack; return currentStack;

View file

@ -15,34 +15,7 @@ import de.ellpeck.actuallyadditions.mod.booklet.gui.GuiBooklet;
import de.ellpeck.actuallyadditions.mod.booklet.gui.GuiMainPage; import de.ellpeck.actuallyadditions.mod.booklet.gui.GuiMainPage;
import de.ellpeck.actuallyadditions.mod.booklet.misc.BookletUtils; import de.ellpeck.actuallyadditions.mod.booklet.misc.BookletUtils;
import de.ellpeck.actuallyadditions.mod.data.PlayerData; import de.ellpeck.actuallyadditions.mod.data.PlayerData;
import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiBag; import de.ellpeck.actuallyadditions.mod.inventory.gui.*;
import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiBioReactor;
import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiBreaker;
import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiCanolaPress;
import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiCoalGenerator;
import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiCoffeeMachine;
import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiDirectionalBreaker;
import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiDrill;
import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiDropper;
import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiEnergizer;
import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiEnervator;
import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiFarmer;
import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiFeeder;
import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiFermentingBarrel;
import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiFilter;
import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiFluidCollector;
import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiFurnaceDouble;
import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiGiantChest;
import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiGrinder;
import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiInputter;
import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiLaserRelayItemWhitelist;
import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiMiner;
import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiOilGenerator;
import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiPhantomPlacer;
import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiRangedCollector;
import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiRepairer;
import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiSmileyCloud;
import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiXPSolidifier;
import de.ellpeck.actuallyadditions.mod.items.ItemBooklet; import de.ellpeck.actuallyadditions.mod.items.ItemBooklet;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
import de.ellpeck.actuallyadditions.mod.util.compat.CompatUtil; import de.ellpeck.actuallyadditions.mod.util.compat.CompatUtil;
@ -221,10 +194,10 @@ public class GuiHandler implements IGuiHandler {
return new GuiMiner(player.inventory, tile); return new GuiMiner(player.inventory, tile);
case LASER_RELAY_ITEM_WHITELIST: case LASER_RELAY_ITEM_WHITELIST:
return new GuiLaserRelayItemWhitelist(player.inventory, tile); return new GuiLaserRelayItemWhitelist(player.inventory, tile);
case BAG: // case BAG:
return new GuiBag(player.getHeldItemMainhand(), player.inventory, false); // return new GuiBag(player.getHeldItemMainhand(), player.inventory, false);
case VOID_BAG: // case VOID_BAG:
return new GuiBag(player.getHeldItemMainhand(), player.inventory, true); // return new GuiBag(player.getHeldItemMainhand(), player.inventory, true);
case BIO_REACTOR: case BIO_REACTOR:
return new GuiBioReactor(player.inventory, tile); return new GuiBioReactor(player.inventory, tile);
case FARMER: case FARMER:

View file

@ -10,6 +10,8 @@
package de.ellpeck.actuallyadditions.mod.inventory.gui; package de.ellpeck.actuallyadditions.mod.inventory.gui;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.platform.GlStateManager;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.inventory.ContainerBag; import de.ellpeck.actuallyadditions.mod.inventory.ContainerBag;
import de.ellpeck.actuallyadditions.mod.network.PacketClientToServer; import de.ellpeck.actuallyadditions.mod.network.PacketClientToServer;
@ -17,39 +19,31 @@ import de.ellpeck.actuallyadditions.mod.network.PacketHandler;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.widget.button.Button;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundNBT; import net.minecraft.nbt.CompoundNBT;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextFormatting; import net.minecraft.util.text.TextFormatting;
import net.minecraftforge.fml.relauncher.OnlyIn;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@OnlyIn(Dist.CLIENT) public class GuiBag extends GuiWtfMojang<ContainerBag> {
public class GuiBag extends GuiWtfMojang {
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_bag"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_bag");
private static final ResourceLocation RES_LOC_VOID = AssetUtil.getGuiLocation("gui_void_bag"); private static final ResourceLocation RES_LOC_VOID = AssetUtil.getGuiLocation("gui_void_bag");
private final ContainerBag container; private final ContainerBag container;
private final boolean isVoid; private final boolean isVoid;
private FilterSettingsGui filter; private FilterSettingsGui filter;
private GuiButton buttonAutoInsert; private Button buttonAutoInsert;
public GuiBag(ItemStack sack, InventoryPlayer inventory, boolean isVoid) { public GuiBag(ContainerBag container, PlayerInventory inventory, ITextComponent title) {
this(isVoid, new ContainerBag(sack, inventory, isVoid)); super(container, inventory);
}
private GuiBag(boolean isVoid, ContainerBag container) {
super(container);
this.xSize = 176; this.xSize = 176;
this.ySize = 90 + 86; this.ySize = 90 + 86;
this.isVoid = isVoid; this.isVoid = container.isVoid;
this.container = container; this.container = container;
} }
@ -86,27 +80,14 @@ public class GuiBag extends GuiWtfMojang {
@Override @Override
public void drawGuiContainerForegroundLayer(int x, int y) { public void drawGuiContainerForegroundLayer(int x, int y) {
AssetUtil.displayNameString(this.fontRenderer, this.xSize, -10, StringUtil.localize("container." + ActuallyAdditions.MODID + "." + (this.isVoid AssetUtil.displayNameString(this.font, this.xSize, -10, StringUtil.localize("container." + ActuallyAdditions.MODID + "." + (this.isVoid
? "voidBag" ? "voidBag"
: "bag") + ".name")); : "bag") + ".name"));
} }
@Override @Override
public void drawGuiContainerBackgroundLayer(float f, int x, int y) { public void render(MatrixStack stack, int mouseX, int mouseY, float partialTicks) {
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); super.render(stack, mouseX, mouseY, partialTicks);
this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
this.drawTexturedModalRect(this.guiLeft, this.guiTop + 90, 0, 0, 176, 86);
this.mc.getTextureManager().bindTexture(this.isVoid
? RES_LOC_VOID
: RES_LOC);
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 90);
}
@Override
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
super.drawScreen(mouseX, mouseY, partialTicks);
this.filter.drawHover(mouseX, mouseY); this.filter.drawHover(mouseX, mouseY);
if (this.buttonAutoInsert.isMouseOver()) { if (this.buttonAutoInsert.isMouseOver()) {
@ -114,9 +95,22 @@ public class GuiBag extends GuiWtfMojang {
text.add(TextFormatting.BOLD + "Auto-Insert " + (this.container.autoInsert text.add(TextFormatting.BOLD + "Auto-Insert " + (this.container.autoInsert
? "On" ? "On"
: "Off")); : "Off"));
text.addAll(this.mc.fontRenderer.listFormattedStringToWidth("Turn this on to make items that get picked up automatically go into the bag.", 200)); text.addAll(this.font.listFormattedStringToWidth("Turn this on to make items that get picked up automatically go into the bag.", 200));
text.addAll(this.mc.fontRenderer.listFormattedStringToWidth(TextFormatting.GRAY + "" + TextFormatting.ITALIC + "Note that this WON'T work when you are holding the bag in your hand.", 200)); text.addAll(this.font.listFormattedStringToWidth(TextFormatting.GRAY + "" + TextFormatting.ITALIC + "Note that this WON'T work when you are holding the bag in your hand.", 200));
this.drawHoveringText(text, mouseX, mouseY); this.renderToolTip(stack, text, mouseX, mouseY, this.getMinecraft().fontRenderer);
} }
} }
@Override
protected void drawGuiContainerBackgroundLayer(MatrixStack matrixStack, float partialTicks, int x, int y) {
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
this.getMinecraft().getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
this.blit(matrixStack, this.guiLeft, this.guiTop + 90, 0, 0, 176, 86);
this.getMinecraft().getTextureManager().bindTexture(this.isVoid
? RES_LOC_VOID
: RES_LOC);
this.blit(matrixStack, this.guiLeft, this.guiTop, 0, 0, 176, 90);
}
} }

View file

@ -16,7 +16,7 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityBioReactor;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.resources.I18n; import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
public class GuiBioReactor extends GuiWtfMojang { public class GuiBioReactor extends GuiWtfMojang {
@ -25,7 +25,7 @@ public class GuiBioReactor extends GuiWtfMojang {
private final TileEntityBioReactor tile; private final TileEntityBioReactor tile;
private EnergyDisplay energy; private EnergyDisplay energy;
public GuiBioReactor(InventoryPlayer inventory, TileEntityBase tile) { public GuiBioReactor(PlayerInventory inventory, TileEntityBase tile) {
super(new ContainerBioReactor(inventory, tile)); super(new ContainerBioReactor(inventory, tile));
this.tile = (TileEntityBioReactor) tile; this.tile = (TileEntityBioReactor) tile;
this.xSize = 176; this.xSize = 176;

View file

@ -15,9 +15,8 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBreaker; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBreaker;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.OnlyIn; import net.minecraftforge.fml.relauncher.OnlyIn;
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
@ -26,7 +25,7 @@ public class GuiBreaker extends GuiWtfMojang {
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_breaker"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_breaker");
private final TileEntityBreaker breaker; private final TileEntityBreaker breaker;
public GuiBreaker(InventoryPlayer inventory, TileEntityBase tile) { public GuiBreaker(PlayerInventory inventory, TileEntityBase tile) {
super(new ContainerBreaker(inventory, tile)); super(new ContainerBreaker(inventory, tile));
this.breaker = (TileEntityBreaker) tile; this.breaker = (TileEntityBreaker) tile;
this.xSize = 176; this.xSize = 176;

View file

@ -15,9 +15,8 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityCanolaPress; import de.ellpeck.actuallyadditions.mod.tile.TileEntityCanolaPress;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.OnlyIn; import net.minecraftforge.fml.relauncher.OnlyIn;
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
@ -28,7 +27,7 @@ public class GuiCanolaPress extends GuiWtfMojang {
private EnergyDisplay energy; private EnergyDisplay energy;
private FluidDisplay fluid; private FluidDisplay fluid;
public GuiCanolaPress(InventoryPlayer inventory, TileEntityBase tile) { public GuiCanolaPress(PlayerInventory inventory, TileEntityBase tile) {
super(new ContainerCanolaPress(inventory, tile)); super(new ContainerCanolaPress(inventory, tile));
this.press = (TileEntityCanolaPress) tile; this.press = (TileEntityCanolaPress) tile;
this.xSize = 176; this.xSize = 176;

View file

@ -15,9 +15,8 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoalGenerator; import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoalGenerator;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.OnlyIn; import net.minecraftforge.fml.relauncher.OnlyIn;
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
@ -27,7 +26,7 @@ public class GuiCoalGenerator extends GuiWtfMojang {
private final TileEntityCoalGenerator generator; private final TileEntityCoalGenerator generator;
private EnergyDisplay energy; private EnergyDisplay energy;
public GuiCoalGenerator(InventoryPlayer inventory, TileEntityBase tile) { public GuiCoalGenerator(PlayerInventory inventory, TileEntityBase tile) {
super(new ContainerCoalGenerator(inventory, tile)); super(new ContainerCoalGenerator(inventory, tile));
this.generator = (TileEntityCoalGenerator) tile; this.generator = (TileEntityCoalGenerator) tile;
this.xSize = 176; this.xSize = 176;

View file

@ -10,8 +10,6 @@
package de.ellpeck.actuallyadditions.mod.inventory.gui; package de.ellpeck.actuallyadditions.mod.inventory.gui;
import java.util.Collections;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.inventory.ContainerCoffeeMachine; import de.ellpeck.actuallyadditions.mod.inventory.ContainerCoffeeMachine;
import de.ellpeck.actuallyadditions.mod.network.PacketHandlerHelper; import de.ellpeck.actuallyadditions.mod.network.PacketHandlerHelper;
@ -21,11 +19,12 @@ import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.OnlyIn; import net.minecraftforge.fml.relauncher.OnlyIn;
import java.util.Collections;
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
public class GuiCoffeeMachine extends GuiWtfMojang { public class GuiCoffeeMachine extends GuiWtfMojang {
@ -35,7 +34,7 @@ public class GuiCoffeeMachine extends GuiWtfMojang {
private EnergyDisplay energy; private EnergyDisplay energy;
private FluidDisplay fluid; private FluidDisplay fluid;
public GuiCoffeeMachine(InventoryPlayer inventory, TileEntityBase tile) { public GuiCoffeeMachine(PlayerInventory inventory, TileEntityBase tile) {
super(new ContainerCoffeeMachine(inventory, tile)); super(new ContainerCoffeeMachine(inventory, tile));
this.machine = (TileEntityCoffeeMachine) tile; this.machine = (TileEntityCoffeeMachine) tile;
this.xSize = 176; this.xSize = 176;

View file

@ -15,9 +15,8 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityDirectionalBreaker; import de.ellpeck.actuallyadditions.mod.tile.TileEntityDirectionalBreaker;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.OnlyIn; import net.minecraftforge.fml.relauncher.OnlyIn;
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
@ -27,7 +26,7 @@ public class GuiDirectionalBreaker extends GuiWtfMojang {
private final TileEntityDirectionalBreaker breaker; private final TileEntityDirectionalBreaker breaker;
private EnergyDisplay energy; private EnergyDisplay energy;
public GuiDirectionalBreaker(InventoryPlayer inventory, TileEntityBase tile) { public GuiDirectionalBreaker(PlayerInventory inventory, TileEntityBase tile) {
super(new ContainerDirectionalBreaker(inventory, tile)); super(new ContainerDirectionalBreaker(inventory, tile));
this.breaker = (TileEntityDirectionalBreaker) tile; this.breaker = (TileEntityDirectionalBreaker) tile;
this.xSize = 176; this.xSize = 176;

View file

@ -15,9 +15,8 @@ import de.ellpeck.actuallyadditions.mod.inventory.ContainerDrill;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.OnlyIn; import net.minecraftforge.fml.relauncher.OnlyIn;
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
@ -25,7 +24,7 @@ public class GuiDrill extends GuiWtfMojang {
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_drill"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_drill");
public GuiDrill(InventoryPlayer inventory) { public GuiDrill(PlayerInventory inventory) {
super(new ContainerDrill(inventory)); super(new ContainerDrill(inventory));
this.xSize = 176; this.xSize = 176;
this.ySize = 54 + 86; this.ySize = 54 + 86;

View file

@ -15,9 +15,8 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityFarmer; import de.ellpeck.actuallyadditions.mod.tile.TileEntityFarmer;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.OnlyIn; import net.minecraftforge.fml.relauncher.OnlyIn;
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
@ -28,7 +27,7 @@ public class GuiFarmer extends GuiWtfMojang {
private EnergyDisplay energy; private EnergyDisplay energy;
public GuiFarmer(InventoryPlayer inventory, TileEntityBase tile) { public GuiFarmer(PlayerInventory inventory, TileEntityBase tile) {
super(new ContainerFarmer(inventory, tile)); super(new ContainerFarmer(inventory, tile));
this.farmer = (TileEntityFarmer) tile; this.farmer = (TileEntityFarmer) tile;
this.xSize = 176; this.xSize = 176;

View file

@ -10,8 +10,6 @@
package de.ellpeck.actuallyadditions.mod.inventory.gui; package de.ellpeck.actuallyadditions.mod.inventory.gui;
import java.util.Arrays;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.inventory.ContainerFeeder; import de.ellpeck.actuallyadditions.mod.inventory.ContainerFeeder;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
@ -19,18 +17,19 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityFeeder;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.OnlyIn; import net.minecraftforge.fml.relauncher.OnlyIn;
import java.util.Arrays;
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
public class GuiFeeder extends GuiWtfMojang { public class GuiFeeder extends GuiWtfMojang {
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_feeder"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_feeder");
public final TileEntityFeeder tileFeeder; public final TileEntityFeeder tileFeeder;
public GuiFeeder(InventoryPlayer inventory, TileEntityBase tile) { public GuiFeeder(PlayerInventory inventory, TileEntityBase tile) {
super(new ContainerFeeder(inventory, tile)); super(new ContainerFeeder(inventory, tile));
this.tileFeeder = (TileEntityFeeder) tile; this.tileFeeder = (TileEntityFeeder) tile;
this.xSize = 176; this.xSize = 176;
@ -41,7 +40,11 @@ public class GuiFeeder extends GuiWtfMojang {
public void drawScreen(int x, int y, float f) { public void drawScreen(int x, int y, float f) {
super.drawScreen(x, y, f); super.drawScreen(x, y, f);
if (x >= this.guiLeft + 69 && y >= this.guiTop + 30 && x <= this.guiLeft + 69 + 10 && y <= this.guiTop + 30 + 10) { if (x >= this.guiLeft + 69 && y >= this.guiTop + 30 && x <= this.guiLeft + 69 + 10 && y <= this.guiTop + 30 + 10) {
String[] array = new String[] { this.tileFeeder.currentAnimalAmount + " " + StringUtil.localize("info." + ActuallyAdditions.MODID + ".gui.animals"), this.tileFeeder.currentAnimalAmount >= 2 && this.tileFeeder.currentAnimalAmount < TileEntityFeeder.THRESHOLD ? StringUtil.localize("info." + ActuallyAdditions.MODID + ".gui.enoughToBreed") : this.tileFeeder.currentAnimalAmount >= TileEntityFeeder.THRESHOLD ? StringUtil.localize("info." + ActuallyAdditions.MODID + ".gui.tooMany") : StringUtil.localize("info." + ActuallyAdditions.MODID + ".gui.notEnough") }; String[] array = new String[]{this.tileFeeder.currentAnimalAmount + " " + StringUtil.localize("info." + ActuallyAdditions.MODID + ".gui.animals"), this.tileFeeder.currentAnimalAmount >= 2 && this.tileFeeder.currentAnimalAmount < TileEntityFeeder.THRESHOLD
? StringUtil.localize("info." + ActuallyAdditions.MODID + ".gui.enoughToBreed")
: this.tileFeeder.currentAnimalAmount >= TileEntityFeeder.THRESHOLD
? StringUtil.localize("info." + ActuallyAdditions.MODID + ".gui.tooMany")
: StringUtil.localize("info." + ActuallyAdditions.MODID + ".gui.notEnough")};
this.drawHoveringText(Arrays.asList(array), x, y); this.drawHoveringText(Arrays.asList(array), x, y);
} }
} }

View file

@ -15,9 +15,8 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityFermentingBarrel; import de.ellpeck.actuallyadditions.mod.tile.TileEntityFermentingBarrel;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.OnlyIn; import net.minecraftforge.fml.relauncher.OnlyIn;
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
@ -28,7 +27,7 @@ public class GuiFermentingBarrel extends GuiWtfMojang {
private FluidDisplay input; private FluidDisplay input;
private FluidDisplay output; private FluidDisplay output;
public GuiFermentingBarrel(InventoryPlayer inventory, TileEntityBase tile) { public GuiFermentingBarrel(PlayerInventory inventory, TileEntityBase tile) {
super(new ContainerFermentingBarrel(inventory, tile)); super(new ContainerFermentingBarrel(inventory, tile));
this.press = (TileEntityFermentingBarrel) tile; this.press = (TileEntityFermentingBarrel) tile;
this.xSize = 176; this.xSize = 176;

View file

@ -15,9 +15,8 @@ import de.ellpeck.actuallyadditions.mod.inventory.ContainerFilter;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.OnlyIn; import net.minecraftforge.fml.relauncher.OnlyIn;
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
@ -25,7 +24,7 @@ public class GuiFilter extends GuiWtfMojang {
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_filter"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_filter");
public GuiFilter(InventoryPlayer inventory) { public GuiFilter(PlayerInventory inventory) {
super(new ContainerFilter(inventory)); super(new ContainerFilter(inventory));
this.xSize = 176; this.xSize = 176;
this.ySize = 90 + 86; this.ySize = 90 + 86;

View file

@ -15,9 +15,8 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityFluidCollector; import de.ellpeck.actuallyadditions.mod.tile.TileEntityFluidCollector;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.OnlyIn; import net.minecraftforge.fml.relauncher.OnlyIn;
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
@ -27,7 +26,7 @@ public class GuiFluidCollector extends GuiWtfMojang {
private final TileEntityFluidCollector collector; private final TileEntityFluidCollector collector;
private FluidDisplay fluid; private FluidDisplay fluid;
public GuiFluidCollector(InventoryPlayer inventory, TileEntityBase tile) { public GuiFluidCollector(PlayerInventory inventory, TileEntityBase tile) {
super(new ContainerFluidCollector(inventory, tile)); super(new ContainerFluidCollector(inventory, tile));
this.collector = (TileEntityFluidCollector) tile; this.collector = (TileEntityFluidCollector) tile;
this.xSize = 176; this.xSize = 176;

View file

@ -10,9 +10,6 @@
package de.ellpeck.actuallyadditions.mod.inventory.gui; package de.ellpeck.actuallyadditions.mod.inventory.gui;
import java.io.IOException;
import java.util.Collections;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.inventory.ContainerFurnaceDouble; import de.ellpeck.actuallyadditions.mod.inventory.ContainerFurnaceDouble;
import de.ellpeck.actuallyadditions.mod.network.PacketHandlerHelper; import de.ellpeck.actuallyadditions.mod.network.PacketHandlerHelper;
@ -22,12 +19,14 @@ import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.TextFormatting; import net.minecraft.util.text.TextFormatting;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.OnlyIn; import net.minecraftforge.fml.relauncher.OnlyIn;
import java.io.IOException;
import java.util.Collections;
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
public class GuiFurnaceDouble extends GuiWtfMojang { public class GuiFurnaceDouble extends GuiWtfMojang {
@ -37,7 +36,7 @@ public class GuiFurnaceDouble extends GuiWtfMojang {
private GuiButton buttonAutoSplit; private GuiButton buttonAutoSplit;
public GuiFurnaceDouble(InventoryPlayer inventory, TileEntityBase tile) { public GuiFurnaceDouble(PlayerInventory inventory, TileEntityBase tile) {
super(new ContainerFurnaceDouble(inventory, tile)); super(new ContainerFurnaceDouble(inventory, tile));
this.tileFurnace = (TileEntityFurnaceDouble) tile; this.tileFurnace = (TileEntityFurnaceDouble) tile;
this.xSize = 176; this.xSize = 176;
@ -50,7 +49,9 @@ public class GuiFurnaceDouble extends GuiWtfMojang {
this.energy.drawOverlay(x, y); this.energy.drawOverlay(x, y);
if (this.buttonAutoSplit.isMouseOver()) { if (this.buttonAutoSplit.isMouseOver()) {
this.drawHoveringText(Collections.singletonList(TextFormatting.BOLD + (this.tileFurnace.isAutoSplit ? StringUtil.localize("info." + ActuallyAdditions.MODID + ".gui.autoSplitItems.on") : StringUtil.localize("info." + ActuallyAdditions.MODID + ".gui.autoSplitItems.off"))), x, y); this.drawHoveringText(Collections.singletonList(TextFormatting.BOLD + (this.tileFurnace.isAutoSplit
? StringUtil.localize("info." + ActuallyAdditions.MODID + ".gui.autoSplitItems.on")
: StringUtil.localize("info." + ActuallyAdditions.MODID + ".gui.autoSplitItems.off"))), x, y);
} }
} }
@ -67,7 +68,9 @@ public class GuiFurnaceDouble extends GuiWtfMojang {
public void updateScreen() { public void updateScreen() {
super.updateScreen(); super.updateScreen();
this.buttonAutoSplit.displayString = (this.tileFurnace.isAutoSplit ? TextFormatting.DARK_GREEN : TextFormatting.RED) + "S"; this.buttonAutoSplit.displayString = (this.tileFurnace.isAutoSplit
? TextFormatting.DARK_GREEN
: TextFormatting.RED) + "S";
} }
@Override @Override

View file

@ -10,8 +10,6 @@
package de.ellpeck.actuallyadditions.mod.inventory.gui; package de.ellpeck.actuallyadditions.mod.inventory.gui;
import java.io.IOException;
import de.ellpeck.actuallyadditions.mod.inventory.ContainerGiantChest; import de.ellpeck.actuallyadditions.mod.inventory.ContainerGiantChest;
import de.ellpeck.actuallyadditions.mod.network.PacketHandlerHelper; import de.ellpeck.actuallyadditions.mod.network.PacketHandlerHelper;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
@ -21,11 +19,12 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityGiantChestMedium;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.OnlyIn; import net.minecraftforge.fml.relauncher.OnlyIn;
import java.io.IOException;
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
public class GuiGiantChest extends GuiWtfMojang { public class GuiGiantChest extends GuiWtfMojang {
@ -34,7 +33,7 @@ public class GuiGiantChest extends GuiWtfMojang {
private final TileEntityGiantChest chest; private final TileEntityGiantChest chest;
private final int page; private final int page;
public GuiGiantChest(InventoryPlayer inventory, TileEntityBase tile, int page) { public GuiGiantChest(PlayerInventory inventory, TileEntityBase tile, int page) {
super(new ContainerGiantChest(inventory, tile, page)); super(new ContainerGiantChest(inventory, tile, page));
this.chest = (TileEntityGiantChest) tile; this.chest = (TileEntityGiantChest) tile;
this.page = page; this.page = page;

View file

@ -10,9 +10,6 @@
package de.ellpeck.actuallyadditions.mod.inventory.gui; package de.ellpeck.actuallyadditions.mod.inventory.gui;
import java.io.IOException;
import java.util.Collections;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.inventory.ContainerGrinder; import de.ellpeck.actuallyadditions.mod.inventory.ContainerGrinder;
import de.ellpeck.actuallyadditions.mod.network.PacketHandlerHelper; import de.ellpeck.actuallyadditions.mod.network.PacketHandlerHelper;
@ -22,12 +19,14 @@ import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.TextFormatting; import net.minecraft.util.text.TextFormatting;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.OnlyIn; import net.minecraftforge.fml.relauncher.OnlyIn;
import java.io.IOException;
import java.util.Collections;
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
public class GuiGrinder extends GuiWtfMojang { public class GuiGrinder extends GuiWtfMojang {
@ -39,11 +38,11 @@ public class GuiGrinder extends GuiWtfMojang {
private GuiButton buttonAutoSplit; private GuiButton buttonAutoSplit;
public GuiGrinder(InventoryPlayer inventoryPlayer, TileEntityBase tile) { public GuiGrinder(PlayerInventory inventoryPlayer, TileEntityBase tile) {
this(inventoryPlayer, tile, false); this(inventoryPlayer, tile, false);
} }
private GuiGrinder(InventoryPlayer inventory, TileEntityBase tile, boolean isDouble) { private GuiGrinder(PlayerInventory inventory, TileEntityBase tile, boolean isDouble) {
super(new ContainerGrinder(inventory, tile, isDouble)); super(new ContainerGrinder(inventory, tile, isDouble));
this.tileGrinder = (TileEntityGrinder) tile; this.tileGrinder = (TileEntityGrinder) tile;
this.isDouble = isDouble; this.isDouble = isDouble;
@ -54,7 +53,9 @@ public class GuiGrinder extends GuiWtfMojang {
@Override @Override
public void initGui() { public void initGui() {
super.initGui(); super.initGui();
this.energy = new EnergyDisplay(this.guiLeft + (this.isDouble ? 13 : 42), this.guiTop + 5, this.tileGrinder.storage); this.energy = new EnergyDisplay(this.guiLeft + (this.isDouble
? 13
: 42), this.guiTop + 5, this.tileGrinder.storage);
if (this.isDouble) { if (this.isDouble) {
this.buttonAutoSplit = new GuiInputter.SmallerButton(0, this.guiLeft - 10, this.guiTop, "S"); this.buttonAutoSplit = new GuiInputter.SmallerButton(0, this.guiLeft - 10, this.guiTop, "S");
@ -74,7 +75,9 @@ public class GuiGrinder extends GuiWtfMojang {
super.updateScreen(); super.updateScreen();
if (this.isDouble) { if (this.isDouble) {
this.buttonAutoSplit.displayString = (this.tileGrinder.isAutoSplit ? TextFormatting.DARK_GREEN : TextFormatting.RED) + "S"; this.buttonAutoSplit.displayString = (this.tileGrinder.isAutoSplit
? TextFormatting.DARK_GREEN
: TextFormatting.RED) + "S";
} }
} }
@ -85,7 +88,9 @@ public class GuiGrinder extends GuiWtfMojang {
if (this.isDouble && this.buttonAutoSplit.isMouseOver()) { if (this.isDouble && this.buttonAutoSplit.isMouseOver()) {
this.drawHoveringText(Collections.singletonList(TextFormatting.BOLD + (this.tileGrinder.isAutoSplit ? StringUtil.localize("info." + ActuallyAdditions.MODID + ".gui.autoSplitItems.on") : StringUtil.localize("info." + ActuallyAdditions.MODID + ".gui.autoSplitItems.off"))), x, y); this.drawHoveringText(Collections.singletonList(TextFormatting.BOLD + (this.tileGrinder.isAutoSplit
? StringUtil.localize("info." + ActuallyAdditions.MODID + ".gui.autoSplitItems.on")
: StringUtil.localize("info." + ActuallyAdditions.MODID + ".gui.autoSplitItems.off"))), x, y);
} }
} }
@ -101,12 +106,16 @@ public class GuiGrinder extends GuiWtfMojang {
this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION); this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
this.drawTexturedModalRect(this.guiLeft, this.guiTop + 93, 0, 0, 176, 86); this.drawTexturedModalRect(this.guiLeft, this.guiTop + 93, 0, 0, 176, 86);
this.mc.getTextureManager().bindTexture(this.isDouble ? RES_LOC_DOUBLE : RES_LOC); this.mc.getTextureManager().bindTexture(this.isDouble
? RES_LOC_DOUBLE
: RES_LOC);
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93); this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93);
if (this.tileGrinder.firstCrushTime > 0) { if (this.tileGrinder.firstCrushTime > 0) {
int i = this.tileGrinder.getFirstTimeToScale(23); int i = this.tileGrinder.getFirstTimeToScale(23);
this.drawTexturedModalRect(this.guiLeft + (this.isDouble ? 51 : 80), this.guiTop + 40, 176, 0, 24, i); this.drawTexturedModalRect(this.guiLeft + (this.isDouble
? 51
: 80), this.guiTop + 40, 176, 0, 24, i);
} }
if (this.isDouble) { if (this.isDouble) {
if (this.tileGrinder.secondCrushTime > 0) { if (this.tileGrinder.secondCrushTime > 0) {
@ -120,7 +129,7 @@ public class GuiGrinder extends GuiWtfMojang {
public static class GuiGrinderDouble extends GuiGrinder { public static class GuiGrinderDouble extends GuiGrinder {
public GuiGrinderDouble(InventoryPlayer inventory, TileEntityBase tile) { public GuiGrinderDouble(PlayerInventory inventory, TileEntityBase tile) {
super(inventory, tile, true); super(inventory, tile, true);
} }
} }

View file

@ -10,10 +10,6 @@
package de.ellpeck.actuallyadditions.mod.inventory.gui; package de.ellpeck.actuallyadditions.mod.inventory.gui;
import java.io.IOException;
import org.lwjgl.input.Keyboard;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.inventory.ContainerInputter; import de.ellpeck.actuallyadditions.mod.inventory.ContainerInputter;
import de.ellpeck.actuallyadditions.mod.network.PacketHandlerHelper; import de.ellpeck.actuallyadditions.mod.network.PacketHandlerHelper;
@ -25,10 +21,12 @@ import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiTextField; import net.minecraft.client.gui.GuiTextField;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.OnlyIn; import net.minecraftforge.fml.relauncher.OnlyIn;
import org.lwjgl.input.Keyboard;
import java.io.IOException;
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
public class GuiInputter extends GuiWtfMojang { public class GuiInputter extends GuiWtfMojang {
@ -47,11 +45,13 @@ public class GuiInputter extends GuiWtfMojang {
private FilterSettingsGui leftFilter; private FilterSettingsGui leftFilter;
private FilterSettingsGui rightFilter; private FilterSettingsGui rightFilter;
public GuiInputter(InventoryPlayer inventory, TileEntityBase tile, boolean isAdvanced) { public GuiInputter(PlayerInventory inventory, TileEntityBase tile, boolean isAdvanced) {
super(new ContainerInputter(inventory, tile, isAdvanced)); super(new ContainerInputter(inventory, tile, isAdvanced));
this.tileInputter = (TileEntityInputter) tile; this.tileInputter = (TileEntityInputter) tile;
this.xSize = 176; this.xSize = 176;
this.ySize = 97 + 86 + (isAdvanced ? OFFSET_ADVANCED : 0); this.ySize = 97 + 86 + (isAdvanced
? OFFSET_ADVANCED
: 0);
this.isAdvanced = isAdvanced; this.isAdvanced = isAdvanced;
} }
@ -64,39 +64,59 @@ public class GuiInputter extends GuiWtfMojang {
this.rightFilter = new FilterSettingsGui(this.tileInputter.rightFilter, this.guiLeft + 157, this.guiTop + 6, this.buttonList); this.rightFilter = new FilterSettingsGui(this.tileInputter.rightFilter, this.guiLeft + 157, this.guiTop + 6, this.buttonList);
} }
this.fieldPullStart = new GuiTextField(3000, this.fontRenderer, this.guiLeft + 6, this.guiTop + 80 + (this.isAdvanced ? OFFSET_ADVANCED : 0), 34, 8); this.fieldPullStart = new GuiTextField(3000, this.fontRenderer, this.guiLeft + 6, this.guiTop + 80 + (this.isAdvanced
? OFFSET_ADVANCED
: 0), 34, 8);
this.fieldPullStart.setMaxStringLength(5); this.fieldPullStart.setMaxStringLength(5);
this.fieldPullStart.setEnableBackgroundDrawing(false); this.fieldPullStart.setEnableBackgroundDrawing(false);
this.fieldPullEnd = new GuiTextField(3001, this.fontRenderer, this.guiLeft + 50, this.guiTop + 80 + (this.isAdvanced ? OFFSET_ADVANCED : 0), 34, 8); this.fieldPullEnd = new GuiTextField(3001, this.fontRenderer, this.guiLeft + 50, this.guiTop + 80 + (this.isAdvanced
? OFFSET_ADVANCED
: 0), 34, 8);
this.fieldPullEnd.setMaxStringLength(5); this.fieldPullEnd.setMaxStringLength(5);
this.fieldPullEnd.setEnableBackgroundDrawing(false); this.fieldPullEnd.setEnableBackgroundDrawing(false);
this.fieldPutStart = new GuiTextField(3002, this.fontRenderer, this.guiLeft + 91, this.guiTop + 80 + (this.isAdvanced ? OFFSET_ADVANCED : 0), 34, 8); this.fieldPutStart = new GuiTextField(3002, this.fontRenderer, this.guiLeft + 91, this.guiTop + 80 + (this.isAdvanced
? OFFSET_ADVANCED
: 0), 34, 8);
this.fieldPutStart.setMaxStringLength(5); this.fieldPutStart.setMaxStringLength(5);
this.fieldPutStart.setEnableBackgroundDrawing(false); this.fieldPutStart.setEnableBackgroundDrawing(false);
this.fieldPutEnd = new GuiTextField(3004, this.fontRenderer, this.guiLeft + 135, this.guiTop + 80 + (this.isAdvanced ? OFFSET_ADVANCED : 0), 34, 8); this.fieldPutEnd = new GuiTextField(3004, this.fontRenderer, this.guiLeft + 135, this.guiTop + 80 + (this.isAdvanced
? OFFSET_ADVANCED
: 0), 34, 8);
this.fieldPutEnd.setMaxStringLength(5); this.fieldPutEnd.setMaxStringLength(5);
this.fieldPutEnd.setEnableBackgroundDrawing(false); this.fieldPutEnd.setEnableBackgroundDrawing(false);
SmallerButton buttonSidePutP = new SmallerButton(0, this.guiLeft + 155, this.guiTop + 43 + (this.isAdvanced ? OFFSET_ADVANCED : 0), ">"); SmallerButton buttonSidePutP = new SmallerButton(0, this.guiLeft + 155, this.guiTop + 43 + (this.isAdvanced
SmallerButton buttonSidePutM = new SmallerButton(1, this.guiLeft + 90, this.guiTop + 43 + (this.isAdvanced ? OFFSET_ADVANCED : 0), "<"); ? OFFSET_ADVANCED
: 0), ">");
SmallerButton buttonSidePutM = new SmallerButton(1, this.guiLeft + 90, this.guiTop + 43 + (this.isAdvanced
? OFFSET_ADVANCED
: 0), "<");
SmallerButton buttonSidePullP = new SmallerButton(2, this.guiLeft + 70, this.guiTop + 43 + (this.isAdvanced ? OFFSET_ADVANCED : 0), ">"); SmallerButton buttonSidePullP = new SmallerButton(2, this.guiLeft + 70, this.guiTop + 43 + (this.isAdvanced
SmallerButton buttonSidePullM = new SmallerButton(3, this.guiLeft + 5, this.guiTop + 43 + (this.isAdvanced ? OFFSET_ADVANCED : 0), "<"); ? OFFSET_ADVANCED
: 0), ">");
SmallerButton buttonSidePullM = new SmallerButton(3, this.guiLeft + 5, this.guiTop + 43 + (this.isAdvanced
? OFFSET_ADVANCED
: 0), "<");
this.buttonList.add(buttonSidePutP); this.buttonList.add(buttonSidePutP);
this.buttonList.add(buttonSidePullP); this.buttonList.add(buttonSidePullP);
this.buttonList.add(buttonSidePutM); this.buttonList.add(buttonSidePutM);
this.buttonList.add(buttonSidePullM); this.buttonList.add(buttonSidePullM);
this.buttonList.add(new TinyButton(TileEntityInputter.OKAY_BUTTON_ID, this.guiLeft + 84, this.guiTop + 91 + (this.isAdvanced ? OFFSET_ADVANCED : 0))); this.buttonList.add(new TinyButton(TileEntityInputter.OKAY_BUTTON_ID, this.guiLeft + 84, this.guiTop + 91 + (this.isAdvanced
? OFFSET_ADVANCED
: 0)));
} }
@Override @Override
public void drawScreen(int x, int y, float f) { public void drawScreen(int x, int y, float f) {
super.drawScreen(x, y, f); super.drawScreen(x, y, f);
int newTopOffset = this.guiTop + (this.isAdvanced ? OFFSET_ADVANCED : 0); int newTopOffset = this.guiTop + (this.isAdvanced
? OFFSET_ADVANCED
: 0);
//Info Mode on! //Info Mode on!
if (x >= this.guiLeft + 4 && y >= newTopOffset + 65 && x <= this.guiLeft + 4 + 38 && y <= newTopOffset + 65 + 12) { if (x >= this.guiLeft + 4 && y >= newTopOffset + 65 && x <= this.guiLeft + 4 + 38 && y <= newTopOffset + 65 + 12) {
this.drawHoveringText(this.fontRenderer.listFormattedStringToWidth(StringUtil.localizeFormatted("info." + ActuallyAdditions.MODID + ".inputter.info.1").replace("<p>", StringUtil.localize("info." + ActuallyAdditions.MODID + ".gui.pull")), 200), x, y); this.drawHoveringText(this.fontRenderer.listFormattedStringToWidth(StringUtil.localizeFormatted("info." + ActuallyAdditions.MODID + ".inputter.info.1").replace("<p>", StringUtil.localize("info." + ActuallyAdditions.MODID + ".gui.pull")), 200), x, y);
@ -127,21 +147,43 @@ public class GuiInputter extends GuiWtfMojang {
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION); this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
this.drawTexturedModalRect(this.guiLeft, this.guiTop + 97 + (this.isAdvanced ? OFFSET_ADVANCED : 0), 0, 0, 176, 86); this.drawTexturedModalRect(this.guiLeft, this.guiTop + 97 + (this.isAdvanced
? OFFSET_ADVANCED
: 0), 0, 0, 176, 86);
this.mc.getTextureManager().bindTexture(this.isAdvanced ? RES_LOC_ADVANCED : RES_LOC); this.mc.getTextureManager().bindTexture(this.isAdvanced
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 97 + (this.isAdvanced ? OFFSET_ADVANCED : 0)); ? RES_LOC_ADVANCED
: RES_LOC);
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 97 + (this.isAdvanced
? OFFSET_ADVANCED
: 0));
this.fontRenderer.drawString(StringUtil.localize("info." + ActuallyAdditions.MODID + ".gui.inbound"), this.guiLeft + 23 + 3, this.guiTop + 32 + (this.isAdvanced ? OFFSET_ADVANCED : 0), StringUtil.DECIMAL_COLOR_GRAY_TEXT); this.fontRenderer.drawString(StringUtil.localize("info." + ActuallyAdditions.MODID + ".gui.inbound"), this.guiLeft + 23 + 3, this.guiTop + 32 + (this.isAdvanced
this.fontRenderer.drawString(StringUtil.localize("info." + ActuallyAdditions.MODID + ".gui.outbound"), this.guiLeft + 104 + 3, this.guiTop + 32 + (this.isAdvanced ? OFFSET_ADVANCED : 0), StringUtil.DECIMAL_COLOR_GRAY_TEXT); ? OFFSET_ADVANCED
: 0), StringUtil.DECIMAL_COLOR_GRAY_TEXT);
this.fontRenderer.drawString(StringUtil.localize("info." + ActuallyAdditions.MODID + ".gui.outbound"), this.guiLeft + 104 + 3, this.guiTop + 32 + (this.isAdvanced
? OFFSET_ADVANCED
: 0), StringUtil.DECIMAL_COLOR_GRAY_TEXT);
this.fontRenderer.drawString(SIDES[this.tileInputter.sideToPull + 1], this.guiLeft + 24 + 1, this.guiTop + 45 + 3 + (this.isAdvanced ? OFFSET_ADVANCED : 0), StringUtil.DECIMAL_COLOR_GRAY_TEXT); this.fontRenderer.drawString(SIDES[this.tileInputter.sideToPull + 1], this.guiLeft + 24 + 1, this.guiTop + 45 + 3 + (this.isAdvanced
this.fontRenderer.drawString(SIDES[this.tileInputter.sideToPut + 1], this.guiLeft + 109 + 1, this.guiTop + 45 + 3 + (this.isAdvanced ? OFFSET_ADVANCED : 0), StringUtil.DECIMAL_COLOR_GRAY_TEXT); ? OFFSET_ADVANCED
: 0), StringUtil.DECIMAL_COLOR_GRAY_TEXT);
this.fontRenderer.drawString(SIDES[this.tileInputter.sideToPut + 1], this.guiLeft + 109 + 1, this.guiTop + 45 + 3 + (this.isAdvanced
? OFFSET_ADVANCED
: 0), StringUtil.DECIMAL_COLOR_GRAY_TEXT);
this.fontRenderer.drawString(Integer.toString(this.tileInputter.slotToPutStart), this.guiLeft + 92, this.guiTop + 67 + (this.isAdvanced ? OFFSET_ADVANCED : 0), StringUtil.DECIMAL_COLOR_WHITE); this.fontRenderer.drawString(Integer.toString(this.tileInputter.slotToPutStart), this.guiLeft + 92, this.guiTop + 67 + (this.isAdvanced
this.fontRenderer.drawString(Integer.toString(this.tileInputter.slotToPutEnd), this.guiLeft + 136, this.guiTop + 67 + (this.isAdvanced ? OFFSET_ADVANCED : 0), StringUtil.DECIMAL_COLOR_WHITE); ? OFFSET_ADVANCED
this.fontRenderer.drawString(Integer.toString(this.tileInputter.slotToPullStart), this.guiLeft + 7, this.guiTop + 67 + (this.isAdvanced ? OFFSET_ADVANCED : 0), StringUtil.DECIMAL_COLOR_WHITE); : 0), StringUtil.DECIMAL_COLOR_WHITE);
this.fontRenderer.drawString(Integer.toString(this.tileInputter.slotToPullEnd), this.guiLeft + 51, this.guiTop + 67 + (this.isAdvanced ? OFFSET_ADVANCED : 0), StringUtil.DECIMAL_COLOR_WHITE); this.fontRenderer.drawString(Integer.toString(this.tileInputter.slotToPutEnd), this.guiLeft + 136, this.guiTop + 67 + (this.isAdvanced
? OFFSET_ADVANCED
: 0), StringUtil.DECIMAL_COLOR_WHITE);
this.fontRenderer.drawString(Integer.toString(this.tileInputter.slotToPullStart), this.guiLeft + 7, this.guiTop + 67 + (this.isAdvanced
? OFFSET_ADVANCED
: 0), StringUtil.DECIMAL_COLOR_WHITE);
this.fontRenderer.drawString(Integer.toString(this.tileInputter.slotToPullEnd), this.guiLeft + 51, this.guiTop + 67 + (this.isAdvanced
? OFFSET_ADVANCED
: 0), StringUtil.DECIMAL_COLOR_WHITE);
this.fieldPutStart.drawTextBox(); this.fieldPutStart.drawTextBox();
this.fieldPutEnd.drawTextBox(); this.fieldPutEnd.drawTextBox();
@ -241,7 +283,9 @@ public class GuiInputter extends GuiWtfMojang {
} }
public SmallerButton(int id, int x, int y, String display, boolean smaller) { public SmallerButton(int id, int x, int y, String display, boolean smaller) {
super(id, x, y, 16, smaller ? 12 : 16, display); super(id, x, y, 16, smaller
? 12
: 16, display);
this.smaller = smaller; this.smaller = smaller;
} }
@ -255,7 +299,9 @@ public class GuiInputter extends GuiWtfMojang {
GlStateManager.enableBlend(); GlStateManager.enableBlend();
GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0); GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
GlStateManager.blendFunc(770, 771); GlStateManager.blendFunc(770, 771);
this.drawTexturedModalRect(this.x, this.y, this.smaller ? 200 : 176, k * this.height, this.width, this.height); this.drawTexturedModalRect(this.x, this.y, this.smaller
? 200
: 176, k * this.height, this.width, this.height);
this.mouseDragged(mc, x, y); this.mouseDragged(mc, x, y);
int color = 14737632; int color = 14737632;

View file

@ -10,9 +10,6 @@
package de.ellpeck.actuallyadditions.mod.inventory.gui; package de.ellpeck.actuallyadditions.mod.inventory.gui;
import java.util.ArrayList;
import java.util.List;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.inventory.ContainerLaserRelayItemWhitelist; import de.ellpeck.actuallyadditions.mod.inventory.ContainerLaserRelayItemWhitelist;
import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiInputter.SmallerButton; import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiInputter.SmallerButton;
@ -23,12 +20,14 @@ import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.TextFormatting; import net.minecraft.util.text.TextFormatting;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.OnlyIn; import net.minecraftforge.fml.relauncher.OnlyIn;
import java.util.ArrayList;
import java.util.List;
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
public class GuiLaserRelayItemWhitelist extends GuiWtfMojang { public class GuiLaserRelayItemWhitelist extends GuiWtfMojang {
@ -41,7 +40,7 @@ public class GuiLaserRelayItemWhitelist extends GuiWtfMojang {
private GuiButton buttonSmartWhitelistLeft; private GuiButton buttonSmartWhitelistLeft;
private GuiButton buttonSmartWhitelistRight; private GuiButton buttonSmartWhitelistRight;
public GuiLaserRelayItemWhitelist(InventoryPlayer inventory, TileEntityBase tile) { public GuiLaserRelayItemWhitelist(PlayerInventory inventory, TileEntityBase tile) {
super(new ContainerLaserRelayItemWhitelist(inventory, tile)); super(new ContainerLaserRelayItemWhitelist(inventory, tile));
this.tile = (TileEntityLaserRelayItemWhitelist) tile; this.tile = (TileEntityLaserRelayItemWhitelist) tile;
this.xSize = 176; this.xSize = 176;

View file

@ -18,9 +18,8 @@ import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.OnlyIn; import net.minecraftforge.fml.relauncher.OnlyIn;
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
@ -29,7 +28,7 @@ public class GuiMiner extends GuiWtfMojang {
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_breaker"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_breaker");
private final TileEntityMiner miner; private final TileEntityMiner miner;
public GuiMiner(InventoryPlayer inventory, TileEntityBase tile) { public GuiMiner(PlayerInventory inventory, TileEntityBase tile) {
super(new ContainerMiner(inventory, tile)); super(new ContainerMiner(inventory, tile));
this.miner = (TileEntityMiner) tile; this.miner = (TileEntityMiner) tile;
this.xSize = 176; this.xSize = 176;
@ -62,7 +61,9 @@ public class GuiMiner extends GuiWtfMojang {
this.mc.getTextureManager().bindTexture(RES_LOC); this.mc.getTextureManager().bindTexture(RES_LOC);
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93); this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93);
String mining = this.miner.onlyMineOres ? "Only Mining Ores" : "Mining Everything"; String mining = this.miner.onlyMineOres
? "Only Mining Ores"
: "Mining Everything";
this.fontRenderer.drawString(mining, this.guiLeft + this.xSize / 2 - this.fontRenderer.getStringWidth(mining) / 2, this.guiTop + 8, StringUtil.DECIMAL_COLOR_GRAY_TEXT); this.fontRenderer.drawString(mining, this.guiLeft + this.xSize / 2 - this.fontRenderer.getStringWidth(mining) / 2, this.guiTop + 8, StringUtil.DECIMAL_COLOR_GRAY_TEXT);
} }

View file

@ -17,9 +17,8 @@ import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.resources.I18n; import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.OnlyIn; import net.minecraftforge.fml.relauncher.OnlyIn;
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
@ -31,7 +30,7 @@ public class GuiOilGenerator extends GuiWtfMojang {
private EnergyDisplay energy; private EnergyDisplay energy;
private FluidDisplay fluid; private FluidDisplay fluid;
public GuiOilGenerator(InventoryPlayer inventory, TileEntityBase tile) { public GuiOilGenerator(PlayerInventory inventory, TileEntityBase tile) {
super(new ContainerOilGenerator(inventory, tile)); super(new ContainerOilGenerator(inventory, tile));
this.generator = (TileEntityOilGenerator) tile; this.generator = (TileEntityOilGenerator) tile;
this.xSize = 176; this.xSize = 176;

View file

@ -10,10 +10,6 @@
package de.ellpeck.actuallyadditions.mod.inventory.gui; package de.ellpeck.actuallyadditions.mod.inventory.gui;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.inventory.ContainerPhantomPlacer; import de.ellpeck.actuallyadditions.mod.inventory.ContainerPhantomPlacer;
import de.ellpeck.actuallyadditions.mod.network.PacketHandlerHelper; import de.ellpeck.actuallyadditions.mod.network.PacketHandlerHelper;
@ -23,19 +19,22 @@ import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.TextFormatting; import net.minecraft.util.text.TextFormatting;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.OnlyIn; import net.minecraftforge.fml.relauncher.OnlyIn;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
public class GuiPhantomPlacer extends GuiWtfMojang { public class GuiPhantomPlacer extends GuiWtfMojang {
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_breaker"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_breaker");
private final TileEntityPhantomPlacer placer; private final TileEntityPhantomPlacer placer;
public GuiPhantomPlacer(InventoryPlayer inventory, TileEntityBase tile) { public GuiPhantomPlacer(PlayerInventory inventory, TileEntityBase tile) {
super(new ContainerPhantomPlacer(inventory, tile)); super(new ContainerPhantomPlacer(inventory, tile));
this.placer = (TileEntityPhantomPlacer) tile; this.placer = (TileEntityPhantomPlacer) tile;
this.xSize = 176; this.xSize = 176;

View file

@ -17,9 +17,8 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityRangedCollector;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.OnlyIn; import net.minecraftforge.fml.relauncher.OnlyIn;
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
@ -30,7 +29,7 @@ public class GuiRangedCollector extends GuiWtfMojang {
private FilterSettingsGui filter; private FilterSettingsGui filter;
public GuiRangedCollector(InventoryPlayer inventory, TileEntityBase tile) { public GuiRangedCollector(PlayerInventory inventory, TileEntityBase tile) {
super(new ContainerRangedCollector(inventory, tile)); super(new ContainerRangedCollector(inventory, tile));
this.collector = (TileEntityRangedCollector) tile; this.collector = (TileEntityRangedCollector) tile;
this.xSize = 176; this.xSize = 176;

View file

@ -15,9 +15,8 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityItemRepairer; import de.ellpeck.actuallyadditions.mod.tile.TileEntityItemRepairer;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.OnlyIn; import net.minecraftforge.fml.relauncher.OnlyIn;
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
@ -27,7 +26,7 @@ public class GuiRepairer extends GuiWtfMojang {
private final TileEntityItemRepairer tileRepairer; private final TileEntityItemRepairer tileRepairer;
private EnergyDisplay energy; private EnergyDisplay energy;
public GuiRepairer(InventoryPlayer inventory, TileEntityBase tile) { public GuiRepairer(PlayerInventory inventory, TileEntityBase tile) {
super(new ContainerRepairer(inventory, tile)); super(new ContainerRepairer(inventory, tile));
this.tileRepairer = (TileEntityItemRepairer) tile; this.tileRepairer = (TileEntityItemRepairer) tile;
this.xSize = 176; this.xSize = 176;

View file

@ -10,19 +10,22 @@
package de.ellpeck.actuallyadditions.mod.inventory.gui; package de.ellpeck.actuallyadditions.mod.inventory.gui;
import net.minecraft.client.gui.inventory.GuiContainer; import com.mojang.blaze3d.matrix.MatrixStack;
import net.minecraft.inventory.Container; import net.minecraft.client.gui.screen.inventory.ContainerScreen;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.container.Container;
import net.minecraft.util.text.StringTextComponent;
public abstract class GuiWtfMojang extends GuiContainer { public abstract class GuiWtfMojang<T extends Container> extends ContainerScreen<T> {
public GuiWtfMojang(Container inventorySlotsIn) { public GuiWtfMojang(T inventorySlotsIn, PlayerInventory inventory) {
super(inventorySlotsIn); super(inventorySlotsIn, inventory, StringTextComponent.EMPTY);
} }
@Override @Override
public void drawScreen(int mouseX, int mouseY, float partialTicks) { public void render(MatrixStack matrixStack, int mouseX, int mouseY, float partialTicks) {
this.drawDefaultBackground(); this.renderBackground(matrixStack);
super.drawScreen(mouseX, mouseY, partialTicks); super.render(matrixStack, mouseX, mouseY, partialTicks);
this.renderHoveredToolTip(mouseX, mouseY); this.renderHoveredTooltip(matrixStack, mouseX, mouseY);
} }
} }

View file

@ -19,7 +19,7 @@ import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.relauncher.OnlyIn; import net.minecraftforge.fml.relauncher.OnlyIn;
@ -29,7 +29,7 @@ public class GuiXPSolidifier extends GuiWtfMojang {
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_xp_solidifier"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_xp_solidifier");
private final TileEntityXPSolidifier solidifier; private final TileEntityXPSolidifier solidifier;
public GuiXPSolidifier(InventoryPlayer inventory, TileEntityBase tile) { public GuiXPSolidifier(PlayerInventory inventory, TileEntityBase tile) {
super(new ContainerXPSolidifier(inventory, tile)); super(new ContainerXPSolidifier(inventory, tile));
this.solidifier = (TileEntityXPSolidifier) tile; this.solidifier = (TileEntityXPSolidifier) tile;
this.xSize = 176; this.xSize = 176;

View file

@ -12,7 +12,7 @@ package de.ellpeck.actuallyadditions.mod.inventory.slot;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.inventory.IInventory; import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.Slot; import net.minecraft.inventory.container.Slot;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
public class SlotImmovable extends Slot { public class SlotImmovable extends Slot {

View file

@ -15,362 +15,210 @@ import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
import de.ellpeck.actuallyadditions.mod.items.base.*; import de.ellpeck.actuallyadditions.mod.items.base.*;
import de.ellpeck.actuallyadditions.mod.items.lens.ItemLens; import de.ellpeck.actuallyadditions.mod.items.lens.ItemLens;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheCrystals;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheFoods; import de.ellpeck.actuallyadditions.mod.items.metalists.TheFoods;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems; import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems;
import de.ellpeck.actuallyadditions.mod.material.InitArmorMaterials; import de.ellpeck.actuallyadditions.mod.material.ArmorMaterials;
import de.ellpeck.actuallyadditions.mod.material.InitToolMaterials; import de.ellpeck.actuallyadditions.mod.material.ToolMaterials;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityGiantChest; import de.ellpeck.actuallyadditions.mod.tile.TileEntityGiantChest;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityGiantChestMedium; import de.ellpeck.actuallyadditions.mod.tile.TileEntityGiantChestMedium;
import de.ellpeck.actuallyadditions.mod.util.Util;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items; import net.minecraft.init.Items;
import net.minecraft.init.MobEffects; import net.minecraft.init.MobEffects;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemTier;
import net.minecraft.potion.PotionEffect; import net.minecraft.potion.PotionEffect;
import net.minecraft.tileentity.TileEntityChest; import net.minecraft.tileentity.TileEntityChest;
import net.minecraftforge.fml.RegistryObject;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;
public final class InitItems { public final class InitItems {
public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, ActuallyAdditions.MODID);
public static Item itemBooklet; // REMOVE ME
public static Item itemFertilizer; @Deprecated
public static Item itemMisc; public static final RegistryObject<Item> itemMisc = ITEMS.register("item_misc", ItemBase::new);
public static Item itemCanola;
public static Item itemCoffeeCup;
public static Item itemFoods;
public static Item itemJams;
public static Item itemKnife;
public static Item itemCrafterOnAStick;
public static Item itemDust;
public static Item itemSolidifiedExperience;
public static Item itemLeafBlower;
public static Item itemLeafBlowerAdvanced;
public static Item itemPotionRing;
public static Item itemPotionRingAdvanced;
public static Item itemPickaxeEmerald;
public static Item itemAxeEmerald;
public static Item itemShovelEmerald;
public static Item itemSwordEmerald;
public static Item itemHoeEmerald;
public static Item itemHelmEmerald;
public static Item itemChestEmerald;
public static Item itemPantsEmerald;
public static Item itemBootsEmerald;
public static Item itemPickaxeObsidian;
public static Item itemAxeObsidian;
public static Item itemShovelObsidian;
public static Item itemSwordObsidian;
public static Item itemHoeObsidian;
public static Item itemPickaxeQuartz;
public static Item itemAxeQuartz;
public static Item itemShovelQuartz;
public static Item itemSwordQuartz;
public static Item itemHoeQuartz;
public static Item itemHelmObsidian;
public static Item itemChestObsidian;
public static Item itemPantsObsidian;
public static Item itemBootsObsidian;
public static Item itemHelmQuartz;
public static Item itemChestQuartz;
public static Item itemPantsQuartz;
public static Item itemBootsQuartz;
public static Item itemHairyBall;
public static Item itemRiceSeed;
public static Item itemCanolaSeed;
public static Item itemFlaxSeed;
public static Item itemCoffeeSeed;
public static Item itemResonantRice;
public static Item itemPhantomConnector;
public static Item itemCoffeeBean;
public static Item itemCoffee;
public static Item woodenPaxel;
public static Item stonePaxel;
public static Item ironPaxel;
public static Item diamondPaxel;
public static Item goldPaxel;
public static Item emeraldPaxel;
public static Item obsidianPaxel;
public static Item quartzPaxel;
public static Item itemDrill;
public static Item itemDrillUpgradeSpeed;
public static Item itemDrillUpgradeSpeedII;
public static Item itemDrillUpgradeSpeedIII;
public static Item itemDrillUpgradeSilkTouch;
public static Item itemDrillUpgradeFortune;
public static Item itemDrillUpgradeFortuneII;
public static Item itemDrillUpgradeThreeByThree;
public static Item itemDrillUpgradeFiveByFive;
public static Item itemDrillUpgradeBlockPlacing;
public static Item itemBattery;
public static Item itemBatteryDouble;
public static Item itemBatteryTriple;
public static Item itemBatteryQuadruple;
public static Item itemBatteryQuintuple;
public static Item itemTeleStaff;
public static Item itemWingsOfTheBats;
public static Item itemGrowthRing;
public static Item itemMagnetRing;
public static Item itemWaterRemovalRing;
public static Item itemChestToCrateUpgrade;
public static Item itemSmallToMediumCrateUpgrade;
public static Item itemMediumToLargeCrateUpgrade;
public static Item itemCrateKeeper;
public static Item itemSpawnerChanger;
public static Item itemLaserWrench;
public static Item itemCrystal;
public static Item itemCrystalEmpowered;
public static Item itemColorLens;
public static Item itemExplosionLens;
public static Item itemDamageLens;
public static Item itemMoreDamageLens;
public static Item itemDisenchantingLens;
public static Item itemMiningLens;
public static Item itemPickaxeCrystalRed;
public static Item itemAxeCrystalRed;
public static Item itemShovelCrystalRed;
public static Item itemSwordCrystalRed;
public static Item itemHoeCrystalRed;
public static Item itemHelmCrystalRed;
public static Item itemChestCrystalRed;
public static Item itemPantsCrystalRed;
public static Item itemBootsCrystalRed;
public static Item itemPaxelCrystalRed;
public static Item itemPickaxeCrystalBlue;
public static Item itemAxeCrystalBlue;
public static Item itemShovelCrystalBlue;
public static Item itemSwordCrystalBlue;
public static Item itemHoeCrystalBlue;
public static Item itemHelmCrystalBlue;
public static Item itemChestCrystalBlue;
public static Item itemPantsCrystalBlue;
public static Item itemBootsCrystalBlue;
public static Item itemPaxelCrystalBlue;
public static Item itemPickaxeCrystalLightBlue;
public static Item itemAxeCrystalLightBlue;
public static Item itemShovelCrystalLightBlue;
public static Item itemSwordCrystalLightBlue;
public static Item itemHoeCrystalLightBlue;
public static Item itemHelmCrystalLightBlue;
public static Item itemChestCrystalLightBlue;
public static Item itemPantsCrystalLightBlue;
public static Item itemBootsCrystalLightBlue;
public static Item itemPaxelCrystalLightBlue;
public static Item itemPickaxeCrystalBlack;
public static Item itemAxeCrystalBlack;
public static Item itemShovelCrystalBlack;
public static Item itemSwordCrystalBlack;
public static Item itemHoeCrystalBlack;
public static Item itemHelmCrystalBlack;
public static Item itemChestCrystalBlack;
public static Item itemPantsCrystalBlack;
public static Item itemBootsCrystalBlack;
public static Item itemPaxelCrystalBlack;
public static Item itemPickaxeCrystalGreen;
public static Item itemAxeCrystalGreen;
public static Item itemShovelCrystalGreen;
public static Item itemSwordCrystalGreen;
public static Item itemHoeCrystalGreen;
public static Item itemHelmCrystalGreen;
public static Item itemChestCrystalGreen;
public static Item itemPantsCrystalGreen;
public static Item itemBootsCrystalGreen;
public static Item itemPaxelCrystalGreen;
public static Item itemPickaxeCrystalWhite;
public static Item itemAxeCrystalWhite;
public static Item itemShovelCrystalWhite;
public static Item itemSwordCrystalWhite;
public static Item itemHoeCrystalWhite;
public static Item itemHelmCrystalWhite;
public static Item itemChestCrystalWhite;
public static Item itemPantsCrystalWhite;
public static Item itemBootsCrystalWhite;
public static Item itemPaxelCrystalWhite;
public static Item itemWaterBowl;
public static Item itemFilter;
public static Item itemPlayerProbe;
public static Item itemWorm;
public static Item itemBag;
public static Item itemVoidBag;
public static Item itemFillingWand;
public static Item itemLaserUpgradeInvisibility;
public static Item itemLaserUpgradeRange;
public static Item itemEngineerGoggles;
public static Item itemEngineerGogglesAdvanced;
public static Item itemCrystalShard;
public static void init() { // SHARDS
ActuallyAdditions.LOGGER.info("Initializing Items..."); public static final RegistryObject<Item> RESTONIA_CRYSTAL_SHARD = ITEMS.register("item_restonia_crystal_shard", ItemBase::new);
public static final RegistryObject<Item> PALIS_CRYSTAL_SHARD = ITEMS.register("item_palis_crystal_shard", ItemBase::new);
public static final RegistryObject<Item> DIAMATINE_CRYSTAL_SHARD = ITEMS.register("item_diamatine_crystal_shard", ItemBase::new);
public static final RegistryObject<Item> VOID_CRYSTAL_SHARD = ITEMS.register("item_void_crystal_shard", ItemBase::new);
public static final RegistryObject<Item> EMERADIC_CRYSTAL_SHARD = ITEMS.register("item_emeradic_crystal_shard", ItemBase::new);
public static final RegistryObject<Item> ENORI_CRYSTAL_SHARD = ITEMS.register("item_enori_crystal_shard", ItemBase::new);
itemCrystalShard = new ItemCrystalShard("item_crystal_shard"); // CRYSTALS
itemEngineerGogglesAdvanced = new ItemEngineerGoggles("item_engineer_goggles_advanced", true); public static final RegistryObject<Item> RESTONIA_CRYSTAL = ITEMS.register("restonia_crystal", ItemBase::new);
itemEngineerGoggles = new ItemEngineerGoggles("item_engineer_goggles", false); public static final RegistryObject<Item> PALIS_CRYSTAL = ITEMS.register("palis_crystal", ItemBase::new);
itemLaserUpgradeRange = new ItemLaserRelayUpgrade("item_laser_upgrade_range"); public static final RegistryObject<Item> DIAMATINE_CRYSTAL = ITEMS.register("diamatine_crystal", ItemBase::new);
itemLaserUpgradeInvisibility = new ItemLaserRelayUpgrade("item_laser_upgrade_invisibility"); public static final RegistryObject<Item> VOID_CRYSTAL = ITEMS.register("void_crystal", ItemBase::new);
itemFillingWand = new ItemFillingWand("item_filling_wand"); public static final RegistryObject<Item> EMERADIC_CRYSTAL = ITEMS.register("emeradic_crystal", ItemBase::new);
itemBag = new ItemBag("item_bag", false); public static final RegistryObject<Item> ENORI_CRYSTAL = ITEMS.register("enori_crystal", ItemBase::new);
itemVoidBag = new ItemBag("item_void_bag", true);
itemWorm = new ItemWorm("item_worm");
itemPlayerProbe = new ItemPlayerProbe("item_player_probe");
itemFilter = new ItemFilter("item_filter");
itemWaterBowl = new ItemWaterBowl("item_water_bowl");
itemSpawnerChanger = new ItemSpawnerChanger("item_spawner_changer");
itemMisc = new ItemMisc("item_misc");
itemCrateKeeper = new ItemGeneric("item_crate_keeper").setMaxStackSize(1);
itemColorLens = new ItemLens("item_color_lens", ActuallyAdditionsAPI.lensColor);
itemExplosionLens = new ItemLens("item_explosion_lens", ActuallyAdditionsAPI.lensDetonation);
itemDamageLens = new ItemLens("item_damage_lens", ActuallyAdditionsAPI.lensDeath);
itemMoreDamageLens = new ItemLens("item_more_damage_lens", ActuallyAdditionsAPI.lensEvenMoarDeath);
itemDisenchantingLens = new ItemLens("item_disenchanting_lens", ActuallyAdditionsAPI.lensDisenchanting);
itemMiningLens = new ItemLens("item_mining_lens", ActuallyAdditionsAPI.lensMining);
itemCrystal = new ItemCrystal("item_crystal", false);
itemCrystalEmpowered = new ItemCrystal("item_crystal_empowered", true);
itemLaserWrench = new ItemLaserWrench("item_laser_wrench");
itemChestToCrateUpgrade = new ItemChestToCrateUpgrade("item_chest_to_crate_upgrade", TileEntityChest.class, InitBlocks.blockGiantChest.getDefaultState());
itemSmallToMediumCrateUpgrade = new ItemChestToCrateUpgrade("item_small_to_medium_crate_upgrade", TileEntityGiantChest.class, InitBlocks.blockGiantChestMedium.getDefaultState());
itemMediumToLargeCrateUpgrade = new ItemChestToCrateUpgrade("item_medium_to_large_crate_upgrade", TileEntityGiantChestMedium.class, InitBlocks.blockGiantChestLarge.getDefaultState());
itemBooklet = new ItemBooklet("item_booklet");
itemGrowthRing = new ItemGrowthRing("item_growth_ring");
itemMagnetRing = new ItemMagnetRing("item_suction_ring");
itemWaterRemovalRing = new ItemWaterRemovalRing("item_water_removal_ring");
itemHelmEmerald = new ItemArmorAA("item_helm_emerald", InitArmorMaterials.armorMaterialEmerald, 0, new ItemStack(Items.EMERALD));
itemChestEmerald = new ItemArmorAA("item_chest_emerald", InitArmorMaterials.armorMaterialEmerald, 1, new ItemStack(Items.EMERALD));
itemPantsEmerald = new ItemArmorAA("item_pants_emerald", InitArmorMaterials.armorMaterialEmerald, 2, new ItemStack(Items.EMERALD));
itemBootsEmerald = new ItemArmorAA("item_boots_emerald", InitArmorMaterials.armorMaterialEmerald, 3, new ItemStack(Items.EMERALD));
itemHelmObsidian = new ItemArmorAA("item_helm_obsidian", InitArmorMaterials.armorMaterialObsidian, 0, new ItemStack(Blocks.OBSIDIAN));
itemChestObsidian = new ItemArmorAA("item_chest_obsidian", InitArmorMaterials.armorMaterialObsidian, 1, new ItemStack(Blocks.OBSIDIAN));
itemPantsObsidian = new ItemArmorAA("item_pants_obsidian", InitArmorMaterials.armorMaterialObsidian, 2, new ItemStack(Blocks.OBSIDIAN));
itemBootsObsidian = new ItemArmorAA("item_boots_obsidian", InitArmorMaterials.armorMaterialObsidian, 3, new ItemStack(Blocks.OBSIDIAN));
itemHelmQuartz = new ItemArmorAA("item_helm_quartz", InitArmorMaterials.armorMaterialQuartz, 0, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()));
itemChestQuartz = new ItemArmorAA("item_chest_quartz", InitArmorMaterials.armorMaterialQuartz, 1, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()));
itemPantsQuartz = new ItemArmorAA("item_pants_quartz", InitArmorMaterials.armorMaterialQuartz, 2, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()));
itemBootsQuartz = new ItemArmorAA("item_boots_quartz", InitArmorMaterials.armorMaterialQuartz, 3, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()));
itemTeleStaff = new ItemTeleStaff("item_tele_staff");
itemWingsOfTheBats = new ItemWingsOfTheBats("item_wings_of_the_bats");
itemDrill = new ItemDrill("item_drill");
itemBattery = new ItemBattery("item_battery", 200000, 1000);
itemBatteryDouble = new ItemBattery("item_battery_double", 350000, 5000);
itemBatteryTriple = new ItemBattery("item_battery_triple", 600000, 10000);
itemBatteryQuadruple = new ItemBattery("item_battery_quadruple", 1000000, 30000);
itemBatteryQuintuple = new ItemBattery("item_battery_quintuple", 2000000, 100000);
itemDrillUpgradeSpeed = new ItemDrillUpgrade(ItemDrillUpgrade.UpgradeType.SPEED, "item_drill_upgrade_speed");
itemDrillUpgradeSpeedII = new ItemDrillUpgrade(ItemDrillUpgrade.UpgradeType.SPEED_II, "item_drill_upgrade_speed_ii");
itemDrillUpgradeSpeedIII = new ItemDrillUpgrade(ItemDrillUpgrade.UpgradeType.SPEED_III, "item_drill_upgrade_speed_iii");
itemDrillUpgradeSilkTouch = new ItemDrillUpgrade(ItemDrillUpgrade.UpgradeType.SILK_TOUCH, "item_drill_upgrade_silk_touch");
itemDrillUpgradeFortune = new ItemDrillUpgrade(ItemDrillUpgrade.UpgradeType.FORTUNE, "item_drill_upgrade_fortune");
itemDrillUpgradeFortuneII = new ItemDrillUpgrade(ItemDrillUpgrade.UpgradeType.FORTUNE_II, "item_drill_upgrade_fortune_ii");
itemDrillUpgradeThreeByThree = new ItemDrillUpgrade(ItemDrillUpgrade.UpgradeType.THREE_BY_THREE, "item_drill_upgrade_three_by_three");
itemDrillUpgradeFiveByFive = new ItemDrillUpgrade(ItemDrillUpgrade.UpgradeType.FIVE_BY_FIVE, "item_drill_upgrade_five_by_five");
itemDrillUpgradeBlockPlacing = new ItemDrillUpgrade(ItemDrillUpgrade.UpgradeType.PLACER, "item_drill_upgrade_block_placing");
itemFertilizer = new ItemFertilizer("item_fertilizer");
itemCoffee = new ItemCoffee("item_coffee");
itemPhantomConnector = new ItemPhantomConnector("item_phantom_connector");
itemResonantRice = new ItemResonantRice("item_resonant_rice");
itemFoods = new ItemFoods("item_food");
itemJams = new ItemJams("item_jam");
itemKnife = new ItemKnife("item_knife");
itemCrafterOnAStick = new ItemCrafterOnAStick("item_crafter_on_a_stick");
itemDust = new ItemDust("item_dust");
itemSolidifiedExperience = new ItemSolidifiedExperience("item_solidified_experience");
itemLeafBlower = new ItemLeafBlower(false, "item_leaf_blower");
itemLeafBlowerAdvanced = new ItemLeafBlower(true, "item_leaf_blower_advanced");
itemPotionRing = new ItemPotionRing(false, "item_potion_ring");
itemPotionRingAdvanced = new ItemPotionRing(true, "item_potion_ring_advanced");
itemHairyBall = new ItemHairyBall("item_hairy_ball");
itemCoffeeBean = new ItemCoffeeBean("item_coffee_beans");
itemRiceSeed = new ItemSeed("item_rice_seed", "seedRice", InitBlocks.blockRice, itemFoods, TheFoods.RICE.ordinal());
itemCanolaSeed = new ItemFoodSeed("item_canola_seed", "seedCanola", InitBlocks.blockCanola, itemMisc, TheMiscItems.CANOLA.ordinal(), 1, 0.01F, 10).setPotionEffect(new PotionEffect(MobEffects.NAUSEA, 1000, 0), 0.2F);
itemFlaxSeed = new ItemSeed("item_flax_seed", "seedFlax", InitBlocks.blockFlax, Items.STRING, 0);
itemCoffeeSeed = new ItemSeed("item_coffee_seed", "seedCoffeeBeans", InitBlocks.blockCoffee, itemCoffeeBean, 0);
itemPickaxeEmerald = new ItemPickaxeAA(InitToolMaterials.toolMaterialEmerald, new ItemStack(Items.EMERALD), "item_pickaxe_emerald", EnumRarity.EPIC);
itemAxeEmerald = new ItemAxeAA(InitToolMaterials.toolMaterialEmerald, new ItemStack(Items.EMERALD), "item_axe_emerald", EnumRarity.EPIC);
itemShovelEmerald = new ItemShovelAA(InitToolMaterials.toolMaterialEmerald, new ItemStack(Items.EMERALD), "item_shovel_emerald", EnumRarity.EPIC);
itemSwordEmerald = new ItemSwordAA(InitToolMaterials.toolMaterialEmerald, new ItemStack(Items.EMERALD), "item_sword_emerald", EnumRarity.EPIC);
itemHoeEmerald = new ItemHoeAA(InitToolMaterials.toolMaterialEmerald, new ItemStack(Items.EMERALD), "item_hoe_emerald", EnumRarity.EPIC);
itemPickaxeObsidian = new ItemPickaxeAA(InitToolMaterials.toolMaterialObsidian, new ItemStack(Blocks.OBSIDIAN), "item_pickaxe_obsidian", EnumRarity.UNCOMMON);
itemAxeObsidian = new ItemAxeAA(InitToolMaterials.toolMaterialObsidian, new ItemStack(Blocks.OBSIDIAN), "item_axe_obsidian", EnumRarity.UNCOMMON);
itemShovelObsidian = new ItemShovelAA(InitToolMaterials.toolMaterialObsidian, new ItemStack(Blocks.OBSIDIAN), "item_shovel_obsidian", EnumRarity.UNCOMMON);
itemSwordObsidian = new ItemSwordAA(InitToolMaterials.toolMaterialObsidian, new ItemStack(Blocks.OBSIDIAN), "item_sword_obsidian", EnumRarity.UNCOMMON);
itemHoeObsidian = new ItemHoeAA(InitToolMaterials.toolMaterialObsidian, new ItemStack(Blocks.OBSIDIAN), "item_hoe_obsidian", EnumRarity.UNCOMMON);
itemPickaxeQuartz = new ItemPickaxeAA(InitToolMaterials.toolMaterialQuartz, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), "item_pickaxe_quartz", EnumRarity.RARE);
itemAxeQuartz = new ItemAxeAA(InitToolMaterials.toolMaterialQuartz, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), "item_axe_quartz", EnumRarity.RARE);
itemShovelQuartz = new ItemShovelAA(InitToolMaterials.toolMaterialQuartz, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), "item_shovel_quartz", EnumRarity.RARE);
itemSwordQuartz = new ItemSwordAA(InitToolMaterials.toolMaterialQuartz, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), "item_sword_quartz", EnumRarity.RARE);
itemHoeQuartz = new ItemHoeAA(InitToolMaterials.toolMaterialQuartz, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), "item_hoe_quartz", EnumRarity.RARE);
woodenPaxel = new ItemAllToolAA(Item.ToolMaterial.WOOD, "plank_wood", "wooden_paxel", EnumRarity.UNCOMMON, 5192733);
stonePaxel = new ItemAllToolAA(Item.ToolMaterial.STONE, new ItemStack(Blocks.COBBLESTONE), "stone_paxel", EnumRarity.UNCOMMON, 7040621);
ironPaxel = new ItemAllToolAA(Item.ToolMaterial.IRON, new ItemStack(Items.IRON_INGOT), "iron_paxel", EnumRarity.RARE, 10920613);
goldPaxel = new ItemAllToolAA(Item.ToolMaterial.GOLD, new ItemStack(Items.GOLD_INGOT), "gold_paxel", EnumRarity.RARE, 16770048);
diamondPaxel = new ItemAllToolAA(Item.ToolMaterial.DIAMOND, new ItemStack(Items.DIAMOND), "diamond_paxel", EnumRarity.EPIC, 3250376);
emeraldPaxel = new ItemAllToolAA(InitToolMaterials.toolMaterialEmerald, new ItemStack(Items.EMERALD), "emerald_paxel", EnumRarity.EPIC, 7723338);
obsidianPaxel = new ItemAllToolAA(InitToolMaterials.toolMaterialObsidian, new ItemStack(Blocks.OBSIDIAN), "obsidian_paxel", EnumRarity.EPIC, 4166);
quartzPaxel = new ItemAllToolAA(InitToolMaterials.toolMaterialQuartz, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), "quartz_paxel", EnumRarity.RARE, 1710103);
itemPickaxeCrystalRed = new ItemPickaxeAA(InitToolMaterials.toolMaterialCrystalRed, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), "item_pickaxe_crystal_red", Util.CRYSTAL_RED_RARITY); public static final RegistryObject<Item> RESTONIA_EMPOWERED_CRYSTAL = ITEMS.register("restonia_empowered_crystal", ItemBase::new);
itemAxeCrystalRed = new ItemAxeAA(InitToolMaterials.toolMaterialCrystalRed, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), "item_axe_crystal_red", Util.CRYSTAL_RED_RARITY); public static final RegistryObject<Item> PALIS_EMPOWERED_CRYSTAL = ITEMS.register("palis_empowered_crystal", ItemBase::new);
itemShovelCrystalRed = new ItemShovelAA(InitToolMaterials.toolMaterialCrystalRed, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), "item_shovel_crystal_red", Util.CRYSTAL_RED_RARITY); public static final RegistryObject<Item> DIAMATINE_EMPOWERED_CRYSTAL = ITEMS.register("diamatine_empowered_crystal", ItemBase::new);
itemSwordCrystalRed = new ItemSwordAA(InitToolMaterials.toolMaterialCrystalRed, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), "item_sword_crystal_red", Util.CRYSTAL_RED_RARITY); public static final RegistryObject<Item> VOID_EMPOWERED_CRYSTAL = ITEMS.register("void_empowered_crystal", ItemBase::new);
itemHoeCrystalRed = new ItemHoeAA(InitToolMaterials.toolMaterialCrystalRed, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), "item_hoe_crystal_red", Util.CRYSTAL_RED_RARITY); public static final RegistryObject<Item> EMERADIC_EMPOWERED_CRYSTAL = ITEMS.register("emeradic_empowered_crystal", ItemBase::new);
itemHelmCrystalRed = new ItemArmorAA("item_helm_crystal_red", InitArmorMaterials.armorMaterialCrystalRed, 0, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), Util.CRYSTAL_RED_RARITY); public static final RegistryObject<Item> ENORI_EMPOWERED_CRYSTAL = ITEMS.register("enori_empowered_crystal", ItemBase::new);
itemChestCrystalRed = new ItemArmorAA("item_chest_crystal_red", InitArmorMaterials.armorMaterialCrystalRed, 1, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), Util.CRYSTAL_RED_RARITY);
itemPantsCrystalRed = new ItemArmorAA("item_pants_crystal_red", InitArmorMaterials.armorMaterialCrystalRed, 2, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), Util.CRYSTAL_RED_RARITY);
itemBootsCrystalRed = new ItemArmorAA("item_boots_crystal_red", InitArmorMaterials.armorMaterialCrystalRed, 3, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), Util.CRYSTAL_RED_RARITY);
itemPaxelCrystalRed = new ItemAllToolAA(InitToolMaterials.toolMaterialCrystalRed, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), "item_paxel_crystal_red", Util.CRYSTAL_RED_RARITY, 16711689);
itemPickaxeCrystalBlue = new ItemPickaxeAA(InitToolMaterials.toolMaterialCrystalBlue, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.LAPIS.ordinal()), "item_pickaxe_crystal_blue", Util.CRYSTAL_BLUE_RARITY); // BLACK QUARTZ
itemAxeCrystalBlue = new ItemAxeAA(InitToolMaterials.toolMaterialCrystalBlue, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.LAPIS.ordinal()), "item_axe_crystal_blue", Util.CRYSTAL_BLUE_RARITY); public static final RegistryObject<Item> BLACK_QUARTZ = ITEMS.register("black_quartz", ItemBase::new));
itemShovelCrystalBlue = new ItemShovelAA(InitToolMaterials.toolMaterialCrystalBlue, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.LAPIS.ordinal()), "item_shovel_crystal_blue", Util.CRYSTAL_BLUE_RARITY);
itemSwordCrystalBlue = new ItemSwordAA(InitToolMaterials.toolMaterialCrystalBlue, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.LAPIS.ordinal()), "item_sword_crystal_blue", Util.CRYSTAL_BLUE_RARITY);
itemHoeCrystalBlue = new ItemHoeAA(InitToolMaterials.toolMaterialCrystalBlue, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.LAPIS.ordinal()), "item_hoe_crystal_blue", Util.CRYSTAL_BLUE_RARITY);
itemHelmCrystalBlue = new ItemArmorAA("item_helm_crystal_blue", InitArmorMaterials.armorMaterialCrystalBlue, 0, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.LAPIS.ordinal()), Util.CRYSTAL_BLUE_RARITY);
itemChestCrystalBlue = new ItemArmorAA("item_chest_crystal_blue", InitArmorMaterials.armorMaterialCrystalBlue, 1, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.LAPIS.ordinal()), Util.CRYSTAL_BLUE_RARITY);
itemPantsCrystalBlue = new ItemArmorAA("item_pants_crystal_blue", InitArmorMaterials.armorMaterialCrystalBlue, 2, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.LAPIS.ordinal()), Util.CRYSTAL_BLUE_RARITY);
itemBootsCrystalBlue = new ItemArmorAA("item_boots_crystal_blue", InitArmorMaterials.armorMaterialCrystalBlue, 3, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.LAPIS.ordinal()), Util.CRYSTAL_BLUE_RARITY);
itemPaxelCrystalBlue = new ItemAllToolAA(InitToolMaterials.toolMaterialCrystalBlue, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.LAPIS.ordinal()), "item_paxel_crystal_blue", Util.CRYSTAL_BLUE_RARITY, 3014911);
itemPickaxeCrystalLightBlue = new ItemPickaxeAA(InitToolMaterials.toolMaterialCrystalLightBlue, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), "item_pickaxe_crystal_light_blue", Util.CRYSTAL_LIGHT_BLUE_RARITY); @Deprecated
itemAxeCrystalLightBlue = new ItemAxeAA(InitToolMaterials.toolMaterialCrystalLightBlue, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), "item_axe_crystal_light_blue", Util.CRYSTAL_LIGHT_BLUE_RARITY); public static final RegistryObject<Item> itemCrystal = ITEMS.register("", new ItemCrystal("item_crystal", false));
itemShovelCrystalLightBlue = new ItemShovelAA(InitToolMaterials.toolMaterialCrystalLightBlue, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), "item_shovel_crystal_light_blue", Util.CRYSTAL_LIGHT_BLUE_RARITY); @Deprecated
itemSwordCrystalLightBlue = new ItemSwordAA(InitToolMaterials.toolMaterialCrystalLightBlue, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), "item_sword_crystal_light_blue", Util.CRYSTAL_LIGHT_BLUE_RARITY); public static final RegistryObject<Item> itemCrystalEmpowered = ITEMS.register("", new ItemCrystal("item_crystal_empowered", true));
itemHoeCrystalLightBlue = new ItemHoeAA(InitToolMaterials.toolMaterialCrystalLightBlue, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), "item_hoe_crystal_light_blue", Util.CRYSTAL_LIGHT_BLUE_RARITY);
itemHelmCrystalLightBlue = new ItemArmorAA("item_helm_crystal_light_blue", InitArmorMaterials.armorMaterialCrystalLightBlue, 0, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), Util.CRYSTAL_LIGHT_BLUE_RARITY);
itemChestCrystalLightBlue = new ItemArmorAA("item_chest_crystal_light_blue", InitArmorMaterials.armorMaterialCrystalLightBlue, 1, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), Util.CRYSTAL_LIGHT_BLUE_RARITY);
itemPantsCrystalLightBlue = new ItemArmorAA("item_pants_crystal_light_blue", InitArmorMaterials.armorMaterialCrystalLightBlue, 2, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), Util.CRYSTAL_LIGHT_BLUE_RARITY);
itemBootsCrystalLightBlue = new ItemArmorAA("item_boots_crystal_light_blue", InitArmorMaterials.armorMaterialCrystalLightBlue, 3, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), Util.CRYSTAL_LIGHT_BLUE_RARITY);
itemPaxelCrystalLightBlue = new ItemAllToolAA(InitToolMaterials.toolMaterialCrystalLightBlue, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), "item_paxel_crystal_light_blue", Util.CRYSTAL_LIGHT_BLUE_RARITY, 4093108);
itemPickaxeCrystalBlack = new ItemPickaxeAA(InitToolMaterials.toolMaterialCrystalBlack, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()), "item_pickaxe_crystal_black", Util.CRYSTAL_BLACK_RARITY); public static final RegistryObject<Item> itemEngineerGogglesAdvanced = ITEMS.register("", new ItemEngineerGoggles("item_engineer_goggles_advanced", true));
itemAxeCrystalBlack = new ItemAxeAA(InitToolMaterials.toolMaterialCrystalBlack, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()), "item_axe_crystal_black", Util.CRYSTAL_BLACK_RARITY); public static final RegistryObject<Item> itemEngineerGoggles = ITEMS.register("", new ItemEngineerGoggles("item_engineer_goggles", false));
itemShovelCrystalBlack = new ItemShovelAA(InitToolMaterials.toolMaterialCrystalBlack, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()), "item_shovel_crystal_black", Util.CRYSTAL_BLACK_RARITY); public static final RegistryObject<Item> itemLaserUpgradeRange = ITEMS.register("item_laser_upgrade_range", ItemLaserRelayUpgrade::new);
itemSwordCrystalBlack = new ItemSwordAA(InitToolMaterials.toolMaterialCrystalBlack, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()), "item_sword_crystal_black", Util.CRYSTAL_BLACK_RARITY); public static final RegistryObject<Item> itemLaserUpgradeInvisibility = ITEMS.register("item_laser_upgrade_invisibility", ItemLaserRelayUpgrade::new);
itemHoeCrystalBlack = new ItemHoeAA(InitToolMaterials.toolMaterialCrystalBlack, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()), "item_hoe_crystal_black", Util.CRYSTAL_BLACK_RARITY); public static final RegistryObject<Item> itemFillingWand = ITEMS.register("item_filling_wand", ItemFillingWand::new);
itemHelmCrystalBlack = new ItemArmorAA("item_helm_crystal_black", InitArmorMaterials.armorMaterialCrystalBlack, 0, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()), Util.CRYSTAL_BLACK_RARITY); public static final RegistryObject<Item> itemBag = ITEMS.register("", new ItemBag("item_bag", false));
itemChestCrystalBlack = new ItemArmorAA("item_chest_crystal_black", InitArmorMaterials.armorMaterialCrystalBlack, 1, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()), Util.CRYSTAL_BLACK_RARITY); public static final RegistryObject<Item> itemVoidBag = ITEMS.register("", new ItemBag("item_void_bag", true));
itemPantsCrystalBlack = new ItemArmorAA("item_pants_crystal_black", InitArmorMaterials.armorMaterialCrystalBlack, 2, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()), Util.CRYSTAL_BLACK_RARITY); public static final RegistryObject<Item> itemWorm = ITEMS.register("item_worm", ItemWorm::new);
itemBootsCrystalBlack = new ItemArmorAA("item_boots_crystal_black", InitArmorMaterials.armorMaterialCrystalBlack, 3, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()), Util.CRYSTAL_BLACK_RARITY); public static final RegistryObject<Item> itemPlayerProbe = ITEMS.register("item_player_probe", ItemPlayerProbe::new);
itemPaxelCrystalBlack = new ItemAllToolAA(InitToolMaterials.toolMaterialCrystalBlack, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()), "item_paxel_crystal_black", Util.CRYSTAL_BLACK_RARITY, 2631982); public static final RegistryObject<Item> itemFilter = ITEMS.register("item_filter", ItemFilter::new);
public static final RegistryObject<Item> itemWaterBowl = ITEMS.register("item_water_bowl", ItemWaterBowl::new);
public static final RegistryObject<Item> itemSpawnerChanger = ITEMS.register("item_spawner_changer", ItemSpawnerChanger::new);
public static final RegistryObject<Item> itemCrateKeeper = ITEMS.register("item_crate_keeper", ItemGeneric::new.setMaxStackSize(1));
public static final RegistryObject<Item> itemColorLens = ITEMS.register("", new ItemLens("item_color_lens", ActuallyAdditionsAPI.lensColor));
public static final RegistryObject<Item> itemExplosionLens = ITEMS.register("", new ItemLens("item_explosion_lens", ActuallyAdditionsAPI.lensDetonation));
public static final RegistryObject<Item> itemDamageLens = ITEMS.register("", new ItemLens("item_damage_lens", ActuallyAdditionsAPI.lensDeath));
public static final RegistryObject<Item> itemMoreDamageLens = ITEMS.register("", new ItemLens("item_more_damage_lens", ActuallyAdditionsAPI.lensEvenMoarDeath));
public static final RegistryObject<Item> itemDisenchantingLens = ITEMS.register("", new ItemLens("item_disenchanting_lens", ActuallyAdditionsAPI.lensDisenchanting));
public static final RegistryObject<Item> itemMiningLens = ITEMS.register("", new ItemLens("item_mining_lens", ActuallyAdditionsAPI.lensMining));
public static final RegistryObject<Item> itemLaserWrench = ITEMS.register("item_laser_wrench", ItemLaserWrench::new);
public static final RegistryObject<Item> itemChestToCrateUpgrade = ITEMS.register("", new ItemChestToCrateUpgrade("item_chest_to_crate_upgrade", TileEntityChest.class, InitBlocks.blockGiantChest.getDefaultState()));
public static final RegistryObject<Item> itemSmallToMediumCrateUpgrade = ITEMS.register("", new ItemChestToCrateUpgrade("item_small_to_medium_crate_upgrade", TileEntityGiantChest.class, InitBlocks.blockGiantChestMedium.getDefaultState()));
public static final RegistryObject<Item> itemMediumToLargeCrateUpgrade = ITEMS.register("", new ItemChestToCrateUpgrade("item_medium_to_large_crate_upgrade", TileEntityGiantChestMedium.class, InitBlocks.blockGiantChestLarge.getDefaultState()));
public static final RegistryObject<Item> itemBooklet = ITEMS.register("item_booklet", ItemBooklet::new);
public static final RegistryObject<Item> itemGrowthRing = ITEMS.register("item_growth_ring", ItemGrowthRing::new);
public static final RegistryObject<Item> itemMagnetRing = ITEMS.register("item_suction_ring", ItemMagnetRing::new);
public static final RegistryObject<Item> itemWaterRemovalRing = ITEMS.register("item_water_removal_ring", ItemWaterRemovalRing::new);
public static final RegistryObject<Item> itemTeleStaff = ITEMS.register("item_tele_staff", ItemTeleStaff::new);
public static final RegistryObject<Item> itemWingsOfTheBats = ITEMS.register("item_wings_of_the_bats", ItemWingsOfTheBats::new);
public static final RegistryObject<Item> itemDrill = ITEMS.register("item_drill", ItemDrill::new);
public static final RegistryObject<Item> itemBattery = ITEMS.register("", new ItemBattery("item_battery", 200000, 1000));
public static final RegistryObject<Item> itemBatteryDouble = ITEMS.register("", new ItemBattery("item_battery_double", 350000, 5000));
public static final RegistryObject<Item> itemBatteryTriple = ITEMS.register("", new ItemBattery("item_battery_triple", 600000, 10000));
public static final RegistryObject<Item> itemBatteryQuadruple = ITEMS.register("", new ItemBattery("item_battery_quadruple", 1000000, 30000));
public static final RegistryObject<Item> itemBatteryQuintuple = ITEMS.register("", new ItemBattery("item_battery_quintuple", 2000000, 100000));
public static final RegistryObject<Item> itemDrillUpgradeSpeed = ITEMS.register("", new ItemDrillUpgrade(ItemDrillUpgrade.UpgradeType.SPEED, "item_drill_upgrade_speed"));
public static final RegistryObject<Item> itemDrillUpgradeSpeedII = ITEMS.register("", new ItemDrillUpgrade(ItemDrillUpgrade.UpgradeType.SPEED_II, "item_drill_upgrade_speed_ii"));
public static final RegistryObject<Item> itemDrillUpgradeSpeedIII = ITEMS.register("", new ItemDrillUpgrade(ItemDrillUpgrade.UpgradeType.SPEED_III, "item_drill_upgrade_speed_iii"));
public static final RegistryObject<Item> itemDrillUpgradeSilkTouch = ITEMS.register("", new ItemDrillUpgrade(ItemDrillUpgrade.UpgradeType.SILK_TOUCH, "item_drill_upgrade_silk_touch"));
public static final RegistryObject<Item> itemDrillUpgradeFortune = ITEMS.register("", new ItemDrillUpgrade(ItemDrillUpgrade.UpgradeType.FORTUNE, "item_drill_upgrade_fortune"));
public static final RegistryObject<Item> itemDrillUpgradeFortuneII = ITEMS.register("", new ItemDrillUpgrade(ItemDrillUpgrade.UpgradeType.FORTUNE_II, "item_drill_upgrade_fortune_ii"));
public static final RegistryObject<Item> itemDrillUpgradeThreeByThree = ITEMS.register("", new ItemDrillUpgrade(ItemDrillUpgrade.UpgradeType.THREE_BY_THREE, "item_drill_upgrade_three_by_three"));
public static final RegistryObject<Item> itemDrillUpgradeFiveByFive = ITEMS.register("", new ItemDrillUpgrade(ItemDrillUpgrade.UpgradeType.FIVE_BY_FIVE, "item_drill_upgrade_five_by_five"));
public static final RegistryObject<Item> itemDrillUpgradeBlockPlacing = ITEMS.register("", new ItemDrillUpgrade(ItemDrillUpgrade.UpgradeType.PLACER, "item_drill_upgrade_block_placing"));
public static final RegistryObject<Item> itemFertilizer = ITEMS.register("item_fertilizer", ItemFertilizer::new);
public static final RegistryObject<Item> itemCoffee = ITEMS.register("item_coffee", ItemCoffee::new);
public static final RegistryObject<Item> itemPhantomConnector = ITEMS.register("item_phantom_connector", ItemPhantomConnector::new);
public static final RegistryObject<Item> itemResonantRice = ITEMS.register("item_resonant_rice", ItemResonantRice::new);
public static final RegistryObject<Item> itemFoods = ITEMS.register("item_food", ItemFoods::new);
public static final RegistryObject<Item> itemJams = ITEMS.register("item_jam", ItemJams::new);
public static final RegistryObject<Item> itemKnife = ITEMS.register("item_knife", ItemKnife::new);
public static final RegistryObject<Item> itemCrafterOnAStick = ITEMS.register("item_crafter_on_a_stick", ItemCrafterOnAStick::new);
public static final RegistryObject<Item> itemDust = ITEMS.register("item_dust", ItemDust::new);
public static final RegistryObject<Item> itemSolidifiedExperience = ITEMS.register("item_solidified_experience", ItemSolidifiedExperience::new);
public static final RegistryObject<Item> itemLeafBlower = ITEMS.register("", new ItemLeafBlower(false, "item_leaf_blower"));
public static final RegistryObject<Item> itemLeafBlowerAdvanced = ITEMS.register("", new ItemLeafBlower(true, "item_leaf_blower_advanced"));
public static final RegistryObject<Item> itemPotionRing = ITEMS.register("", new ItemPotionRing(false, "item_potion_ring"));
public static final RegistryObject<Item> itemPotionRingAdvanced = ITEMS.register("", new ItemPotionRing(true, "item_potion_ring_advanced"));
public static final RegistryObject<Item> itemHairyBall = ITEMS.register("item_hairy_ball", ItemHairyBall::new);
public static final RegistryObject<Item> itemCoffeeBean = ITEMS.register("item_coffee_beans", ItemCoffeeBean::new);
public static final RegistryObject<Item> itemRiceSeed = ITEMS.register("", new ItemSeed("item_rice_seed", "seedRice", InitBlocks.blockRice, itemFoods, TheFoods.RICE.ordinal()));
public static final RegistryObject<Item> itemCanolaSeed = ITEMS.register("", new ItemFoodSeed("item_canola_seed", "seedCanola", InitBlocks.blockCanola, itemMisc, TheMiscItems.CANOLA.ordinal(), 1, 0.01F, 10).setPotionEffect(new PotionEffect(MobEffects.NAUSEA, 1000, 0), 0.2F));
public static final RegistryObject<Item> itemFlaxSeed = ITEMS.register("", new ItemSeed("item_flax_seed", "seedFlax", InitBlocks.blockFlax, Items.STRING, 0));
public static final RegistryObject<Item> itemCoffeeSeed = ITEMS.register("", new ItemSeed("item_coffee_seed", "seedCoffeeBeans", InitBlocks.blockCoffee, itemCoffeeBean, 0));
itemPickaxeCrystalGreen = new ItemPickaxeAA(InitToolMaterials.toolMaterialCrystalGreen, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.EMERALD.ordinal()), "item_pickaxe_crystal_green", Util.CRYSTAL_GREEN_RARITY); // TOOLS & ARMOR
itemAxeCrystalGreen = new ItemAxeAA(InitToolMaterials.toolMaterialCrystalGreen, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.EMERALD.ordinal()), "item_axe_crystal_green", Util.CRYSTAL_GREEN_RARITY); public static final RegistryObject<Item> itemHelmQuartz = ITEMS.register("item_helm_quartz", () -> new ItemArmorAA(ArmorMaterials.QUARTZ, 0));
itemShovelCrystalGreen = new ItemShovelAA(InitToolMaterials.toolMaterialCrystalGreen, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.EMERALD.ordinal()), "item_shovel_crystal_green", Util.CRYSTAL_GREEN_RARITY); public static final RegistryObject<Item> itemChestQuartz = ITEMS.register("item_chest_quartz", () -> new ItemArmorAA(ArmorMaterials.QUARTZ, 1));
itemSwordCrystalGreen = new ItemSwordAA(InitToolMaterials.toolMaterialCrystalGreen, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.EMERALD.ordinal()), "item_sword_crystal_green", Util.CRYSTAL_GREEN_RARITY); public static final RegistryObject<Item> itemPantsQuartz = ITEMS.register("item_pants_quartz", () -> new ItemArmorAA(ArmorMaterials.QUARTZ, 2));
itemHoeCrystalGreen = new ItemHoeAA(InitToolMaterials.toolMaterialCrystalGreen, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.EMERALD.ordinal()), "item_hoe_crystal_green", Util.CRYSTAL_GREEN_RARITY); public static final RegistryObject<Item> itemBootsQuartz = ITEMS.register("item_boots_quartz", () -> new ItemArmorAA(ArmorMaterials.QUARTZ, 3));
itemHelmCrystalGreen = new ItemArmorAA("item_helm_crystal_green", InitArmorMaterials.armorMaterialCrystalGreen, 0, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.EMERALD.ordinal()), Util.CRYSTAL_GREEN_RARITY);
itemChestCrystalGreen = new ItemArmorAA("item_chest_crystal_green", InitArmorMaterials.armorMaterialCrystalGreen, 1, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.EMERALD.ordinal()), Util.CRYSTAL_GREEN_RARITY);
itemPantsCrystalGreen = new ItemArmorAA("item_pants_crystal_green", InitArmorMaterials.armorMaterialCrystalGreen, 2, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.EMERALD.ordinal()), Util.CRYSTAL_GREEN_RARITY);
itemBootsCrystalGreen = new ItemArmorAA("item_boots_crystal_green", InitArmorMaterials.armorMaterialCrystalGreen, 3, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.EMERALD.ordinal()), Util.CRYSTAL_GREEN_RARITY);
itemPaxelCrystalGreen = new ItemAllToolAA(InitToolMaterials.toolMaterialCrystalGreen, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.EMERALD.ordinal()), "item_paxel_crystal_green", Util.CRYSTAL_GREEN_RARITY, 46848);
itemPickaxeCrystalWhite = new ItemPickaxeAA(InitToolMaterials.toolMaterialCrystalWhite, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), "item_pickaxe_crystal_white", Util.CRYSTAL_WHITE_RARITY); public static final RegistryObject<Item> itemPickaxeQuartz = ITEMS.register("item_pickaxe_quartz", () -> new ItemPickaxeAA(ToolMaterials.QUARTZ));
itemAxeCrystalWhite = new ItemAxeAA(InitToolMaterials.toolMaterialCrystalWhite, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), "item_axe_crystal_white", Util.CRYSTAL_WHITE_RARITY); public static final RegistryObject<Item> itemAxeQuartz = ITEMS.register("item_axe_quartz", () -> new ItemAxeAA(ToolMaterials.QUARTZ));
itemShovelCrystalWhite = new ItemShovelAA(InitToolMaterials.toolMaterialCrystalWhite, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), "item_shovel_crystal_white", Util.CRYSTAL_WHITE_RARITY); public static final RegistryObject<Item> itemShovelQuartz = ITEMS.register("item_shovel_quartz", () -> new ItemShovelAA(ToolMaterials.QUARTZ));
itemSwordCrystalWhite = new ItemSwordAA(InitToolMaterials.toolMaterialCrystalWhite, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), "item_sword_crystal_white", Util.CRYSTAL_WHITE_RARITY); public static final RegistryObject<Item> itemSwordQuartz = ITEMS.register("item_sword_quartz", () -> new ItemSwordAA(ToolMaterials.QUARTZ));
itemHoeCrystalWhite = new ItemHoeAA(InitToolMaterials.toolMaterialCrystalWhite, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), "item_hoe_crystal_white", Util.CRYSTAL_WHITE_RARITY); public static final RegistryObject<Item> itemHoeQuartz = ITEMS.register("item_hoe_quartz", () -> new ItemHoeAA(ToolMaterials.QUARTZ));
itemHelmCrystalWhite = new ItemArmorAA("item_helm_crystal_white", InitArmorMaterials.armorMaterialCrystalWhite, 0, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), Util.CRYSTAL_WHITE_RARITY); public static final RegistryObject<Item> woodenPaxel = ITEMS.register("wooden_paxel", () -> new ItemAllToolAA(ItemTier.WOOD));
itemChestCrystalWhite = new ItemArmorAA("item_chest_crystal_white", InitArmorMaterials.armorMaterialCrystalWhite, 1, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), Util.CRYSTAL_WHITE_RARITY); public static final RegistryObject<Item> stonePaxel = ITEMS.register("stone_paxel", () -> new ItemAllToolAA(ItemTier.STONE));
itemPantsCrystalWhite = new ItemArmorAA("item_pants_crystal_white", InitArmorMaterials.armorMaterialCrystalWhite, 2, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), Util.CRYSTAL_WHITE_RARITY); public static final RegistryObject<Item> ironPaxel = ITEMS.register("iron_paxel", () -> new ItemAllToolAA(ItemTier.IRON));
itemBootsCrystalWhite = new ItemArmorAA("item_boots_crystal_white", InitArmorMaterials.armorMaterialCrystalWhite, 3, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), Util.CRYSTAL_WHITE_RARITY); public static final RegistryObject<Item> goldPaxel = ITEMS.register("gold_paxel", () -> new ItemAllToolAA(ItemTier.GOLD));
itemPaxelCrystalWhite = new ItemAllToolAA(InitToolMaterials.toolMaterialCrystalWhite, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), "item_paxel_crystal_white", Util.CRYSTAL_WHITE_RARITY, 14606302); public static final RegistryObject<Item> diamondPaxel = ITEMS.register("diamond_paxel", () -> new ItemAllToolAA(ItemTier.DIAMOND));
public static final RegistryObject<Item> quartzPaxel = ITEMS.register("quartz_paxel", () -> new ItemAllToolAA(ToolMaterials.QUARTZ));
public static final RegistryObject<Item> itemPickaxeCrystalRed = ITEMS.register("item_pickaxe_crystal_restonia", () -> new ItemPickaxeAA(ToolMaterials.RESTONIA));
public static final RegistryObject<Item> itemAxeCrystalRed = ITEMS.register("item_axe_crystal_restonia", () -> new ItemAxeAA(ToolMaterials.RESTONIA));
public static final RegistryObject<Item> itemShovelCrystalRed = ITEMS.register("item_shovel_crystal_restonia", () -> new ItemShovelAA(ToolMaterials.RESTONIA));
public static final RegistryObject<Item> itemSwordCrystalRed = ITEMS.register("item_sword_crystal_restonia", () -> new ItemSwordAA(ToolMaterials.RESTONIA));
public static final RegistryObject<Item> itemHoeCrystalRed = ITEMS.register("item_hoe_crystal_restonia", () -> new ItemHoeAA(ToolMaterials.RESTONIA));
public static final RegistryObject<Item> itemHelmCrystalRed = ITEMS.register("item_helm_crystal_red", () -> new ItemArmorAA(ArmorMaterials.RESTONIA, 0));
public static final RegistryObject<Item> itemChestCrystalRed = ITEMS.register("item_chest_crystal_red", () -> new ItemArmorAA(ArmorMaterials.RESTONIA, 1));
public static final RegistryObject<Item> itemPantsCrystalRed = ITEMS.register("item_pants_crystal_red", () -> new ItemArmorAA(ArmorMaterials.RESTONIA, 2));
public static final RegistryObject<Item> itemBootsCrystalRed = ITEMS.register("item_boots_crystal_red", () -> new ItemArmorAA(ArmorMaterials.RESTONIA, 3));
public static final RegistryObject<Item> itemPaxelCrystalRed = ITEMS.register("item_paxel_crystal_red", () -> new ItemAllToolAA(ToolMaterials.RESTONIA));
public static final RegistryObject<Item> itemPickaxeCrystalBlue = ITEMS.register("item_pickaxe_crystal_blue", () -> new ItemPickaxeAA(ToolMaterials.PALIS));
public static final RegistryObject<Item> itemAxeCrystalBlue = ITEMS.register("item_axe_crystal_blue", () -> new ItemAxeAA(ToolMaterials.PALIS));
public static final RegistryObject<Item> itemShovelCrystalBlue = ITEMS.register("item_shovel_crystal_blue", () -> new ItemShovelAA(ToolMaterials.PALIS));
public static final RegistryObject<Item> itemSwordCrystalBlue = ITEMS.register("item_sword_crystal_blue", () -> new ItemSwordAA(ToolMaterials.PALIS));
public static final RegistryObject<Item> itemHoeCrystalBlue = ITEMS.register("item_hoe_crystal_blue", () -> new ItemHoeAA(ToolMaterials.PALIS));
public static final RegistryObject<Item> itemHelmCrystalBlue = ITEMS.register("item_helm_crystal_blue", () -> new ItemArmorAA(ArmorMaterials.PALIS, 0));
public static final RegistryObject<Item> itemChestCrystalBlue = ITEMS.register("item_chest_crystal_blue", () -> new ItemArmorAA(ArmorMaterials.PALIS, 1));
public static final RegistryObject<Item> itemPantsCrystalBlue = ITEMS.register("item_pants_crystal_blue", () -> new ItemArmorAA(ArmorMaterials.PALIS, 2));
public static final RegistryObject<Item> itemBootsCrystalBlue = ITEMS.register("item_boots_crystal_blue", () -> new ItemArmorAA(ArmorMaterials.PALIS, 3));
public static final RegistryObject<Item> itemPaxelCrystalBlue = ITEMS.register("item_paxel_crystal_blue", () -> new ItemAllToolAA(ToolMaterials.PALIS));
public static final RegistryObject<Item> itemPickaxeCrystalLightBlue = ITEMS.register("item_pickaxe_crystal_light_blue", () -> new ItemPickaxeAA(ToolMaterials.DIAMATINE));
public static final RegistryObject<Item> itemAxeCrystalLightBlue = ITEMS.register("item_axe_crystal_light_blue", () -> new ItemAxeAA(ToolMaterials.DIAMATINE));
public static final RegistryObject<Item> itemShovelCrystalLightBlue = ITEMS.register("item_shovel_crystal_light_blue", () -> new ItemShovelAA(ToolMaterials.DIAMATINE));
public static final RegistryObject<Item> itemSwordCrystalLightBlue = ITEMS.register("item_sword_crystal_light_blue", () -> new ItemSwordAA(ToolMaterials.DIAMATINE));
public static final RegistryObject<Item> itemHoeCrystalLightBlue = ITEMS.register("item_hoe_crystal_light_blue", () -> new ItemHoeAA(ToolMaterials.DIAMATINE));
public static final RegistryObject<Item> itemHelmCrystalLightBlue = ITEMS.register("item_helm_crystal_light_blue", () -> new ItemArmorAA(ArmorMaterials.DIAMATINE, 0));
public static final RegistryObject<Item> itemChestCrystalLightBlue = ITEMS.register("item_chest_crystal_light_blue", () -> new ItemArmorAA(ArmorMaterials.DIAMATINE, 1));
public static final RegistryObject<Item> itemPantsCrystalLightBlue = ITEMS.register("item_pants_crystal_light_blue", () -> new ItemArmorAA(ArmorMaterials.DIAMATINE, 2));
public static final RegistryObject<Item> itemBootsCrystalLightBlue = ITEMS.register("item_boots_crystal_light_blue", () -> new ItemArmorAA(ArmorMaterials.DIAMATINE, 3));
public static final RegistryObject<Item> itemPaxelCrystalLightBlue = ITEMS.register("item_paxel_crystal_light_blue", () -> new ItemAllToolAA(ToolMaterials.DIAMATINE));
public static final RegistryObject<Item> itemPickaxeCrystalBlack = ITEMS.register("item_pickaxe_crystal_black", () -> new ItemPickaxeAA(ToolMaterials.VOID));
public static final RegistryObject<Item> itemAxeCrystalBlack = ITEMS.register("item_axe_crystal_black", () -> new ItemAxeAA(ToolMaterials.VOID));
public static final RegistryObject<Item> itemShovelCrystalBlack = ITEMS.register("item_shovel_crystal_black", () -> new ItemShovelAA(ToolMaterials.VOID));
public static final RegistryObject<Item> itemSwordCrystalBlack = ITEMS.register("item_sword_crystal_black", () -> new ItemSwordAA(ToolMaterials.VOID));
public static final RegistryObject<Item> itemHoeCrystalBlack = ITEMS.register("item_hoe_crystal_black", () -> new ItemHoeAA(ToolMaterials.VOID));
public static final RegistryObject<Item> itemHelmCrystalBlack = ITEMS.register("item_helm_crystal_black", () -> new ItemArmorAA(ArmorMaterials.VOID, 0));
public static final RegistryObject<Item> itemChestCrystalBlack = ITEMS.register("item_chest_crystal_black", () -> new ItemArmorAA(ArmorMaterials.VOID, 1));
public static final RegistryObject<Item> itemPantsCrystalBlack = ITEMS.register("item_pants_crystal_black", () -> new ItemArmorAA(ArmorMaterials.VOID, 2));
public static final RegistryObject<Item> itemBootsCrystalBlack = ITEMS.register("item_boots_crystal_black", () -> new ItemArmorAA(ArmorMaterials.VOID, 3));
public static final RegistryObject<Item> itemPaxelCrystalBlack = ITEMS.register("item_paxel_crystal_black", () -> new ItemAllToolAA(ToolMaterials.VOID));
public static final RegistryObject<Item> itemPickaxeCrystalGreen = ITEMS.register("item_pickaxe_crystal_green", () -> new ItemPickaxeAA(ToolMaterials.EMERADIC));
public static final RegistryObject<Item> itemAxeCrystalGreen = ITEMS.register("item_axe_crystal_green", () -> new ItemAxeAA(ToolMaterials.EMERADIC));
public static final RegistryObject<Item> itemShovelCrystalGreen = ITEMS.register("item_shovel_crystal_green", () -> new ItemShovelAA(ToolMaterials.EMERADIC));
public static final RegistryObject<Item> itemSwordCrystalGreen = ITEMS.register("item_sword_crystal_green", () -> new ItemSwordAA(ToolMaterials.EMERADIC));
public static final RegistryObject<Item> itemHoeCrystalGreen = ITEMS.register("item_hoe_crystal_green", () -> new ItemHoeAA(ToolMaterials.EMERADIC));
public static final RegistryObject<Item> itemHelmCrystalGreen = ITEMS.register("item_helm_crystal_green", () -> new ItemArmorAA(ArmorMaterials.DIAMATINE, 0));
public static final RegistryObject<Item> itemChestCrystalGreen = ITEMS.register("item_chest_crystal_green", () -> new ItemArmorAA(ArmorMaterials.DIAMATINE, 1));
public static final RegistryObject<Item> itemPantsCrystalGreen = ITEMS.register("item_pants_crystal_green", () -> new ItemArmorAA(ArmorMaterials.DIAMATINE, 2));
public static final RegistryObject<Item> itemBootsCrystalGreen = ITEMS.register("item_boots_crystal_green", () -> new ItemArmorAA(ArmorMaterials.DIAMATINE, 3));
public static final RegistryObject<Item> itemPaxelCrystalGreen = ITEMS.register("item_paxel_crystal_green", () -> new ItemAllToolAA(ToolMaterials.EMERADIC));
public static final RegistryObject<Item> itemPickaxeCrystalWhite = ITEMS.register("item_pickaxe_crystal_white", () -> new ItemPickaxeAA(ToolMaterials.ENORI));
public static final RegistryObject<Item> itemAxeCrystalWhite = ITEMS.register("item_axe_crystal_white", () -> new ItemAxeAA(ToolMaterials.ENORI));
public static final RegistryObject<Item> itemShovelCrystalWhite = ITEMS.register("item_shovel_crystal_white", () -> new ItemShovelAA(ToolMaterials.ENORI));
public static final RegistryObject<Item> itemSwordCrystalWhite = ITEMS.register("item_sword_crystal_white", () -> new ItemSwordAA(ToolMaterials.ENORI));
public static final RegistryObject<Item> itemHoeCrystalWhite = ITEMS.register("item_hoe_crystal_white", () -> new ItemHoeAA(ToolMaterials.ENORI));
public static final RegistryObject<Item> itemHelmCrystalWhite = ITEMS.register("item_helm_crystal_white", () -> new ItemArmorAA(ArmorMaterials.ENORI, 0));
public static final RegistryObject<Item> itemChestCrystalWhite = ITEMS.register("item_chest_crystal_white", () -> new ItemArmorAA(ArmorMaterials.ENORI, 1));
public static final RegistryObject<Item> itemPantsCrystalWhite = ITEMS.register("item_pants_crystal_white", () -> new ItemArmorAA(ArmorMaterials.ENORI, 2));
public static final RegistryObject<Item> itemBootsCrystalWhite = ITEMS.register("item_boots_crystal_white", () -> new ItemArmorAA(ArmorMaterials.ENORI, 3));
public static final RegistryObject<Item> itemPaxelCrystalWhite = ITEMS.register("item_paxel_crystal_white", () -> new ItemAllToolAA(ToolMaterials.ENORI));
public static Item.Properties defaultProps() {
return new Item.Properties().group(ActuallyAdditions.GROUP);
} }
} }

View file

@ -16,12 +16,14 @@ import de.ellpeck.actuallyadditions.mod.config.values.ConfigStringListValues;
import de.ellpeck.actuallyadditions.mod.items.base.ItemToolAA; import de.ellpeck.actuallyadditions.mod.items.base.ItemToolAA;
import de.ellpeck.actuallyadditions.mod.util.IColorProvidingItem; import de.ellpeck.actuallyadditions.mod.util.IColorProvidingItem;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.color.IItemColor; import net.minecraft.client.renderer.color.IItemColor;
import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.Enchantment;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.init.Blocks; import net.minecraft.init.Blocks;
import net.minecraft.init.Items; import net.minecraft.init.Items;
import net.minecraft.item.IItemTier;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.Direction; import net.minecraft.util.Direction;
import net.minecraft.util.EnumActionResult; import net.minecraft.util.EnumActionResult;
@ -29,7 +31,7 @@ import net.minecraft.util.Hand;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.IRarity; import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.fml.relauncher.OnlyIn; import net.minecraftforge.fml.relauncher.OnlyIn;
import java.util.HashSet; import java.util.HashSet;
@ -39,17 +41,9 @@ public class ItemAllToolAA extends ItemToolAA implements IColorProvidingItem {
public final int color; public final int color;
public ItemAllToolAA(ToolMaterial toolMat, String repairItem, String unlocalizedName, IRarity rarity, int color) { public ItemAllToolAA(IItemTier toolMat) {
super(4.0F, -2F, toolMat, repairItem, unlocalizedName, rarity, new HashSet<>()); super(4.0F, -2F, toolMat, this.repairItem, unlocalizedName, this.rarity, new HashSet<>());
this.color = color; this.color = this.color;
this.setMaxDamage(toolMat.getMaxUses() * 4);
this.setHarvestLevels(toolMat.getHarvestLevel());
}
public ItemAllToolAA(ToolMaterial toolMat, ItemStack repairItem, String unlocalizedName, IRarity rarity, int color) {
super(4.0F, -2F, toolMat, repairItem, unlocalizedName, rarity, new HashSet<>());
this.color = color;
this.setMaxDamage(toolMat.getMaxUses() * 4); this.setMaxDamage(toolMat.getMaxUses() * 4);
this.setHarvestLevels(toolMat.getHarvestLevel()); this.setHarvestLevels(toolMat.getHarvestLevel());

View file

@ -13,11 +13,11 @@ package de.ellpeck.actuallyadditions.mod.items;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;
import de.ellpeck.actuallyadditions.mod.items.base.ItemToolAA; import de.ellpeck.actuallyadditions.mod.items.base.ItemToolAA;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.init.Blocks; import net.minecraft.init.Blocks;
import net.minecraft.item.Item; import net.minecraft.item.IItemTier;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraftforge.common.IRarity;
import java.util.Collections; import java.util.Collections;
import java.util.Set; import java.util.Set;
@ -26,13 +26,8 @@ public class ItemAxeAA extends ItemToolAA {
private static final Set<Block> EFFECTIVE_ON = Sets.newHashSet(Blocks.PLANKS, Blocks.BOOKSHELF, Blocks.LOG, Blocks.LOG2, Blocks.CHEST, Blocks.PUMPKIN, Blocks.LIT_PUMPKIN, Blocks.MELON_BLOCK, Blocks.LADDER, Blocks.WOODEN_BUTTON, Blocks.WOODEN_PRESSURE_PLATE); private static final Set<Block> EFFECTIVE_ON = Sets.newHashSet(Blocks.PLANKS, Blocks.BOOKSHELF, Blocks.LOG, Blocks.LOG2, Blocks.CHEST, Blocks.PUMPKIN, Blocks.LIT_PUMPKIN, Blocks.MELON_BLOCK, Blocks.LADDER, Blocks.WOODEN_BUTTON, Blocks.WOODEN_PRESSURE_PLATE);
public ItemAxeAA(Item.ToolMaterial material, String repairItem, String unlocalizedName, IRarity rarity) { public ItemAxeAA(IItemTier material) {
super(6.0F, -3.0F, material, repairItem, unlocalizedName, rarity, EFFECTIVE_ON); super(6.0F, -3.0F, material, this.repairItem, unlocalizedName, this.rarity, EFFECTIVE_ON);
this.setHarvestLevel("axe", material.getHarvestLevel());
}
public ItemAxeAA(Item.ToolMaterial material, ItemStack repairItem, String unlocalizedName, IRarity rarity) {
super(6.0F, -3.0F, material, repairItem, unlocalizedName, rarity, EFFECTIVE_ON);
this.setHarvestLevel("axe", material.getHarvestLevel()); this.setHarvestLevel("axe", material.getHarvestLevel());
} }

View file

@ -10,6 +10,7 @@
package de.ellpeck.actuallyadditions.mod.items; package de.ellpeck.actuallyadditions.mod.items;
import com.mojang.blaze3d.matrix.MatrixStack;
import de.ellpeck.actuallyadditions.api.booklet.IBookletPage; import de.ellpeck.actuallyadditions.api.booklet.IBookletPage;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.blocks.IHudDisplay; import de.ellpeck.actuallyadditions.mod.blocks.IHudDisplay;
@ -20,6 +21,7 @@ import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.client.MainWindow; import net.minecraft.client.MainWindow;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.util.ITooltipFlag; import net.minecraft.client.util.ITooltipFlag;
@ -34,6 +36,7 @@ import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.RayTraceResult; import net.minecraft.util.math.RayTraceResult;
import net.minecraft.util.text.TextFormatting; import net.minecraft.util.text.TextFormatting;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.fml.relauncher.OnlyIn; import net.minecraftforge.fml.relauncher.OnlyIn;
import javax.annotation.Nullable; import javax.annotation.Nullable;
@ -98,11 +101,11 @@ public class ItemBooklet extends ItemBase implements IHudDisplay {
@Override @Override
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)
public void displayHud(Minecraft minecraft, PlayerEntity player, ItemStack stack, RayTraceResult posHit, MainWindow resolution) { public void displayHud(MatrixStack matrices, Minecraft minecraft, PlayerEntity player, ItemStack stack, RayTraceResult rayCast, MainWindow resolution) {
if (posHit != null && posHit.getBlockPos() != null) { if (rayCast != null && rayCast.getBlockPos() != null) {
BlockState state = minecraft.world.getBlockState(posHit.getBlockPos()); BlockState state = minecraft.world.getBlockState(rayCast.getBlockPos());
Block block = state.getBlock(); Block block = state.getBlock();
if (block != null && !block.isAir(minecraft.world.getBlockState(posHit.getBlockPos()), minecraft.world, posHit.getBlockPos())) { if (block != null && !block.isAir(minecraft.world.getBlockState(rayCast.getBlockPos()), minecraft.world, rayCast.getBlockPos())) {
ItemStack blockStack = new ItemStack(block, 1, block.getMetaFromState(state)); ItemStack blockStack = new ItemStack(block, 1, block.getMetaFromState(state));
int height = resolution.getScaledHeight() / 5 * 3; int height = resolution.getScaledHeight() / 5 * 3;
if (player.isSneaking()) { if (player.isSneaking()) {

View file

@ -95,7 +95,7 @@ public class ItemDrill extends ItemEnergy {
ItemStack upgrade = this.getHasUpgradeAsStack(stack, ItemDrillUpgrade.UpgradeType.PLACER); ItemStack upgrade = this.getHasUpgradeAsStack(stack, ItemDrillUpgrade.UpgradeType.PLACER);
if (StackUtil.isValid(upgrade)) { if (StackUtil.isValid(upgrade)) {
int slot = ItemDrillUpgrade.getSlotToPlaceFrom(upgrade); int slot = ItemDrillUpgrade.getSlotToPlaceFrom(upgrade);
if (slot >= 0 && slot < InventoryPlayer.getHotbarSize()) { if (slot >= 0 && slot < PlayerInventory.getHotbarSize()) {
ItemStack equip = player.inventory.getStackInSlot(slot); ItemStack equip = player.inventory.getStackInSlot(slot);
if (StackUtil.isValid(equip) && equip != stack) { if (StackUtil.isValid(equip) && equip != stack) {
ItemStack toPlaceStack = equip.copy(); ItemStack toPlaceStack = equip.copy();

View file

@ -11,18 +11,9 @@
package de.ellpeck.actuallyadditions.mod.items; package de.ellpeck.actuallyadditions.mod.items;
import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack;
public class ItemGeneric extends ItemBase { public class ItemGeneric extends ItemBase {
public ItemGeneric(Properties props) {
public ItemGeneric(String name) { super(props.maxDamage(0));
super(name);
this.setMaxDamage(0);
}
@Override
public EnumRarity getRarity(ItemStack stack) {
return EnumRarity.UNCOMMON;
} }
} }

View file

@ -13,11 +13,11 @@ package de.ellpeck.actuallyadditions.mod.items;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;
import de.ellpeck.actuallyadditions.mod.items.base.ItemToolAA; import de.ellpeck.actuallyadditions.mod.items.base.ItemToolAA;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.init.Blocks; import net.minecraft.item.IItemTier;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraftforge.common.IRarity;
import java.util.Collections; import java.util.Collections;
import java.util.Set; import java.util.Set;
@ -26,13 +26,8 @@ public class ItemPickaxeAA extends ItemToolAA {
private static final Set<Block> EFFECTIVE_ON = Sets.newHashSet(Blocks.ACTIVATOR_RAIL, Blocks.COAL_ORE, Blocks.COBBLESTONE, Blocks.DETECTOR_RAIL, Blocks.DIAMOND_BLOCK, Blocks.DIAMOND_ORE, Blocks.DOUBLE_STONE_SLAB, Blocks.GOLDEN_RAIL, Blocks.GOLD_BLOCK, Blocks.GOLD_ORE, Blocks.ICE, Blocks.IRON_BLOCK, Blocks.IRON_ORE, Blocks.LAPIS_BLOCK, Blocks.LAPIS_ORE, Blocks.LIT_REDSTONE_ORE, Blocks.MOSSY_COBBLESTONE, Blocks.NETHERRACK, Blocks.PACKED_ICE, Blocks.RAIL, Blocks.REDSTONE_ORE, Blocks.SANDSTONE, Blocks.RED_SANDSTONE, Blocks.STONE, Blocks.STONE_SLAB, Blocks.STONE_BUTTON, Blocks.STONE_PRESSURE_PLATE); private static final Set<Block> EFFECTIVE_ON = Sets.newHashSet(Blocks.ACTIVATOR_RAIL, Blocks.COAL_ORE, Blocks.COBBLESTONE, Blocks.DETECTOR_RAIL, Blocks.DIAMOND_BLOCK, Blocks.DIAMOND_ORE, Blocks.DOUBLE_STONE_SLAB, Blocks.GOLDEN_RAIL, Blocks.GOLD_BLOCK, Blocks.GOLD_ORE, Blocks.ICE, Blocks.IRON_BLOCK, Blocks.IRON_ORE, Blocks.LAPIS_BLOCK, Blocks.LAPIS_ORE, Blocks.LIT_REDSTONE_ORE, Blocks.MOSSY_COBBLESTONE, Blocks.NETHERRACK, Blocks.PACKED_ICE, Blocks.RAIL, Blocks.REDSTONE_ORE, Blocks.SANDSTONE, Blocks.RED_SANDSTONE, Blocks.STONE, Blocks.STONE_SLAB, Blocks.STONE_BUTTON, Blocks.STONE_PRESSURE_PLATE);
public ItemPickaxeAA(Item.ToolMaterial material, String repairItem, String unlocalizedName, IRarity rarity) { public ItemPickaxeAA(IItemTier material) {
super(1.0F, -2.8F, material, repairItem, unlocalizedName, rarity, EFFECTIVE_ON); super(1.0F, -2.8F, material, this.repairItem, unlocalizedName, this.rarity, EFFECTIVE_ON);
this.setHarvestLevel("pickaxe", material.getHarvestLevel());
}
public ItemPickaxeAA(Item.ToolMaterial material, ItemStack repairItem, String unlocalizedName, IRarity rarity) {
super(1.0F, -2.8F, material, repairItem, unlocalizedName, rarity, EFFECTIVE_ON);
this.setHarvestLevel("pickaxe", material.getHarvestLevel()); this.setHarvestLevel("pickaxe", material.getHarvestLevel());
} }

View file

@ -13,17 +13,17 @@ package de.ellpeck.actuallyadditions.mod.items;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;
import de.ellpeck.actuallyadditions.mod.items.base.ItemToolAA; import de.ellpeck.actuallyadditions.mod.items.base.ItemToolAA;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.init.Blocks; import net.minecraft.init.Blocks;
import net.minecraft.init.Items; import net.minecraft.init.Items;
import net.minecraft.item.Item; import net.minecraft.item.IItemTier;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.Direction; import net.minecraft.util.Direction;
import net.minecraft.util.EnumActionResult; import net.minecraft.util.EnumActionResult;
import net.minecraft.util.Hand; import net.minecraft.util.Hand;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.IRarity;
import java.util.Collections; import java.util.Collections;
import java.util.Set; import java.util.Set;
@ -32,13 +32,8 @@ public class ItemShovelAA extends ItemToolAA {
private static final Set<Block> EFFECTIVE_ON = Sets.newHashSet(Blocks.CLAY, Blocks.DIRT, Blocks.FARMLAND, Blocks.GRASS, Blocks.GRAVEL, Blocks.MYCELIUM, Blocks.SAND, Blocks.SNOW, Blocks.SNOW_LAYER, Blocks.SOUL_SAND, Blocks.GRASS_PATH); private static final Set<Block> EFFECTIVE_ON = Sets.newHashSet(Blocks.CLAY, Blocks.DIRT, Blocks.FARMLAND, Blocks.GRASS, Blocks.GRAVEL, Blocks.MYCELIUM, Blocks.SAND, Blocks.SNOW, Blocks.SNOW_LAYER, Blocks.SOUL_SAND, Blocks.GRASS_PATH);
public ItemShovelAA(Item.ToolMaterial material, String repairItem, String unlocalizedName, IRarity rarity) { public ItemShovelAA(IItemTier material) {
super(1.5F, -3.0F, material, repairItem, unlocalizedName, rarity, EFFECTIVE_ON); super(1.5F, -3.0F, material, this.repairItem, unlocalizedName, this.rarity, EFFECTIVE_ON);
this.setHarvestLevel("shovel", material.getHarvestLevel());
}
public ItemShovelAA(Item.ToolMaterial material, ItemStack repairItem, String unlocalizedName, IRarity rarity) {
super(1.5F, -3.0F, material, repairItem, unlocalizedName, rarity, EFFECTIVE_ON);
this.setHarvestLevel("shovel", material.getHarvestLevel()); this.setHarvestLevel("shovel", material.getHarvestLevel());
} }

View file

@ -17,29 +17,27 @@ import de.ellpeck.actuallyadditions.mod.inventory.ContainerEnergizer;
import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.item.EnumRarity; import net.minecraft.item.ArmorItem;
import net.minecraft.item.ItemArmor; import net.minecraft.item.IArmorMaterial;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraftforge.common.IRarity; import net.minecraftforge.common.IRarity;
public class ItemArmorAA extends ItemArmor implements IDisableableItem { public class ItemArmorAA extends ArmorItem implements IDisableableItem {
private final ItemStack repairItem; private final ItemStack repairItem;
private final String name; private final String name;
private final IRarity rarity; private final IRarity rarity;
private final boolean disabled; private final boolean disabled;
public ItemArmorAA(String name, ArmorMaterial material, int type, ItemStack repairItem) { public ItemArmorAA(IArmorMaterial material, int type) {
this(name, material, type, repairItem, EnumRarity.RARE);
}
public ItemArmorAA(String name, ArmorMaterial material, int type, ItemStack repairItem, IRarity rarity) {
super(material, 0, ContainerEnergizer.VALID_EQUIPMENT_SLOTS[type]); super(material, 0, ContainerEnergizer.VALID_EQUIPMENT_SLOTS[type]);
this.repairItem = repairItem; this.repairItem = this.repairItem;
this.name = name; this.name = this.name;
this.rarity = rarity; this.rarity = this.rarity;
this.disabled = ConfigurationHandler.config.getBoolean("Disable: " + StringUtil.badTranslate(name), "Tool Control", false, "This will disable the " + StringUtil.badTranslate(name) + ". It will not be registered."); this.disabled = ConfigurationHandler.config.getBoolean("Disable: " + StringUtil.badTranslate(this.name), "Tool Control", false, "This will disable the " + StringUtil.badTranslate(this.name) + ". It will not be registered.");
if (!this.disabled) this.register(); if (!this.disabled) {
this.register();
}
} }
private void register() { private void register() {

View file

@ -10,36 +10,15 @@
package de.ellpeck.actuallyadditions.mod.items.base; package de.ellpeck.actuallyadditions.mod.items.base;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.items.InitItems;
import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
public class ItemBase extends Item { public class ItemBase extends Item {
public ItemBase(Properties props) {
private final String name; super(props);
public ItemBase(String name) {
this.name = name;
this.register();
} }
private void register() { public ItemBase() {
ItemUtil.registerItem(this, this.getBaseName(), this.shouldAddCreative()); super(InitItems.defaultProps());
this.registerRendering();
}
protected String getBaseName() {
return this.name;
}
public boolean shouldAddCreative() {
return true;
}
protected void registerRendering() {
ActuallyAdditions.PROXY.addRenderRegister(new ItemStack(this), this.getRegistryName(), "inventory");
} }
} }

View file

@ -15,27 +15,29 @@ import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.config.ConfigurationHandler; import de.ellpeck.actuallyadditions.mod.config.ConfigurationHandler;
import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.item.Item; import net.minecraft.item.HoeItem;
import net.minecraft.item.ItemHoe; import net.minecraft.item.IItemTier;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraftforge.common.IRarity; import net.minecraftforge.common.IRarity;
public class ItemHoeAA extends ItemHoe implements IDisableableItem { public class ItemHoeAA extends HoeItem implements IDisableableItem {
private final String name; private final String name;
private final IRarity rarity; private final IRarity rarity;
private final ItemStack repairItem; private final ItemStack repairItem;
private final boolean disabled; private final boolean disabled;
public ItemHoeAA(Item.ToolMaterial toolMat, ItemStack repairItem, String unlocalizedName, IRarity rarity) { public ItemHoeAA(IItemTier toolMat) {
super(toolMat); super(toolMat);
this.repairItem = repairItem; this.repairItem = this.repairItem;
this.name = unlocalizedName; this.name = unlocalizedName;
this.rarity = rarity; this.rarity = this.rarity;
this.disabled = ConfigurationHandler.config.getBoolean("Disable: " + StringUtil.badTranslate(this.name), "Tool Control", false, "This will disable the " + StringUtil.badTranslate(this.name) + ". It will not be registered."); this.disabled = ConfigurationHandler.config.getBoolean("Disable: " + StringUtil.badTranslate(this.name), "Tool Control", false, "This will disable the " + StringUtil.badTranslate(this.name) + ". It will not be registered.");
if (!this.disabled) this.register(); if (!this.disabled) {
this.register();
}
} }
private void register() { private void register() {

View file

@ -16,26 +16,29 @@ import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase;
import de.ellpeck.actuallyadditions.mod.config.ConfigurationHandler; import de.ellpeck.actuallyadditions.mod.config.ConfigurationHandler;
import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.item.IItemTier;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemSword; import net.minecraft.item.SwordItem;
import net.minecraftforge.common.IRarity; import net.minecraftforge.common.IRarity;
public class ItemSwordAA extends ItemSword implements IDisableableItem { public class ItemSwordAA extends SwordItem implements IDisableableItem {
private final String name; private final String name;
private final IRarity rarity; private final IRarity rarity;
private final ItemStack repairItem; private final ItemStack repairItem;
private final boolean disabled; private final boolean disabled;
public ItemSwordAA(ToolMaterial toolMat, ItemStack repairItem, String unlocalizedName, IRarity rarity) { public ItemSwordAA(IItemTier toolMat) {
super(toolMat); super(toolMat);
this.repairItem = repairItem; this.repairItem = this.repairItem;
this.name = unlocalizedName; this.name = unlocalizedName;
this.rarity = rarity; this.rarity = this.rarity;
this.disabled = ConfigurationHandler.config.getBoolean("Disable: " + StringUtil.badTranslate(this.name), "Tool Control", false, "This will disable the " + StringUtil.badTranslate(this.name) + ". It will not be registered."); this.disabled = ConfigurationHandler.config.getBoolean("Disable: " + StringUtil.badTranslate(this.name), "Tool Control", false, "This will disable the " + StringUtil.badTranslate(this.name) + ". It will not be registered.");
if (!this.disabled) this.register(); if (!this.disabled) {
this.register();
}
} }
private void register() { private void register() {

View file

@ -10,8 +10,6 @@
package de.ellpeck.actuallyadditions.mod.items.base; package de.ellpeck.actuallyadditions.mod.items.base;
import java.util.Set;
import de.ellpeck.actuallyadditions.api.misc.IDisableableItem; import de.ellpeck.actuallyadditions.api.misc.IDisableableItem;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.config.ConfigurationHandler; import de.ellpeck.actuallyadditions.mod.config.ConfigurationHandler;
@ -20,11 +18,13 @@ import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemTool; import net.minecraft.item.ToolItem;
import net.minecraftforge.common.IRarity; import net.minecraftforge.common.IRarity;
import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.OreDictionary;
public class ItemToolAA extends ItemTool implements IDisableableItem { import java.util.Set;
public class ItemToolAA extends ToolItem implements IDisableableItem {
private final String name; private final String name;
private final IRarity rarity; private final IRarity rarity;
@ -44,7 +44,9 @@ public class ItemToolAA extends ItemTool implements IDisableableItem {
this.name = unlocalizedName; this.name = unlocalizedName;
this.rarity = rarity; this.rarity = rarity;
this.disabled = ConfigurationHandler.config.getBoolean("Disable: " + StringUtil.badTranslate(unlocalizedName), "Tool Control", false, "This will disable the " + StringUtil.badTranslate(unlocalizedName) + ". It will not be registered."); this.disabled = ConfigurationHandler.config.getBoolean("Disable: " + StringUtil.badTranslate(unlocalizedName), "Tool Control", false, "This will disable the " + StringUtil.badTranslate(unlocalizedName) + ". It will not be registered.");
if (!this.disabled) this.register(); if (!this.disabled) {
this.register();
}
} }
private void register() { private void register() {
@ -77,7 +79,9 @@ public class ItemToolAA extends ItemTool implements IDisableableItem {
} else if (this.repairOredict != null) { } else if (this.repairOredict != null) {
int[] idsStack = OreDictionary.getOreIDs(stack); int[] idsStack = OreDictionary.getOreIDs(stack);
for (int id : idsStack) { for (int id : idsStack) {
if (OreDictionary.getOreName(id).equals(this.repairOredict)) { return true; } if (OreDictionary.getOreName(id).equals(this.repairOredict)) {
return true;
}
} }
} }
return false; return false;

View file

@ -10,160 +10,134 @@
package de.ellpeck.actuallyadditions.mod.items.lens; package de.ellpeck.actuallyadditions.mod.items.lens;
import java.util.ArrayList; // TODO: [port] ADD BACK WITH DATA GENS
import java.util.List;
import javax.annotation.Nullable;
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
import de.ellpeck.actuallyadditions.api.lens.Lens;
import de.ellpeck.actuallyadditions.api.recipe.ColorLensChangerByDyeMeta;
import de.ellpeck.actuallyadditions.api.recipe.IColorLensChanger;
import de.ellpeck.actuallyadditions.api.recipe.LensConversionRecipe;
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues;
import de.ellpeck.actuallyadditions.mod.items.InitItems;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheCrystals;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems;
import de.ellpeck.actuallyadditions.mod.recipe.ColorLensRotator;
import de.ellpeck.actuallyadditions.mod.recipe.EnchBookConversion;
import de.ellpeck.actuallyadditions.mod.util.RecipeUtil;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.Ingredient;
import net.minecraft.util.NonNullList;
import net.minecraftforge.oredict.OreDictionary;
public final class LensRecipeHandler { public final class LensRecipeHandler {
//
public static final ArrayList<LensConversionRecipe> MAIN_PAGE_RECIPES = new ArrayList<>(); // public static final ArrayList<LensConversionRecipe> MAIN_PAGE_RECIPES = new ArrayList<>();
public static LensConversionRecipe recipeColorLens; // public static LensConversionRecipe recipeColorLens;
public static LensConversionRecipe recipeSoulSand; // public static LensConversionRecipe recipeSoulSand;
public static LensConversionRecipe recipeGreenWall; // public static LensConversionRecipe recipeGreenWall;
public static LensConversionRecipe recipeWhiteWall; // public static LensConversionRecipe recipeWhiteWall;
public static LensConversionRecipe recipeExplosionLens; // public static LensConversionRecipe recipeExplosionLens;
public static LensConversionRecipe recipeDamageLens; // public static LensConversionRecipe recipeDamageLens;
public static LensConversionRecipe recipeLeather; // public static LensConversionRecipe recipeLeather;
public static LensConversionRecipe recipeNetherWart; // public static LensConversionRecipe recipeNetherWart;
public static LensConversionRecipe recipePrismarine; // public static LensConversionRecipe recipePrismarine;
public static LensConversionRecipe recipeCrystallizedCanolaSeed; // public static LensConversionRecipe recipeCrystallizedCanolaSeed;
public static LensConversionRecipe recipeItemLaser; // public static LensConversionRecipe recipeItemLaser;
public static LensConversionRecipe recipeFluidLaser; // public static LensConversionRecipe recipeFluidLaser;
public static EnchBookConversion recipeEnchBook; // public static EnchBookConversion recipeEnchBook;
//
public static void init() { public static void init() {
//Crystal Blocks // //Crystal Blocks
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(fromBlock(Blocks.REDSTONE_BLOCK), new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.REDSTONE.ordinal()), 400); // ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(fromBlock(Blocks.REDSTONE_BLOCK), new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.REDSTONE.ordinal()), 400);
MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe()); // MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe());
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(fromBlock(Blocks.LAPIS_BLOCK), new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.LAPIS.ordinal()), 400); // ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(fromBlock(Blocks.LAPIS_BLOCK), new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.LAPIS.ordinal()), 400);
MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe()); // MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe());
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(fromBlock(Blocks.DIAMOND_BLOCK), new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.DIAMOND.ordinal()), 600); // ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(fromBlock(Blocks.DIAMOND_BLOCK), new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.DIAMOND.ordinal()), 600);
MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe()); // MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe());
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(fromBlock(Blocks.EMERALD_BLOCK), new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.EMERALD.ordinal()), 1000); // ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(fromBlock(Blocks.EMERALD_BLOCK), new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.EMERALD.ordinal()), 1000);
MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe()); // MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe());
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(fromBlock(Blocks.COAL_BLOCK), new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.COAL.ordinal()), 600); // ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(fromBlock(Blocks.COAL_BLOCK), new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.COAL.ordinal()), 600);
MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe()); // MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe());
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(fromBlock(Blocks.IRON_BLOCK), new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.IRON.ordinal()), 800); // ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(fromBlock(Blocks.IRON_BLOCK), new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.IRON.ordinal()), 800);
MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe()); // MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe());
//
//Crystal Items // //Crystal Items
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromItems(Items.REDSTONE), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), 40); // ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromItems(Items.REDSTONE), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), 40);
MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe()); // MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe());
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromStacks(new ItemStack(Items.DYE, 1, 4)), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.LAPIS.ordinal()), 40); // ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromStacks(new ItemStack(Items.DYE, 1, 4)), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.LAPIS.ordinal()), 40);
MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe()); // MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe());
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromItems(Items.DIAMOND), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), 60); // ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromItems(Items.DIAMOND), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), 60);
MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe()); // MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe());
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromItems(Items.EMERALD), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.EMERALD.ordinal()), 100); // ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromItems(Items.EMERALD), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.EMERALD.ordinal()), 100);
MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe()); // MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe());
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromItems(Items.COAL), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()), 60); // ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromItems(Items.COAL), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()), 60);
MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe()); // MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe());
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromItems(Items.IRON_INGOT), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), 80); // ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromItems(Items.IRON_INGOT), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), 80);
MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe()); // MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe());
//
//Lenses // //Lenses
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromStacks(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.LENS.ordinal())), new ItemStack(InitItems.itemColorLens), 5000); // ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromStacks(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.LENS.ordinal())), new ItemStack(InitItems.itemColorLens), 5000);
recipeColorLens = RecipeUtil.lastReconstructorRecipe(); // recipeColorLens = RecipeUtil.lastReconstructorRecipe();
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromItems(InitItems.itemColorLens), new ItemStack(InitItems.itemExplosionLens), 5000); // ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromItems(InitItems.itemColorLens), new ItemStack(InitItems.itemExplosionLens), 5000);
recipeExplosionLens = RecipeUtil.lastReconstructorRecipe(); // recipeExplosionLens = RecipeUtil.lastReconstructorRecipe();
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromItems(InitItems.itemExplosionLens), new ItemStack(InitItems.itemDamageLens), 5000); // ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromItems(InitItems.itemExplosionLens), new ItemStack(InitItems.itemDamageLens), 5000);
recipeDamageLens = RecipeUtil.lastReconstructorRecipe(); // recipeDamageLens = RecipeUtil.lastReconstructorRecipe();
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromItems(InitItems.itemDamageLens), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.LENS.ordinal()), 5000); // ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromItems(InitItems.itemDamageLens), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.LENS.ordinal()), 5000);
//
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(fromBlock(InitBlocks.blockLaserRelay), new ItemStack(InitBlocks.blockLaserRelayFluids), 2000); // ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(fromBlock(InitBlocks.blockLaserRelay), new ItemStack(InitBlocks.blockLaserRelayFluids), 2000);
recipeFluidLaser = RecipeUtil.lastReconstructorRecipe(); // recipeFluidLaser = RecipeUtil.lastReconstructorRecipe();
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(fromBlock(InitBlocks.blockLaserRelayFluids), new ItemStack(InitBlocks.blockLaserRelayItem), 2000); // ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(fromBlock(InitBlocks.blockLaserRelayFluids), new ItemStack(InitBlocks.blockLaserRelayItem), 2000);
recipeItemLaser = RecipeUtil.lastReconstructorRecipe(); // recipeItemLaser = RecipeUtil.lastReconstructorRecipe();
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(fromBlock(InitBlocks.blockLaserRelayItem), new ItemStack(InitBlocks.blockLaserRelay), 2000); // ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(fromBlock(InitBlocks.blockLaserRelayItem), new ItemStack(InitBlocks.blockLaserRelay), 2000);
//
//Misc // //Misc
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(fromBlock(Blocks.SAND), new ItemStack(Blocks.SOUL_SAND), 20000); // ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(fromBlock(Blocks.SAND), new ItemStack(Blocks.SOUL_SAND), 20000);
recipeSoulSand = RecipeUtil.lastReconstructorRecipe(); // recipeSoulSand = RecipeUtil.lastReconstructorRecipe();
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromItems(Items.ROTTEN_FLESH), new ItemStack(Items.LEATHER), 8000); // ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromItems(Items.ROTTEN_FLESH), new ItemStack(Items.LEATHER), 8000);
recipeLeather = RecipeUtil.lastReconstructorRecipe(); // recipeLeather = RecipeUtil.lastReconstructorRecipe();
//
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(fromBlock(Blocks.RED_MUSHROOM), new ItemStack(Items.NETHER_WART), 150000); // ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(fromBlock(Blocks.RED_MUSHROOM), new ItemStack(Items.NETHER_WART), 150000);
recipeNetherWart = RecipeUtil.lastReconstructorRecipe(); // recipeNetherWart = RecipeUtil.lastReconstructorRecipe();
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromItems(Items.QUARTZ), new ItemStack(Items.PRISMARINE_SHARD), 30000); // ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromItems(Items.QUARTZ), new ItemStack(Items.PRISMARINE_SHARD), 30000);
recipePrismarine = RecipeUtil.lastReconstructorRecipe(); // recipePrismarine = RecipeUtil.lastReconstructorRecipe();
//
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromItems(InitItems.itemCanolaSeed), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CRYSTALLIZED_CANOLA_SEED.ordinal()), 2000); // ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromItems(InitItems.itemCanolaSeed), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CRYSTALLIZED_CANOLA_SEED.ordinal()), 2000);
recipeCrystallizedCanolaSeed = RecipeUtil.lastReconstructorRecipe(); // recipeCrystallizedCanolaSeed = RecipeUtil.lastReconstructorRecipe();
//
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(fromBlock(Blocks.QUARTZ_BLOCK), new ItemStack(InitBlocks.blockTestifiBucksWhiteWall), 10); // ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(fromBlock(Blocks.QUARTZ_BLOCK), new ItemStack(InitBlocks.blockTestifiBucksWhiteWall), 10);
recipeWhiteWall = RecipeUtil.lastReconstructorRecipe(); // recipeWhiteWall = RecipeUtil.lastReconstructorRecipe();
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromStacks(new ItemStack(Blocks.QUARTZ_BLOCK, 1, 1)), new ItemStack(InitBlocks.blockTestifiBucksGreenWall), 10); // ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromStacks(new ItemStack(Blocks.QUARTZ_BLOCK, 1, 1)), new ItemStack(InitBlocks.blockTestifiBucksGreenWall), 10);
recipeGreenWall = RecipeUtil.lastReconstructorRecipe(); // recipeGreenWall = RecipeUtil.lastReconstructorRecipe();
//
ActuallyAdditionsAPI.RECONSTRUCTOR_LENS_CONVERSION_RECIPES.add(recipeEnchBook = new EnchBookConversion()); // ActuallyAdditionsAPI.RECONSTRUCTOR_LENS_CONVERSION_RECIPES.add(recipeEnchBook = new EnchBookConversion());
//
IColorLensChanger changer = new ColorLensChangerByDyeMeta(); // IColorLensChanger changer = new ColorLensChangerByDyeMeta();
if (ConfigBoolValues.COLOR_LENS_USES_OREDICT.isEnabled()) { // if (ConfigBoolValues.COLOR_LENS_USES_OREDICT.isEnabled()) {
initOredictDyeRotator(); // initOredictDyeRotator();
} else { // } else {
ActuallyAdditionsAPI.addReconstructorLensColorChangeItem(Items.DYE, changer); // ActuallyAdditionsAPI.addReconstructorLensColorChangeItem(Items.DYE, changer);
} // }
ActuallyAdditionsAPI.addReconstructorLensColorChangeItem(Item.getItemFromBlock(Blocks.WOOL), changer); // ActuallyAdditionsAPI.addReconstructorLensColorChangeItem(Item.getItemFromBlock(Blocks.WOOL), changer);
ActuallyAdditionsAPI.addReconstructorLensColorChangeItem(Item.getItemFromBlock(Blocks.STAINED_GLASS), changer); // ActuallyAdditionsAPI.addReconstructorLensColorChangeItem(Item.getItemFromBlock(Blocks.STAINED_GLASS), changer);
ActuallyAdditionsAPI.addReconstructorLensColorChangeItem(Item.getItemFromBlock(Blocks.STAINED_GLASS_PANE), changer); // ActuallyAdditionsAPI.addReconstructorLensColorChangeItem(Item.getItemFromBlock(Blocks.STAINED_GLASS_PANE), changer);
ActuallyAdditionsAPI.addReconstructorLensColorChangeItem(Item.getItemFromBlock(Blocks.STAINED_HARDENED_CLAY), changer); // ActuallyAdditionsAPI.addReconstructorLensColorChangeItem(Item.getItemFromBlock(Blocks.STAINED_HARDENED_CLAY), changer);
ActuallyAdditionsAPI.addReconstructorLensColorChangeItem(Item.getItemFromBlock(Blocks.CARPET), changer); // ActuallyAdditionsAPI.addReconstructorLensColorChangeItem(Item.getItemFromBlock(Blocks.CARPET), changer);
ActuallyAdditionsAPI.addReconstructorLensColorChangeItem(Item.getItemFromBlock(InitBlocks.blockColoredLamp), changer); // ActuallyAdditionsAPI.addReconstructorLensColorChangeItem(Item.getItemFromBlock(InitBlocks.blockColoredLamp), changer);
ActuallyAdditionsAPI.addReconstructorLensColorChangeItem(Item.getItemFromBlock(InitBlocks.blockColoredLampOn), changer); // ActuallyAdditionsAPI.addReconstructorLensColorChangeItem(Item.getItemFromBlock(InitBlocks.blockColoredLampOn), changer);
}
@Deprecated //Use lens-checking method below.
public static List<LensConversionRecipe> getRecipesFor(ItemStack input) {
List<LensConversionRecipe> possibleRecipes = new ArrayList<>();
for (LensConversionRecipe recipe : ActuallyAdditionsAPI.RECONSTRUCTOR_LENS_CONVERSION_RECIPES)
if (recipe.getInput().apply(input)) possibleRecipes.add(recipe);
return possibleRecipes;
}
@Nullable
public static LensConversionRecipe findMatchingRecipe(ItemStack input, Lens lens) {
for (LensConversionRecipe recipe : ActuallyAdditionsAPI.RECONSTRUCTOR_LENS_CONVERSION_RECIPES)
if (recipe.matches(input, lens)) return recipe;
return null;
}
private static Ingredient fromBlock(Block b) {
return Ingredient.fromItems(Item.getItemFromBlock(b));
}
private static void initOredictDyeRotator() {
List<ItemStack> stacks = NonNullList.withSize(16, ItemStack.EMPTY);
List<ItemStack> dyeItems = new ArrayList<>();
String[] dyes = { "White", "Orange", "Magenta", "LightBlue", "Yellow", "Lime", "Pink", "Gray", "LightGray", "Cyan", "Purple", "Blue", "Brown", "Green", "Red", "Black" };
for (int i = 0; i < dyes.length; i++) {
List<ItemStack> ores = OreDictionary.getOres("dye" + dyes[i]);
dyeItems.addAll(ores);
stacks.set(i, ores.get(ores.size() - 1));
}
ColorLensRotator rotator = new ColorLensRotator(stacks);
for (ItemStack s : dyeItems)
ActuallyAdditionsAPI.addReconstructorLensColorChangeItem(s.getItem(), rotator);
} }
//
// @Deprecated //Use lens-checking method below.
// public static List<LensConversionRecipe> getRecipesFor(ItemStack input) {
// List<LensConversionRecipe> possibleRecipes = new ArrayList<>();
// for (LensConversionRecipe recipe : ActuallyAdditionsAPI.RECONSTRUCTOR_LENS_CONVERSION_RECIPES)
// if (recipe.getInput().apply(input)) possibleRecipes.add(recipe);
// return possibleRecipes;
// }
//
// @Nullable
// public static LensConversionRecipe findMatchingRecipe(ItemStack input, Lens lens) {
// for (LensConversionRecipe recipe : ActuallyAdditionsAPI.RECONSTRUCTOR_LENS_CONVERSION_RECIPES)
// if (recipe.matches(input, lens)) return recipe;
// return null;
// }
//
// private static Ingredient fromBlock(Block b) {
// return Ingredient.fromItems(Item.getItemFromBlock(b));
// }
//
// private static void initOredictDyeRotator() {
// List<ItemStack> stacks = NonNullList.withSize(16, ItemStack.EMPTY);
// List<ItemStack> dyeItems = new ArrayList<>();
// String[] dyes = { "White", "Orange", "Magenta", "LightBlue", "Yellow", "Lime", "Pink", "Gray", "LightGray", "Cyan", "Purple", "Blue", "Brown", "Green", "Red", "Black" };
// for (int i = 0; i < dyes.length; i++) {
// List<ItemStack> ores = OreDictionary.getOres("dye" + dyes[i]);
// dyeItems.addAll(ores);
// stacks.set(i, ores.get(ores.size() - 1));
// }
// ColorLensRotator rotator = new ColorLensRotator(stacks);
// for (ItemStack s : dyeItems)
// ActuallyAdditionsAPI.addReconstructorLensColorChangeItem(s.getItem(), rotator);
// }
} }

View file

@ -14,6 +14,7 @@ import de.ellpeck.actuallyadditions.mod.util.Util;
import net.minecraft.util.IStringSerializable; import net.minecraft.util.IStringSerializable;
import net.minecraftforge.common.IRarity; import net.minecraftforge.common.IRarity;
@Deprecated
public enum TheCrystals implements IStringSerializable { public enum TheCrystals implements IStringSerializable {
REDSTONE("red", Util.CRYSTAL_RED_RARITY, 0xFF2F21, 158F / 255F, 43F / 255F, 39F / 255F), REDSTONE("red", Util.CRYSTAL_RED_RARITY, 0xFF2F21, 158F / 255F, 43F / 255F, 39F / 255F),

Some files were not shown because too many files have changed in this diff Show more