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;
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.config.ConfigurationHandler;
import de.ellpeck.actuallyadditions.mod.crafting.CrusherCrafting;
import de.ellpeck.actuallyadditions.mod.data.WorldData;
import de.ellpeck.actuallyadditions.mod.entity.InitEntities;
import de.ellpeck.actuallyadditions.mod.event.CommonEvents;
import de.ellpeck.actuallyadditions.mod.fluids.InitFluids;
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.items.InitItems;
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.MethodHandler;
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.HairyBallHandler;
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.util.compat.CompatUtil;
import net.minecraft.item.ItemGroup;
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.fluids.FluidRegistry;
import net.minecraftforge.fml.common.FMLCommonHandler;
import net.minecraftforge.fml.common.Loader;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.Mod.Instance;
import net.minecraftforge.fml.common.SidedProxy;
import net.minecraftforge.fml.common.event.*;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
import net.minecraftforge.fml.event.server.FMLServerStartedEvent;
import net.minecraftforge.fml.event.server.FMLServerStoppedEvent;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
import org.apache.logging.log4j.LogManager;
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 static final String MODID = ActuallyAdditionsAPI.MOD_ID;
@Deprecated
public static final String NAME = "Actually Additions";
@Deprecated
public static final String VERSION = "@VERSION@";
@Deprecated
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 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) {
@Override
@ -74,70 +74,52 @@ public class ActuallyAdditions {
}
};
@Instance
@Deprecated
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);
static {
FluidRegistry.enableUniversalBucket();
}
// TODO: [port] eval
// static {
// FluidRegistry.enableUniversalBucket();
// }
public static boolean commonCapsLoaded;
@EventHandler
public void preInit(FMLPreInitializationEvent event) {
ActuallyAdditions.LOGGER.info("Starting PreInitialization Phase...");
public ActuallyAdditions() {
IEventBus eventBus = FMLJavaModLoadingContext.get().getModEventBus();
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.connectionHandler = new LaserRelayConnectionHandler();
Lenses.init();
InitBooklet.preInit();
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();
InitArmorMaterials.init();
InitFluids.init();
new UpdateChecker();
PROXY.preInit(event);
ActuallyAdditions.LOGGER.info("PreInitialization Finished.");
}
@EventHandler
public void init(FMLInitializationEvent event) {
ActuallyAdditions.LOGGER.info("Starting Initialization Phase...");
BannerHelper.init();
//InitAchievements.init();
GuiHandler.init();
InitEntities.init(); // todo: [port] replace
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();
CrusherCrafting.init();
HairyBallHandler.init();
@ -145,28 +127,26 @@ public class ActuallyAdditions {
LensRecipeHandler.init();
EmpowererHandler.init();
LensMining.init();
InitBooklet.postInit();
PROXY.postInit(event);
ConfigurationHandler.redefineConfigs();
ActuallyAdditions.LOGGER.info("PostInitialization Finished.");
InitBooklet.init();
}
private void clientSetup(FMLClientSetupEvent event) {
ActuallyAdditionsClient.setup();
}
@EventHandler
public void serverStarted(FMLServerStartedEvent event) {
MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance();
if (server != null) {
World world = server.getEntityWorld();
if (world != null && !world.isRemote) {
WorldData.get(world, true).markDirty();
}
}
// TODO: [port] check if this is needed
// if (event.getServer() != null) {
// World world = event.getServer().getWorld(OVERWORLD);
// if (world != null && !world.isRemote) {
// WorldData.get(world, true).markDirty();
// }
// }
}
@EventHandler
public void serverStopped(FMLServerStoppedEvent event) {
// TODO: [port] check if this is needed
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;
import de.ellpeck.actuallyadditions.mod.blocks.render.ActualCompostModel;
import de.ellpeck.actuallyadditions.mod.blocks.render.CompostModel;
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.client.renderer.model.ModelResourceLocation;
import net.minecraft.fluid.Fluid;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.event.ModelBakeEvent;
import net.minecraftforge.client.event.ModelRegistryEvent;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import java.util.HashMap;
import java.util.Map;
/**
* TODO: [port] eval all of this class
*/
public class ClientRegistryHandler {
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!)
*/
private static void registerCustomFluidBlockRenderer(Fluid fluid) {
Block block = fluid.getBlock();
Item item = Item.getItemFromBlock(block);
FluidStateMapper mapper = new FluidStateMapper(fluid);
ModelBakery.registerItemVariants(item);
ModelLoader.setCustomMeshDefinition(item, mapper);
ModelLoader.setCustomStateMapper(block, mapper);
// Block block = fluid.getBlock();
// Item item = Item.getItemFromBlock(block);
// FluidStateMapper mapper = new FluidStateMapper(fluid);
// ModelBakery.registerItemVariants(item);
// ModelLoader.setCustomMeshDefinition(item, mapper);
// ModelLoader.setCustomStateMapper(block, mapper);
}
@SubscribeEvent
public void onModelRegistry(ModelRegistryEvent event) {
for (Block block : RegistryHandler.BLOCKS_TO_REGISTER) {
if (block instanceof IHasModel) {
((IHasModel) block).registerRendering();
}
}
for (Map.Entry<ItemStack, ModelResourceLocation> entry : MODEL_LOCATIONS_FOR_REGISTERING.entrySet()) {
ModelLoader.setCustomModelResourceLocation(entry.getKey().getItem(), entry.getKey().getItemDamage(), entry.getValue());
}
registerCustomFluidBlockRenderer(InitFluids.fluidCanolaOil);
registerCustomFluidBlockRenderer(InitFluids.fluidRefinedCanolaOil);
registerCustomFluidBlockRenderer(InitFluids.fluidCrystalOil);
registerCustomFluidBlockRenderer(InitFluids.fluidEmpoweredOil);
// for (Block block : RegistryHandler.BLOCKS_TO_REGISTER) {
// if (block instanceof IHasModel) {
// ((IHasModel) block).registerRendering();
// }
// }
//
// for (Map.Entry<ItemStack, ModelResourceLocation> entry : MODEL_LOCATIONS_FOR_REGISTERING.entrySet()) {
// ModelLoader.setCustomModelResourceLocation(entry.getKey().getItem(), entry.getKey().getItemDamage(), entry.getValue());
// }
//
// registerCustomFluidBlockRenderer(InitFluids.fluidCanolaOil);
// registerCustomFluidBlockRenderer(InitFluids.fluidRefinedCanolaOil);
// registerCustomFluidBlockRenderer(InitFluids.fluidCrystalOil);
// registerCustomFluidBlockRenderer(InitFluids.fluidEmpoweredOil);
}
@SubscribeEvent
public void onModelBake(ModelBakeEvent e) {
ModelResourceLocation mrl = new ModelResourceLocation(new ResourceLocation(ActuallyAdditions.MODID, "block_compost"), "normal");
CompostModel.compostBase = e.getModelRegistry().getObject(mrl);
e.getModelRegistry().putObject(mrl, new ActualCompostModel());
// ModelResourceLocation mrl = new ModelResourceLocation(new ResourceLocation(ActuallyAdditions.MODID, "block_compost"), "normal");
// CompostModel.compostBase = e.getModelRegistry().getObject(mrl);
// e.getModelRegistry().putObject(mrl, new ActualCompostModel());
}
}

View file

@ -1,78 +1,79 @@
package de.ellpeck.actuallyadditions.mod;
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.crafting.InitCrafting;
import de.ellpeck.actuallyadditions.mod.gen.village.InitVillager;
import de.ellpeck.actuallyadditions.mod.items.InitItems;
import de.ellpeck.actuallyadditions.mod.misc.SoundHandler;
import de.ellpeck.actuallyadditions.mod.ore.InitOreDict;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.util.SoundEvent;
import net.minecraftforge.event.RegistryEvent.Register;
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 {
public static final List<Block> BLOCKS_TO_REGISTER = new ArrayList<>();
public static final List<Item> ITEMS_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) {
InitBlocks.init();
for (Block block : BLOCKS_TO_REGISTER) {
event.getRegistry().register(block);
}
}
@SubscribeEvent
public void onItemRegistry(Register<Item> event) {
InitItems.init();
for (Item item : ITEMS_TO_REGISTER) {
event.getRegistry().register(item);
}
ITEMS_TO_REGISTER.clear();
//Hack to make this register before recipes :>
InitOreDict.init();
}
@SubscribeEvent
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);
}
@SubscribeEvent
public void onCraftingRegistry(Register<IRecipe> event) {
InitCrafting.init();
for (IRecipe recipe : RECIPES_TO_REGISTER) {
event.getRegistry().register(recipe);
}
RECIPES_TO_REGISTER.clear();
}
@SubscribeEvent
public void onSoundRegistry(Register<SoundEvent> event) {
SoundHandler.init();
for (SoundEvent sound : SOUNDS_TO_REGISTER) {
event.getRegistry().register(sound);
}
SOUNDS_TO_REGISTER.clear();
}
}
// TODO: [port] remove all of this
//package de.ellpeck.actuallyadditions.mod;
//
//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.crafting.InitCrafting;
//import de.ellpeck.actuallyadditions.mod.gen.village.InitVillager;
//import de.ellpeck.actuallyadditions.mod.items.InitItems;
//import de.ellpeck.actuallyadditions.mod.misc.SoundHandler;
//import de.ellpeck.actuallyadditions.mod.ore.InitOreDict;
//import net.minecraft.block.Block;
//import net.minecraft.item.Item;
//import net.minecraft.item.crafting.IRecipe;
//import net.minecraft.util.SoundEvent;
//import net.minecraftforge.event.RegistryEvent.Register;
//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 {
//
// public static final List<Block> BLOCKS_TO_REGISTER = new ArrayList<>();
// public static final List<Item> ITEMS_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) {
// InitBlocks.init();
//
// for (Block block : BLOCKS_TO_REGISTER) {
// event.getRegistry().register(block);
// }
// }
//
// @SubscribeEvent
// public void onItemRegistry(Register<Item> event) {
// InitItems.init();
//
// for (Item item : ITEMS_TO_REGISTER) {
// event.getRegistry().register(item);
// }
// ITEMS_TO_REGISTER.clear();
//
// //Hack to make this register before recipes :>
// InitOreDict.init();
// }
//
// @SubscribeEvent
// 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);
// }
//
// @SubscribeEvent
// public void onCraftingRegistry(Register<IRecipe> event) {
// InitCrafting.init();
//
// for (IRecipe recipe : RECIPES_TO_REGISTER) {
// event.getRegistry().register(recipe);
// }
// RECIPES_TO_REGISTER.clear();
// }
//
// @SubscribeEvent
// public void onSoundRegistry(Register<SoundEvent> event) {
// SoundHandler.init();
//
// for (SoundEvent sound : SOUNDS_TO_REGISTER) {
// event.getRegistry().register(sound);
// }
// SOUNDS_TO_REGISTER.clear();
// }
//}

View file

@ -10,12 +10,13 @@
package de.ellpeck.actuallyadditions.mod.blocks;
import com.mojang.blaze3d.matrix.MatrixStack;
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.config.values.ConfigIntValues;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityAtomicReconstructor;
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.StringUtil;
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.MathHelper;
import net.minecraft.util.math.RayTraceResult;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
@ -116,19 +118,23 @@ public class BlockAtomicReconstructor extends BlockContainerBase implements IHud
@Override
@OnlyIn(Dist.CLIENT)
public void displayHud(Minecraft minecraft, PlayerEntity player, ItemStack stack, RayTraceResult posHit, MainWindow resolution) {
TileEntity tile = minecraft.world.getTileEntity(posHit.getBlockPos());
public void displayHud(MatrixStack matrices, Minecraft minecraft, PlayerEntity player, ItemStack stack, RayTraceResult rayCast, MainWindow resolution) {
if (!(rayCast instanceof BlockRayTraceResult) || minecraft.world == null) {
return;
}
TileEntity tile = minecraft.world.getTileEntity(((BlockRayTraceResult) rayCast).getPos());
if (tile instanceof TileEntityAtomicReconstructor) {
ItemStack slot = ((TileEntityAtomicReconstructor) tile).inv.getStackInSlot(0);
String strg;
ITextComponent strg;
if (!StackUtil.isValid(slot)) {
strg = StringUtil.localize("info." + ActuallyAdditions.MODID + ".noLens");
strg = Help.Trans("info", "nolens");
} else {
strg = slot.getItem().getItemStackDisplayName(slot);
strg = slot.getItem().getDisplayName(slot);
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.inventory.GuiHandler;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBioReactor;
import net.minecraft.block.BlockState;
import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack;
import net.minecraft.entity.player.ServerPlayerEntity;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Direction;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.Hand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import net.minecraftforge.common.ToolType;
import net.minecraftforge.fml.network.NetworkHooks;
public class BlockBioReactor extends BlockContainerBase {
public BlockBioReactor() {
super(Material.ROCK, this.name);
this.setHarvestLevel("pickaxe", 0);
this.setHardness(2.0F);
this.setResistance(10.0F);
this.setSoundType(SoundType.STONE);
super(Properties.create(Material.ROCK).harvestTool(ToolType.PICKAXE).hardnessAndResistance(2.0F, 10.0F).sound(SoundType.STONE));
}
@Override
public TileEntity createNewTileEntity(World worldIn, int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileEntityBioReactor();
}
@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.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());
}
}
return true;
}
@Override
public EnumRarity getRarity(ItemStack stack) {
return EnumRarity.EPIC;
}
}

View file

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

View file

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

View file

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

View file

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

View file

@ -10,6 +10,7 @@
package de.ellpeck.actuallyadditions.mod.blocks;
import com.mojang.blaze3d.matrix.MatrixStack;
import de.ellpeck.actuallyadditions.api.tile.IPhantomTile;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
@ -121,14 +122,14 @@ public class BlockPhantom extends BlockContainerBase implements IHudDisplay {
@Override
@OnlyIn(Dist.CLIENT)
public void displayHud(Minecraft minecraft, PlayerEntity player, ItemStack stack, RayTraceResult posHit, MainWindow resolution) {
TileEntity tile = minecraft.world.getTileEntity(posHit.getBlockPos());
public void displayHud(MatrixStack matrices, Minecraft minecraft, PlayerEntity player, ItemStack stack, RayTraceResult rayCast, MainWindow resolution) {
TileEntity tile = minecraft.world.getTileEntity(rayCast.getBlockPos());
if (tile != null) {
if (tile instanceof IPhantomTile) {
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);
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());
Block block = state.getBlock();
Item item = Item.getItemFromBlock(block);

View file

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

View file

@ -10,6 +10,7 @@
package de.ellpeck.actuallyadditions.mod.blocks;
import com.mojang.blaze3d.matrix.MatrixStack;
import net.minecraft.client.MainWindow;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.PlayerEntity;
@ -21,6 +22,6 @@ import net.minecraftforge.api.distmarker.OnlyIn;
public interface IHudDisplay {
@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;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.platform.GlStateManager;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityDisplayStand;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.item.ItemBlock;
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.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.fml.relauncher.OnlyIn;
@OnlyIn(Dist.CLIENT)
public class RenderDisplayStand extends TileEntitySpecialRenderer<TileEntityDisplayStand> {
public class RenderDisplayStand extends TileEntityRenderer<TileEntityDisplayStand> {
public RenderDisplayStand(TileEntityRendererDispatcher rendererDispatcherIn) {
super(rendererDispatcherIn);
}
@Override
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();
}
}
@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;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.platform.GlStateManager;
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
import de.ellpeck.actuallyadditions.api.recipe.EmpowererRecipe;
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.StackUtil;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.item.ItemBlock;
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.util.Direction;
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 TileEntitySpecialRenderer<TileEntityEmpowerer> {
public class RenderEmpowerer extends TileEntityRenderer<TileEntityEmpowerer> {
@Override
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;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.platform.GlStateManager;
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
import de.ellpeck.actuallyadditions.api.laser.IConnectionPair;
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 io.netty.util.internal.ConcurrentSet;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GlStateManager;
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.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
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 TileEntitySpecialRenderer<TileEntityLaserRelay> {
public class RenderLaserRelay extends TileEntityRenderer<TileEntityLaserRelay> {
private static final float[] COLOR = new float[]{1F, 0F, 0F};
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
public boolean isGlobalRenderer(TileEntityLaserRelay tile) {
return true;

View file

@ -10,18 +10,28 @@
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.mod.tile.TileEntityAtomicReconstructor;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.block.BlockState;
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.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.fml.relauncher.OnlyIn;
@OnlyIn(Dist.CLIENT)
public class RenderReconstructorLens extends TileEntitySpecialRenderer<TileEntityAtomicReconstructor> {
public class RenderReconstructorLens extends TileEntityRenderer<TileEntityAtomicReconstructor> {
public RenderReconstructorLens(TileEntityRendererDispatcher rendererDispatcherIn) {
super(rendererDispatcherIn);
}
@Override
public void render(TileEntityAtomicReconstructor tileEntityIn, float partialTicks, MatrixStack matrixStackIn, IRenderTypeBuffer bufferIn, int combinedLightIn, int combinedOverlayIn) {
}
@Override
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.lens.LensDisenchanting;
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.TheMiscItems;
import de.ellpeck.actuallyadditions.mod.recipe.EmpowererHandler;
@ -61,7 +60,7 @@ public final class InitBooklet {
public static BookletChapter[] chaptersIntroduction = new BookletChapter[11];
public static void preInit() {
public static void init() {
ActuallyAdditionsAPI.entryAllAndSearch = new BookletEntryAllItems("allAndSearch").setImportant();
ActuallyAdditionsAPI.entryTrials = new BookletEntryTrials("trials");
@ -75,9 +74,7 @@ public final class InitBooklet {
ActuallyAdditionsAPI.entryItemsRF = new BookletEntry("itemsRF");
ActuallyAdditionsAPI.entryMisc = new BookletEntry("misc");
ActuallyAdditionsAPI.entryUpdatesAndInfos = new BookletEntry("updatesAndInfos").setSpecial();
}
public static void postInit() {
initChapters();
int chapCount = 0;
@ -129,9 +126,9 @@ public final class InitBooklet {
private static void initChapters() {
//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[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();
new BookletChapter("intro", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitItems.itemBooklet), new PageTextOnly(1), new PageTextOnly(2), new PageTextOnly(3));
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.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.get()), new PageTextOnly(1), new PageTextOnly(2), new PageTextOnly(3));
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()));
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_CRYSTAL_BLOCKS).setNoText());
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();
//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("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("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("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<>();
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());
}
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("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("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.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("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("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();
//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("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("lensDeath", ActuallyAdditionsAPI.entryReconstruction, new ItemStack(InitItems.itemDamageLens), 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("lensDetonation", ActuallyAdditionsAPI.entryReconstruction, new ItemStack(InitItems.itemExplosionLens), 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("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("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.get()), new PageTextOnly(1), new PageReconstructor(2, LensRecipeHandler.recipeDamageLens).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.get()), new PageTextOnly(1), new PageReconstructor(2, LensRecipeHandler.recipeExplosionLens).setNoText());
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.get()), new PageTextOnly(1).addTextReplacement("<energy>", ConfigIntValues.MINING_LENS_USE.getValue()), new PageCrafting(2, ItemCrafting.recipeMiningLens).setNoText()).setImportant();
//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("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("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("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("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("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.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
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("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("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("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("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("rangedCollector", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockRangedCollector.get()), new PageTextOnly(1).addTextReplacement("<range>", TileEntityRangedCollector.RANGE), new PageCrafting(2, BlockCrafting.recipeRangedCollector).setNoText());
//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("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 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.add(new PageTextOnly(1).addTextReplacement("<rf>", TileEntityGrinder.ENERGY_USE));
@ -249,56 +246,56 @@ public final class InitBooklet {
//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("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("bioReactor", ActuallyAdditionsAPI.entryGeneratingRF, new ItemStack(InitBlocks.blockBioReactor.get()), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeBioReactor).setNoText()).setSpecial();
//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();
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("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("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("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("playerProbe", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(InitItems.itemPlayerProbe), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipePlayerProbe).setNoText()).setSpecial();
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.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.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.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.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.get()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipePlayerProbe).setNoText()).setSpecial();
ArrayList<BookletPage> aiotPages = new ArrayList<>();
aiotPages.add(new PageTextOnly(aiotPages.size() + 1));
for (IRecipe recipe : ToolCrafting.RECIPES_PAXELS) {
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<>();
potionRingPages.add(new PageTextOnly(potionRingPages.size() + 1));
for (IRecipe recipe : ItemCrafting.RECIPES_POTION_RINGS) {
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("spawnerChanger", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(InitItems.itemSpawnerChanger), 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("potionRings", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(InitItems.itemPotionRing.get()), potionRingPages.toArray(new BookletPage[potionRingPages.size()]));
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.get()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeFilter).setNoText()).setImportant();
//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("fillingWand", ActuallyAdditionsAPI.entryItemsRF, new ItemStack(InitItems.itemFillingWand), 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("magnetRing", ActuallyAdditionsAPI.entryItemsRF, new ItemStack(InitItems.itemMagnetRing), new PageCrafting(1, ItemCrafting.recipeMagnetRing));
new BookletChapter("growthRing", ActuallyAdditionsAPI.entryItemsRF, new ItemStack(InitItems.itemGrowthRing), new PageCrafting(1, ItemCrafting.recipeGrowthRing));
new BookletChapter("waterRemovalRing", ActuallyAdditionsAPI.entryItemsRF, new ItemStack(InitItems.itemWaterRemovalRing), 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("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.get()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeFillingWand).setNoText()).setSpecial();
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.get()), new PageCrafting(1, ItemCrafting.recipeMagnetRing));
new BookletChapter("growthRing", ActuallyAdditionsAPI.entryItemsRF, new ItemStack(InitItems.itemGrowthRing.get()), new PageCrafting(1, ItemCrafting.recipeGrowthRing));
new BookletChapter("waterRemovalRing", ActuallyAdditionsAPI.entryItemsRF, new ItemStack(InitItems.itemWaterRemovalRing.get()), new PageCrafting(1, ItemCrafting.recipeWaterRing));
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
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("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("website", ActuallyAdditionsAPI.entryUpdatesAndInfos, new ItemStack(InitItems.itemBooklet), new PageLinkButton(1, "http://ellpeck.de"));
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.get()), new PageLinkButton(1, "http://ellpeck.de"));
//Trials
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("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("mobFarm", new ItemStack(Items.ROTTEN_FLESH), false);
new BookletChapterTrials("empowererAutomation", new ItemStack(InitBlocks.blockEmpowerer.get()), false);

View file

@ -10,415 +10,398 @@
package de.ellpeck.actuallyadditions.mod.crafting;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.blocks.BlockColoredLamp;
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;
// TODO: [port] MOVE TO DATA_GENERATOR
@Deprecated
public final class BlockCrafting {
public static final IRecipe[] RECIPES_LAMPS = new IRecipe[BlockColoredLamp.ALL_LAMP_TYPES.length];
public static IRecipe recipeSmileyCloud;
public static IRecipe recipePhantomface;
public static IRecipe recipeLiquiface;
public static IRecipe recipeEnergyface;
public static IRecipe recipePhantomBreaker;
public static IRecipe recipePhantomPlacer;
public static IRecipe recipeBreaker;
public static IRecipe recipePlacer;
public static IRecipe recipeLiquidPlacer;
public static IRecipe recipeLiquidCollector;
public static IRecipe recipeCase;
public static IRecipe recipeIronCase;
public static IRecipe recipeEnderCase;
public static IRecipe recipeEnderPearlBlock;
public static IRecipe recipeESD;
public static IRecipe recipeAdvancedESD;
public static IRecipe recipePhantomBooster;
public static IRecipe recipeCoffeeMachine;
public static IRecipe recipeCrusher;
public static IRecipe recipeDoubleCrusher;
public static IRecipe recipeFurnace;
public static IRecipe recipeSolidifier;
public static IRecipe recipeCasing;
public static IRecipe recipeGlass;
public static IRecipe recipeLavaFactory;
public static IRecipe recipeEnergizer;
public static IRecipe recipeEnervator;
public static IRecipe recipeSolar;
public static IRecipe recipeHeatCollector;
public static IRecipe recipeCoalGen;
public static IRecipe recipeOilGen;
public static IRecipe recipeRepairer;
public static IRecipe recipeFisher;
public static IRecipe recipeQuartzBlock;
public static IRecipe recipeQuartzChiseled;
public static IRecipe recipeQuartzPillar;
public static IRecipe recipeBlockChar;
public static IRecipe recipeFeeder;
public static IRecipe recipeCompost;
public static IRecipe recipeCrate;
public static IRecipe recipeCrateMedium;
public static IRecipe recipeCrateLarge;
public static IRecipe recipeFermentingBarrel;
public static IRecipe recipeCanolaPress;
public static IRecipe recipePowerer;
public static IRecipe recipeLeafGen;
public static IRecipe recipeDirectionalBreaker;
public static IRecipe recipeDropper;
public static IRecipe recipeRangedCollector;
public static IRecipe recipeLaserRelay;
public static IRecipe recipeLaserRelayAdvanced;
public static IRecipe recipeLaserRelayExtreme;
public static IRecipe recipeAtomicReconstructor;
public static IRecipe recipeMiner;
public static IRecipe recipeFireworkBox;
public static IRecipe recipePhantomRedstoneface;
public static IRecipe recipeLaserRelayItemWhitelist;
public static IRecipe recipeItemInterface;
public static IRecipe recipeItemInterfaceHopping;
public static IRecipe recipePlayerInterface;
public static IRecipe recipeDisplayStand;
public static IRecipe recipeShockSuppressor;
public static IRecipe recipeEmpowerer;
public static IRecipe[] recipesTinyTorch = new IRecipe[2];
public static IRecipe recipeBioReactor;
public static IRecipe recipeFarmer;
public static IRecipe recipeBatteryBox;
private static class FireworkIngredient extends Ingredient {
ItemStack firework = new ItemStack(Items.FIREWORKS);
ItemStack[] fireworks = new ItemStack[] { this.firework };
@Override
public ItemStack[] getMatchingStacks() {
return this.fireworks;
}
@Override
public boolean apply(ItemStack stack) {
return stack.getItem() == Items.FIREWORKS;
}
}
public static void init() {
Block[] removeNBTBlocks = new Block[] { InitBlocks.blockOilGenerator, InitBlocks.blockFluidPlacer, InitBlocks.blockFluidCollector, InitBlocks.blockCanolaPress, InitBlocks.blockFermentingBarrel };
for (Block b : removeNBTBlocks)
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(b), new ItemStack(b));
//Battery Box
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();
//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));
recipeFarmer = RecipeUtil.lastIRecipe();
//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));
recipeEmpowerer = RecipeUtil.lastIRecipe();
//Tiny Torch
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();
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();
//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()));
recipeFireworkBox = RecipeUtil.lastIRecipe();
//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()));
recipeShockSuppressor = RecipeUtil.lastIRecipe();
//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));
recipeDisplayStand = RecipeUtil.lastIRecipe();
//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));
recipeMiner = RecipeUtil.lastIRecipe();
//Quartz
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.blockQuartzStair, 6), "X ", "XX ", "XXX", 'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal()));
//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.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()));
//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.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()));
//White Ethetic Blocks
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.blockTestifiBucksWhiteStairs, 6), "X ", "XX ", "XXX", 'X', new ItemStack(InitBlocks.blockTestifiBucksWhiteWall));
//Green Ethetic Blocks
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.blockTestifiBucksGreenStairs, 6), "X ", "XX ", "XXX", 'X', new ItemStack(InitBlocks.blockTestifiBucksGreenWall));
//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()));
recipeAtomicReconstructor = RecipeUtil.lastIRecipe();
//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()));
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()));
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()));
recipeLaserRelayExtreme = RecipeUtil.lastIRecipe();
//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()));
recipeLaserRelayItemWhitelist = RecipeUtil.lastIRecipe();
//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");
recipeItemInterface = RecipeUtil.lastIRecipe();
//Hopping Item Interface
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitBlocks.blockItemViewerHopping), new ItemStack(InitBlocks.blockItemViewer), new ItemStack(Blocks.HOPPER));
recipeItemInterfaceHopping = RecipeUtil.lastIRecipe();
//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()));
recipeRangedCollector = RecipeUtil.lastIRecipe();
//Directional Breaker
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();
//Smiley Cloud
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();
//Compost
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();
//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()));
recipeSolidifier = RecipeUtil.lastIRecipe();
//Charcoal Block
RecipeHandler.addShapedRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.CHARCOAL_BLOCK.ordinal()), "CCC", "CCC", "CCC", 'C', new ItemStack(Items.COAL, 1, 1));
recipeBlockChar = RecipeUtil.lastIRecipe();
RecipeHandler.addShapelessRecipe(new ItemStack(Items.COAL, 9, 1), new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.CHARCOAL_BLOCK.ordinal()));
//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");
recipeCase = RecipeUtil.lastIRecipe();
//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");
recipeIronCase = RecipeUtil.lastIRecipe();
//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()));
recipeEnderCase = RecipeUtil.lastIRecipe();
//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()));
recipePhantomBooster = RecipeUtil.lastIRecipe();
//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()));
recipeCoffeeMachine = RecipeUtil.lastIRecipe();
//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()));
recipeEnergizer = RecipeUtil.lastIRecipe();
//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()));
recipeEnervator = RecipeUtil.lastIRecipe();
//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);
recipeLavaFactory = RecipeUtil.lastIRecipe();
//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()));
recipeCasing = RecipeUtil.lastIRecipe();
//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()));
recipeCanolaPress = RecipeUtil.lastIRecipe();
//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()));
recipeFermentingBarrel = RecipeUtil.lastIRecipe();
//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()));
recipePhantomface = RecipeUtil.lastIRecipe();
//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()));
recipePlayerInterface = RecipeUtil.lastIRecipe();
//Phantom Placer
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitBlocks.blockPhantomPlacer), InitBlocks.blockPlacer, InitBlocks.blockPhantomface);
recipePhantomPlacer = RecipeUtil.lastIRecipe();
//Phantom Breaker
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitBlocks.blockPhantomBreaker), InitBlocks.blockBreaker, InitBlocks.blockPhantomface);
recipePhantomBreaker = RecipeUtil.lastIRecipe();
//Phantom Energyface
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockPhantomEnergyface), " R ", "RFR", " R ", 'R', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.REDSTONE.ordinal()), 'F', InitBlocks.blockPhantomface);
recipeEnergyface = RecipeUtil.lastIRecipe();
//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);
recipePhantomRedstoneface = RecipeUtil.lastIRecipe();
//Phantom Liquiface
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockPhantomLiquiface), "RFR", 'R', Items.BUCKET, 'F', InitBlocks.blockPhantomface);
recipeLiquiface = RecipeUtil.lastIRecipe();
//Liquid Placer
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockFluidPlacer), "RFR", 'R', Items.BUCKET, 'F', InitBlocks.blockPlacer);
recipeLiquidPlacer = RecipeUtil.lastIRecipe();
//Liquid Breaker
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockFluidCollector), "RFR", 'R', Items.BUCKET, 'F', InitBlocks.blockBreaker);
recipeLiquidCollector = RecipeUtil.lastIRecipe();
//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()));
recipeOilGen = RecipeUtil.lastIRecipe();
//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));
recipeBioReactor = RecipeUtil.lastIRecipe();
//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));
recipeCoalGen = RecipeUtil.lastIRecipe();
//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()));
recipeLeafGen = RecipeUtil.lastIRecipe();
//Enderpearl Block
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.ordinal()), "EE", "EE", 'E', Items.ENDER_PEARL);
recipeEnderPearlBlock = RecipeUtil.lastIRecipe();
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(Items.ENDER_PEARL, 4), new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.ordinal()));
//Quartz Block
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal()), "QQ", "QQ", 'Q', "gemQuartzBlack");
recipeQuartzBlock = RecipeUtil.lastIRecipe();
//Fishing Net
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockFishingNet), "SSS", "SDS", "SSS", 'D', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.EMERALD.ordinal()), 'S', Items.STRING);
recipeFisher = RecipeUtil.lastIRecipe();
//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()));
recipeRepairer = RecipeUtil.lastIRecipe();
//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));
recipeSolar = RecipeUtil.lastIRecipe();
//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));
recipeHeatCollector = RecipeUtil.lastIRecipe();
//Quartz Pillar
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ_PILLAR.ordinal()), "Q", "Q", 'Q', "gemQuartzBlack");
recipeQuartzPillar = RecipeUtil.lastIRecipe();
//Chiseled Quartz
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();
//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()));
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()));
recipeAdvancedESD = RecipeUtil.lastIRecipe();
//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));
recipeCrusher = RecipeUtil.lastIRecipe();
//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()));
recipeDoubleCrusher = RecipeUtil.lastIRecipe();
//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()));
recipeFurnace = RecipeUtil.lastIRecipe();
//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()));
recipeFeeder = RecipeUtil.lastIRecipe();
//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");
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");
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");
recipeCrateLarge = RecipeUtil.lastIRecipe();
//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");
recipeGlass = RecipeUtil.lastIRecipe();
//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()));
recipePlacer = RecipeUtil.lastIRecipe();
//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()));
recipeBreaker = RecipeUtil.lastIRecipe();
//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()));
recipeDropper = RecipeUtil.lastIRecipe();
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");
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));
recipePowerer = RecipeUtil.lastIRecipe();
}
//
// public static final IRecipe[] RECIPES_LAMPS = new IRecipe[BlockColoredLamp.ALL_LAMP_TYPES.length];
// public static IRecipe recipeSmileyCloud;
// public static IRecipe recipePhantomface;
// public static IRecipe recipeLiquiface;
// public static IRecipe recipeEnergyface;
// public static IRecipe recipePhantomBreaker;
// public static IRecipe recipePhantomPlacer;
// public static IRecipe recipeBreaker;
// public static IRecipe recipePlacer;
// public static IRecipe recipeLiquidPlacer;
// public static IRecipe recipeLiquidCollector;
// public static IRecipe recipeCase;
// public static IRecipe recipeIronCase;
// public static IRecipe recipeEnderCase;
// public static IRecipe recipeEnderPearlBlock;
// public static IRecipe recipeESD;
// public static IRecipe recipeAdvancedESD;
// public static IRecipe recipePhantomBooster;
// public static IRecipe recipeCoffeeMachine;
// public static IRecipe recipeCrusher;
// public static IRecipe recipeDoubleCrusher;
// public static IRecipe recipeFurnace;
// public static IRecipe recipeSolidifier;
// public static IRecipe recipeCasing;
// public static IRecipe recipeGlass;
// public static IRecipe recipeLavaFactory;
// public static IRecipe recipeEnergizer;
// public static IRecipe recipeEnervator;
// public static IRecipe recipeSolar;
// public static IRecipe recipeHeatCollector;
// public static IRecipe recipeCoalGen;
// public static IRecipe recipeOilGen;
// public static IRecipe recipeRepairer;
// public static IRecipe recipeFisher;
// public static IRecipe recipeQuartzBlock;
// public static IRecipe recipeQuartzChiseled;
// public static IRecipe recipeQuartzPillar;
// public static IRecipe recipeBlockChar;
// public static IRecipe recipeFeeder;
// public static IRecipe recipeCompost;
// public static IRecipe recipeCrate;
// public static IRecipe recipeCrateMedium;
// public static IRecipe recipeCrateLarge;
// public static IRecipe recipeFermentingBarrel;
// public static IRecipe recipeCanolaPress;
// public static IRecipe recipePowerer;
// public static IRecipe recipeLeafGen;
// public static IRecipe recipeDirectionalBreaker;
// public static IRecipe recipeDropper;
// public static IRecipe recipeRangedCollector;
// public static IRecipe recipeLaserRelay;
// public static IRecipe recipeLaserRelayAdvanced;
// public static IRecipe recipeLaserRelayExtreme;
// public static IRecipe recipeAtomicReconstructor;
// public static IRecipe recipeMiner;
// public static IRecipe recipeFireworkBox;
// public static IRecipe recipePhantomRedstoneface;
// public static IRecipe recipeLaserRelayItemWhitelist;
// public static IRecipe recipeItemInterface;
// public static IRecipe recipeItemInterfaceHopping;
// public static IRecipe recipePlayerInterface;
// public static IRecipe recipeDisplayStand;
// public static IRecipe recipeShockSuppressor;
// public static IRecipe recipeEmpowerer;
// public static IRecipe[] recipesTinyTorch = new IRecipe[2];
// public static IRecipe recipeBioReactor;
// public static IRecipe recipeFarmer;
// public static IRecipe recipeBatteryBox;
//
// private static class FireworkIngredient extends Ingredient {
//
// ItemStack firework = new ItemStack(Items.FIREWORKS);
// ItemStack[] fireworks = new ItemStack[] { this.firework };
//
// @Override
// public ItemStack[] getMatchingStacks() {
// return this.fireworks;
// }
//
// @Override
// public boolean apply(ItemStack stack) {
// return stack.getItem() == Items.FIREWORKS;
// }
// }
//
// public static void init() {
//
// Block[] removeNBTBlocks = new Block[] { InitBlocks.blockOilGenerator, InitBlocks.blockFluidPlacer, InitBlocks.blockFluidCollector, InitBlocks.blockCanolaPress, InitBlocks.blockFermentingBarrel };
//
// for (Block b : removeNBTBlocks)
// RecipeHandler.addShapelessOreDictRecipe(new ItemStack(b), new ItemStack(b));
//
// //Battery Box
// 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();
//
// //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));
// recipeFarmer = RecipeUtil.lastIRecipe();
//
// //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));
// recipeEmpowerer = RecipeUtil.lastIRecipe();
//
// //Tiny Torch
// 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();
// 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();
//
// //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()));
// recipeFireworkBox = RecipeUtil.lastIRecipe();
//
// //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()));
// recipeShockSuppressor = RecipeUtil.lastIRecipe();
//
// //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));
// recipeDisplayStand = RecipeUtil.lastIRecipe();
//
// //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));
// recipeMiner = RecipeUtil.lastIRecipe();
//
// //Quartz
// 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.blockQuartzStair, 6), "X ", "XX ", "XXX", 'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal()));
//
// //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.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()));
//
// //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.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()));
//
// //White Ethetic Blocks
// 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.blockTestifiBucksWhiteStairs, 6), "X ", "XX ", "XXX", 'X', new ItemStack(InitBlocks.blockTestifiBucksWhiteWall));
//
// //Green Ethetic Blocks
// 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.blockTestifiBucksGreenStairs, 6), "X ", "XX ", "XXX", 'X', new ItemStack(InitBlocks.blockTestifiBucksGreenWall));
//
// //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()));
// recipeAtomicReconstructor = RecipeUtil.lastIRecipe();
//
// //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()));
// 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()));
// 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()));
// recipeLaserRelayExtreme = RecipeUtil.lastIRecipe();
//
// //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()));
// recipeLaserRelayItemWhitelist = RecipeUtil.lastIRecipe();
//
// //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");
// recipeItemInterface = RecipeUtil.lastIRecipe();
//
// //Hopping Item Interface
// RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitBlocks.blockItemViewerHopping), new ItemStack(InitBlocks.blockItemViewer), new ItemStack(Blocks.HOPPER));
// recipeItemInterfaceHopping = RecipeUtil.lastIRecipe();
//
// //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()));
// recipeRangedCollector = RecipeUtil.lastIRecipe();
//
// //Directional Breaker
// 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();
//
// //Smiley Cloud
// 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();
//
// //Compost
// 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();
//
// //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()));
// recipeSolidifier = RecipeUtil.lastIRecipe();
//
// //Charcoal Block
// RecipeHandler.addShapedRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.CHARCOAL_BLOCK.ordinal()), "CCC", "CCC", "CCC", 'C', new ItemStack(Items.COAL, 1, 1));
// recipeBlockChar = RecipeUtil.lastIRecipe();
// RecipeHandler.addShapelessRecipe(new ItemStack(Items.COAL, 9, 1), new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.CHARCOAL_BLOCK.ordinal()));
//
// //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");
// recipeCase = RecipeUtil.lastIRecipe();
//
// //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");
// recipeIronCase = RecipeUtil.lastIRecipe();
//
// //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()));
// recipeEnderCase = RecipeUtil.lastIRecipe();
//
// //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()));
// recipePhantomBooster = RecipeUtil.lastIRecipe();
//
// //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()));
// recipeCoffeeMachine = RecipeUtil.lastIRecipe();
//
// //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()));
// recipeEnergizer = RecipeUtil.lastIRecipe();
//
// //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()));
// recipeEnervator = RecipeUtil.lastIRecipe();
//
// //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);
// recipeLavaFactory = RecipeUtil.lastIRecipe();
//
// //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()));
// recipeCasing = RecipeUtil.lastIRecipe();
//
// //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()));
// recipeCanolaPress = RecipeUtil.lastIRecipe();
//
// //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()));
// recipeFermentingBarrel = RecipeUtil.lastIRecipe();
//
// //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()));
// recipePhantomface = RecipeUtil.lastIRecipe();
//
// //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()));
// recipePlayerInterface = RecipeUtil.lastIRecipe();
//
// //Phantom Placer
// RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitBlocks.blockPhantomPlacer), InitBlocks.blockPlacer, InitBlocks.blockPhantomface);
// recipePhantomPlacer = RecipeUtil.lastIRecipe();
//
// //Phantom Breaker
// RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitBlocks.blockPhantomBreaker), InitBlocks.blockBreaker, InitBlocks.blockPhantomface);
// recipePhantomBreaker = RecipeUtil.lastIRecipe();
//
// //Phantom Energyface
// RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockPhantomEnergyface), " R ", "RFR", " R ", 'R', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.REDSTONE.ordinal()), 'F', InitBlocks.blockPhantomface);
// recipeEnergyface = RecipeUtil.lastIRecipe();
//
// //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);
// recipePhantomRedstoneface = RecipeUtil.lastIRecipe();
//
// //Phantom Liquiface
// RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockPhantomLiquiface), "RFR", 'R', Items.BUCKET, 'F', InitBlocks.blockPhantomface);
// recipeLiquiface = RecipeUtil.lastIRecipe();
//
// //Liquid Placer
// RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockFluidPlacer), "RFR", 'R', Items.BUCKET, 'F', InitBlocks.blockPlacer);
// recipeLiquidPlacer = RecipeUtil.lastIRecipe();
//
// //Liquid Breaker
// RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockFluidCollector), "RFR", 'R', Items.BUCKET, 'F', InitBlocks.blockBreaker);
// recipeLiquidCollector = RecipeUtil.lastIRecipe();
//
// //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()));
// recipeOilGen = RecipeUtil.lastIRecipe();
//
// //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));
// recipeBioReactor = RecipeUtil.lastIRecipe();
//
// //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));
// recipeCoalGen = RecipeUtil.lastIRecipe();
//
// //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()));
// recipeLeafGen = RecipeUtil.lastIRecipe();
//
// //Enderpearl Block
// RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.ordinal()), "EE", "EE", 'E', Items.ENDER_PEARL);
// recipeEnderPearlBlock = RecipeUtil.lastIRecipe();
// RecipeHandler.addShapelessOreDictRecipe(new ItemStack(Items.ENDER_PEARL, 4), new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.ordinal()));
//
// //Quartz Block
// RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal()), "QQ", "QQ", 'Q', "gemQuartzBlack");
// recipeQuartzBlock = RecipeUtil.lastIRecipe();
//
// //Fishing Net
// RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockFishingNet), "SSS", "SDS", "SSS", 'D', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.EMERALD.ordinal()), 'S', Items.STRING);
// recipeFisher = RecipeUtil.lastIRecipe();
//
// //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()));
// recipeRepairer = RecipeUtil.lastIRecipe();
//
// //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));
// recipeSolar = RecipeUtil.lastIRecipe();
//
// //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));
// recipeHeatCollector = RecipeUtil.lastIRecipe();
//
// //Quartz Pillar
// RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ_PILLAR.ordinal()), "Q", "Q", 'Q', "gemQuartzBlack");
// recipeQuartzPillar = RecipeUtil.lastIRecipe();
//
// //Chiseled Quartz
// 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();
//
// //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()));
// 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()));
// recipeAdvancedESD = RecipeUtil.lastIRecipe();
//
// //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));
// recipeCrusher = RecipeUtil.lastIRecipe();
//
// //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()));
// recipeDoubleCrusher = RecipeUtil.lastIRecipe();
//
// //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()));
// recipeFurnace = RecipeUtil.lastIRecipe();
//
// //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()));
// recipeFeeder = RecipeUtil.lastIRecipe();
//
// //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");
// 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");
// 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");
// recipeCrateLarge = RecipeUtil.lastIRecipe();
//
// //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");
// recipeGlass = RecipeUtil.lastIRecipe();
//
// //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()));
// recipePlacer = RecipeUtil.lastIRecipe();
//
// //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()));
// recipeBreaker = RecipeUtil.lastIRecipe();
//
// //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()));
// recipeDropper = RecipeUtil.lastIRecipe();
//
// 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");
// 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));
// recipePowerer = RecipeUtil.lastIRecipe();
//
// }
}

View file

@ -10,125 +10,108 @@
package de.ellpeck.actuallyadditions.mod.crafting;
import java.util.ArrayList;
import java.util.List;
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;
// TODO: [port] MOVE TO DATA_GENERATOR
@Deprecated
public final class CrusherCrafting {
public static final ArrayList<CrusherRecipe> MISC_RECIPES = new ArrayList<>();
public static CrusherRecipe recipeIronHorseArmor;
public static CrusherRecipe recipeGoldHorseArmor;
public static CrusherRecipe recipeDiamondHorseArmor;
public static void init() {
ActuallyAdditions.LOGGER.info("Initializing Crusher Recipes...");
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Items.BONE), new ItemStack(Items.DYE, 6, 15), StackUtil.getEmpty(), 0);
MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Items.REEDS), new ItemStack(Items.SUGAR, 3), StackUtil.getEmpty(), 0);
MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Items.BLAZE_ROD), new ItemStack(Items.BLAZE_POWDER, 4), StackUtil.getEmpty(), 0);
MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.YELLOW_FLOWER), new ItemStack(Items.DYE, 3, 11), StackUtil.getEmpty(), 0);
MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 0), new ItemStack(Items.DYE, 3, 1), StackUtil.getEmpty(), 0);
MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 1), new ItemStack(Items.DYE, 3, 12), StackUtil.getEmpty(), 0);
MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 2), new ItemStack(Items.DYE, 3, 13), StackUtil.getEmpty(), 0);
MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 3), new ItemStack(Items.DYE, 3, 7), StackUtil.getEmpty(), 0);
MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 4), new ItemStack(Items.DYE, 3, 1), StackUtil.getEmpty(), 0);
MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 5), new ItemStack(Items.DYE, 3, 14), StackUtil.getEmpty(), 0);
MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 6), new ItemStack(Items.DYE, 3, 7), StackUtil.getEmpty(), 0);
MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 7), new ItemStack(Items.DYE, 3, 9), StackUtil.getEmpty(), 0);
MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 8), new ItemStack(Items.DYE, 3, 7), StackUtil.getEmpty(), 0);
MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.DOUBLE_PLANT, 1, 0), new ItemStack(Items.DYE, 4, 11), StackUtil.getEmpty(), 0);
MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.DOUBLE_PLANT, 1, 1), new ItemStack(Items.DYE, 4, 13), StackUtil.getEmpty(), 0);
MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.DOUBLE_PLANT, 1, 4), new ItemStack(Items.DYE, 4, 1), StackUtil.getEmpty(), 0);
MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.DOUBLE_PLANT, 1, 5), new ItemStack(Items.DYE, 4, 9), StackUtil.getEmpty(), 0);
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("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("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("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);
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);
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()), new ItemStack(Items.SUGAR, 2), StackUtil.getEmpty(), 0);
MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.GLOWSTONE), new ItemStack(Items.GLOWSTONE_DUST, 4), StackUtil.getEmpty(), 0);
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("oreIron")) ActuallyAdditionsAPI.addCrusherRecipes(OreDictionary.getOres("oreIron", false), OreDictionary.getOres("dustIron", false), 2, OreDictionary.getOres("dustGold", false), 1, 20);
ItemStack temp = getStack("dustIron");
if (!temp.isEmpty()) {
temp.setCount(6);
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Items.IRON_HORSE_ARMOR), temp, StackUtil.getEmpty(), 0);
recipeIronHorseArmor = RecipeUtil.lastCrusherRecipe();
}
temp = getStack("dustGold");
if (!temp.isEmpty()) {
temp.setCount(6);
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Items.GOLDEN_HORSE_ARMOR), temp, StackUtil.getEmpty(), 0);
recipeGoldHorseArmor = RecipeUtil.lastCrusherRecipe();
}
temp = getStack("dustDiamond");
if (!temp.isEmpty()) {
temp.setCount(6);
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Items.DIAMOND_HORSE_ARMOR), temp, StackUtil.getEmpty(), 0);
recipeDiamondHorseArmor = RecipeUtil.lastCrusherRecipe();
}
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("denseore", 8));
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("ore", 2, "gem")); //Search for gems first so removeDuplicates doesn't clear gem recipes.
CrusherRecipeRegistry.SEARCH_CASES.add(new CrusherRecipeRegistry.SearchCase("ore", 2));
CrusherRecipeRegistry.registerFinally();
}
private static ItemStack getStack(String ore) {
List<ItemStack> stacks = OreDictionary.getOres(ore);
if (stacks.isEmpty()) return StackUtil.getEmpty();
return stacks.get(0).copy();
}
//
// public static final ArrayList<CrusherRecipe> MISC_RECIPES = new ArrayList<>();
// public static CrusherRecipe recipeIronHorseArmor;
// public static CrusherRecipe recipeGoldHorseArmor;
// public static CrusherRecipe recipeDiamondHorseArmor;
//
// public static void init() {
// ActuallyAdditions.LOGGER.info("Initializing Crusher Recipes...");
//
// ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Items.BONE), new ItemStack(Items.DYE, 6, 15), StackUtil.getEmpty(), 0);
// MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
// ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Items.REEDS), new ItemStack(Items.SUGAR, 3), StackUtil.getEmpty(), 0);
// MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
// ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Items.BLAZE_ROD), new ItemStack(Items.BLAZE_POWDER, 4), StackUtil.getEmpty(), 0);
// MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
//
// ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.YELLOW_FLOWER), new ItemStack(Items.DYE, 3, 11), StackUtil.getEmpty(), 0);
// MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
// ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 0), new ItemStack(Items.DYE, 3, 1), StackUtil.getEmpty(), 0);
// MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
// ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 1), new ItemStack(Items.DYE, 3, 12), StackUtil.getEmpty(), 0);
// MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
// ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 2), new ItemStack(Items.DYE, 3, 13), StackUtil.getEmpty(), 0);
// MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
// ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 3), new ItemStack(Items.DYE, 3, 7), StackUtil.getEmpty(), 0);
// MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
// ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 4), new ItemStack(Items.DYE, 3, 1), StackUtil.getEmpty(), 0);
// MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
// ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 5), new ItemStack(Items.DYE, 3, 14), StackUtil.getEmpty(), 0);
// MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
// ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 6), new ItemStack(Items.DYE, 3, 7), StackUtil.getEmpty(), 0);
// MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
// ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 7), new ItemStack(Items.DYE, 3, 9), StackUtil.getEmpty(), 0);
// MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
// ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 8), new ItemStack(Items.DYE, 3, 7), StackUtil.getEmpty(), 0);
// MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
// ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.DOUBLE_PLANT, 1, 0), new ItemStack(Items.DYE, 4, 11), StackUtil.getEmpty(), 0);
// MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
// ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.DOUBLE_PLANT, 1, 1), new ItemStack(Items.DYE, 4, 13), StackUtil.getEmpty(), 0);
// MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
// ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.DOUBLE_PLANT, 1, 4), new ItemStack(Items.DYE, 4, 1), StackUtil.getEmpty(), 0);
// MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
// ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.DOUBLE_PLANT, 1, 5), new ItemStack(Items.DYE, 4, 9), StackUtil.getEmpty(), 0);
// 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("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("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("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);
// 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);
//
// ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()), new ItemStack(Items.SUGAR, 2), StackUtil.getEmpty(), 0);
// MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
//
// ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.GLOWSTONE), new ItemStack(Items.GLOWSTONE_DUST, 4), StackUtil.getEmpty(), 0);
// 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("oreIron")) ActuallyAdditionsAPI.addCrusherRecipes(OreDictionary.getOres("oreIron", false), OreDictionary.getOres("dustIron", false), 2, OreDictionary.getOres("dustGold", false), 1, 20);
//
// ItemStack temp = getStack("dustIron");
// if (!temp.isEmpty()) {
// temp.setCount(6);
// ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Items.IRON_HORSE_ARMOR), temp, StackUtil.getEmpty(), 0);
// recipeIronHorseArmor = RecipeUtil.lastCrusherRecipe();
// }
//
// temp = getStack("dustGold");
// if (!temp.isEmpty()) {
// temp.setCount(6);
// ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Items.GOLDEN_HORSE_ARMOR), temp, StackUtil.getEmpty(), 0);
// recipeGoldHorseArmor = RecipeUtil.lastCrusherRecipe();
// }
//
// temp = getStack("dustDiamond");
// if (!temp.isEmpty()) {
// temp.setCount(6);
// ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Items.DIAMOND_HORSE_ARMOR), temp, StackUtil.getEmpty(), 0);
// recipeDiamondHorseArmor = RecipeUtil.lastCrusherRecipe();
// }
//
// 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("denseore", 8));
// 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("ore", 2, "gem")); //Search for gems first so removeDuplicates doesn't clear gem recipes.
// CrusherRecipeRegistry.SEARCH_CASES.add(new CrusherRecipeRegistry.SearchCase("ore", 2));
//
// CrusherRecipeRegistry.registerFinally();
// }
//
// private static ItemStack getStack(String ore) {
// List<ItemStack> stacks = OreDictionary.getOres(ore);
// if (stacks.isEmpty()) return StackUtil.getEmpty();
// return stacks.get(0).copy();
// }
}

View file

@ -10,116 +10,105 @@
package de.ellpeck.actuallyadditions.mod.crafting;
import de.ellpeck.actuallyadditions.mod.items.InitItems;
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.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;
// TODO: [port] MOVE TO DATA_GENERATOR
@Deprecated
public final class FoodCrafting {
public static IRecipe recipePizza;
public static IRecipe recipeHamburger;
public static IRecipe recipeBigCookie;
public static IRecipe recipeSubSandwich;
public static IRecipe recipeFrenchFry;
public static IRecipe recipeFrenchFries;
public static IRecipe recipeFishNChips;
public static IRecipe recipeCheese;
public static IRecipe recipePumpkinStew;
public static IRecipe recipeCarrotJuice;
public static IRecipe recipeSpaghetti;
public static IRecipe recipeNoodle;
public static IRecipe recipeChocolate;
public static IRecipe recipeChocolateCake;
public static IRecipe recipeToast;
public static IRecipe recipeChocolateToast;
public static IRecipe recipeBacon;
public static void init() {
Ingredient knife = Ingredient.fromItem(InitItems.itemKnife);
//Rice Bread
GameRegistry.addSmelting(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RICE_DOUGH.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE_BREAD.ordinal()), 1F);
//Bacon
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemFoods, 3, TheFoods.BACON.ordinal()), knife, new ItemStack(Items.COOKED_PORKCHOP));
recipeBacon = RecipeUtil.lastIRecipe();
//Baguette
GameRegistry.addSmelting(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DOUGH.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.BAGUETTE.ordinal()), 1F);
//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()));
recipePizza = RecipeUtil.lastIRecipe();
//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));
recipeHamburger = RecipeUtil.lastIRecipe();
//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));
recipeBigCookie = RecipeUtil.lastIRecipe();
//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);
recipeSubSandwich = RecipeUtil.lastIRecipe();
//French Fry
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemFoods, 2, TheFoods.FRENCH_FRY.ordinal()), new ItemStack(Items.BAKED_POTATO), knife);
recipeFrenchFry = RecipeUtil.lastIRecipe();
//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()));
recipeFrenchFries = RecipeUtil.lastIRecipe();
//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()));
recipeFishNChips = RecipeUtil.lastIRecipe();
//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
recipeCheese = RecipeUtil.lastIRecipe();
//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));
recipePumpkinStew = RecipeUtil.lastIRecipe();
//Carrot Juice
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.CARROT_JUICE.ordinal()), new ItemStack(Items.GLASS_BOTTLE), "cropCarrot", knife);
recipeCarrotJuice = RecipeUtil.lastIRecipe();
//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));
recipeSpaghetti = RecipeUtil.lastIRecipe();
//Noodle
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.NOODLE.ordinal()), "cropWheat", knife);
recipeNoodle = RecipeUtil.lastIRecipe();
//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));
recipeChocolate = RecipeUtil.lastIRecipe();
//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));
recipeChocolateCake = RecipeUtil.lastIRecipe();
//Toast
RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemFoods, 2, TheFoods.TOAST.ordinal()), new ItemStack(Items.BREAD));
recipeToast = RecipeUtil.lastIRecipe();
//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()));
recipeChocolateToast = RecipeUtil.lastIRecipe();
}
//
// public static IRecipe recipePizza;
// public static IRecipe recipeHamburger;
// public static IRecipe recipeBigCookie;
// public static IRecipe recipeSubSandwich;
// public static IRecipe recipeFrenchFry;
// public static IRecipe recipeFrenchFries;
// public static IRecipe recipeFishNChips;
// public static IRecipe recipeCheese;
// public static IRecipe recipePumpkinStew;
// public static IRecipe recipeCarrotJuice;
// public static IRecipe recipeSpaghetti;
// public static IRecipe recipeNoodle;
// public static IRecipe recipeChocolate;
// public static IRecipe recipeChocolateCake;
// public static IRecipe recipeToast;
// public static IRecipe recipeChocolateToast;
// public static IRecipe recipeBacon;
//
// public static void init() {
//
// Ingredient knife = Ingredient.fromItem(InitItems.itemKnife);
//
// //Rice Bread
// GameRegistry.addSmelting(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RICE_DOUGH.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE_BREAD.ordinal()), 1F);
//
// //Bacon
// RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemFoods, 3, TheFoods.BACON.ordinal()), knife, new ItemStack(Items.COOKED_PORKCHOP));
// recipeBacon = RecipeUtil.lastIRecipe();
//
// //Baguette
// GameRegistry.addSmelting(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DOUGH.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.BAGUETTE.ordinal()), 1F);
//
// //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()));
// recipePizza = RecipeUtil.lastIRecipe();
//
// //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));
// recipeHamburger = RecipeUtil.lastIRecipe();
//
// //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));
// recipeBigCookie = RecipeUtil.lastIRecipe();
//
// //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);
// recipeSubSandwich = RecipeUtil.lastIRecipe();
//
// //French Fry
// RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemFoods, 2, TheFoods.FRENCH_FRY.ordinal()), new ItemStack(Items.BAKED_POTATO), knife);
// recipeFrenchFry = RecipeUtil.lastIRecipe();
//
// //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()));
// recipeFrenchFries = RecipeUtil.lastIRecipe();
//
// //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()));
// recipeFishNChips = RecipeUtil.lastIRecipe();
//
// //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
// recipeCheese = RecipeUtil.lastIRecipe();
//
// //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));
// recipePumpkinStew = RecipeUtil.lastIRecipe();
//
// //Carrot Juice
// RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.CARROT_JUICE.ordinal()), new ItemStack(Items.GLASS_BOTTLE), "cropCarrot", knife);
// recipeCarrotJuice = RecipeUtil.lastIRecipe();
//
// //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));
// recipeSpaghetti = RecipeUtil.lastIRecipe();
//
// //Noodle
// RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.NOODLE.ordinal()), "cropWheat", knife);
// recipeNoodle = RecipeUtil.lastIRecipe();
//
// //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));
// recipeChocolate = RecipeUtil.lastIRecipe();
//
// //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));
// recipeChocolateCake = RecipeUtil.lastIRecipe();
//
// //Toast
// RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemFoods, 2, TheFoods.TOAST.ordinal()), new ItemStack(Items.BREAD));
// recipeToast = RecipeUtil.lastIRecipe();
//
// //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()));
// 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.items.InitItems;
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.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 de.ellpeck.actuallyadditions.mod.misc.apiimpl.farmer.*;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.Ingredient;
import net.minecraft.util.ResourceLocation;
// TODO: [port] MOVE TO DATA_GENERATOR
@Deprecated
public final class InitCrafting {
public static void init() {
ActuallyAdditions.LOGGER.info("Initializing Crafting Recipes...");
ItemCrafting.init();
BlockCrafting.init();
MiscCrafting.init();
FoodCrafting.init();
ToolCrafting.init();
// ItemCrafting.init();
// BlockCrafting.init();
// MiscCrafting.init();
// FoodCrafting.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.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 ReedFarmerBehavior());
ActuallyAdditionsAPI.addFarmerBehavior(new MelonPumpkinFarmerBehavior());
ActuallyAdditionsAPI.addFarmerBehavior(new EnderlillyFarmerBehavior());
ActuallyAdditionsAPI.addFarmerBehavior(new RedOrchidFarmerBehavior());
// ActuallyAdditionsAPI.addFarmerBehavior(new EnderlillyFarmerBehavior());
// ActuallyAdditionsAPI.addFarmerBehavior(new RedOrchidFarmerBehavior());
new RecipePotionRingCharging(new ResourceLocation(ActuallyAdditions.MODID, "potion_ring_charging"));
new RecipeBioMash(new ResourceLocation(ActuallyAdditions.MODID, "bio_mash"));

View file

@ -10,377 +10,350 @@
package de.ellpeck.actuallyadditions.mod.crafting;
import java.util.ArrayList;
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;
// TODO: [port] MOVE TO DATA_GENERATOR
@Deprecated
public final class ItemCrafting {
public static final ArrayList<IRecipe> RECIPES_POTION_RINGS = new ArrayList<>();
public static final ArrayList<IRecipe> RECIPES_DRILL_COLORING = new ArrayList<>();
public static IRecipe recipePhantomConnector;
public static IRecipe recipeCoil;
public static IRecipe recipeCoilAdvanced;
public static IRecipe recipeBook;
public static IRecipe recipeTinyCoal;
public static IRecipe recipeTinyChar;
public static IRecipe recipeDrill;
public static IRecipe recipeDrillSpeedI;
public static IRecipe recipeDrillSpeedII;
public static IRecipe recipeDrillSpeedIII;
public static IRecipe recipeDrillFortuneI;
public static IRecipe recipeDrillFortuneII;
public static IRecipe recipeDrillSilk;
public static IRecipe recipeDrillPlacing;
public static IRecipe recipeDrillThree;
public static IRecipe recipeDrillFive;
public static IRecipe recipeBattery;
public static IRecipe recipeBatteryDouble;
public static IRecipe recipeBatteryTriple;
public static IRecipe recipeBatteryQuadruple;
public static IRecipe recipeBatteryQuintuple;
public static IRecipe recipeStaff;
public static IRecipe recipeGrowthRing;
public static IRecipe recipeMagnetRing;
public static IRecipe recipeWaterRing;
public static IRecipe recipeWings;
public static IRecipe recipeCup;
public static IRecipe recipeKnifeHandle;
public static IRecipe recipeKnifeBlade;
public static IRecipe recipeKnife;
public static IRecipe recipeRing;
public static IRecipe recipeDough;
public static IRecipe recipeRiceDough;
public static IRecipe recipeLeafBlower;
public static IRecipe recipeLeafBlowerAdvanced;
public static IRecipe recipeChestToCrateUpgrade;
public static IRecipe recipeSmallToMediumCrateUpgrade;
public static IRecipe recipeMediumToLargeCrateUpgrade;
public static IRecipe recipeLaserWrench;
public static IRecipe recipeDrillCore;
public static IRecipe recipeBlackDye;
public static IRecipe recipeLens;
public static IRecipe recipeCrateKeeper;
public static IRecipe recipeEnderStar;
public static IRecipe recipeSpawnerChanger;
public static IRecipe recipeFilter;
public static IRecipe recipePlayerProbe;
public static IRecipe recipeDisenchantingLens;
public static IRecipe recipeMiningLens;
public static IRecipe recipeBag;
public static IRecipe recipeVoidBag;
public static IRecipe recipeLensMoreDeath;
public static IRecipe recipeFillingWand;
public static IRecipe recipeLaserUpgradeInvisibility;
public static IRecipe recipeLaserUpgradeRange;
public static IRecipe recipeGoggles;
public static IRecipe recipeGogglesAdvanced;
public static void init() {
//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));
recipeGogglesAdvanced = RecipeUtil.lastIRecipe();
//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");
recipeGoggles = RecipeUtil.lastIRecipe();
//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()));
recipeLaserUpgradeInvisibility = RecipeUtil.lastIRecipe();
//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()));
recipeLaserUpgradeRange = RecipeUtil.lastIRecipe();
//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));
recipeFillingWand = RecipeUtil.lastIRecipe();
//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()));
recipeBag = RecipeUtil.lastIRecipe();
//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()));
recipeVoidBag = RecipeUtil.lastIRecipe();
//Lens
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.LENS.ordinal()), "GGG", "GBG", "GGG", 'G', "blockGlass", 'B', "gemQuartzBlack");
recipeLens = RecipeUtil.lastIRecipe();
//Black Dye
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemMisc, 2, TheMiscItems.BLACK_DYE.ordinal()), new ItemStack(InitBlocks.blockBlackLotus));
recipeBlackDye = RecipeUtil.lastIRecipe();
//Booklet
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemBooklet), new ItemStack(InitItems.itemCanolaSeed), new ItemStack(Items.PAPER));
recipeBook = RecipeUtil.lastIRecipe();
//Clearing NBT Storage
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.itemSpawnerChanger), new ItemStack(InitItems.itemSpawnerChanger));
//Chest To Crate Upgrade
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemChestToCrateUpgrade), " W ", "WCW", " W ", 'C', new ItemStack(InitBlocks.blockGiantChest), 'W', "plankWood");
recipeChestToCrateUpgrade = RecipeUtil.lastIRecipe();
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemSmallToMediumCrateUpgrade), " W ", "WCW", " W ", 'C', new ItemStack(InitBlocks.blockGiantChestMedium), 'W', "plankWood");
recipeSmallToMediumCrateUpgrade = RecipeUtil.lastIRecipe();
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMediumToLargeCrateUpgrade), " W ", "WCW", " W ", 'C', new ItemStack(InitBlocks.blockGiantChestLarge), 'W', "plankWood");
recipeMediumToLargeCrateUpgrade = RecipeUtil.lastIRecipe();
//Disenchanting Lens
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()));
recipeDisenchantingLens = RecipeUtil.lastIRecipe();
//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");
recipeMiningLens = RecipeUtil.lastIRecipe();
//Killer Lens
ItemStack enchBook = new ItemStack(Items.ENCHANTED_BOOK);
ItemEnchantedBook.addEnchantment(enchBook, new EnchantmentData(Enchantments.SHARPNESS, 5));
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemMoreDamageLens), new ItemStack(Items.DIAMOND_SWORD), new ItemStack(InitItems.itemDamageLens), enchBook);
recipeLensMoreDeath = RecipeUtil.lastIRecipe();
//Filter
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemFilter), "III", "IQI", "III", 'I', new ItemStack(Blocks.IRON_BARS), 'Q', "gemQuartzBlack");
recipeFilter = RecipeUtil.lastIRecipe();
//Crate Keeper
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemCrateKeeper), "WIW", "IQI", "WIW", 'I', "ingotIron", 'W', "plankWood", 'Q', "gemQuartzBlack");
recipeCrateKeeper = RecipeUtil.lastIRecipe();
//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()));
recipeSpawnerChanger = RecipeUtil.lastIRecipe();
//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()));
recipeLaserWrench = RecipeUtil.lastIRecipe();
//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(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));
//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()));
recipeLeafBlower = RecipeUtil.lastIRecipe();
//Drill
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()));
recipeDrill = RecipeUtil.lastIRecipe();
for (int i = 0; i < 16; i++) {
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);
RECIPES_DRILL_COLORING.add(RecipeUtil.lastIRecipe());
}
}
//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()));
recipeDrillCore = RecipeUtil.lastIRecipe();
//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));
recipeStaff = RecipeUtil.lastIRecipe();
//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()));
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);
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()));
recipeDrillSpeedIII = RecipeUtil.lastIRecipe();
//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()));
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()));
recipeDrillFortuneII = RecipeUtil.lastIRecipe();
//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()));
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()));
recipeDrillFive = RecipeUtil.lastIRecipe();
//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()));
recipeDrillSilk = RecipeUtil.lastIRecipe();
//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()));
recipeDrillPlacing = RecipeUtil.lastIRecipe();
//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()));
recipeBattery = RecipeUtil.lastIRecipe();
//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()));
recipeBatteryDouble = RecipeUtil.lastIRecipe();
//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()));
recipeMagnetRing = RecipeUtil.lastIRecipe();
//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()));
recipeGrowthRing = RecipeUtil.lastIRecipe();
//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()));
recipeWaterRing = RecipeUtil.lastIRecipe();
//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()));
recipeBatteryTriple = RecipeUtil.lastIRecipe();
//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()));
recipeBatteryQuadruple = RecipeUtil.lastIRecipe();
//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()));
recipeBatteryQuintuple = RecipeUtil.lastIRecipe();
//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()));
recipeWings = RecipeUtil.lastIRecipe();
//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()));
recipeCoil = RecipeUtil.lastIRecipe();
//Cup
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CUP.ordinal()), "S S", "SCS", "SSS", 'S', "stone", 'C', "cropCoffee");
recipeCup = RecipeUtil.lastIRecipe();
//Resonant Rice
if (!OreDictionary.getOres("nuggetEnderium", false).isEmpty()) {
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemResonantRice), new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()), "nuggetEnderium", Items.GUNPOWDER);
}
//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");
recipeCoilAdvanced = RecipeUtil.lastIRecipe();
//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()));
recipeLeafBlowerAdvanced = RecipeUtil.lastIRecipe();
//Phantom Connector
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemPhantomConnector), "YE", "EY", "S ", 'Y', Items.ENDER_EYE, 'E', Items.ENDER_PEARL, 'S', "stickWood");
recipePhantomConnector = RecipeUtil.lastIRecipe();
//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));
recipePlayerProbe = RecipeUtil.lastIRecipe();
//Quartz
GameRegistry.addSmelting(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ORE_QUARTZ.ordinal()), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), 1F);
//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()));
recipeKnife = RecipeUtil.lastIRecipe();
//Crafter on a Stick
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemCrafterOnAStick), new ItemStack(Blocks.CRAFTING_TABLE), new ItemStack(Items.SIGN));
//Tiny Coal
if (ConfigBoolValues.TINY_COAL_STUFF.isEnabled()) {
RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemMisc, 8, TheMiscItems.TINY_COAL.ordinal()), new ItemStack(Items.COAL));
recipeTinyCoal = RecipeUtil.lastIRecipe();
RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemMisc, 8, TheMiscItems.TINY_CHAR.ordinal()), new ItemStack(Items.COAL, 1, 1));
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, 1, 1), "CCC", "C C", "CCC", 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.TINY_CHAR.ordinal()));
}
//Rice Seeds
RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemRiceSeed), new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()));
//Canola Seeds
RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemCanolaSeed), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CANOLA.ordinal()));
//Rings
initPotionRingRecipes();
//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.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.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.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.COAL.ordinal()), new ItemStack(Items.COAL), 1F);
}
public static void initPotionRingRecipes() {
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RING.ordinal()), "IGI", "GDG", "IGI", 'G', "ingotGold", 'I', "ingotIron", 'D', "dustGlowstone");
recipeRing = RecipeUtil.lastIRecipe();
addRingRecipeWithStack(ThePotionRings.SPEED.craftingItem, ThePotionRings.SPEED.ordinal());
addRingRecipeWithStack(ThePotionRings.HASTE.craftingItem, ThePotionRings.HASTE.ordinal());
addRingRecipeWithStack(ThePotionRings.STRENGTH.craftingItem, ThePotionRings.STRENGTH.ordinal());
addRingRecipeWithStack(ThePotionRings.JUMP_BOOST.craftingItem, ThePotionRings.JUMP_BOOST.ordinal());
addRingRecipeWithStack(ThePotionRings.REGEN.craftingItem, ThePotionRings.REGEN.ordinal());
addRingRecipeWithStack(ThePotionRings.RESISTANCE.craftingItem, ThePotionRings.RESISTANCE.ordinal());
addRingRecipeWithStack(ThePotionRings.FIRE_RESISTANCE.craftingItem, ThePotionRings.FIRE_RESISTANCE.ordinal());
addRingRecipeWithStack(ThePotionRings.WATER_BREATHING.craftingItem, ThePotionRings.WATER_BREATHING.ordinal());
addRingRecipeWithStack(ThePotionRings.INVISIBILITY.craftingItem, ThePotionRings.INVISIBILITY.ordinal());
addRingRecipeWithStack(ThePotionRings.NIGHT_VISION.craftingItem, ThePotionRings.NIGHT_VISION.ordinal());
}
public static void addRingRecipeWithStack(ItemStack mainStack, int meta) {
ItemStack potion = new ItemStack(Items.POTIONITEM);
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()));
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()));
RECIPES_POTION_RINGS.add(RecipeUtil.lastIRecipe());
}
//
// public static final ArrayList<IRecipe> RECIPES_POTION_RINGS = new ArrayList<>();
// public static final ArrayList<IRecipe> RECIPES_DRILL_COLORING = new ArrayList<>();
// public static IRecipe recipePhantomConnector;
// public static IRecipe recipeCoil;
// public static IRecipe recipeCoilAdvanced;
// public static IRecipe recipeBook;
// public static IRecipe recipeTinyCoal;
// public static IRecipe recipeTinyChar;
// public static IRecipe recipeDrill;
// public static IRecipe recipeDrillSpeedI;
// public static IRecipe recipeDrillSpeedII;
// public static IRecipe recipeDrillSpeedIII;
// public static IRecipe recipeDrillFortuneI;
// public static IRecipe recipeDrillFortuneII;
// public static IRecipe recipeDrillSilk;
// public static IRecipe recipeDrillPlacing;
// public static IRecipe recipeDrillThree;
// public static IRecipe recipeDrillFive;
// public static IRecipe recipeBattery;
// public static IRecipe recipeBatteryDouble;
// public static IRecipe recipeBatteryTriple;
// public static IRecipe recipeBatteryQuadruple;
// public static IRecipe recipeBatteryQuintuple;
// public static IRecipe recipeStaff;
// public static IRecipe recipeGrowthRing;
// public static IRecipe recipeMagnetRing;
// public static IRecipe recipeWaterRing;
// public static IRecipe recipeWings;
// public static IRecipe recipeCup;
// public static IRecipe recipeKnifeHandle;
// public static IRecipe recipeKnifeBlade;
// public static IRecipe recipeKnife;
// public static IRecipe recipeRing;
// public static IRecipe recipeDough;
// public static IRecipe recipeRiceDough;
// public static IRecipe recipeLeafBlower;
// public static IRecipe recipeLeafBlowerAdvanced;
// public static IRecipe recipeChestToCrateUpgrade;
// public static IRecipe recipeSmallToMediumCrateUpgrade;
// public static IRecipe recipeMediumToLargeCrateUpgrade;
// public static IRecipe recipeLaserWrench;
// public static IRecipe recipeDrillCore;
// public static IRecipe recipeBlackDye;
// public static IRecipe recipeLens;
// public static IRecipe recipeCrateKeeper;
// public static IRecipe recipeEnderStar;
// public static IRecipe recipeSpawnerChanger;
// public static IRecipe recipeFilter;
// public static IRecipe recipePlayerProbe;
// public static IRecipe recipeDisenchantingLens;
// public static IRecipe recipeMiningLens;
// public static IRecipe recipeBag;
// public static IRecipe recipeVoidBag;
// public static IRecipe recipeLensMoreDeath;
// public static IRecipe recipeFillingWand;
// public static IRecipe recipeLaserUpgradeInvisibility;
// public static IRecipe recipeLaserUpgradeRange;
// public static IRecipe recipeGoggles;
// public static IRecipe recipeGogglesAdvanced;
//
// public static void init() {
//
// //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));
// recipeGogglesAdvanced = RecipeUtil.lastIRecipe();
//
// //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");
// recipeGoggles = RecipeUtil.lastIRecipe();
//
// //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()));
// recipeLaserUpgradeInvisibility = RecipeUtil.lastIRecipe();
//
// //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()));
// recipeLaserUpgradeRange = RecipeUtil.lastIRecipe();
//
// //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));
// recipeFillingWand = RecipeUtil.lastIRecipe();
//
// //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()));
// recipeBag = RecipeUtil.lastIRecipe();
//
// //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()));
// recipeVoidBag = RecipeUtil.lastIRecipe();
//
// //Lens
// RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.LENS.ordinal()), "GGG", "GBG", "GGG", 'G', "blockGlass", 'B', "gemQuartzBlack");
// recipeLens = RecipeUtil.lastIRecipe();
//
// //Black Dye
// RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemMisc, 2, TheMiscItems.BLACK_DYE.ordinal()), new ItemStack(InitBlocks.blockBlackLotus));
// recipeBlackDye = RecipeUtil.lastIRecipe();
//
// //Booklet
// RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemBooklet), new ItemStack(InitItems.itemCanolaSeed), new ItemStack(Items.PAPER));
// recipeBook = RecipeUtil.lastIRecipe();
//
// //Clearing NBT Storage
// 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.itemSpawnerChanger), new ItemStack(InitItems.itemSpawnerChanger));
//
// //Chest To Crate Upgrade
// RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemChestToCrateUpgrade), " W ", "WCW", " W ", 'C', new ItemStack(InitBlocks.blockGiantChest), 'W', "plankWood");
// recipeChestToCrateUpgrade = RecipeUtil.lastIRecipe();
//
// RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemSmallToMediumCrateUpgrade), " W ", "WCW", " W ", 'C', new ItemStack(InitBlocks.blockGiantChestMedium), 'W', "plankWood");
// recipeSmallToMediumCrateUpgrade = RecipeUtil.lastIRecipe();
//
// RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMediumToLargeCrateUpgrade), " W ", "WCW", " W ", 'C', new ItemStack(InitBlocks.blockGiantChestLarge), 'W', "plankWood");
// recipeMediumToLargeCrateUpgrade = RecipeUtil.lastIRecipe();
//
// //Disenchanting Lens
// 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()));
// recipeDisenchantingLens = RecipeUtil.lastIRecipe();
//
// //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");
// recipeMiningLens = RecipeUtil.lastIRecipe();
//
// //Killer Lens
// ItemStack enchBook = new ItemStack(Items.ENCHANTED_BOOK);
// ItemEnchantedBook.addEnchantment(enchBook, new EnchantmentData(Enchantments.SHARPNESS, 5));
//
// RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemMoreDamageLens), new ItemStack(Items.DIAMOND_SWORD), new ItemStack(InitItems.itemDamageLens), enchBook);
// recipeLensMoreDeath = RecipeUtil.lastIRecipe();
//
// //Filter
// RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemFilter), "III", "IQI", "III", 'I', new ItemStack(Blocks.IRON_BARS), 'Q', "gemQuartzBlack");
// recipeFilter = RecipeUtil.lastIRecipe();
//
// //Crate Keeper
// RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemCrateKeeper), "WIW", "IQI", "WIW", 'I', "ingotIron", 'W', "plankWood", 'Q', "gemQuartzBlack");
// recipeCrateKeeper = RecipeUtil.lastIRecipe();
//
// //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()));
// recipeSpawnerChanger = RecipeUtil.lastIRecipe();
//
// //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()));
// recipeLaserWrench = RecipeUtil.lastIRecipe();
//
// //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(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));
//
// //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()));
// recipeLeafBlower = RecipeUtil.lastIRecipe();
//
// //Drill
// 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()));
// recipeDrill = RecipeUtil.lastIRecipe();
//
// for (int i = 0; i < 16; i++) {
// 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);
// RECIPES_DRILL_COLORING.add(RecipeUtil.lastIRecipe());
// }
// }
//
// //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()));
// recipeDrillCore = RecipeUtil.lastIRecipe();
//
// //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));
// recipeStaff = RecipeUtil.lastIRecipe();
//
// //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()));
// 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);
// 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()));
// recipeDrillSpeedIII = RecipeUtil.lastIRecipe();
//
// //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()));
// 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()));
// recipeDrillFortuneII = RecipeUtil.lastIRecipe();
//
// //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()));
// 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()));
// recipeDrillFive = RecipeUtil.lastIRecipe();
//
// //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()));
// recipeDrillSilk = RecipeUtil.lastIRecipe();
//
// //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()));
// recipeDrillPlacing = RecipeUtil.lastIRecipe();
//
// //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()));
// recipeBattery = RecipeUtil.lastIRecipe();
//
// //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()));
// recipeBatteryDouble = RecipeUtil.lastIRecipe();
//
// //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()));
// recipeMagnetRing = RecipeUtil.lastIRecipe();
//
// //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()));
// recipeGrowthRing = RecipeUtil.lastIRecipe();
//
// //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()));
// recipeWaterRing = RecipeUtil.lastIRecipe();
//
// //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()));
// recipeBatteryTriple = RecipeUtil.lastIRecipe();
//
// //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()));
// recipeBatteryQuadruple = RecipeUtil.lastIRecipe();
//
// //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()));
// recipeBatteryQuintuple = RecipeUtil.lastIRecipe();
//
// //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()));
// recipeWings = RecipeUtil.lastIRecipe();
//
// //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()));
// recipeCoil = RecipeUtil.lastIRecipe();
//
// //Cup
// RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CUP.ordinal()), "S S", "SCS", "SSS", 'S', "stone", 'C', "cropCoffee");
// recipeCup = RecipeUtil.lastIRecipe();
//
// //Resonant Rice
// if (!OreDictionary.getOres("nuggetEnderium", false).isEmpty()) {
// RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemResonantRice), new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()), "nuggetEnderium", Items.GUNPOWDER);
// }
//
// //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");
// recipeCoilAdvanced = RecipeUtil.lastIRecipe();
//
// //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()));
// recipeLeafBlowerAdvanced = RecipeUtil.lastIRecipe();
//
// //Phantom Connector
// RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemPhantomConnector), "YE", "EY", "S ", 'Y', Items.ENDER_EYE, 'E', Items.ENDER_PEARL, 'S', "stickWood");
// recipePhantomConnector = RecipeUtil.lastIRecipe();
//
// //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));
// recipePlayerProbe = RecipeUtil.lastIRecipe();
//
// //Quartz
// GameRegistry.addSmelting(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ORE_QUARTZ.ordinal()), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), 1F);
//
// //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()));
// recipeKnife = RecipeUtil.lastIRecipe();
//
// //Crafter on a Stick
// RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemCrafterOnAStick), new ItemStack(Blocks.CRAFTING_TABLE), new ItemStack(Items.SIGN));
//
// //Tiny Coal
// if (ConfigBoolValues.TINY_COAL_STUFF.isEnabled()) {
// RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemMisc, 8, TheMiscItems.TINY_COAL.ordinal()), new ItemStack(Items.COAL));
// recipeTinyCoal = RecipeUtil.lastIRecipe();
// RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemMisc, 8, TheMiscItems.TINY_CHAR.ordinal()), new ItemStack(Items.COAL, 1, 1));
// 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, 1, 1), "CCC", "C C", "CCC", 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.TINY_CHAR.ordinal()));
// }
//
// //Rice Seeds
// RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemRiceSeed), new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()));
//
// //Canola Seeds
// RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemCanolaSeed), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CANOLA.ordinal()));
//
// //Rings
// initPotionRingRecipes();
//
// //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.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.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.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.COAL.ordinal()), new ItemStack(Items.COAL), 1F);
//
// }
//
// public static void initPotionRingRecipes() {
// RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RING.ordinal()), "IGI", "GDG", "IGI", 'G', "ingotGold", 'I', "ingotIron", 'D', "dustGlowstone");
// recipeRing = RecipeUtil.lastIRecipe();
//
// addRingRecipeWithStack(ThePotionRings.SPEED.craftingItem, ThePotionRings.SPEED.ordinal());
// addRingRecipeWithStack(ThePotionRings.HASTE.craftingItem, ThePotionRings.HASTE.ordinal());
// addRingRecipeWithStack(ThePotionRings.STRENGTH.craftingItem, ThePotionRings.STRENGTH.ordinal());
// addRingRecipeWithStack(ThePotionRings.JUMP_BOOST.craftingItem, ThePotionRings.JUMP_BOOST.ordinal());
// addRingRecipeWithStack(ThePotionRings.REGEN.craftingItem, ThePotionRings.REGEN.ordinal());
// addRingRecipeWithStack(ThePotionRings.RESISTANCE.craftingItem, ThePotionRings.RESISTANCE.ordinal());
// addRingRecipeWithStack(ThePotionRings.FIRE_RESISTANCE.craftingItem, ThePotionRings.FIRE_RESISTANCE.ordinal());
// addRingRecipeWithStack(ThePotionRings.WATER_BREATHING.craftingItem, ThePotionRings.WATER_BREATHING.ordinal());
// addRingRecipeWithStack(ThePotionRings.INVISIBILITY.craftingItem, ThePotionRings.INVISIBILITY.ordinal());
// addRingRecipeWithStack(ThePotionRings.NIGHT_VISION.craftingItem, ThePotionRings.NIGHT_VISION.ordinal());
// }
//
// public static void addRingRecipeWithStack(ItemStack mainStack, int meta) {
// ItemStack potion = new ItemStack(Items.POTIONITEM);
// 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()));
// 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()));
// RECIPES_POTION_RINGS.add(RecipeUtil.lastIRecipe());
// }
}

View file

@ -10,77 +10,67 @@
package de.ellpeck.actuallyadditions.mod.crafting;
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
import de.ellpeck.actuallyadditions.mod.items.InitItems;
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;
// TODO: [port] MOVE TO DATA_GENERATOR
@Deprecated
public final class MiscCrafting {
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_CRYSTALS = 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_CRYSTAL_BLOCKS = new IRecipe[TheCrystals.values().length];
public static void init() {
//Bio Coal
GameRegistry.addSmelting(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.BIOMASS.ordinal()), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.BIOCOAL.ordinal()), 1.0F);
//Crystals
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));
RECIPES_CRYSTAL_BLOCKS[i] = RecipeUtil.lastIRecipe();
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemCrystal, 9, i), new ItemStack(InitBlocks.blockCrystal, 1, i));
RECIPES_CRYSTALS[i] = RecipeUtil.lastIRecipe();
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();
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemCrystalEmpowered, 9, i), new ItemStack(InitBlocks.blockCrystalEmpowered, 1, i));
RECIPES_EMPOWERED_CRYSTALS[i] = RecipeUtil.lastIRecipe();
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemCrystal, 1, i), "XXX", "XXX", "XXX", 'X', new ItemStack(InitItems.itemCrystalShard, 1, i));
RECIPES_CRYSTAL_SHARDS[i] = RecipeUtil.lastIRecipe();
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemCrystalShard, 9, i), new ItemStack(InitItems.itemCrystal, 1, i));
RECIPES_CRYSTAL_SHARDS_BACK[i] = RecipeUtil.lastIRecipe();
}
//Dough
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemMisc, 2, TheMiscItems.DOUGH.ordinal()), "cropWheat", "cropWheat");
ItemCrafting.recipeDough = RecipeUtil.lastIRecipe();
//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()));
ItemCrafting.recipeRiceDough = RecipeUtil.lastIRecipe();
//Paper Cone
RecipeHandler.addShapedRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.PAPER_CONE.ordinal()), "P P", " P ", 'P', new ItemStack(Items.PAPER));
//Knife Handle
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_HANDLE.ordinal()), "stickWood", new ItemStack(Items.LEATHER));
ItemCrafting.recipeKnifeHandle = RecipeUtil.lastIRecipe();
//Knife Blade
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();
//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));
ItemCrafting.recipeEnderStar = RecipeUtil.lastIRecipe();
//Spawner Shard -> ingot
GameRegistry.addSmelting(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.SPAWNER_SHARD.ordinal()), new ItemStack(Items.IRON_INGOT, 2), 5F);
}
//
// 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_CRYSTALS = 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_CRYSTAL_BLOCKS = new IRecipe[TheCrystals.values().length];
//
// public static void init() {
//
// //Bio Coal
// GameRegistry.addSmelting(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.BIOMASS.ordinal()), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.BIOCOAL.ordinal()), 1.0F);
//
// //Crystals
// 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));
// RECIPES_CRYSTAL_BLOCKS[i] = RecipeUtil.lastIRecipe();
// RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemCrystal, 9, i), new ItemStack(InitBlocks.blockCrystal, 1, i));
// RECIPES_CRYSTALS[i] = RecipeUtil.lastIRecipe();
//
// 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();
// RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemCrystalEmpowered, 9, i), new ItemStack(InitBlocks.blockCrystalEmpowered, 1, i));
// RECIPES_EMPOWERED_CRYSTALS[i] = RecipeUtil.lastIRecipe();
//
// RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemCrystal, 1, i), "XXX", "XXX", "XXX", 'X', new ItemStack(InitItems.itemCrystalShard, 1, i));
// RECIPES_CRYSTAL_SHARDS[i] = RecipeUtil.lastIRecipe();
// RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemCrystalShard, 9, i), new ItemStack(InitItems.itemCrystal, 1, i));
// RECIPES_CRYSTAL_SHARDS_BACK[i] = RecipeUtil.lastIRecipe();
// }
//
// //Dough
// RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemMisc, 2, TheMiscItems.DOUGH.ordinal()), "cropWheat", "cropWheat");
// ItemCrafting.recipeDough = RecipeUtil.lastIRecipe();
//
// //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()));
// ItemCrafting.recipeRiceDough = RecipeUtil.lastIRecipe();
//
// //Paper Cone
// RecipeHandler.addShapedRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.PAPER_CONE.ordinal()), "P P", " P ", 'P', new ItemStack(Items.PAPER));
//
// //Knife Handle
// RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_HANDLE.ordinal()), "stickWood", new ItemStack(Items.LEATHER));
// ItemCrafting.recipeKnifeHandle = RecipeUtil.lastIRecipe();
//
// //Knife Blade
// 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();
//
// //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));
// ItemCrafting.recipeEnderStar = RecipeUtil.lastIRecipe();
//
// //Spawner Shard -> ingot
// 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;
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.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;
// TODO: [port] MOVE TO DATA_GENERATOR
@Deprecated
public class RecipeBioMash extends IForgeRegistryEntry.Impl<IRecipe> implements IRecipe {
public RecipeBioMash(ResourceLocation location) {
RecipeHelper.addRecipe(location.getPath(), this);
}
@Override
public boolean matches(InventoryCrafting inv, World world) {
boolean foundFood = false;
boolean hasKnife = false;
for (int i = 0; i < inv.getSizeInventory(); i++) {
ItemStack stack = inv.getStackInSlot(i);
if (StackUtil.isValid(stack)) {
if (stack.getItem() instanceof ItemKnife) {
if (hasKnife) {
return false;
} else {
hasKnife = true;
}
} else if (stack.getItem() instanceof ItemFood) {
foundFood = true;
} else {
return false;
}
}
}
return foundFood && hasKnife;
}
@Override
public ItemStack getCraftingResult(InventoryCrafting inv) {
int amount = 0;
for (int i = 0; i < inv.getSizeInventory(); i++) {
ItemStack stack = inv.getStackInSlot(i);
if (StackUtil.isValid(stack)) {
if (stack.getItem() instanceof ItemFood) {
ItemFood food = (ItemFood) stack.getItem();
float heal = food.getHealAmount(stack);
float sat = food.getSaturationModifier(stack);
amount += MathHelper.ceil(heal * sat);
}
}
}
if (amount > 0 && amount <= 64) {
return new ItemStack(InitItems.itemMisc, amount, TheMiscItems.MASHED_FOOD.ordinal());
} else {
return StackUtil.getEmpty();
}
}
@Override
public boolean canFit(int width, int height) {
return width * height > 5;
}
@Override
public ItemStack getRecipeOutput() {
return StackUtil.getEmpty();
}
@Override
public NonNullList<ItemStack> getRemainingItems(InventoryCrafting inv) {
return ForgeHooks.defaultRecipeGetRemainingItems(inv);
}
//
// public RecipeBioMash(ResourceLocation location) {
// RecipeHelper.addRecipe(location.getPath(), this);
// }
//
// @Override
// public boolean matches(InventoryCrafting inv, World world) {
// boolean foundFood = false;
// boolean hasKnife = false;
//
// for (int i = 0; i < inv.getSizeInventory(); i++) {
// ItemStack stack = inv.getStackInSlot(i);
// if (StackUtil.isValid(stack)) {
// if (stack.getItem() instanceof ItemKnife) {
// if (hasKnife) {
// return false;
// } else {
// hasKnife = true;
// }
// } else if (stack.getItem() instanceof ItemFood) {
// foundFood = true;
// } else {
// return false;
// }
// }
// }
//
// return foundFood && hasKnife;
// }
//
// @Override
// public ItemStack getCraftingResult(InventoryCrafting inv) {
// int amount = 0;
//
// for (int i = 0; i < inv.getSizeInventory(); i++) {
// ItemStack stack = inv.getStackInSlot(i);
// if (StackUtil.isValid(stack)) {
// if (stack.getItem() instanceof ItemFood) {
// ItemFood food = (ItemFood) stack.getItem();
// float heal = food.getHealAmount(stack);
// float sat = food.getSaturationModifier(stack);
//
// amount += MathHelper.ceil(heal * sat);
// }
// }
// }
//
// if (amount > 0 && amount <= 64) {
// return new ItemStack(InitItems.itemMisc, amount, TheMiscItems.MASHED_FOOD.ordinal());
// } else {
// return StackUtil.getEmpty();
// }
// }
//
// @Override
// public boolean canFit(int width, int height) {
// return width * height > 5;
// }
//
// @Override
// public ItemStack getRecipeOutput() {
// return StackUtil.getEmpty();
// }
//
// @Override
// public NonNullList<ItemStack> getRemainingItems(InventoryCrafting inv) {
// return ForgeHooks.defaultRecipeGetRemainingItems(inv);
// }
}

View file

@ -10,38 +10,34 @@
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;
// TODO: [port] MOVE TO DATA_GENERATOR
@Deprecated
public class RecipeKeepDataShaped extends ShapedOreRecipe {
private final ItemStack nbtCopyStack;
public RecipeKeepDataShaped(ResourceLocation group, ItemStack result, ItemStack nbtCopyStack, Object... recipe) {
super(group, result, recipe);
this.nbtCopyStack = nbtCopyStack;
RecipeHelper.addRecipe(group.getPath(), this);
}
@Override
public ItemStack getCraftingResult(InventoryCrafting inventory) {
ItemStack stack = super.getCraftingResult(inventory);
if (StackUtil.isValid(stack)) {
for (int i = 0; i < inventory.getSizeInventory(); i++) {
ItemStack input = inventory.getStackInSlot(i);
if (ItemUtil.areItemsEqual(this.nbtCopyStack, input, true)) {
stack.setTagCompound(input.getTagCompound());
break;
}
}
}
return stack;
}
//
// private final ItemStack nbtCopyStack;
//
// public RecipeKeepDataShaped(ResourceLocation group, ItemStack result, ItemStack nbtCopyStack, Object... recipe) {
// super(group, result, recipe);
// this.nbtCopyStack = nbtCopyStack;
//
// RecipeHelper.addRecipe(group.getPath(), this);
// }
//
// @Override
// public ItemStack getCraftingResult(InventoryCrafting inventory) {
// ItemStack stack = super.getCraftingResult(inventory);
// if (StackUtil.isValid(stack)) {
// for (int i = 0; i < inventory.getSizeInventory(); i++) {
// ItemStack input = inventory.getStackInSlot(i);
// if (ItemUtil.areItemsEqual(this.nbtCopyStack, input, true)) {
// stack.setTagCompound(input.getTagCompound());
// break;
// }
// }
// }
// return stack;
// }
}

View file

@ -10,37 +10,33 @@
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;
// TODO: [port] MOVE TO DATA_GENERATOR
@Deprecated
public class RecipeKeepDataShapeless extends ShapelessOreRecipe {
private final ItemStack nbtCopyStack;
public RecipeKeepDataShapeless(ResourceLocation group, ItemStack result, ItemStack nbtCopyStack, Object... recipe) {
super(group, result, recipe);
this.nbtCopyStack = nbtCopyStack;
RecipeHelper.addRecipe(group.getPath(), this);
}
@Override
public ItemStack getCraftingResult(InventoryCrafting inventory) {
ItemStack stack = super.getCraftingResult(inventory);
if (StackUtil.isValid(stack)) {
for (int i = 0; i < inventory.getSizeInventory(); i++) {
ItemStack input = inventory.getStackInSlot(i);
if (ItemUtil.areItemsEqual(this.nbtCopyStack, input, true)) {
stack.setTagCompound(input.getTagCompound());
break;
}
}
}
return stack;
}
//
// private final ItemStack nbtCopyStack;
//
// public RecipeKeepDataShapeless(ResourceLocation group, ItemStack result, ItemStack nbtCopyStack, Object... recipe) {
// super(group, result, recipe);
// this.nbtCopyStack = nbtCopyStack;
//
// RecipeHelper.addRecipe(group.getPath(), this);
// }
//
// @Override
// public ItemStack getCraftingResult(InventoryCrafting inventory) {
// ItemStack stack = super.getCraftingResult(inventory);
// if (StackUtil.isValid(stack)) {
// for (int i = 0; i < inventory.getSizeInventory(); i++) {
// ItemStack input = inventory.getStackInSlot(i);
// if (ItemUtil.areItemsEqual(this.nbtCopyStack, input, true)) {
// stack.setTagCompound(input.getTagCompound());
// break;
// }
// }
// }
// return stack;
// }
}

View file

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

View file

@ -10,93 +10,83 @@
package de.ellpeck.actuallyadditions.mod.crafting;
import java.util.ArrayList;
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;
// TODO: [port] MOVE TO DATA_GENERATOR
@Deprecated
public final class ToolCrafting {
public static final ArrayList<IRecipe> RECIPES_PAXELS = new ArrayList<>();
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("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(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.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.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);
//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));
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));
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));
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));
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));
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));
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));
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));
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));
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));
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));
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));
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));
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));
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) {
//Pickaxe
RecipeHandler.addOreDictRecipe(new ItemStack(pickaxe), "EEE", " S ", " S ", 'E', base, 'S', new ItemStack(Items.STICK));
//Sword
RecipeHandler.addOreDictRecipe(new ItemStack(sword), "E", "E", "S", 'E', base, 'S', new ItemStack(Items.STICK));
//Axe
RecipeHandler.addOreDictRecipe(new ItemStack(axe), "EE", "ES", " S", 'E', base, 'S', new ItemStack(Items.STICK));
//Shovel
RecipeHandler.addOreDictRecipe(new ItemStack(shovel), "E", "S", "S", 'E', base, 'S', new ItemStack(Items.STICK));
//Hoe
RecipeHandler.addOreDictRecipe(new ItemStack(hoe), "EE", " S", " S", 'E', base, 'S', new ItemStack(Items.STICK));
//Helm
RecipeHandler.addShapedRecipe(new ItemStack(helm), "OOO", "O O", 'O', base);
//Chest
RecipeHandler.addShapedRecipe(new ItemStack(chest), "O O", "OOO", "OOO", 'O', base);
//Legs
RecipeHandler.addShapedRecipe(new ItemStack(pants), "OOO", "O O", "O O", 'O', base);
//Boots
RecipeHandler.addShapedRecipe(new ItemStack(boots), "O O", "O O", 'O', base);
}
//
// public static final ArrayList<IRecipe> RECIPES_PAXELS = new ArrayList<>();
//
// 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("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(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.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.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);
//
// //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));
// 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));
// 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));
// 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));
// 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));
// 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));
// 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));
// 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));
// 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));
// 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));
// 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));
// 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));
// 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));
// 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));
// 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) {
// //Pickaxe
// RecipeHandler.addOreDictRecipe(new ItemStack(pickaxe), "EEE", " S ", " S ", 'E', base, 'S', new ItemStack(Items.STICK));
//
// //Sword
// RecipeHandler.addOreDictRecipe(new ItemStack(sword), "E", "E", "S", 'E', base, 'S', new ItemStack(Items.STICK));
//
// //Axe
// RecipeHandler.addOreDictRecipe(new ItemStack(axe), "EE", "ES", " S", 'E', base, 'S', new ItemStack(Items.STICK));
//
// //Shovel
// RecipeHandler.addOreDictRecipe(new ItemStack(shovel), "E", "S", "S", 'E', base, 'S', new ItemStack(Items.STICK));
//
// //Hoe
// RecipeHandler.addOreDictRecipe(new ItemStack(hoe), "EE", " S", " S", 'E', base, 'S', new ItemStack(Items.STICK));
//
// //Helm
// RecipeHandler.addShapedRecipe(new ItemStack(helm), "OOO", "O O", 'O', base);
//
// //Chest
// RecipeHandler.addShapedRecipe(new ItemStack(chest), "O O", "OOO", "OOO", 'O', base);
//
// //Legs
// RecipeHandler.addShapedRecipe(new ItemStack(pants), "OOO", "O O", "O O", 'O', base);
//
// //Boots
// 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.OnlyIn;
import net.minecraftforge.client.event.RenderGameOverlayEvent;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.TickEvent;
import net.minecraftforge.event.entity.player.ItemTooltipEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
@ -47,10 +46,6 @@ public class ClientEvents {
private static EnergyDisplay energyDisplay;
public ClientEvents() {
MinecraftForge.EVENT_BUS.register(this);
}
// TODO: [port] the fuck?
@SubscribeEvent
public void onClientTick(TickEvent.ClientTickEvent event) {
@ -179,7 +174,7 @@ public class ClientEvents {
if (StackUtil.isValid(stack)) {
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());
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) {

View file

@ -10,79 +10,59 @@
package de.ellpeck.actuallyadditions.mod.gen.village;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
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;
// TODO: [port] ADD BACK
public final class InitVillager {
public static VillagerProfession jamProfession;
public static VillagerProfession engineerProfession;
public static void init() {
ActuallyAdditions.LOGGER.info("Initializing Village Addons...");
if (ConfigBoolValues.JAM_VILLAGER_EXISTS.isEnabled()) {
initJamVillagePart();
}
if (ConfigBoolValues.CROP_FIELD_EXISTS.isEnabled()) {
initCustomCropFieldPart();
}
if (ConfigBoolValues.ENGINEER_VILLAGER_EXISTS.isEnabled()) {
initEngineerVillagePart();
}
}
private static void initEngineerVillagePart() {
VillagerRegistry.instance().registerVillageCreationHandler(new VillageEngineerHouseHandler());
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");
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(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)));
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(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(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() {
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");
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(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());
MapGenStructureIO.registerStructureComponent(VillageComponentJamHouse.class, ActuallyAdditions.MODID + ":jamHouseStructure");
}
private static void initCustomCropFieldPart() {
VillagerRegistry.instance().registerVillageCreationHandler(new VillageCustomCropFieldHandler());
MapGenStructureIO.registerStructureComponent(VillageComponentCustomCropField.class, ActuallyAdditions.MODID + ":customCropFieldStructure");
}
//
// public static VillagerProfession jamProfession;
// public static VillagerProfession engineerProfession;
//
// public static void init() {
// ActuallyAdditions.LOGGER.info("Initializing Village Addons...");
//
// if (ConfigBoolValues.JAM_VILLAGER_EXISTS.isEnabled()) {
// initJamVillagePart();
// }
// if (ConfigBoolValues.CROP_FIELD_EXISTS.isEnabled()) {
// initCustomCropFieldPart();
// }
// if (ConfigBoolValues.ENGINEER_VILLAGER_EXISTS.isEnabled()) {
// initEngineerVillagePart();
// }
// }
//
// private static void initEngineerVillagePart() {
// VillagerRegistry.instance().registerVillageCreationHandler(new VillageEngineerHouseHandler());
// 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");
//
// 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(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)));
//
// 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(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(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() {
// 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");
// 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(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());
// MapGenStructureIO.registerStructureComponent(VillageComponentJamHouse.class, ActuallyAdditions.MODID + ":jamHouseStructure");
// }
//
// private static void initCustomCropFieldPart() {
// VillagerRegistry.instance().registerVillageCreationHandler(new VillageCustomCropFieldHandler());
// 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.ItemStack;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.network.PacketBuffer;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.api.distmarker.Dist;
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);
private final ItemStackHandlerAA bagInventory;
private final InventoryPlayer inventory;
private final boolean isVoid;
private final PlayerInventory inventory;
public final boolean isVoid;
public boolean autoInsert;
private boolean oldAutoInsert;
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.bagInventory = new ItemStackHandlerAA(getSlotAmount(isVoid), (slot, stack, automation) -> !isBlacklisted(stack), ItemStackHandlerAA.REMOVE_TRUE);
this.isVoid = isVoid;
this.sack = sack;
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) {
this.addSlotToContainer(new SlotDeletion(this.bagInventory, 0, 64, 65) {
this.addSlot(new SlotDeletion(this.bagInventory, 0, 64, 65) {
@Override
public boolean isItemValid(ItemStack stack) {
return ContainerBag.this.filter.check(stack);
@ -70,7 +77,7 @@ public class ContainerBag extends Container implements IButtonReactor {
} else {
for (int i = 0; i < 4; i++) {
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
public boolean isItemValid(ItemStack 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 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++) {
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 {
this.addSlotToContainer(new Slot(inventory, i, 8 + i * 18, 152));
this.addSlot(new Slot(inventory, i, 8 + i * 18, 152));
}
}
ItemStack stack = inventory.getCurrentItem();
if (StackUtil.isValid(stack) && stack.getItem() instanceof ItemBag) {
ItemDrill.loadSlotsFromNBT(this.bagInventory, inventory.getCurrentItem());
if (stack.hasTagCompound()) {
CompoundNBT compound = stack.getTagCompound();
if (stack.hasTag()) {
CompoundNBT compound = stack.getOrCreateTag();
this.filter.readFromNBT(compound, "Filter");
this.autoInsert = compound.getBoolean("AutoInsert");
}
@ -219,7 +226,7 @@ public class ContainerBag extends Container implements IButtonReactor {
ItemStack stack = this.inventory.getCurrentItem();
if (StackUtil.isValid(stack) && stack.getItem() instanceof ItemBag) {
ItemDrill.writeSlotsToNBT(this.bagInventory, this.inventory.getCurrentItem());
CompoundNBT compound = stack.getTagCompound();
CompoundNBT compound = stack.getOrCreateTag();
this.filter.writeToNBT(compound, "Filter");
compound.putBoolean("AutoInsert", this.autoInsert);
}
@ -244,6 +251,7 @@ public class ContainerBag extends Container implements IButtonReactor {
private static boolean runOnce = false;
// TODO: [port] FIX THIS
public static boolean isBlacklisted(ItemStack stack) {
if (!runOnce) {
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;
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.util.StackUtil;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.container.Container;
import net.minecraft.inventory.container.Slot;
import net.minecraft.item.ItemStack;
import net.minecraft.network.PacketBuffer;
import java.util.Objects;
public class ContainerBioReactor extends Container {
private final TileEntityBioReactor tile;
public ContainerBioReactor(InventoryPlayer inventory, TileEntityBase tile) {
this.tile = (TileEntityBioReactor) tile;
public static ContainerBioReactor fromNetwork(int windowId, PlayerInventory inv, PacketBuffer data) {
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 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 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++) {
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) {
//Shift from Inventory
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) {
if (!this.mergeItemStack(newStack, hotbarStart, 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 (!this.mergeItemStack(newStack, hotbarStart, 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)) {
theSlot.putStack(StackUtil.getEmpty());
@ -75,7 +90,9 @@ public class ContainerBioReactor extends Container {
theSlot.onSlotChanged();
}
if (newStack.getCount() == currentStack.getCount()) { return StackUtil.getEmpty(); }
if (newStack.getCount() == currentStack.getCount()) {
return StackUtil.getEmpty();
}
theSlot.onTake(player, newStack);
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.util.StackUtil;
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.Slot;
import net.minecraft.item.ItemStack;
@ -24,7 +24,7 @@ public class ContainerBreaker extends Container {
private final TileEntityBreaker breaker;
public ContainerBreaker(InventoryPlayer inventory, TileEntityBase tile) {
public ContainerBreaker(PlayerInventory inventory, TileEntityBase tile) {
this.breaker = (TileEntityBreaker) tile;
for (int i = 0; i < 3; i++) {
@ -62,10 +62,16 @@ public class ContainerBreaker extends Container {
if (!this.mergeItemStack(newStack, 0, 9, false)) {
//
if (slot >= inventoryStart && slot <= inventoryEnd) {
if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); }
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) { return StackUtil.getEmpty(); }
if (!this.mergeItemStack(newStack, hotbarStart, 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();
}
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); }
if (!StackUtil.isValid(newStack)) {
theSlot.putStack(StackUtil.getEmpty());
@ -73,7 +79,9 @@ public class ContainerBreaker extends Container {
theSlot.onSlotChanged();
}
if (newStack.getCount() == currentStack.getCount()) { return StackUtil.getEmpty(); }
if (newStack.getCount() == currentStack.getCount()) {
return StackUtil.getEmpty();
}
theSlot.onTake(player, newStack);
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.util.StackUtil;
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.Slot;
import net.minecraft.item.ItemStack;
@ -26,7 +26,7 @@ public class ContainerCanolaPress extends Container {
private final TileEntityCanolaPress press;
public ContainerCanolaPress(InventoryPlayer inventory, TileEntityBase tile) {
public ContainerCanolaPress(PlayerInventory inventory, TileEntityBase tile) {
this.press = (TileEntityCanolaPress) tile;
this.addSlotToContainer(new SlotItemHandlerUnconditioned(this.press.inv, 0, 81, 10));
@ -58,14 +58,22 @@ public class ContainerCanolaPress extends Container {
if (slot >= inventoryStart) {
//Shift from Inventory
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) {
if (!this.mergeItemStack(newStack, hotbarStart, 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 (!this.mergeItemStack(newStack, hotbarStart, 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)) {
theSlot.putStack(StackUtil.getEmpty());
@ -73,7 +81,9 @@ public class ContainerCanolaPress extends Container {
theSlot.onSlotChanged();
}
if (newStack.getCount() == currentStack.getCount()) { return StackUtil.getEmpty(); }
if (newStack.getCount() == currentStack.getCount()) {
return StackUtil.getEmpty();
}
theSlot.onTake(player, newStack);
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.util.StackUtil;
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.Slot;
import net.minecraft.item.ItemStack;
@ -25,7 +25,7 @@ public class ContainerCoalGenerator extends Container {
private final TileEntityCoalGenerator generator;
public ContainerCoalGenerator(InventoryPlayer inventory, TileEntityBase tile) {
public ContainerCoalGenerator(PlayerInventory inventory, TileEntityBase tile) {
this.generator = (TileEntityCoalGenerator) tile;
this.addSlotToContainer(new SlotItemHandlerUnconditioned(this.generator.inv, 0, 87, 43));
@ -57,14 +57,22 @@ public class ContainerCoalGenerator extends Container {
if (slot >= inventoryStart) {
//Shift from Inventory
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) {
if (!this.mergeItemStack(newStack, hotbarStart, 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 (!this.mergeItemStack(newStack, hotbarStart, 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)) {
theSlot.putStack(StackUtil.getEmpty());
@ -72,7 +80,9 @@ public class ContainerCoalGenerator extends Container {
theSlot.onSlotChanged();
}
if (newStack.getCount() == currentStack.getCount()) { return StackUtil.getEmpty(); }
if (newStack.getCount() == currentStack.getCount()) {
return StackUtil.getEmpty();
}
theSlot.onTake(player, newStack);
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.TileEntityCoffeeMachine;
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
@ -29,7 +29,7 @@ public class ContainerCoffeeMachine extends Container {
private final TileEntityCoffeeMachine machine;
public ContainerCoffeeMachine(InventoryPlayer inventory, TileEntityBase tile) {
public ContainerCoffeeMachine(PlayerInventory inventory, TileEntityBase tile) {
this.machine = (TileEntityCoffeeMachine) tile;
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.util.StackUtil;
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.Slot;
import net.minecraft.item.ItemStack;
@ -24,7 +24,7 @@ public class ContainerDirectionalBreaker extends Container {
private final TileEntityDirectionalBreaker breaker;
public ContainerDirectionalBreaker(InventoryPlayer inventory, TileEntityBase tile) {
public ContainerDirectionalBreaker(PlayerInventory inventory, TileEntityBase tile) {
this.breaker = (TileEntityDirectionalBreaker) tile;
for (int i = 0; i < 3; i++) {
@ -62,10 +62,16 @@ public class ContainerDirectionalBreaker extends Container {
if (!this.mergeItemStack(newStack, 0, 9, false)) {
//
if (slot >= inventoryStart && slot <= inventoryEnd) {
if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); }
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) { return StackUtil.getEmpty(); }
if (!this.mergeItemStack(newStack, hotbarStart, 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();
}
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); }
if (!StackUtil.isValid(newStack)) {
theSlot.putStack(StackUtil.getEmpty());
@ -73,7 +79,9 @@ public class ContainerDirectionalBreaker extends Container {
theSlot.onSlotChanged();
}
if (newStack.getCount() == currentStack.getCount()) { return StackUtil.getEmpty(); }
if (newStack.getCount() == currentStack.getCount()) {
return StackUtil.getEmpty();
}
theSlot.onTake(player, newStack);
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.StackUtil;
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.Container;
import net.minecraft.inventory.Slot;
@ -28,9 +28,9 @@ public class ContainerDrill extends Container {
public static final int SLOT_AMOUNT = 5;
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;
for (int i = 0; i < SLOT_AMOUNT; i++) {
@ -78,14 +78,22 @@ public class ContainerDrill extends Container {
if (slot >= inventoryStart) {
//Shift from Inventory
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) {
if (!this.mergeItemStack(newStack, hotbarStart, 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 (!this.mergeItemStack(newStack, hotbarStart, 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)) {
theSlot.putStack(StackUtil.getEmpty());
@ -93,7 +101,9 @@ public class ContainerDrill extends Container {
theSlot.onSlotChanged();
}
if (newStack.getCount() == currentStack.getCount()) { return StackUtil.getEmpty(); }
if (newStack.getCount() == currentStack.getCount()) {
return StackUtil.getEmpty();
}
theSlot.onTake(player, newStack);
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.util.StackUtil;
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.Slot;
import net.minecraft.item.ItemStack;
@ -29,7 +29,7 @@ public class ContainerDropper extends Container {
public ContainerDropper(PlayerEntity player, TileEntityBase tile) {
this.dropper = (TileEntityDropper) tile;
this.player = player;
InventoryPlayer inventory = player.inventory;
PlayerInventory inventory = player.inventory;
for (int i = 0; i < 3; i++) {
for (int j = 0; j < 3; j++) {
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 (slot >= inventoryStart && slot <= inventoryEnd) {
if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); }
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) { return StackUtil.getEmpty(); }
if (!this.mergeItemStack(newStack, hotbarStart, 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();
}
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); }
if (!StackUtil.isValid(newStack)) {
theSlot.putStack(StackUtil.getEmpty());
@ -76,7 +82,9 @@ public class ContainerDropper extends Container {
theSlot.onSlotChanged();
}
if (newStack.getCount() == currentStack.getCount()) { return StackUtil.getEmpty(); }
if (newStack.getCount() == currentStack.getCount()) {
return StackUtil.getEmpty();
}
theSlot.onTake(player, newStack);
return currentStack;
@ -92,6 +100,8 @@ public class ContainerDropper extends Container {
@Override
public void onContainerClosed(PlayerEntity 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 net.minecraft.enchantment.EnchantmentHelper;
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.EntityEquipmentSlot;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
import net.minecraftforge.energy.CapabilityEnergy;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.OnlyIn;
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};
private final TileEntityEnergizer energizer;
public ContainerEnergizer(final PlayerEntity player, TileEntityBase tile) {
public ContainerEnergizer(PlayerEntity player, TileEntityBase tile) {
this.energizer = (TileEntityEnergizer) tile;
InventoryPlayer inventory = player.inventory;
PlayerInventory inventory = player.inventory;
this.addSlotToContainer(new SlotItemHandlerUnconditioned(this.energizer.inv, 0, 76, 73) {
@Override
@ -54,7 +53,7 @@ public class ContainerEnergizer extends Container {
}
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) {
@Override
public int getSlotStackLimit() {
@ -69,7 +68,9 @@ public class ContainerEnergizer extends Container {
@Override
public boolean canTakeStack(PlayerEntity player) {
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
@ -96,21 +97,31 @@ public class ContainerEnergizer extends Container {
//Slots in Inventory to shift from
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);
}
//Other Slots in Inventory excluded
else if (slot >= inventoryStart) {
//Shift from Inventory
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) {
if (!this.mergeItemStack(newStack, hotbarStart, 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 (!this.mergeItemStack(newStack, hotbarStart, 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)) {
theSlot.putStack(StackUtil.getEmpty());
@ -118,7 +129,9 @@ public class ContainerEnergizer extends Container {
theSlot.onSlotChanged();
}
if (newStack.getCount() == currentStack.getCount()) { return StackUtil.getEmpty(); }
if (newStack.getCount() == currentStack.getCount()) {
return StackUtil.getEmpty();
}
theSlot.onTake(player, newStack);
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.util.StackUtil;
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.EntityEquipmentSlot;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
import net.minecraftforge.energy.CapabilityEnergy;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.OnlyIn;
public class ContainerEnervator extends Container {
private final TileEntityEnervator enervator;
public ContainerEnervator(final PlayerEntity player, TileEntityBase tile) {
public ContainerEnervator(PlayerEntity player, TileEntityBase 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 SlotOutput(this.enervator.inv, 1, 76, 42));
@ -47,7 +46,7 @@ public class ContainerEnervator extends Container {
}
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) {
@Override
public int getSlotStackLimit() {
@ -83,21 +82,31 @@ public class ContainerEnervator extends Container {
//Slots in Inventory to shift from
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);
}
//Other Slots in Inventory excluded
else if (slot >= inventoryStart) {
//Shift from Inventory
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) {
if (!this.mergeItemStack(newStack, hotbarStart, 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 (!this.mergeItemStack(newStack, hotbarStart, 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)) {
theSlot.putStack(StackUtil.getEmpty());
@ -105,7 +114,9 @@ public class ContainerEnervator extends Container {
theSlot.onSlotChanged();
}
if (newStack.getCount() == currentStack.getCount()) { return StackUtil.getEmpty(); }
if (newStack.getCount() == currentStack.getCount()) {
return StackUtil.getEmpty();
}
theSlot.onTake(player, newStack);
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.util.StackUtil;
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.Slot;
import net.minecraft.item.ItemStack;
@ -24,7 +24,7 @@ public class ContainerFarmer extends Container {
private final TileEntityFarmer farmer;
public ContainerFarmer(InventoryPlayer inventory, TileEntityBase tile) {
public ContainerFarmer(PlayerInventory inventory, TileEntityBase tile) {
this.farmer = (TileEntityFarmer) tile;
for (int i = 0; i < 3; i++) {
@ -67,10 +67,16 @@ public class ContainerFarmer extends Container {
if (!this.mergeItemStack(newStack, 0, 6, false)) {
//
if (slot >= inventoryStart && slot <= inventoryEnd) {
if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); }
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) { return StackUtil.getEmpty(); }
if (!this.mergeItemStack(newStack, hotbarStart, 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();
}
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); }
if (!StackUtil.isValid(newStack)) {
theSlot.putStack(StackUtil.getEmpty());
@ -78,7 +84,9 @@ public class ContainerFarmer extends Container {
theSlot.onSlotChanged();
}
if (newStack.getCount() == currentStack.getCount()) { return StackUtil.getEmpty(); }
if (newStack.getCount() == currentStack.getCount()) {
return StackUtil.getEmpty();
}
theSlot.onTake(player, newStack);
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.util.StackUtil;
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.Slot;
import net.minecraft.item.ItemStack;
@ -24,7 +24,7 @@ public class ContainerFeeder extends Container {
private final TileEntityFeeder tileFeeder;
public ContainerFeeder(InventoryPlayer inventory, TileEntityBase tile) {
public ContainerFeeder(PlayerInventory inventory, TileEntityBase tile) {
this.tileFeeder = (TileEntityFeeder) tile;
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 (slot >= inventoryStart && slot <= inventoryEnd) {
if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); }
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) { return StackUtil.getEmpty(); }
if (!this.mergeItemStack(newStack, hotbarStart, 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();
}
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); }
if (!StackUtil.isValid(newStack)) {
theSlot.putStack(StackUtil.getEmpty());
@ -68,7 +74,9 @@ public class ContainerFeeder extends Container {
theSlot.onSlotChanged();
}
if (newStack.getCount() == currentStack.getCount()) { return StackUtil.getEmpty(); }
if (newStack.getCount() == currentStack.getCount()) {
return StackUtil.getEmpty();
}
theSlot.onTake(player, newStack);
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.util.StackUtil;
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.Slot;
import net.minecraft.item.ItemStack;
@ -23,7 +23,7 @@ public class ContainerFermentingBarrel extends Container {
private final TileEntityFermentingBarrel barrel;
public ContainerFermentingBarrel(InventoryPlayer inventory, TileEntityBase tile) {
public ContainerFermentingBarrel(PlayerInventory inventory, TileEntityBase tile) {
this.barrel = (TileEntityFermentingBarrel) tile;
for (int i = 0; i < 3; i++) {
@ -52,9 +52,15 @@ public class ContainerFermentingBarrel extends Container {
//Other Slots in Inventory excluded
if (slot >= inventoryStart) {
if (slot >= inventoryStart && slot <= inventoryEnd) {
if (!this.mergeItemStack(newStack, hotbarStart, 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 (!this.mergeItemStack(newStack, hotbarStart, 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)) {
theSlot.putStack(StackUtil.getEmpty());
@ -62,7 +68,9 @@ public class ContainerFermentingBarrel extends Container {
theSlot.onSlotChanged();
}
if (newStack.getCount() == currentStack.getCount()) { return StackUtil.getEmpty(); }
if (newStack.getCount() == currentStack.getCount()) {
return StackUtil.getEmpty();
}
theSlot.onTake(player, newStack);
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.StackUtil;
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.Container;
import net.minecraft.inventory.Slot;
@ -27,9 +27,9 @@ public class ContainerFilter extends Container {
public static final int SLOT_AMOUNT = 24;
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;
for (int i = 0; i < 4; i++) {
@ -75,9 +75,15 @@ public class ContainerFilter extends Container {
//Shift from Inventory
//
if (slot >= inventoryStart && slot <= inventoryEnd) {
if (!this.mergeItemStack(newStack, hotbarStart, 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 (!this.mergeItemStack(newStack, hotbarStart, 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)) {
theSlot.putStack(StackUtil.getEmpty());
@ -85,7 +91,9 @@ public class ContainerFilter extends Container {
theSlot.onSlotChanged();
}
if (newStack.getCount() == currentStack.getCount()) { return StackUtil.getEmpty(); }
if (newStack.getCount() == currentStack.getCount()) {
return StackUtil.getEmpty();
}
theSlot.onTake(player, newStack);
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.util.StackUtil;
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.Slot;
import net.minecraft.item.ItemStack;
@ -23,7 +23,7 @@ public class ContainerFluidCollector extends Container {
private final TileEntityFluidCollector collector;
public ContainerFluidCollector(InventoryPlayer inventory, TileEntityBase tile) {
public ContainerFluidCollector(PlayerInventory inventory, TileEntityBase tile) {
this.collector = (TileEntityFluidCollector) tile;
for (int i = 0; i < 3; i++) {
@ -51,15 +51,23 @@ public class ContainerFluidCollector extends Container {
//Slots in Inventory to shift from
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);
}
//Other Slots in Inventory excluded
else if (slot >= inventoryStart) {
if (slot >= inventoryStart && slot <= inventoryEnd) {
if (!this.mergeItemStack(newStack, hotbarStart, 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 (!this.mergeItemStack(newStack, hotbarStart, 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)) {
theSlot.putStack(StackUtil.getEmpty());
@ -67,7 +75,9 @@ public class ContainerFluidCollector extends Container {
theSlot.onSlotChanged();
}
if (newStack.getCount() == currentStack.getCount()) { return StackUtil.getEmpty(); }
if (newStack.getCount() == currentStack.getCount()) {
return StackUtil.getEmpty();
}
theSlot.onTake(player, newStack);
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.util.StackUtil;
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.Slot;
import net.minecraft.item.ItemStack;
@ -26,7 +26,7 @@ public class ContainerFurnaceDouble extends Container {
private final TileEntityFurnaceDouble tileFurnace;
public ContainerFurnaceDouble(InventoryPlayer inventory, TileEntityBase tile) {
public ContainerFurnaceDouble(PlayerInventory inventory, TileEntityBase tile) {
this.tileFurnace = (TileEntityFurnaceDouble) tile;
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
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);
}
//Other Slots in Inventory excluded
@ -67,15 +69,23 @@ public class ContainerFurnaceDouble extends Container {
//Shift from Inventory
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_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) {
if (!this.mergeItemStack(newStack, hotbarStart, 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 (!this.mergeItemStack(newStack, hotbarStart, 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)) {
theSlot.putStack(StackUtil.getEmpty());
@ -83,7 +93,9 @@ public class ContainerFurnaceDouble extends Container {
theSlot.onSlotChanged();
}
if (newStack.getCount() == currentStack.getCount()) { return StackUtil.getEmpty(); }
if (newStack.getCount() == currentStack.getCount()) {
return StackUtil.getEmpty();
}
theSlot.onTake(player, newStack);
return currentStack;

View file

@ -16,7 +16,7 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityGiantChest;
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import invtweaks.api.container.ChestContainer;
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.Slot;
import net.minecraft.item.ItemStack;
@ -26,7 +26,7 @@ public class ContainerGiantChest extends Container {
public final TileEntityGiantChest tileChest;
public ContainerGiantChest(InventoryPlayer inventory, TileEntityBase tile, int page) {
public ContainerGiantChest(PlayerInventory inventory, TileEntityBase tile, int page) {
this.tileChest = (TileEntityGiantChest) tile;
for (int i = 0; i < 9; i++) {
@ -64,10 +64,16 @@ public class ContainerGiantChest extends Container {
if (!this.mergeItemStack(newStack, 0, 117, false)) {
//
if (slot >= inventoryStart && slot <= inventoryEnd) {
if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); }
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) { return StackUtil.getEmpty(); }
if (!this.mergeItemStack(newStack, hotbarStart, 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, true)) {
return StackUtil.getEmpty();
}
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, true)) { return StackUtil.getEmpty(); }
if (!StackUtil.isValid(newStack)) {
theSlot.putStack(StackUtil.getEmpty());
@ -75,7 +81,9 @@ public class ContainerGiantChest extends Container {
theSlot.onSlotChanged();
}
if (newStack.getCount() == currentStack.getCount()) { return StackUtil.getEmpty(); }
if (newStack.getCount() == currentStack.getCount()) {
return StackUtil.getEmpty();
}
theSlot.onTake(player, newStack);
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.util.StackUtil;
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.Container;
import net.minecraft.inventory.Slot;
@ -29,17 +29,21 @@ public class ContainerInputter extends Container {
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.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) {
for (int i = 0; i < 2; i++) {
for (int x = 0; x < 3; x++) {
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 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++) {
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
public ItemStack transferStackInSlot(PlayerEntity player, int slot) {
int inventoryStart = this.isAdvanced ? 25 : 1;
int inventoryStart = this.isAdvanced
? 25
: 1;
int inventoryEnd = inventoryStart + 26;
int hotbarStart = inventoryEnd + 1;
int hotbarEnd = hotbarStart + 8;
@ -74,10 +84,16 @@ public class ContainerInputter extends Container {
if (!this.mergeItemStack(newStack, 0, 1, false)) {
//
if (slot >= inventoryStart && slot <= inventoryEnd) {
if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); }
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) { return StackUtil.getEmpty(); }
if (!this.mergeItemStack(newStack, hotbarStart, 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();
}
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); }
if (!StackUtil.isValid(newStack)) {
theSlot.putStack(StackUtil.getEmpty());
@ -85,7 +101,9 @@ public class ContainerInputter extends Container {
theSlot.onSlotChanged();
}
if (newStack.getCount() == currentStack.getCount()) { return StackUtil.getEmpty(); }
if (newStack.getCount() == currentStack.getCount()) {
return StackUtil.getEmpty();
}
theSlot.onTake(player, newStack);
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.util.StackUtil;
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.Container;
import net.minecraft.inventory.Slot;
@ -25,13 +25,15 @@ public class ContainerLaserRelayItemWhitelist extends Container {
private final TileEntityLaserRelayItemWhitelist tile;
public ContainerLaserRelayItemWhitelist(InventoryPlayer inventory, TileEntityBase tile) {
public ContainerLaserRelayItemWhitelist(PlayerInventory inventory, TileEntityBase tile) {
this.tile = (TileEntityLaserRelayItemWhitelist) tile;
for (int i = 0; i < 2; i++) {
for (int x = 0; x < 3; x++) {
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
if (slot >= inventoryStart) {
if (slot >= inventoryStart && slot <= inventoryEnd) {
if (!this.mergeItemStack(newStack, hotbarStart, 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 (!this.mergeItemStack(newStack, hotbarStart, 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)) {
theSlot.putStack(StackUtil.getEmpty());
@ -72,7 +80,9 @@ public class ContainerLaserRelayItemWhitelist extends Container {
theSlot.onSlotChanged();
}
if (newStack.getCount() == currentStack.getCount()) { return StackUtil.getEmpty(); }
if (newStack.getCount() == currentStack.getCount()) {
return StackUtil.getEmpty();
}
theSlot.onTake(player, newStack);
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.util.StackUtil;
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.Slot;
import net.minecraft.item.ItemStack;
@ -24,7 +24,7 @@ public class ContainerMiner extends Container {
private final TileEntityMiner miner;
public ContainerMiner(InventoryPlayer inventory, TileEntityBase tile) {
public ContainerMiner(PlayerInventory inventory, TileEntityBase tile) {
this.miner = (TileEntityMiner) tile;
for (int i = 0; i < 3; i++) {
@ -62,10 +62,16 @@ public class ContainerMiner extends Container {
if (!this.mergeItemStack(newStack, 0, 9, false)) {
//
if (slot >= inventoryStart && slot <= inventoryEnd) {
if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); }
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) { return StackUtil.getEmpty(); }
if (!this.mergeItemStack(newStack, hotbarStart, 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();
}
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); }
if (!StackUtil.isValid(newStack)) {
theSlot.putStack(StackUtil.getEmpty());
@ -73,7 +79,9 @@ public class ContainerMiner extends Container {
theSlot.onSlotChanged();
}
if (newStack.getCount() == currentStack.getCount()) { return StackUtil.getEmpty(); }
if (newStack.getCount() == currentStack.getCount()) {
return StackUtil.getEmpty();
}
theSlot.onTake(player, newStack);
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.util.StackUtil;
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.Slot;
import net.minecraft.item.ItemStack;
@ -23,7 +23,7 @@ public class ContainerOilGenerator extends Container {
private final TileEntityOilGenerator generator;
public ContainerOilGenerator(InventoryPlayer inventory, TileEntityBase tile) {
public ContainerOilGenerator(PlayerInventory inventory, TileEntityBase tile) {
this.generator = (TileEntityOilGenerator) tile;
for (int i = 0; i < 3; i++) {
@ -52,9 +52,15 @@ public class ContainerOilGenerator extends Container {
//Other Slots in Inventory excluded
if (slot >= inventoryStart) {
if (slot >= inventoryStart && slot <= inventoryEnd) {
if (!this.mergeItemStack(newStack, hotbarStart, 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 (!this.mergeItemStack(newStack, hotbarStart, 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)) {
theSlot.putStack(StackUtil.getEmpty());
@ -62,7 +68,9 @@ public class ContainerOilGenerator extends Container {
theSlot.onSlotChanged();
}
if (newStack.getCount() == currentStack.getCount()) { return StackUtil.getEmpty(); }
if (newStack.getCount() == currentStack.getCount()) {
return StackUtil.getEmpty();
}
theSlot.onTake(player, newStack);
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.util.StackUtil;
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.Slot;
import net.minecraft.item.ItemStack;
@ -24,7 +24,7 @@ public class ContainerPhantomPlacer extends Container {
private final TileEntityPhantomPlacer placer;
public ContainerPhantomPlacer(InventoryPlayer inventory, TileEntityBase tile) {
public ContainerPhantomPlacer(PlayerInventory inventory, TileEntityBase tile) {
this.placer = (TileEntityPhantomPlacer) tile;
for (int i = 0; i < 3; i++) {
@ -62,10 +62,16 @@ public class ContainerPhantomPlacer extends Container {
if (!this.mergeItemStack(newStack, 0, 9, false)) {
//
if (slot >= inventoryStart && slot <= inventoryEnd) {
if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); }
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) { return StackUtil.getEmpty(); }
if (!this.mergeItemStack(newStack, hotbarStart, 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();
}
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); }
if (!StackUtil.isValid(newStack)) {
theSlot.putStack(StackUtil.getEmpty());
@ -73,7 +79,9 @@ public class ContainerPhantomPlacer extends Container {
theSlot.onSlotChanged();
}
if (newStack.getCount() == currentStack.getCount()) { return StackUtil.getEmpty(); }
if (newStack.getCount() == currentStack.getCount()) {
return StackUtil.getEmpty();
}
theSlot.onTake(player, newStack);
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.util.StackUtil;
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.Container;
import net.minecraft.inventory.Slot;
@ -26,7 +26,7 @@ public class ContainerRangedCollector extends Container {
private final TileEntityRangedCollector collector;
public ContainerRangedCollector(InventoryPlayer inventory, TileEntityBase tile) {
public ContainerRangedCollector(PlayerInventory inventory, TileEntityBase tile) {
this.collector = (TileEntityRangedCollector) tile;
for (int i = 0; i < 2; i++) {
@ -69,10 +69,16 @@ public class ContainerRangedCollector extends Container {
if (!this.mergeItemStack(newStack, 0, 6, false)) {
//
if (slot >= inventoryStart && slot <= inventoryEnd) {
if (!this.mergeItemStack(newStack, hotbarStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); }
} else if (slot >= inventoryEnd + 1 && slot < hotbarEnd + 1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd + 1, false)) { return StackUtil.getEmpty(); }
if (!this.mergeItemStack(newStack, hotbarStart, 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();
}
} else if (!this.mergeItemStack(newStack, inventoryStart, hotbarEnd + 1, false)) { return StackUtil.getEmpty(); }
if (!StackUtil.isValid(newStack)) {
theSlot.putStack(StackUtil.getEmpty());
@ -80,7 +86,9 @@ public class ContainerRangedCollector extends Container {
theSlot.onSlotChanged();
}
if (newStack.getCount() == currentStack.getCount()) { return StackUtil.getEmpty(); }
if (newStack.getCount() == currentStack.getCount()) {
return StackUtil.getEmpty();
}
theSlot.onTake(player, newStack);
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.util.StackUtil;
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.Slot;
import net.minecraft.item.ItemStack;
@ -25,7 +25,7 @@ public class ContainerRepairer extends Container {
private final TileEntityItemRepairer tileRepairer;
public ContainerRepairer(InventoryPlayer inventory, TileEntityBase tile) {
public ContainerRepairer(PlayerInventory inventory, TileEntityBase tile) {
this.tileRepairer = (TileEntityItemRepairer) tile;
this.addSlotToContainer(new SlotItemHandlerUnconditioned(this.tileRepairer.inv, TileEntityItemRepairer.SLOT_INPUT, 47, 53));
@ -58,14 +58,22 @@ public class ContainerRepairer extends Container {
if (slot >= inventoryStart) {
//Shift from Inventory
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) {
if (!this.mergeItemStack(newStack, hotbarStart, 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 (!this.mergeItemStack(newStack, hotbarStart, 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)) {
theSlot.putStack(StackUtil.getEmpty());
@ -73,7 +81,9 @@ public class ContainerRepairer extends Container {
theSlot.onSlotChanged();
}
if (newStack.getCount() == currentStack.getCount()) { return StackUtil.getEmpty(); }
if (newStack.getCount() == currentStack.getCount()) {
return StackUtil.getEmpty();
}
theSlot.onTake(player, newStack);
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.util.StackUtil;
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.Slot;
import net.minecraft.item.ItemStack;
@ -26,7 +26,7 @@ public class ContainerXPSolidifier extends Container {
private final TileEntityXPSolidifier solidifier;
public ContainerXPSolidifier(InventoryPlayer inventory, TileEntityBase tile) {
public ContainerXPSolidifier(PlayerInventory inventory, TileEntityBase tile) {
this.solidifier = (TileEntityXPSolidifier) tile;
this.addSlotToContainer(new SlotOutput(this.solidifier.inv, 0, 95, 8));
@ -58,11 +58,19 @@ public class ContainerXPSolidifier extends Container {
//Other Slots in Inventory excluded
if (slot >= inventoryStart) {
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) {
if (!this.mergeItemStack(newStack, hotbarStart, 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 (!this.mergeItemStack(newStack, hotbarStart, 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)) {
theSlot.putStack(StackUtil.getEmpty());
@ -70,7 +78,9 @@ public class ContainerXPSolidifier extends Container {
theSlot.onSlotChanged();
}
if (newStack.getCount() == currentStack.getCount()) { return StackUtil.getEmpty(); }
if (newStack.getCount() == currentStack.getCount()) {
return StackUtil.getEmpty();
}
theSlot.onTake(player, newStack);
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.misc.BookletUtils;
import de.ellpeck.actuallyadditions.mod.data.PlayerData;
import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiBag;
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.inventory.gui.*;
import de.ellpeck.actuallyadditions.mod.items.ItemBooklet;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
import de.ellpeck.actuallyadditions.mod.util.compat.CompatUtil;
@ -221,10 +194,10 @@ public class GuiHandler implements IGuiHandler {
return new GuiMiner(player.inventory, tile);
case LASER_RELAY_ITEM_WHITELIST:
return new GuiLaserRelayItemWhitelist(player.inventory, tile);
case BAG:
return new GuiBag(player.getHeldItemMainhand(), player.inventory, false);
case VOID_BAG:
return new GuiBag(player.getHeldItemMainhand(), player.inventory, true);
// case BAG:
// return new GuiBag(player.getHeldItemMainhand(), player.inventory, false);
// case VOID_BAG:
// return new GuiBag(player.getHeldItemMainhand(), player.inventory, true);
case BIO_REACTOR:
return new GuiBioReactor(player.inventory, tile);
case FARMER:

View file

@ -10,6 +10,8 @@
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.inventory.ContainerBag;
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.StringUtil;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.client.gui.widget.button.Button;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextFormatting;
import net.minecraftforge.fml.relauncher.OnlyIn;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
@OnlyIn(Dist.CLIENT)
public class GuiBag extends GuiWtfMojang {
public class GuiBag extends GuiWtfMojang<ContainerBag> {
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_bag");
private static final ResourceLocation RES_LOC_VOID = AssetUtil.getGuiLocation("gui_void_bag");
private final ContainerBag container;
private final boolean isVoid;
private FilterSettingsGui filter;
private GuiButton buttonAutoInsert;
private Button buttonAutoInsert;
public GuiBag(ItemStack sack, InventoryPlayer inventory, boolean isVoid) {
this(isVoid, new ContainerBag(sack, inventory, isVoid));
}
private GuiBag(boolean isVoid, ContainerBag container) {
super(container);
public GuiBag(ContainerBag container, PlayerInventory inventory, ITextComponent title) {
super(container, inventory);
this.xSize = 176;
this.ySize = 90 + 86;
this.isVoid = isVoid;
this.isVoid = container.isVoid;
this.container = container;
}
@ -86,27 +80,14 @@ public class GuiBag extends GuiWtfMojang {
@Override
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"
: "bag") + ".name"));
}
@Override
public void drawGuiContainerBackgroundLayer(float f, int x, int y) {
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
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);
public void render(MatrixStack stack, int mouseX, int mouseY, float partialTicks) {
super.render(stack, mouseX, mouseY, partialTicks);
this.filter.drawHover(mouseX, mouseY);
if (this.buttonAutoInsert.isMouseOver()) {
@ -114,9 +95,22 @@ public class GuiBag extends GuiWtfMojang {
text.add(TextFormatting.BOLD + "Auto-Insert " + (this.container.autoInsert
? "On"
: "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.mc.fontRenderer.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);
text.addAll(this.font.listFormattedStringToWidth("Turn this on to make items that get picked up automatically go into the bag.", 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.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 net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.ResourceLocation;
public class GuiBioReactor extends GuiWtfMojang {
@ -25,7 +25,7 @@ public class GuiBioReactor extends GuiWtfMojang {
private final TileEntityBioReactor tile;
private EnergyDisplay energy;
public GuiBioReactor(InventoryPlayer inventory, TileEntityBase tile) {
public GuiBioReactor(PlayerInventory inventory, TileEntityBase tile) {
super(new ContainerBioReactor(inventory, tile));
this.tile = (TileEntityBioReactor) tile;
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.util.AssetUtil;
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.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.OnlyIn;
@OnlyIn(Dist.CLIENT)
@ -26,7 +25,7 @@ public class GuiBreaker extends GuiWtfMojang {
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_breaker");
private final TileEntityBreaker breaker;
public GuiBreaker(InventoryPlayer inventory, TileEntityBase tile) {
public GuiBreaker(PlayerInventory inventory, TileEntityBase tile) {
super(new ContainerBreaker(inventory, tile));
this.breaker = (TileEntityBreaker) tile;
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.util.AssetUtil;
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.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.OnlyIn;
@OnlyIn(Dist.CLIENT)
@ -28,7 +27,7 @@ public class GuiCanolaPress extends GuiWtfMojang {
private EnergyDisplay energy;
private FluidDisplay fluid;
public GuiCanolaPress(InventoryPlayer inventory, TileEntityBase tile) {
public GuiCanolaPress(PlayerInventory inventory, TileEntityBase tile) {
super(new ContainerCanolaPress(inventory, tile));
this.press = (TileEntityCanolaPress) tile;
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.util.AssetUtil;
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.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.OnlyIn;
@OnlyIn(Dist.CLIENT)
@ -27,7 +26,7 @@ public class GuiCoalGenerator extends GuiWtfMojang {
private final TileEntityCoalGenerator generator;
private EnergyDisplay energy;
public GuiCoalGenerator(InventoryPlayer inventory, TileEntityBase tile) {
public GuiCoalGenerator(PlayerInventory inventory, TileEntityBase tile) {
super(new ContainerCoalGenerator(inventory, tile));
this.generator = (TileEntityCoalGenerator) tile;
this.xSize = 176;

View file

@ -10,8 +10,6 @@
package de.ellpeck.actuallyadditions.mod.inventory.gui;
import java.util.Collections;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.inventory.ContainerCoffeeMachine;
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 net.minecraft.client.gui.GuiButton;
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.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.OnlyIn;
import java.util.Collections;
@OnlyIn(Dist.CLIENT)
public class GuiCoffeeMachine extends GuiWtfMojang {
@ -35,7 +34,7 @@ public class GuiCoffeeMachine extends GuiWtfMojang {
private EnergyDisplay energy;
private FluidDisplay fluid;
public GuiCoffeeMachine(InventoryPlayer inventory, TileEntityBase tile) {
public GuiCoffeeMachine(PlayerInventory inventory, TileEntityBase tile) {
super(new ContainerCoffeeMachine(inventory, tile));
this.machine = (TileEntityCoffeeMachine) tile;
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.util.AssetUtil;
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.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.OnlyIn;
@OnlyIn(Dist.CLIENT)
@ -27,7 +26,7 @@ public class GuiDirectionalBreaker extends GuiWtfMojang {
private final TileEntityDirectionalBreaker breaker;
private EnergyDisplay energy;
public GuiDirectionalBreaker(InventoryPlayer inventory, TileEntityBase tile) {
public GuiDirectionalBreaker(PlayerInventory inventory, TileEntityBase tile) {
super(new ContainerDirectionalBreaker(inventory, tile));
this.breaker = (TileEntityDirectionalBreaker) tile;
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.StringUtil;
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.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.OnlyIn;
@OnlyIn(Dist.CLIENT)
@ -25,7 +24,7 @@ public class GuiDrill extends GuiWtfMojang {
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_drill");
public GuiDrill(InventoryPlayer inventory) {
public GuiDrill(PlayerInventory inventory) {
super(new ContainerDrill(inventory));
this.xSize = 176;
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.util.AssetUtil;
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.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.OnlyIn;
@OnlyIn(Dist.CLIENT)
@ -28,7 +27,7 @@ public class GuiFarmer extends GuiWtfMojang {
private EnergyDisplay energy;
public GuiFarmer(InventoryPlayer inventory, TileEntityBase tile) {
public GuiFarmer(PlayerInventory inventory, TileEntityBase tile) {
super(new ContainerFarmer(inventory, tile));
this.farmer = (TileEntityFarmer) tile;
this.xSize = 176;

View file

@ -10,8 +10,6 @@
package de.ellpeck.actuallyadditions.mod.inventory.gui;
import java.util.Arrays;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.inventory.ContainerFeeder;
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.StringUtil;
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.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.OnlyIn;
import java.util.Arrays;
@OnlyIn(Dist.CLIENT)
public class GuiFeeder extends GuiWtfMojang {
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_feeder");
public final TileEntityFeeder tileFeeder;
public GuiFeeder(InventoryPlayer inventory, TileEntityBase tile) {
public GuiFeeder(PlayerInventory inventory, TileEntityBase tile) {
super(new ContainerFeeder(inventory, tile));
this.tileFeeder = (TileEntityFeeder) tile;
this.xSize = 176;
@ -41,7 +40,11 @@ public class GuiFeeder extends GuiWtfMojang {
public void drawScreen(int x, int y, float 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) {
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);
}
}

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.util.AssetUtil;
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.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.OnlyIn;
@OnlyIn(Dist.CLIENT)
@ -28,7 +27,7 @@ public class GuiFermentingBarrel extends GuiWtfMojang {
private FluidDisplay input;
private FluidDisplay output;
public GuiFermentingBarrel(InventoryPlayer inventory, TileEntityBase tile) {
public GuiFermentingBarrel(PlayerInventory inventory, TileEntityBase tile) {
super(new ContainerFermentingBarrel(inventory, tile));
this.press = (TileEntityFermentingBarrel) tile;
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.StringUtil;
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.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.OnlyIn;
@OnlyIn(Dist.CLIENT)
@ -25,7 +24,7 @@ public class GuiFilter extends GuiWtfMojang {
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_filter");
public GuiFilter(InventoryPlayer inventory) {
public GuiFilter(PlayerInventory inventory) {
super(new ContainerFilter(inventory));
this.xSize = 176;
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.util.AssetUtil;
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.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.OnlyIn;
@OnlyIn(Dist.CLIENT)
@ -27,7 +26,7 @@ public class GuiFluidCollector extends GuiWtfMojang {
private final TileEntityFluidCollector collector;
private FluidDisplay fluid;
public GuiFluidCollector(InventoryPlayer inventory, TileEntityBase tile) {
public GuiFluidCollector(PlayerInventory inventory, TileEntityBase tile) {
super(new ContainerFluidCollector(inventory, tile));
this.collector = (TileEntityFluidCollector) tile;
this.xSize = 176;

View file

@ -10,9 +10,6 @@
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.inventory.ContainerFurnaceDouble;
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 net.minecraft.client.gui.GuiButton;
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.text.TextFormatting;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.OnlyIn;
import java.io.IOException;
import java.util.Collections;
@OnlyIn(Dist.CLIENT)
public class GuiFurnaceDouble extends GuiWtfMojang {
@ -37,7 +36,7 @@ public class GuiFurnaceDouble extends GuiWtfMojang {
private GuiButton buttonAutoSplit;
public GuiFurnaceDouble(InventoryPlayer inventory, TileEntityBase tile) {
public GuiFurnaceDouble(PlayerInventory inventory, TileEntityBase tile) {
super(new ContainerFurnaceDouble(inventory, tile));
this.tileFurnace = (TileEntityFurnaceDouble) tile;
this.xSize = 176;
@ -50,7 +49,9 @@ public class GuiFurnaceDouble extends GuiWtfMojang {
this.energy.drawOverlay(x, y);
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() {
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

View file

@ -10,8 +10,6 @@
package de.ellpeck.actuallyadditions.mod.inventory.gui;
import java.io.IOException;
import de.ellpeck.actuallyadditions.mod.inventory.ContainerGiantChest;
import de.ellpeck.actuallyadditions.mod.network.PacketHandlerHelper;
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 net.minecraft.client.gui.GuiButton;
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.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.OnlyIn;
import java.io.IOException;
@OnlyIn(Dist.CLIENT)
public class GuiGiantChest extends GuiWtfMojang {
@ -34,7 +33,7 @@ public class GuiGiantChest extends GuiWtfMojang {
private final TileEntityGiantChest chest;
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));
this.chest = (TileEntityGiantChest) tile;
this.page = page;

View file

@ -10,9 +10,6 @@
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.inventory.ContainerGrinder;
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 net.minecraft.client.gui.GuiButton;
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.text.TextFormatting;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.OnlyIn;
import java.io.IOException;
import java.util.Collections;
@OnlyIn(Dist.CLIENT)
public class GuiGrinder extends GuiWtfMojang {
@ -39,11 +38,11 @@ public class GuiGrinder extends GuiWtfMojang {
private GuiButton buttonAutoSplit;
public GuiGrinder(InventoryPlayer inventoryPlayer, TileEntityBase tile) {
public GuiGrinder(PlayerInventory inventoryPlayer, TileEntityBase tile) {
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));
this.tileGrinder = (TileEntityGrinder) tile;
this.isDouble = isDouble;
@ -54,7 +53,9 @@ public class GuiGrinder extends GuiWtfMojang {
@Override
public void 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) {
this.buttonAutoSplit = new GuiInputter.SmallerButton(0, this.guiLeft - 10, this.guiTop, "S");
@ -74,7 +75,9 @@ public class GuiGrinder extends GuiWtfMojang {
super.updateScreen();
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()) {
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.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);
if (this.tileGrinder.firstCrushTime > 0) {
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.tileGrinder.secondCrushTime > 0) {
@ -120,7 +129,7 @@ public class GuiGrinder extends GuiWtfMojang {
public static class GuiGrinderDouble extends GuiGrinder {
public GuiGrinderDouble(InventoryPlayer inventory, TileEntityBase tile) {
public GuiGrinderDouble(PlayerInventory inventory, TileEntityBase tile) {
super(inventory, tile, true);
}
}

View file

@ -10,10 +10,6 @@
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.inventory.ContainerInputter;
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.GuiTextField;
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.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.OnlyIn;
import org.lwjgl.input.Keyboard;
import java.io.IOException;
@OnlyIn(Dist.CLIENT)
public class GuiInputter extends GuiWtfMojang {
@ -47,11 +45,13 @@ public class GuiInputter extends GuiWtfMojang {
private FilterSettingsGui leftFilter;
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));
this.tileInputter = (TileEntityInputter) tile;
this.xSize = 176;
this.ySize = 97 + 86 + (isAdvanced ? OFFSET_ADVANCED : 0);
this.ySize = 97 + 86 + (isAdvanced
? OFFSET_ADVANCED
: 0);
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.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.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.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.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.setEnableBackgroundDrawing(false);
SmallerButton buttonSidePutP = new SmallerButton(0, this.guiLeft + 155, this.guiTop + 43 + (this.isAdvanced ? OFFSET_ADVANCED : 0), ">");
SmallerButton buttonSidePutM = new SmallerButton(1, this.guiLeft + 90, this.guiTop + 43 + (this.isAdvanced ? OFFSET_ADVANCED : 0), "<");
SmallerButton buttonSidePutP = new SmallerButton(0, this.guiLeft + 155, this.guiTop + 43 + (this.isAdvanced
? 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 buttonSidePullM = new SmallerButton(3, this.guiLeft + 5, 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 buttonSidePullM = new SmallerButton(3, this.guiLeft + 5, this.guiTop + 43 + (this.isAdvanced
? OFFSET_ADVANCED
: 0), "<");
this.buttonList.add(buttonSidePutP);
this.buttonList.add(buttonSidePullP);
this.buttonList.add(buttonSidePutM);
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
public void drawScreen(int x, int y, float 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!
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);
@ -127,21 +147,43 @@ public class GuiInputter extends GuiWtfMojang {
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
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.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 97 + (this.isAdvanced ? OFFSET_ADVANCED : 0));
this.mc.getTextureManager().bindTexture(this.isAdvanced
? 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.outbound"), this.guiLeft + 104 + 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
? 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.sideToPut + 1], this.guiLeft + 109 + 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
? 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.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.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.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.fieldPutEnd.drawTextBox();
@ -241,7 +283,9 @@ public class GuiInputter extends GuiWtfMojang {
}
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;
}
@ -255,7 +299,9 @@ public class GuiInputter extends GuiWtfMojang {
GlStateManager.enableBlend();
GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
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);
int color = 14737632;

View file

@ -10,9 +10,6 @@
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.inventory.ContainerLaserRelayItemWhitelist;
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 net.minecraft.client.gui.GuiButton;
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.text.TextFormatting;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.OnlyIn;
import java.util.ArrayList;
import java.util.List;
@OnlyIn(Dist.CLIENT)
public class GuiLaserRelayItemWhitelist extends GuiWtfMojang {
@ -41,7 +40,7 @@ public class GuiLaserRelayItemWhitelist extends GuiWtfMojang {
private GuiButton buttonSmartWhitelistLeft;
private GuiButton buttonSmartWhitelistRight;
public GuiLaserRelayItemWhitelist(InventoryPlayer inventory, TileEntityBase tile) {
public GuiLaserRelayItemWhitelist(PlayerInventory inventory, TileEntityBase tile) {
super(new ContainerLaserRelayItemWhitelist(inventory, tile));
this.tile = (TileEntityLaserRelayItemWhitelist) tile;
this.xSize = 176;

View file

@ -18,9 +18,8 @@ import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.gui.GuiButton;
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.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.OnlyIn;
@OnlyIn(Dist.CLIENT)
@ -29,7 +28,7 @@ public class GuiMiner extends GuiWtfMojang {
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_breaker");
private final TileEntityMiner miner;
public GuiMiner(InventoryPlayer inventory, TileEntityBase tile) {
public GuiMiner(PlayerInventory inventory, TileEntityBase tile) {
super(new ContainerMiner(inventory, tile));
this.miner = (TileEntityMiner) tile;
this.xSize = 176;
@ -62,7 +61,9 @@ public class GuiMiner extends GuiWtfMojang {
this.mc.getTextureManager().bindTexture(RES_LOC);
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);
}

View file

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

View file

@ -10,10 +10,6 @@
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.inventory.ContainerPhantomPlacer;
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 net.minecraft.client.gui.GuiButton;
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.text.TextFormatting;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.OnlyIn;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
@OnlyIn(Dist.CLIENT)
public class GuiPhantomPlacer extends GuiWtfMojang {
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_breaker");
private final TileEntityPhantomPlacer placer;
public GuiPhantomPlacer(InventoryPlayer inventory, TileEntityBase tile) {
public GuiPhantomPlacer(PlayerInventory inventory, TileEntityBase tile) {
super(new ContainerPhantomPlacer(inventory, tile));
this.placer = (TileEntityPhantomPlacer) tile;
this.xSize = 176;

View file

@ -17,9 +17,8 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityRangedCollector;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import net.minecraft.client.gui.GuiButton;
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.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.OnlyIn;
@OnlyIn(Dist.CLIENT)
@ -30,7 +29,7 @@ public class GuiRangedCollector extends GuiWtfMojang {
private FilterSettingsGui filter;
public GuiRangedCollector(InventoryPlayer inventory, TileEntityBase tile) {
public GuiRangedCollector(PlayerInventory inventory, TileEntityBase tile) {
super(new ContainerRangedCollector(inventory, tile));
this.collector = (TileEntityRangedCollector) tile;
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.util.AssetUtil;
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.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.OnlyIn;
@OnlyIn(Dist.CLIENT)
@ -27,7 +26,7 @@ public class GuiRepairer extends GuiWtfMojang {
private final TileEntityItemRepairer tileRepairer;
private EnergyDisplay energy;
public GuiRepairer(InventoryPlayer inventory, TileEntityBase tile) {
public GuiRepairer(PlayerInventory inventory, TileEntityBase tile) {
super(new ContainerRepairer(inventory, tile));
this.tileRepairer = (TileEntityItemRepairer) tile;
this.xSize = 176;

View file

@ -10,19 +10,22 @@
package de.ellpeck.actuallyadditions.mod.inventory.gui;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.inventory.Container;
import com.mojang.blaze3d.matrix.MatrixStack;
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) {
super(inventorySlotsIn);
public GuiWtfMojang(T inventorySlotsIn, PlayerInventory inventory) {
super(inventorySlotsIn, inventory, StringTextComponent.EMPTY);
}
@Override
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
this.drawDefaultBackground();
super.drawScreen(mouseX, mouseY, partialTicks);
this.renderHoveredToolTip(mouseX, mouseY);
public void render(MatrixStack matrixStack, int mouseX, int mouseY, float partialTicks) {
this.renderBackground(matrixStack);
super.render(matrixStack, mouseX, mouseY, partialTicks);
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.gui.GuiButton;
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.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 final TileEntityXPSolidifier solidifier;
public GuiXPSolidifier(InventoryPlayer inventory, TileEntityBase tile) {
public GuiXPSolidifier(PlayerInventory inventory, TileEntityBase tile) {
super(new ContainerXPSolidifier(inventory, tile));
this.solidifier = (TileEntityXPSolidifier) tile;
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.inventory.IInventory;
import net.minecraft.inventory.Slot;
import net.minecraft.inventory.container.Slot;
import net.minecraft.item.ItemStack;
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.items.base.*;
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.TheMiscItems;
import de.ellpeck.actuallyadditions.mod.material.InitArmorMaterials;
import de.ellpeck.actuallyadditions.mod.material.InitToolMaterials;
import de.ellpeck.actuallyadditions.mod.material.ArmorMaterials;
import de.ellpeck.actuallyadditions.mod.material.ToolMaterials;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityGiantChest;
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.MobEffects;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemTier;
import net.minecraft.potion.PotionEffect;
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 static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, ActuallyAdditions.MODID);
public static Item itemBooklet;
public static Item itemFertilizer;
public static Item itemMisc;
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;
// REMOVE ME
@Deprecated
public static final RegistryObject<Item> itemMisc = ITEMS.register("item_misc", ItemBase::new);
public static void init() {
ActuallyAdditions.LOGGER.info("Initializing Items...");
// SHARDS
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");
itemEngineerGogglesAdvanced = new ItemEngineerGoggles("item_engineer_goggles_advanced", true);
itemEngineerGoggles = new ItemEngineerGoggles("item_engineer_goggles", false);
itemLaserUpgradeRange = new ItemLaserRelayUpgrade("item_laser_upgrade_range");
itemLaserUpgradeInvisibility = new ItemLaserRelayUpgrade("item_laser_upgrade_invisibility");
itemFillingWand = new ItemFillingWand("item_filling_wand");
itemBag = new ItemBag("item_bag", false);
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);
// CRYSTALS
public static final RegistryObject<Item> RESTONIA_CRYSTAL = ITEMS.register("restonia_crystal", ItemBase::new);
public static final RegistryObject<Item> PALIS_CRYSTAL = ITEMS.register("palis_crystal", ItemBase::new);
public static final RegistryObject<Item> DIAMATINE_CRYSTAL = ITEMS.register("diamatine_crystal", ItemBase::new);
public static final RegistryObject<Item> VOID_CRYSTAL = ITEMS.register("void_crystal", ItemBase::new);
public static final RegistryObject<Item> EMERADIC_CRYSTAL = ITEMS.register("emeradic_crystal", ItemBase::new);
public static final RegistryObject<Item> ENORI_CRYSTAL = ITEMS.register("enori_crystal", ItemBase::new);
itemPickaxeCrystalRed = new ItemPickaxeAA(InitToolMaterials.toolMaterialCrystalRed, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), "item_pickaxe_crystal_red", Util.CRYSTAL_RED_RARITY);
itemAxeCrystalRed = new ItemAxeAA(InitToolMaterials.toolMaterialCrystalRed, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), "item_axe_crystal_red", Util.CRYSTAL_RED_RARITY);
itemShovelCrystalRed = new ItemShovelAA(InitToolMaterials.toolMaterialCrystalRed, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), "item_shovel_crystal_red", Util.CRYSTAL_RED_RARITY);
itemSwordCrystalRed = new ItemSwordAA(InitToolMaterials.toolMaterialCrystalRed, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), "item_sword_crystal_red", Util.CRYSTAL_RED_RARITY);
itemHoeCrystalRed = new ItemHoeAA(InitToolMaterials.toolMaterialCrystalRed, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), "item_hoe_crystal_red", Util.CRYSTAL_RED_RARITY);
itemHelmCrystalRed = new ItemArmorAA("item_helm_crystal_red", InitArmorMaterials.armorMaterialCrystalRed, 0, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), Util.CRYSTAL_RED_RARITY);
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);
public static final RegistryObject<Item> RESTONIA_EMPOWERED_CRYSTAL = ITEMS.register("restonia_empowered_crystal", ItemBase::new);
public static final RegistryObject<Item> PALIS_EMPOWERED_CRYSTAL = ITEMS.register("palis_empowered_crystal", ItemBase::new);
public static final RegistryObject<Item> DIAMATINE_EMPOWERED_CRYSTAL = ITEMS.register("diamatine_empowered_crystal", ItemBase::new);
public static final RegistryObject<Item> VOID_EMPOWERED_CRYSTAL = ITEMS.register("void_empowered_crystal", ItemBase::new);
public static final RegistryObject<Item> EMERADIC_EMPOWERED_CRYSTAL = ITEMS.register("emeradic_empowered_crystal", ItemBase::new);
public static final RegistryObject<Item> ENORI_EMPOWERED_CRYSTAL = ITEMS.register("enori_empowered_crystal", ItemBase::new);
itemPickaxeCrystalBlue = new ItemPickaxeAA(InitToolMaterials.toolMaterialCrystalBlue, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.LAPIS.ordinal()), "item_pickaxe_crystal_blue", Util.CRYSTAL_BLUE_RARITY);
itemAxeCrystalBlue = new ItemAxeAA(InitToolMaterials.toolMaterialCrystalBlue, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.LAPIS.ordinal()), "item_axe_crystal_blue", Util.CRYSTAL_BLUE_RARITY);
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);
// BLACK QUARTZ
public static final RegistryObject<Item> BLACK_QUARTZ = ITEMS.register("black_quartz", ItemBase::new));
itemPickaxeCrystalLightBlue = new ItemPickaxeAA(InitToolMaterials.toolMaterialCrystalLightBlue, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), "item_pickaxe_crystal_light_blue", Util.CRYSTAL_LIGHT_BLUE_RARITY);
itemAxeCrystalLightBlue = new ItemAxeAA(InitToolMaterials.toolMaterialCrystalLightBlue, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), "item_axe_crystal_light_blue", Util.CRYSTAL_LIGHT_BLUE_RARITY);
itemShovelCrystalLightBlue = new ItemShovelAA(InitToolMaterials.toolMaterialCrystalLightBlue, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), "item_shovel_crystal_light_blue", Util.CRYSTAL_LIGHT_BLUE_RARITY);
itemSwordCrystalLightBlue = new ItemSwordAA(InitToolMaterials.toolMaterialCrystalLightBlue, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), "item_sword_crystal_light_blue", Util.CRYSTAL_LIGHT_BLUE_RARITY);
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);
@Deprecated
public static final RegistryObject<Item> itemCrystal = ITEMS.register("", new ItemCrystal("item_crystal", false));
@Deprecated
public static final RegistryObject<Item> itemCrystalEmpowered = ITEMS.register("", new ItemCrystal("item_crystal_empowered", true));
itemPickaxeCrystalBlack = new ItemPickaxeAA(InitToolMaterials.toolMaterialCrystalBlack, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()), "item_pickaxe_crystal_black", Util.CRYSTAL_BLACK_RARITY);
itemAxeCrystalBlack = new ItemAxeAA(InitToolMaterials.toolMaterialCrystalBlack, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()), "item_axe_crystal_black", Util.CRYSTAL_BLACK_RARITY);
itemShovelCrystalBlack = new ItemShovelAA(InitToolMaterials.toolMaterialCrystalBlack, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()), "item_shovel_crystal_black", Util.CRYSTAL_BLACK_RARITY);
itemSwordCrystalBlack = new ItemSwordAA(InitToolMaterials.toolMaterialCrystalBlack, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()), "item_sword_crystal_black", Util.CRYSTAL_BLACK_RARITY);
itemHoeCrystalBlack = new ItemHoeAA(InitToolMaterials.toolMaterialCrystalBlack, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()), "item_hoe_crystal_black", Util.CRYSTAL_BLACK_RARITY);
itemHelmCrystalBlack = new ItemArmorAA("item_helm_crystal_black", InitArmorMaterials.armorMaterialCrystalBlack, 0, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()), Util.CRYSTAL_BLACK_RARITY);
itemChestCrystalBlack = new ItemArmorAA("item_chest_crystal_black", InitArmorMaterials.armorMaterialCrystalBlack, 1, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()), Util.CRYSTAL_BLACK_RARITY);
itemPantsCrystalBlack = new ItemArmorAA("item_pants_crystal_black", InitArmorMaterials.armorMaterialCrystalBlack, 2, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()), Util.CRYSTAL_BLACK_RARITY);
itemBootsCrystalBlack = new ItemArmorAA("item_boots_crystal_black", InitArmorMaterials.armorMaterialCrystalBlack, 3, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()), Util.CRYSTAL_BLACK_RARITY);
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> itemEngineerGogglesAdvanced = ITEMS.register("", new ItemEngineerGoggles("item_engineer_goggles_advanced", true));
public static final RegistryObject<Item> itemEngineerGoggles = ITEMS.register("", new ItemEngineerGoggles("item_engineer_goggles", false));
public static final RegistryObject<Item> itemLaserUpgradeRange = ITEMS.register("item_laser_upgrade_range", ItemLaserRelayUpgrade::new);
public static final RegistryObject<Item> itemLaserUpgradeInvisibility = ITEMS.register("item_laser_upgrade_invisibility", ItemLaserRelayUpgrade::new);
public static final RegistryObject<Item> itemFillingWand = ITEMS.register("item_filling_wand", ItemFillingWand::new);
public static final RegistryObject<Item> itemBag = ITEMS.register("", new ItemBag("item_bag", false));
public static final RegistryObject<Item> itemVoidBag = ITEMS.register("", new ItemBag("item_void_bag", true));
public static final RegistryObject<Item> itemWorm = ITEMS.register("item_worm", ItemWorm::new);
public static final RegistryObject<Item> itemPlayerProbe = ITEMS.register("item_player_probe", ItemPlayerProbe::new);
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);
itemAxeCrystalGreen = new ItemAxeAA(InitToolMaterials.toolMaterialCrystalGreen, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.EMERALD.ordinal()), "item_axe_crystal_green", Util.CRYSTAL_GREEN_RARITY);
itemShovelCrystalGreen = new ItemShovelAA(InitToolMaterials.toolMaterialCrystalGreen, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.EMERALD.ordinal()), "item_shovel_crystal_green", Util.CRYSTAL_GREEN_RARITY);
itemSwordCrystalGreen = new ItemSwordAA(InitToolMaterials.toolMaterialCrystalGreen, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.EMERALD.ordinal()), "item_sword_crystal_green", Util.CRYSTAL_GREEN_RARITY);
itemHoeCrystalGreen = new ItemHoeAA(InitToolMaterials.toolMaterialCrystalGreen, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.EMERALD.ordinal()), "item_hoe_crystal_green", Util.CRYSTAL_GREEN_RARITY);
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);
// TOOLS & ARMOR
public static final RegistryObject<Item> itemHelmQuartz = ITEMS.register("item_helm_quartz", () -> new ItemArmorAA(ArmorMaterials.QUARTZ, 0));
public static final RegistryObject<Item> itemChestQuartz = ITEMS.register("item_chest_quartz", () -> new ItemArmorAA(ArmorMaterials.QUARTZ, 1));
public static final RegistryObject<Item> itemPantsQuartz = ITEMS.register("item_pants_quartz", () -> new ItemArmorAA(ArmorMaterials.QUARTZ, 2));
public static final RegistryObject<Item> itemBootsQuartz = ITEMS.register("item_boots_quartz", () -> new ItemArmorAA(ArmorMaterials.QUARTZ, 3));
itemPickaxeCrystalWhite = new ItemPickaxeAA(InitToolMaterials.toolMaterialCrystalWhite, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), "item_pickaxe_crystal_white", Util.CRYSTAL_WHITE_RARITY);
itemAxeCrystalWhite = new ItemAxeAA(InitToolMaterials.toolMaterialCrystalWhite, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), "item_axe_crystal_white", Util.CRYSTAL_WHITE_RARITY);
itemShovelCrystalWhite = new ItemShovelAA(InitToolMaterials.toolMaterialCrystalWhite, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), "item_shovel_crystal_white", Util.CRYSTAL_WHITE_RARITY);
itemSwordCrystalWhite = new ItemSwordAA(InitToolMaterials.toolMaterialCrystalWhite, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), "item_sword_crystal_white", Util.CRYSTAL_WHITE_RARITY);
itemHoeCrystalWhite = new ItemHoeAA(InitToolMaterials.toolMaterialCrystalWhite, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), "item_hoe_crystal_white", Util.CRYSTAL_WHITE_RARITY);
itemHelmCrystalWhite = new ItemArmorAA("item_helm_crystal_white", InitArmorMaterials.armorMaterialCrystalWhite, 0, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), Util.CRYSTAL_WHITE_RARITY);
itemChestCrystalWhite = new ItemArmorAA("item_chest_crystal_white", InitArmorMaterials.armorMaterialCrystalWhite, 1, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), Util.CRYSTAL_WHITE_RARITY);
itemPantsCrystalWhite = new ItemArmorAA("item_pants_crystal_white", InitArmorMaterials.armorMaterialCrystalWhite, 2, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), Util.CRYSTAL_WHITE_RARITY);
itemBootsCrystalWhite = new ItemArmorAA("item_boots_crystal_white", InitArmorMaterials.armorMaterialCrystalWhite, 3, new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), Util.CRYSTAL_WHITE_RARITY);
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> itemPickaxeQuartz = ITEMS.register("item_pickaxe_quartz", () -> new ItemPickaxeAA(ToolMaterials.QUARTZ));
public static final RegistryObject<Item> itemAxeQuartz = ITEMS.register("item_axe_quartz", () -> new ItemAxeAA(ToolMaterials.QUARTZ));
public static final RegistryObject<Item> itemShovelQuartz = ITEMS.register("item_shovel_quartz", () -> new ItemShovelAA(ToolMaterials.QUARTZ));
public static final RegistryObject<Item> itemSwordQuartz = ITEMS.register("item_sword_quartz", () -> new ItemSwordAA(ToolMaterials.QUARTZ));
public static final RegistryObject<Item> itemHoeQuartz = ITEMS.register("item_hoe_quartz", () -> new ItemHoeAA(ToolMaterials.QUARTZ));
public static final RegistryObject<Item> woodenPaxel = ITEMS.register("wooden_paxel", () -> new ItemAllToolAA(ItemTier.WOOD));
public static final RegistryObject<Item> stonePaxel = ITEMS.register("stone_paxel", () -> new ItemAllToolAA(ItemTier.STONE));
public static final RegistryObject<Item> ironPaxel = ITEMS.register("iron_paxel", () -> new ItemAllToolAA(ItemTier.IRON));
public static final RegistryObject<Item> goldPaxel = ITEMS.register("gold_paxel", () -> new ItemAllToolAA(ItemTier.GOLD));
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.util.IColorProvidingItem;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.color.IItemColor;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.IItemTier;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Direction;
import net.minecraft.util.EnumActionResult;
@ -29,7 +31,7 @@ import net.minecraft.util.Hand;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.common.IRarity;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.fml.relauncher.OnlyIn;
import java.util.HashSet;
@ -39,17 +41,9 @@ public class ItemAllToolAA extends ItemToolAA implements IColorProvidingItem {
public final int color;
public ItemAllToolAA(ToolMaterial toolMat, String 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.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;
public ItemAllToolAA(IItemTier toolMat) {
super(4.0F, -2F, toolMat, this.repairItem, unlocalizedName, this.rarity, new HashSet<>());
this.color = this.color;
this.setMaxDamage(toolMat.getMaxUses() * 4);
this.setHarvestLevels(toolMat.getHarvestLevel());

View file

@ -13,11 +13,11 @@ package de.ellpeck.actuallyadditions.mod.items;
import com.google.common.collect.Sets;
import de.ellpeck.actuallyadditions.mod.items.base.ItemToolAA;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.material.Material;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.IItemTier;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.IRarity;
import java.util.Collections;
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);
public ItemAxeAA(Item.ToolMaterial material, String repairItem, String unlocalizedName, IRarity rarity) {
super(6.0F, -3.0F, material, repairItem, unlocalizedName, 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);
public ItemAxeAA(IItemTier material) {
super(6.0F, -3.0F, material, this.repairItem, unlocalizedName, this.rarity, EFFECTIVE_ON);
this.setHarvestLevel("axe", material.getHarvestLevel());
}

View file

@ -10,6 +10,7 @@
package de.ellpeck.actuallyadditions.mod.items;
import com.mojang.blaze3d.matrix.MatrixStack;
import de.ellpeck.actuallyadditions.api.booklet.IBookletPage;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
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.StringUtil;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.client.MainWindow;
import net.minecraft.client.Minecraft;
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.text.TextFormatting;
import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.fml.relauncher.OnlyIn;
import javax.annotation.Nullable;
@ -98,11 +101,11 @@ public class ItemBooklet extends ItemBase implements IHudDisplay {
@Override
@OnlyIn(Dist.CLIENT)
public void displayHud(Minecraft minecraft, PlayerEntity player, ItemStack stack, RayTraceResult posHit, MainWindow resolution) {
if (posHit != null && posHit.getBlockPos() != null) {
BlockState state = minecraft.world.getBlockState(posHit.getBlockPos());
public void displayHud(MatrixStack matrices, Minecraft minecraft, PlayerEntity player, ItemStack stack, RayTraceResult rayCast, MainWindow resolution) {
if (rayCast != null && rayCast.getBlockPos() != null) {
BlockState state = minecraft.world.getBlockState(rayCast.getBlockPos());
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));
int height = resolution.getScaledHeight() / 5 * 3;
if (player.isSneaking()) {

View file

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

View file

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

View file

@ -13,11 +13,11 @@ package de.ellpeck.actuallyadditions.mod.items;
import com.google.common.collect.Sets;
import de.ellpeck.actuallyadditions.mod.items.base.ItemToolAA;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.block.material.Material;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.IItemTier;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.IRarity;
import java.util.Collections;
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);
public ItemPickaxeAA(Item.ToolMaterial material, String repairItem, String unlocalizedName, IRarity rarity) {
super(1.0F, -2.8F, material, repairItem, unlocalizedName, 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);
public ItemPickaxeAA(IItemTier material) {
super(1.0F, -2.8F, material, this.repairItem, unlocalizedName, this.rarity, EFFECTIVE_ON);
this.setHarvestLevel("pickaxe", material.getHarvestLevel());
}

View file

@ -13,17 +13,17 @@ package de.ellpeck.actuallyadditions.mod.items;
import com.google.common.collect.Sets;
import de.ellpeck.actuallyadditions.mod.items.base.ItemToolAA;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.IItemTier;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Direction;
import net.minecraft.util.EnumActionResult;
import net.minecraft.util.Hand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.common.IRarity;
import java.util.Collections;
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);
public ItemShovelAA(Item.ToolMaterial material, String repairItem, String unlocalizedName, IRarity rarity) {
super(1.5F, -3.0F, material, repairItem, unlocalizedName, 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);
public ItemShovelAA(IItemTier material) {
super(1.5F, -3.0F, material, this.repairItem, unlocalizedName, this.rarity, EFFECTIVE_ON);
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.StackUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ArmorItem;
import net.minecraft.item.IArmorMaterial;
import net.minecraft.item.ItemStack;
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 String name;
private final IRarity rarity;
private final boolean disabled;
public ItemArmorAA(String name, ArmorMaterial material, int type, ItemStack repairItem) {
this(name, material, type, repairItem, EnumRarity.RARE);
}
public ItemArmorAA(String name, ArmorMaterial material, int type, ItemStack repairItem, IRarity rarity) {
public ItemArmorAA(IArmorMaterial material, int type) {
super(material, 0, ContainerEnergizer.VALID_EQUIPMENT_SLOTS[type]);
this.repairItem = repairItem;
this.name = name;
this.rarity = 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.");
if (!this.disabled) this.register();
this.repairItem = this.repairItem;
this.name = this.name;
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.");
if (!this.disabled) {
this.register();
}
}
private void register() {

View file

@ -10,36 +10,15 @@
package de.ellpeck.actuallyadditions.mod.items.base;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
import de.ellpeck.actuallyadditions.mod.items.InitItems;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
public class ItemBase extends Item {
private final String name;
public ItemBase(String name) {
this.name = name;
this.register();
public ItemBase(Properties props) {
super(props);
}
private void register() {
ItemUtil.registerItem(this, this.getBaseName(), this.shouldAddCreative());
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");
public ItemBase() {
super(InitItems.defaultProps());
}
}

View file

@ -15,27 +15,29 @@ import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.config.ConfigurationHandler;
import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.item.Item;
import net.minecraft.item.ItemHoe;
import net.minecraft.item.HoeItem;
import net.minecraft.item.IItemTier;
import net.minecraft.item.ItemStack;
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 IRarity rarity;
private final ItemStack repairItem;
private final boolean disabled;
public ItemHoeAA(Item.ToolMaterial toolMat, ItemStack repairItem, String unlocalizedName, IRarity rarity) {
public ItemHoeAA(IItemTier toolMat) {
super(toolMat);
this.repairItem = repairItem;
this.repairItem = this.repairItem;
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.");
if (!this.disabled) this.register();
if (!this.disabled) {
this.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.util.ItemUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.item.IItemTier;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemSword;
import net.minecraft.item.SwordItem;
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 IRarity rarity;
private final ItemStack repairItem;
private final boolean disabled;
public ItemSwordAA(ToolMaterial toolMat, ItemStack repairItem, String unlocalizedName, IRarity rarity) {
public ItemSwordAA(IItemTier toolMat) {
super(toolMat);
this.repairItem = repairItem;
this.repairItem = this.repairItem;
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.");
if (!this.disabled) this.register();
if (!this.disabled) {
this.register();
}
}
private void register() {

View file

@ -10,8 +10,6 @@
package de.ellpeck.actuallyadditions.mod.items.base;
import java.util.Set;
import de.ellpeck.actuallyadditions.api.misc.IDisableableItem;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
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 net.minecraft.block.Block;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemTool;
import net.minecraft.item.ToolItem;
import net.minecraftforge.common.IRarity;
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 IRarity rarity;
@ -44,7 +44,9 @@ public class ItemToolAA extends ItemTool implements IDisableableItem {
this.name = unlocalizedName;
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.");
if (!this.disabled) this.register();
if (!this.disabled) {
this.register();
}
}
private void register() {
@ -77,7 +79,9 @@ public class ItemToolAA extends ItemTool implements IDisableableItem {
} else if (this.repairOredict != null) {
int[] idsStack = OreDictionary.getOreIDs(stack);
for (int id : idsStack) {
if (OreDictionary.getOreName(id).equals(this.repairOredict)) { return true; }
if (OreDictionary.getOreName(id).equals(this.repairOredict)) {
return true;
}
}
}
return false;

View file

@ -10,160 +10,134 @@
package de.ellpeck.actuallyadditions.mod.items.lens;
import java.util.ArrayList;
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;
// TODO: [port] ADD BACK WITH DATA GENS
public final class LensRecipeHandler {
public static final ArrayList<LensConversionRecipe> MAIN_PAGE_RECIPES = new ArrayList<>();
public static LensConversionRecipe recipeColorLens;
public static LensConversionRecipe recipeSoulSand;
public static LensConversionRecipe recipeGreenWall;
public static LensConversionRecipe recipeWhiteWall;
public static LensConversionRecipe recipeExplosionLens;
public static LensConversionRecipe recipeDamageLens;
public static LensConversionRecipe recipeLeather;
public static LensConversionRecipe recipeNetherWart;
public static LensConversionRecipe recipePrismarine;
public static LensConversionRecipe recipeCrystallizedCanolaSeed;
public static LensConversionRecipe recipeItemLaser;
public static LensConversionRecipe recipeFluidLaser;
public static EnchBookConversion recipeEnchBook;
//
// public static final ArrayList<LensConversionRecipe> MAIN_PAGE_RECIPES = new ArrayList<>();
// public static LensConversionRecipe recipeColorLens;
// public static LensConversionRecipe recipeSoulSand;
// public static LensConversionRecipe recipeGreenWall;
// public static LensConversionRecipe recipeWhiteWall;
// public static LensConversionRecipe recipeExplosionLens;
// public static LensConversionRecipe recipeDamageLens;
// public static LensConversionRecipe recipeLeather;
// public static LensConversionRecipe recipeNetherWart;
// public static LensConversionRecipe recipePrismarine;
// public static LensConversionRecipe recipeCrystallizedCanolaSeed;
// public static LensConversionRecipe recipeItemLaser;
// public static LensConversionRecipe recipeFluidLaser;
// public static EnchBookConversion recipeEnchBook;
//
public static void init() {
//Crystal Blocks
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(fromBlock(Blocks.REDSTONE_BLOCK), new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.REDSTONE.ordinal()), 400);
MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe());
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(fromBlock(Blocks.LAPIS_BLOCK), new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.LAPIS.ordinal()), 400);
MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe());
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(fromBlock(Blocks.DIAMOND_BLOCK), new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.DIAMOND.ordinal()), 600);
MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe());
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(fromBlock(Blocks.EMERALD_BLOCK), new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.EMERALD.ordinal()), 1000);
MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe());
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(fromBlock(Blocks.COAL_BLOCK), new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.COAL.ordinal()), 600);
MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe());
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(fromBlock(Blocks.IRON_BLOCK), new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.IRON.ordinal()), 800);
MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe());
//Crystal Items
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromItems(Items.REDSTONE), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), 40);
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);
MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe());
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromItems(Items.DIAMOND), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), 60);
MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe());
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromItems(Items.EMERALD), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.EMERALD.ordinal()), 100);
MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe());
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromItems(Items.COAL), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()), 60);
MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe());
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromItems(Items.IRON_INGOT), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), 80);
MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe());
//Lenses
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromStacks(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.LENS.ordinal())), new ItemStack(InitItems.itemColorLens), 5000);
recipeColorLens = RecipeUtil.lastReconstructorRecipe();
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromItems(InitItems.itemColorLens), new ItemStack(InitItems.itemExplosionLens), 5000);
recipeExplosionLens = RecipeUtil.lastReconstructorRecipe();
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromItems(InitItems.itemExplosionLens), new ItemStack(InitItems.itemDamageLens), 5000);
recipeDamageLens = RecipeUtil.lastReconstructorRecipe();
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);
recipeFluidLaser = RecipeUtil.lastReconstructorRecipe();
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(fromBlock(InitBlocks.blockLaserRelayFluids), new ItemStack(InitBlocks.blockLaserRelayItem), 2000);
recipeItemLaser = RecipeUtil.lastReconstructorRecipe();
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(fromBlock(InitBlocks.blockLaserRelayItem), new ItemStack(InitBlocks.blockLaserRelay), 2000);
//Misc
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(fromBlock(Blocks.SAND), new ItemStack(Blocks.SOUL_SAND), 20000);
recipeSoulSand = RecipeUtil.lastReconstructorRecipe();
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromItems(Items.ROTTEN_FLESH), new ItemStack(Items.LEATHER), 8000);
recipeLeather = RecipeUtil.lastReconstructorRecipe();
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(fromBlock(Blocks.RED_MUSHROOM), new ItemStack(Items.NETHER_WART), 150000);
recipeNetherWart = RecipeUtil.lastReconstructorRecipe();
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromItems(Items.QUARTZ), new ItemStack(Items.PRISMARINE_SHARD), 30000);
recipePrismarine = RecipeUtil.lastReconstructorRecipe();
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromItems(InitItems.itemCanolaSeed), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CRYSTALLIZED_CANOLA_SEED.ordinal()), 2000);
recipeCrystallizedCanolaSeed = RecipeUtil.lastReconstructorRecipe();
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(fromBlock(Blocks.QUARTZ_BLOCK), new ItemStack(InitBlocks.blockTestifiBucksWhiteWall), 10);
recipeWhiteWall = RecipeUtil.lastReconstructorRecipe();
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromStacks(new ItemStack(Blocks.QUARTZ_BLOCK, 1, 1)), new ItemStack(InitBlocks.blockTestifiBucksGreenWall), 10);
recipeGreenWall = RecipeUtil.lastReconstructorRecipe();
ActuallyAdditionsAPI.RECONSTRUCTOR_LENS_CONVERSION_RECIPES.add(recipeEnchBook = new EnchBookConversion());
IColorLensChanger changer = new ColorLensChangerByDyeMeta();
if (ConfigBoolValues.COLOR_LENS_USES_OREDICT.isEnabled()) {
initOredictDyeRotator();
} else {
ActuallyAdditionsAPI.addReconstructorLensColorChangeItem(Items.DYE, changer);
}
ActuallyAdditionsAPI.addReconstructorLensColorChangeItem(Item.getItemFromBlock(Blocks.WOOL), changer);
ActuallyAdditionsAPI.addReconstructorLensColorChangeItem(Item.getItemFromBlock(Blocks.STAINED_GLASS), changer);
ActuallyAdditionsAPI.addReconstructorLensColorChangeItem(Item.getItemFromBlock(Blocks.STAINED_GLASS_PANE), changer);
ActuallyAdditionsAPI.addReconstructorLensColorChangeItem(Item.getItemFromBlock(Blocks.STAINED_HARDENED_CLAY), changer);
ActuallyAdditionsAPI.addReconstructorLensColorChangeItem(Item.getItemFromBlock(Blocks.CARPET), changer);
ActuallyAdditionsAPI.addReconstructorLensColorChangeItem(Item.getItemFromBlock(InitBlocks.blockColoredLamp), 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);
// //Crystal Blocks
// ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(fromBlock(Blocks.REDSTONE_BLOCK), new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.REDSTONE.ordinal()), 400);
// MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe());
// ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(fromBlock(Blocks.LAPIS_BLOCK), new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.LAPIS.ordinal()), 400);
// MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe());
// ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(fromBlock(Blocks.DIAMOND_BLOCK), new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.DIAMOND.ordinal()), 600);
// MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe());
// ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(fromBlock(Blocks.EMERALD_BLOCK), new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.EMERALD.ordinal()), 1000);
// MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe());
// ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(fromBlock(Blocks.COAL_BLOCK), new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.COAL.ordinal()), 600);
// MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe());
// ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(fromBlock(Blocks.IRON_BLOCK), new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.IRON.ordinal()), 800);
// MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe());
//
// //Crystal Items
// ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromItems(Items.REDSTONE), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), 40);
// 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);
// MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe());
// ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromItems(Items.DIAMOND), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), 60);
// MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe());
// ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromItems(Items.EMERALD), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.EMERALD.ordinal()), 100);
// MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe());
// ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromItems(Items.COAL), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()), 60);
// MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe());
// ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromItems(Items.IRON_INGOT), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), 80);
// MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe());
//
// //Lenses
// ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromStacks(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.LENS.ordinal())), new ItemStack(InitItems.itemColorLens), 5000);
// recipeColorLens = RecipeUtil.lastReconstructorRecipe();
// ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromItems(InitItems.itemColorLens), new ItemStack(InitItems.itemExplosionLens), 5000);
// recipeExplosionLens = RecipeUtil.lastReconstructorRecipe();
// ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromItems(InitItems.itemExplosionLens), new ItemStack(InitItems.itemDamageLens), 5000);
// recipeDamageLens = RecipeUtil.lastReconstructorRecipe();
// 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);
// recipeFluidLaser = RecipeUtil.lastReconstructorRecipe();
// ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(fromBlock(InitBlocks.blockLaserRelayFluids), new ItemStack(InitBlocks.blockLaserRelayItem), 2000);
// recipeItemLaser = RecipeUtil.lastReconstructorRecipe();
// ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(fromBlock(InitBlocks.blockLaserRelayItem), new ItemStack(InitBlocks.blockLaserRelay), 2000);
//
// //Misc
// ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(fromBlock(Blocks.SAND), new ItemStack(Blocks.SOUL_SAND), 20000);
// recipeSoulSand = RecipeUtil.lastReconstructorRecipe();
// ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromItems(Items.ROTTEN_FLESH), new ItemStack(Items.LEATHER), 8000);
// recipeLeather = RecipeUtil.lastReconstructorRecipe();
//
// ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(fromBlock(Blocks.RED_MUSHROOM), new ItemStack(Items.NETHER_WART), 150000);
// recipeNetherWart = RecipeUtil.lastReconstructorRecipe();
// ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromItems(Items.QUARTZ), new ItemStack(Items.PRISMARINE_SHARD), 30000);
// recipePrismarine = RecipeUtil.lastReconstructorRecipe();
//
// ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromItems(InitItems.itemCanolaSeed), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CRYSTALLIZED_CANOLA_SEED.ordinal()), 2000);
// recipeCrystallizedCanolaSeed = RecipeUtil.lastReconstructorRecipe();
//
// ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(fromBlock(Blocks.QUARTZ_BLOCK), new ItemStack(InitBlocks.blockTestifiBucksWhiteWall), 10);
// recipeWhiteWall = RecipeUtil.lastReconstructorRecipe();
// ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(Ingredient.fromStacks(new ItemStack(Blocks.QUARTZ_BLOCK, 1, 1)), new ItemStack(InitBlocks.blockTestifiBucksGreenWall), 10);
// recipeGreenWall = RecipeUtil.lastReconstructorRecipe();
//
// ActuallyAdditionsAPI.RECONSTRUCTOR_LENS_CONVERSION_RECIPES.add(recipeEnchBook = new EnchBookConversion());
//
// IColorLensChanger changer = new ColorLensChangerByDyeMeta();
// if (ConfigBoolValues.COLOR_LENS_USES_OREDICT.isEnabled()) {
// initOredictDyeRotator();
// } else {
// ActuallyAdditionsAPI.addReconstructorLensColorChangeItem(Items.DYE, changer);
// }
// ActuallyAdditionsAPI.addReconstructorLensColorChangeItem(Item.getItemFromBlock(Blocks.WOOL), changer);
// ActuallyAdditionsAPI.addReconstructorLensColorChangeItem(Item.getItemFromBlock(Blocks.STAINED_GLASS), changer);
// ActuallyAdditionsAPI.addReconstructorLensColorChangeItem(Item.getItemFromBlock(Blocks.STAINED_GLASS_PANE), changer);
// ActuallyAdditionsAPI.addReconstructorLensColorChangeItem(Item.getItemFromBlock(Blocks.STAINED_HARDENED_CLAY), changer);
// ActuallyAdditionsAPI.addReconstructorLensColorChangeItem(Item.getItemFromBlock(Blocks.CARPET), changer);
// ActuallyAdditionsAPI.addReconstructorLensColorChangeItem(Item.getItemFromBlock(InitBlocks.blockColoredLamp), 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);
// }
}

View file

@ -14,6 +14,7 @@ import de.ellpeck.actuallyadditions.mod.util.Util;
import net.minecraft.util.IStringSerializable;
import net.minecraftforge.common.IRarity;
@Deprecated
public enum TheCrystals implements IStringSerializable {
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