use of net.minecraftforge.fluids.FluidStack in project Minechem by iopleke.
the class GuiFluidTank method draw.
@Override
public void draw(int guiLeft, int guiTop) {
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glColor3f(ColourHelper.getRed(colour), ColourHelper.getGreen(colour), ColourHelper.getBlue(colour));
bindTexture(Compendium.Resource.GUI.Element.fluidTank);
drawTexturedModalRect(guiLeft + posX, guiTop + posY, 0, 0, 18, 39, width, height);
GL11.glColor3f(1.0F, 1.0F, 1.0F);
int iconHeightRemainder = (height - 4) % 16;
int iconWidthRemainder = (width - 2) % 16;
FluidStack fluidStack = tank.getFluid();
if (fluidStack != null && fluidStack.amount > 0) {
bindTexture(TextureMap.locationBlocksTexture);
IIcon fluidIcon = fluidStack.getFluid().getStillIcon();
// Top left corner
drawTexturedModelRectFromIcon(guiLeft + posX + 1, guiTop + posY + 2, fluidIcon, iconWidthRemainder, iconHeightRemainder);
for (int i = 0; i <= (width - 4) / 16; i++) {
// Top right only draw when more then 1 pass is needed
if (i > 0) {
drawTexturedModelRectFromIcon(guiLeft + posX + 1 + (i - 1) * 16 + iconWidthRemainder, guiTop + posY + 2, fluidIcon, 16, iconHeightRemainder);
}
for (int ii = 0; ii < (height - 6) / 16; ii++) {
// Bottom right only draw when more then 1 pass is needed
if (i > 0) {
drawTexturedModelRectFromIcon(guiLeft + posX + 1 + (i - 1) * 16 + iconWidthRemainder, guiTop + posY + 2 + ii * 16 + iconHeightRemainder, fluidIcon, 16, 16);
}
// Bottom left
drawTexturedModelRectFromIcon(guiLeft + posX + 1, guiTop + posY + 2 + ii * 16 + iconHeightRemainder, fluidIcon, iconWidthRemainder, 16);
}
}
bindTexture(Compendium.Resource.GUI.Element.fluidTank);
drawTexturedModalRect(guiLeft + posX + 2, guiTop + posY + 1, 1, 1, 15, 37 - ((int) ((38) * ((float) fluidStack.amount / tank.getCapacity()))), width - 3, height - 2 - ((int) ((height - 1) * ((float) fluidStack.amount / tank.getCapacity()))));
}
bindTexture(Compendium.Resource.GUI.Element.fluidTank);
drawTexturedModalRect(guiLeft + posX + 1, guiTop + posY + 1, 19, 1, 16, 37, width - 2, height - 2);
drawTooltip(Mouse.getX() - guiLeft, Mouse.getY() - guiTop);
GL11.glEnable(GL11.GL_LIGHTING);
}
use of net.minecraftforge.fluids.FluidStack in project ImmersiveEngineering by BluSunrize.
the class IEContent method init.
public static void init() {
/**TILEENTITIES*/
registerTile(TileEntityIESlab.class);
registerTile(TileEntityBalloon.class);
registerTile(TileEntityStripCurtain.class);
registerTile(TileEntityCokeOven.class);
registerTile(TileEntityBlastFurnace.class);
registerTile(TileEntityBlastFurnaceAdvanced.class);
registerTile(TileEntityCoresample.class);
registerTile(TileEntityWoodenCrate.class);
registerTile(TileEntityWoodenBarrel.class);
registerTile(TileEntityModWorkbench.class);
registerTile(TileEntitySorter.class);
registerTile(TileEntityTurntable.class);
registerTile(TileEntityFluidSorter.class);
registerTile(TileEntityWatermill.class);
registerTile(TileEntityWindmill.class);
registerTile(TileEntityWindmillAdvanced.class);
registerTile(TileEntityWoodenPost.class);
registerTile(TileEntityWallmount.class);
registerTile(TileEntityLantern.class);
registerTile(TileEntityRazorWire.class);
registerTile(TileEntityToolbox.class);
registerTile(TileEntityConnectorLV.class);
registerTile(TileEntityRelayLV.class);
registerTile(TileEntityConnectorMV.class);
registerTile(TileEntityRelayMV.class);
registerTile(TileEntityConnectorHV.class);
registerTile(TileEntityRelayHV.class);
registerTile(TileEntityConnectorStructural.class);
registerTile(TileEntityTransformer.class);
registerTile(TileEntityTransformerHV.class);
registerTile(TileEntityBreakerSwitch.class);
registerTile(TileEntityRedstoneBreaker.class);
registerTile(TileEntityEnergyMeter.class);
registerTile(TileEntityConnectorRedstone.class);
registerTile(TileEntityCapacitorLV.class);
registerTile(TileEntityCapacitorMV.class);
registerTile(TileEntityCapacitorHV.class);
registerTile(TileEntityCapacitorCreative.class);
registerTile(TileEntityMetalBarrel.class);
registerTile(TileEntityFluidPump.class);
registerTile(TileEntityFluidPlacer.class);
registerTile(TileEntityBlastFurnacePreheater.class);
registerTile(TileEntityFurnaceHeater.class);
registerTile(TileEntityDynamo.class);
registerTile(TileEntityThermoelectricGen.class);
registerTile(TileEntityElectricLantern.class);
registerTile(TileEntityChargingStation.class);
registerTile(TileEntityFluidPipe.class);
registerTile(TileEntitySampleDrill.class);
registerTile(TileEntityTeslaCoil.class);
registerTile(TileEntityFloodlight.class);
registerTile(TileEntityTurret.class);
registerTile(TileEntityTurretChem.class);
registerTile(TileEntityTurretGun.class);
registerTile(TileEntityBelljar.class);
registerTile(TileEntityConveyorBelt.class);
registerTile(TileEntityConveyorVertical.class);
registerTile(TileEntityMetalPress.class);
registerTile(TileEntityCrusher.class);
registerTile(TileEntitySheetmetalTank.class);
registerTile(TileEntitySilo.class);
registerTile(TileEntityAssembler.class);
registerTile(TileEntityAutoWorkbench.class);
registerTile(TileEntityBottlingMachine.class);
registerTile(TileEntitySqueezer.class);
registerTile(TileEntityFermenter.class);
registerTile(TileEntityRefinery.class);
registerTile(TileEntityDieselGenerator.class);
registerTile(TileEntityBucketWheel.class);
registerTile(TileEntityExcavator.class);
registerTile(TileEntityArcFurnace.class);
registerTile(TileEntityLightningrod.class);
registerTile(TileEntityMixer.class);
//
// registerTile(TileEntitySkycrateDispenser.class);
// registerTile(TileEntityFloodlight.class);
//
registerTile(TileEntityFakeLight.class);
/**ENTITIES*/
int i = 0;
EntityRegistry.registerModEntity(EntityRevolvershot.class, "revolverShot", i++, ImmersiveEngineering.instance, 64, 1, true);
EntityRegistry.registerModEntity(EntitySkylineHook.class, "skylineHook", i++, ImmersiveEngineering.instance, 64, 1, true);
//EntityRegistry.registerModEntity(EntitySkycrate.class, "skylineCrate", 2, ImmersiveEngineering.instance, 64, 1, true);
EntityRegistry.registerModEntity(EntityRevolvershotHoming.class, "revolverShotHoming", i++, ImmersiveEngineering.instance, 64, 1, true);
EntityRegistry.registerModEntity(EntityWolfpackShot.class, "revolverShotWolfpack", i++, ImmersiveEngineering.instance, 64, 1, true);
EntityRegistry.registerModEntity(EntityChemthrowerShot.class, "chemthrowerShot", i++, ImmersiveEngineering.instance, 64, 1, true);
EntityRegistry.registerModEntity(EntityRailgunShot.class, "railgunShot", i++, ImmersiveEngineering.instance, 64, 5, true);
EntityRegistry.registerModEntity(EntityRevolvershotFlare.class, "revolverShotFlare", i++, ImmersiveEngineering.instance, 64, 1, true);
EntityRegistry.registerModEntity(EntityIEExplosive.class, "explosive", i++, ImmersiveEngineering.instance, 64, 1, true);
EntityRegistry.registerModEntity(EntityFluorescentTube.class, "fluorescentTube", i++, ImmersiveEngineering.instance, 64, 1, true);
CapabilityShader.register();
ShaderRegistry.itemShader = IEContent.itemShader;
ShaderRegistry.itemShaderBag = IEContent.itemShaderBag;
ShaderRegistry.itemExamples.add(new ItemStack(IEContent.itemRevolver));
ShaderRegistry.itemExamples.add(new ItemStack(IEContent.itemDrill));
ShaderRegistry.itemExamples.add(new ItemStack(IEContent.itemChemthrower));
ShaderRegistry.itemExamples.add(new ItemStack(IEContent.itemRailgun));
/**WOLFPACK BULLETS*/
if (!BulletHandler.homingCartridges.isEmpty()) {
BulletHandler.registerBullet("wolfpack", new WolfpackBullet());
BulletHandler.registerBullet("wolfpackPart", new WolfpackPartBullet());
}
/**SMELTING*/
IERecipes.initFurnaceRecipes();
/**CRAFTING*/
IERecipes.initCraftingRecipes();
/**BLUEPRINTS*/
IERecipes.initBlueprintRecipes();
/**POTIONS*/
IEPotions.init();
/**BANNERS*/
addBanner("hammer", "hmr", new ItemStack(itemTool, 1, 0));
addBanner("bevels", "bvl", "plateIron");
addBanner("ornate", "orn", "dustSilver");
addBanner("treatedwood", "twd", "plankTreatedWood");
addBanner("windmill", "wnd", new ItemStack[] { new ItemStack(blockWoodenDevice1, 1, BlockTypes_WoodenDevice1.WINDMILL.getMeta()), new ItemStack(blockWoodenDevice1, 1, BlockTypes_WoodenDevice1.WINDMILL_ADVANCED.getMeta()) });
if (!BulletHandler.homingCartridges.isEmpty()) {
ItemStack wolfpackCartridge = BulletHandler.getBulletStack("wolfpack");
addBanner("wolf_r", "wlfr", wolfpackCartridge, 1);
addBanner("wolf_l", "wlfl", wolfpackCartridge, -1);
addBanner("wolf", "wlf", wolfpackCartridge, 0, 0);
}
/**CONVEYORS*/
ConveyorHandler.registerMagnetSupression((entity, iConveyorTile) -> {
NBTTagCompound data = entity.getEntityData();
if (!data.getBoolean(Lib.MAGNET_PREVENT_NBT))
data.setBoolean(Lib.MAGNET_PREVENT_NBT, true);
}, (entity, iConveyorTile) -> {
entity.getEntityData().removeTag(Lib.MAGNET_PREVENT_NBT);
});
ConveyorHandler.registerConveyorHandler(new ResourceLocation(ImmersiveEngineering.MODID, "conveyor"), ConveyorBasic.class, (tileEntity) -> new ConveyorBasic());
ConveyorHandler.registerConveyorHandler(new ResourceLocation(ImmersiveEngineering.MODID, "uncontrolled"), ConveyorUncontrolled.class, (tileEntity) -> new ConveyorUncontrolled());
ConveyorHandler.registerConveyorHandler(new ResourceLocation(ImmersiveEngineering.MODID, "dropper"), ConveyorDrop.class, (tileEntity) -> new ConveyorDrop());
ConveyorHandler.registerConveyorHandler(new ResourceLocation(ImmersiveEngineering.MODID, "vertical"), ConveyorVertical.class, (tileEntity) -> new ConveyorVertical());
ConveyorHandler.registerConveyorHandler(new ResourceLocation(ImmersiveEngineering.MODID, "splitter"), ConveyorSplit.class, (tileEntity) -> new ConveyorSplit(tileEntity instanceof IConveyorTile ? ((IConveyorTile) tileEntity).getFacing() : EnumFacing.NORTH));
ConveyorHandler.registerConveyorHandler(new ResourceLocation(ImmersiveEngineering.MODID, "covered"), ConveyorCovered.class, (tileEntity) -> new ConveyorCovered());
/**ASSEMBLER RECIPE ADAPTERS*/
//Shaped
AssemblerHandler.registerRecipeAdapter(ShapedRecipes.class, new IRecipeAdapter<ShapedRecipes>() {
@Override
public RecipeQuery[] getQueriedInputs(ShapedRecipes recipe) {
AssemblerHandler.RecipeQuery[] query = new AssemblerHandler.RecipeQuery[recipe.recipeItems.length];
for (int i = 0; i < query.length; i++) query[i] = AssemblerHandler.createQuery(recipe.recipeItems[i]);
return query;
}
});
//Shapeless
AssemblerHandler.registerRecipeAdapter(ShapelessRecipes.class, new IRecipeAdapter<ShapelessRecipes>() {
@Override
public RecipeQuery[] getQueriedInputs(ShapelessRecipes recipe) {
AssemblerHandler.RecipeQuery[] query = new AssemblerHandler.RecipeQuery[recipe.recipeItems.size()];
for (int i = 0; i < query.length; i++) query[i] = AssemblerHandler.createQuery(recipe.recipeItems.get(i));
return query;
}
});
//ShapedOre
AssemblerHandler.registerRecipeAdapter(ShapedOreRecipe.class, new IRecipeAdapter<ShapedOreRecipe>() {
@Override
public RecipeQuery[] getQueriedInputs(ShapedOreRecipe recipe) {
AssemblerHandler.RecipeQuery[] query = new AssemblerHandler.RecipeQuery[recipe.getInput().length];
for (int i = 0; i < query.length; i++) query[i] = AssemblerHandler.createQuery(recipe.getInput()[i]);
return query;
}
});
//ShapelessOre
AssemblerHandler.registerRecipeAdapter(ShapelessOreRecipe.class, new IRecipeAdapter<ShapelessOreRecipe>() {
@Override
public RecipeQuery[] getQueriedInputs(ShapelessOreRecipe recipe) {
AssemblerHandler.RecipeQuery[] query = new AssemblerHandler.RecipeQuery[recipe.getInput().size()];
for (int i = 0; i < query.length; i++) query[i] = AssemblerHandler.createQuery(recipe.getInput().get(i));
return query;
}
});
//ShapedIngredient
AssemblerHandler.registerRecipeAdapter(RecipeShapedIngredient.class, new IRecipeAdapter<RecipeShapedIngredient>() {
@Override
public RecipeQuery[] getQueriedInputs(RecipeShapedIngredient recipe) {
AssemblerHandler.RecipeQuery[] query = new AssemblerHandler.RecipeQuery[recipe.getIngredients().length];
for (int i = 0; i < query.length; i++) query[i] = AssemblerHandler.createQuery(recipe.getIngredients()[i]);
return query;
}
});
//ShapelessIngredient
AssemblerHandler.registerRecipeAdapter(RecipeShapelessIngredient.class, new IRecipeAdapter<RecipeShapelessIngredient>() {
@Override
public RecipeQuery[] getQueriedInputs(RecipeShapelessIngredient recipe) {
AssemblerHandler.RecipeQuery[] query = new AssemblerHandler.RecipeQuery[recipe.getIngredients().size()];
for (int i = 0; i < query.length; i++) query[i] = AssemblerHandler.createQuery(recipe.getIngredients().get(i));
return query;
}
});
CokeOvenRecipe.addRecipe(new ItemStack(itemMaterial, 1, 6), new ItemStack(Items.COAL), 1800, 500);
CokeOvenRecipe.addRecipe(new ItemStack(blockStoneDecoration, 1, 3), "blockCoal", 1800 * 9, 5000);
CokeOvenRecipe.addRecipe(new ItemStack(Items.COAL, 1, 1), "logWood", 900, 250);
BlastFurnaceRecipe.addRecipe(new ItemStack(itemMetal, 1, 8), "ingotIron", 1200, new ItemStack(itemMaterial, 1, 7));
BlastFurnaceRecipe.addRecipe(new ItemStack(blockStorage, 1, 8), "blockIron", 1200 * 9, new ItemStack(itemMaterial, 9, 7));
BlastFurnaceRecipe.addBlastFuel("fuelCoke", 1200);
BlastFurnaceRecipe.addBlastFuel("blockFuelCoke", 1200 * 10);
BlastFurnaceRecipe.addBlastFuel("charcoal", 300);
BlastFurnaceRecipe.addBlastFuel("blockCharcoal", 300 * 10);
GameRegistry.registerFuelHandler(new IEFuelHandler());
IERecipes.initCrusherRecipes();
IERecipes.initArcSmeltingRecipes();
ItemStack shoddyElectrode = new ItemStack(itemGraphiteElectrode);
shoddyElectrode.setItemDamage(ItemGraphiteElectrode.electrodeMaxDamage / 2);
MetalPressRecipe.addRecipe(shoddyElectrode, "ingotHOPGraphite", new ItemStack(IEContent.itemMold, 1, 2), 4800).setInputSize(4);
DieselHandler.registerFuel(fluidBiodiesel, 125);
DieselHandler.registerFuel(FluidRegistry.getFluid("fuel"), 375);
DieselHandler.registerFuel(FluidRegistry.getFluid("diesel"), 175);
DieselHandler.registerDrillFuel(fluidBiodiesel);
DieselHandler.registerDrillFuel(FluidRegistry.getFluid("fuel"));
DieselHandler.registerDrillFuel(FluidRegistry.getFluid("diesel"));
blockFluidCreosote.setPotionEffects(new PotionEffect(IEPotions.flammable, 100, 0));
blockFluidEthanol.setPotionEffects(new PotionEffect(MobEffects.NAUSEA, 40, 0));
blockFluidBiodiesel.setPotionEffects(new PotionEffect(IEPotions.flammable, 100, 1));
blockFluidConcrete.setPotionEffects(new PotionEffect(MobEffects.SLOWNESS, 20, 3, false, false));
ChemthrowerHandler.registerEffect(FluidRegistry.WATER, new ChemthrowerEffect_Extinguish());
ChemthrowerHandler.registerEffect(fluidPotion, new ChemthrowerEffect() {
@Override
public void applyToEntity(EntityLivingBase target, @Nullable EntityPlayer shooter, ItemStack thrower, FluidStack fluid) {
if (fluid.tag != null) {
List<PotionEffect> effects = PotionUtils.getEffectsFromTag(fluid.tag);
for (PotionEffect e : effects) {
PotionEffect newEffect = new PotionEffect(e.getPotion(), (int) Math.ceil(e.getDuration() * .05), e.getAmplifier());
newEffect.setCurativeItems(new ArrayList(e.getCurativeItems()));
target.addPotionEffect(newEffect);
}
}
}
@Override
public void applyToEntity(EntityLivingBase target, @Nullable EntityPlayer shooter, ItemStack thrower, Fluid fluid) {
}
@Override
public void applyToBlock(World worldObj, RayTraceResult mop, @Nullable EntityPlayer shooter, ItemStack thrower, FluidStack fluid) {
}
@Override
public void applyToBlock(World worldObj, RayTraceResult mop, @Nullable EntityPlayer shooter, ItemStack thrower, Fluid fluid) {
}
});
ChemthrowerHandler.registerEffect(fluidCreosote, new ChemthrowerEffect_Potion(null, 0, IEPotions.flammable, 140, 0));
ChemthrowerHandler.registerFlammable(fluidCreosote);
ChemthrowerHandler.registerEffect(fluidBiodiesel, new ChemthrowerEffect_Potion(null, 0, IEPotions.flammable, 140, 1));
ChemthrowerHandler.registerFlammable(fluidBiodiesel);
ChemthrowerHandler.registerFlammable(fluidEthanol);
ChemthrowerHandler.registerEffect("oil", new ChemthrowerEffect_Potion(null, 0, new PotionEffect(IEPotions.flammable, 140, 0), new PotionEffect(MobEffects.BLINDNESS, 80, 1)));
ChemthrowerHandler.registerFlammable("oil");
ChemthrowerHandler.registerEffect("fuel", new ChemthrowerEffect_Potion(null, 0, IEPotions.flammable, 100, 1));
ChemthrowerHandler.registerFlammable("fuel");
ChemthrowerHandler.registerEffect("diesel", new ChemthrowerEffect_Potion(null, 0, IEPotions.flammable, 140, 1));
ChemthrowerHandler.registerFlammable("diesel");
ChemthrowerHandler.registerEffect("kerosene", new ChemthrowerEffect_Potion(null, 0, IEPotions.flammable, 100, 1));
ChemthrowerHandler.registerFlammable("kerosene");
ChemthrowerHandler.registerEffect("biofuel", new ChemthrowerEffect_Potion(null, 0, IEPotions.flammable, 140, 1));
ChemthrowerHandler.registerFlammable("biofuel");
ChemthrowerHandler.registerEffect("rocket_fuel", new ChemthrowerEffect_Potion(null, 0, IEPotions.flammable, 60, 2));
ChemthrowerHandler.registerFlammable("rocket_fuel");
RailgunHandler.registerProjectileProperties(new IngredientStack("stickIron"), 10, 1.25).setColourMap(new int[][] { { 0xd8d8d8, 0xd8d8d8, 0xd8d8d8, 0xa8a8a8, 0x686868, 0x686868 } });
RailgunHandler.registerProjectileProperties(new IngredientStack("stickAluminum"), 9, 1.05).setColourMap(new int[][] { { 0xd8d8d8, 0xd8d8d8, 0xd8d8d8, 0xa8a8a8, 0x686868, 0x686868 } });
RailgunHandler.registerProjectileProperties(new IngredientStack("stickSteel"), 12, 1.25).setColourMap(new int[][] { { 0xb4b4b4, 0xb4b4b4, 0xb4b4b4, 0x7a7a7a, 0x555555, 0x555555 } });
RailgunHandler.registerProjectileProperties(new ItemStack(itemGraphiteElectrode), 16, .9).setColourMap(new int[][] { { 0x242424, 0x242424, 0x242424, 0x171717, 0x171717, 0x0a0a0a } });
ExternalHeaterHandler.defaultFurnaceEnergyCost = IEConfig.Machines.heater_consumption;
ExternalHeaterHandler.defaultFurnaceSpeedupCost = IEConfig.Machines.heater_speedupConsumption;
ExternalHeaterHandler.registerHeatableAdapter(TileEntityFurnace.class, new DefaultFurnaceAdapter());
SqueezerRecipe.addRecipe(new FluidStack(fluidPlantoil, 80), null, Items.WHEAT_SEEDS, 6400);
SqueezerRecipe.addRecipe(new FluidStack(fluidPlantoil, 80), null, Items.PUMPKIN_SEEDS, 6400);
SqueezerRecipe.addRecipe(new FluidStack(fluidPlantoil, 80), null, Items.MELON_SEEDS, 6400);
SqueezerRecipe.addRecipe(new FluidStack(fluidPlantoil, 120), null, itemSeeds, 6400);
SqueezerRecipe.addRecipe(null, new ItemStack(itemMaterial, 1, 18), new ItemStack(itemMaterial, 8, 17), 19200);
Fluid fluidBlood = FluidRegistry.getFluid("blood");
if (fluidBlood != null)
SqueezerRecipe.addRecipe(new FluidStack(fluidBlood, 5), new ItemStack(Items.LEATHER), new ItemStack(Items.ROTTEN_FLESH), 6400);
FermenterRecipe.addRecipe(new FluidStack(fluidEthanol, 80), null, Items.REEDS, 6400);
FermenterRecipe.addRecipe(new FluidStack(fluidEthanol, 80), null, Items.MELON, 6400);
FermenterRecipe.addRecipe(new FluidStack(fluidEthanol, 80), null, Items.APPLE, 6400);
FermenterRecipe.addRecipe(new FluidStack(fluidEthanol, 80), null, "cropPotato", 6400);
RefineryRecipe.addRecipe(new FluidStack(fluidBiodiesel, 16), new FluidStack(fluidPlantoil, 8), new FluidStack(fluidEthanol, 8), 80);
MixerRecipe.addRecipe(new FluidStack(fluidConcrete, 500), new FluidStack(FluidRegistry.WATER, 500), new Object[] { "sand", "sand", Items.CLAY_BALL, "gravel" }, 3200);
BottlingMachineRecipe.addRecipe(new ItemStack(Blocks.SPONGE, 1, 1), new ItemStack(Blocks.SPONGE, 1, 0), new FluidStack(FluidRegistry.WATER, 1000));
BelljarHandler.DefaultPlantHandler hempBelljarHandler = new BelljarHandler.DefaultPlantHandler() {
private HashSet<ComparableItemStack> validSeeds = new HashSet<>();
@Override
protected HashSet<ComparableItemStack> getSeedSet() {
return validSeeds;
}
@Override
@SideOnly(Side.CLIENT)
public IBlockState[] getRenderedPlant(ItemStack seed, ItemStack soil, float growth, TileEntity tile) {
int age = Math.min(4, Math.round(growth * 4));
if (age == 4)
return new IBlockState[] { blockCrop.getStateFromMeta(age), blockCrop.getStateFromMeta(age + 1) };
return new IBlockState[] { blockCrop.getStateFromMeta(age) };
}
@Override
@SideOnly(Side.CLIENT)
public float getRenderSize(ItemStack seed, ItemStack soil, float growth, TileEntity tile) {
return .6875f;
}
};
BelljarHandler.registerHandler(hempBelljarHandler);
hempBelljarHandler.register(new ItemStack(itemSeeds), new ItemStack[] { new ItemStack(itemMaterial, 4, 4), new ItemStack(itemSeeds, 2) }, new ItemStack(Blocks.DIRT), blockCrop.getDefaultState());
ThermoelectricHandler.registerSourceInKelvin("blockIce", 273);
ThermoelectricHandler.registerSourceInKelvin("blockPackedIce", 200);
ThermoelectricHandler.registerSourceInKelvin("blockUranium", 2000);
ThermoelectricHandler.registerSourceInKelvin("blockYellorium", 2000);
ThermoelectricHandler.registerSourceInKelvin("blockPlutonium", 4000);
ThermoelectricHandler.registerSourceInKelvin("blockBlutonium", 4000);
ExcavatorHandler.mineralVeinCapacity = IEConfig.Machines.excavator_depletion;
ExcavatorHandler.mineralChance = IEConfig.Machines.excavator_chance;
ExcavatorHandler.defaultDimensionBlacklist = IEConfig.Machines.excavator_dimBlacklist;
ExcavatorHandler.addMineral("Iron", 25, .1f, new String[] { "oreIron", "oreNickel", "oreTin", "denseoreIron" }, new float[] { .5f, .25f, .20f, .05f });
ExcavatorHandler.addMineral("Magnetite", 25, .1f, new String[] { "oreIron", "oreGold" }, new float[] { .85f, .15f });
if (OreDictionary.doesOreNameExist("oreSulfur"))
ExcavatorHandler.addMineral("Pyrite", 20, .1f, new String[] { "oreIron", "oreSulfur" }, new float[] { .5f, .5f });
ExcavatorHandler.addMineral("Bauxite", 20, .2f, new String[] { "oreAluminum", "oreTitanium", "denseoreAluminum" }, new float[] { .90f, .05f, .05f });
ExcavatorHandler.addMineral("Copper", 30, .2f, new String[] { "oreCopper", "oreGold", "oreNickel", "denseoreCopper" }, new float[] { .65f, .25f, .05f, .05f });
if (OreDictionary.doesOreNameExist("oreTin"))
ExcavatorHandler.addMineral("Cassiterite", 15, .2f, new String[] { "oreTin", "denseoreTin" }, new float[] { .95f, .05f });
ExcavatorHandler.addMineral("Gold", 20, .3f, new String[] { "oreGold", "oreCopper", "oreNickel", "denseoreGold" }, new float[] { .65f, .25f, .05f, .05f });
ExcavatorHandler.addMineral("Nickel", 20, .3f, new String[] { "oreNickel", "orePlatinum", "oreIron", "denseoreNickel" }, new float[] { .85f, .05f, .05f, .05f });
if (OreDictionary.doesOreNameExist("orePlatinum"))
ExcavatorHandler.addMineral("Platinum", 5, .35f, new String[] { "orePlatinum", "oreNickel", "", "oreIridium", "denseorePlatinum" }, new float[] { .40f, .30f, .15f, .1f, .05f });
if (OreDictionary.doesOreNameExist("oreUranium") || OreDictionary.doesOreNameExist("oreYellorium"))
ExcavatorHandler.addMineral("Uranium", 10, .35f, new String[] { "oreUranium", "oreLead", "orePlutonium", "denseoreUranium" }, new float[] { .55f, .3f, .1f, .05f }).addReplacement("oreUranium", "oreYellorium");
ExcavatorHandler.addMineral("Quartzite", 5, .3f, new String[] { "oreQuartz", "oreCertusQuartz" }, new float[] { .6f, .4f });
ExcavatorHandler.addMineral("Galena", 15, .2f, new String[] { "oreLead", "oreSilver", "oreSulfur", "denseoreLead", "denseoreSilver" }, new float[] { .40f, .40f, .1f, .05f, .05f });
ExcavatorHandler.addMineral("Lead", 10, .15f, new String[] { "oreLead", "oreSilver", "denseoreLead" }, new float[] { .55f, .4f, .05f });
ExcavatorHandler.addMineral("Silver", 10, .2f, new String[] { "oreSilver", "oreLead", "denseoreSilver" }, new float[] { .55f, .4f, .05f });
ExcavatorHandler.addMineral("Lapis", 10, .2f, new String[] { "oreLapis", "oreIron", "oreSulfur", "denseoreLapis" }, new float[] { .65f, .275f, .025f, .05f });
ExcavatorHandler.addMineral("Coal", 25, .1f, new String[] { "oreCoal", "denseoreCoal", "oreDiamond", "oreEmerald" }, new float[] { .92f, .1f, .015f, .015f });
/**MULTIBLOCKS*/
MultiblockHandler.registerMultiblock(MultiblockCokeOven.instance);
MultiblockHandler.registerMultiblock(MultiblockBlastFurnace.instance);
MultiblockHandler.registerMultiblock(MultiblockBlastFurnaceAdvanced.instance);
MultiblockHandler.registerMultiblock(MultiblockMetalPress.instance);
MultiblockHandler.registerMultiblock(MultiblockCrusher.instance);
MultiblockHandler.registerMultiblock(MultiblockSheetmetalTank.instance);
MultiblockHandler.registerMultiblock(MultiblockSilo.instance);
MultiblockHandler.registerMultiblock(MultiblockAssembler.instance);
MultiblockHandler.registerMultiblock(MultiblockAutoWorkbench.instance);
MultiblockHandler.registerMultiblock(MultiblockBottlingMachine.instance);
MultiblockHandler.registerMultiblock(MultiblockSqueezer.instance);
MultiblockHandler.registerMultiblock(MultiblockFermenter.instance);
MultiblockHandler.registerMultiblock(MultiblockRefinery.instance);
MultiblockHandler.registerMultiblock(MultiblockDieselGenerator.instance);
MultiblockHandler.registerMultiblock(MultiblockExcavator.instance);
MultiblockHandler.registerMultiblock(MultiblockBucketWheel.instance);
MultiblockHandler.registerMultiblock(MultiblockArcFurnace.instance);
MultiblockHandler.registerMultiblock(MultiblockLightningrod.instance);
MultiblockHandler.registerMultiblock(MultiblockMixer.instance);
/**ACHIEVEMENTS*/
IEAchievements.init();
/**VILLAGE*/
VillagerRegistry villageRegistry = VillagerRegistry.instance();
if (IEConfig.villagerHouse) {
villageRegistry.registerVillageCreationHandler(new VillageEngineersHouse.VillageManager());
MapGenStructureIO.registerStructureComponent(VillageEngineersHouse.class, ImmersiveEngineering.MODID + ":EngineersHouse");
}
if (IEConfig.enableVillagers) {
villagerProfession_engineer = new VillagerRegistry.VillagerProfession(ImmersiveEngineering.MODID + ":engineer", "immersiveengineering:textures/models/villager_engineer.png", "immersiveengineering:textures/models/villager_engineer_zombie.png");
villageRegistry.register(villagerProfession_engineer);
VillagerRegistry.VillagerCareer career_engineer = new VillagerRegistry.VillagerCareer(villagerProfession_engineer, ImmersiveEngineering.MODID + ".engineer");
career_engineer.addTrade(1, new IEVillagerTrades.EmeraldForItemstack(new ItemStack(itemMaterial, 1, 0), new EntityVillager.PriceInfo(8, 16)), new IEVillagerTrades.ItemstackForEmerald(new ItemStack(blockWoodenDecoration, 1, 1), new EntityVillager.PriceInfo(-10, -6)), new IEVillagerTrades.ItemstackForEmerald(new ItemStack(blockClothDevice, 1, 1), new EntityVillager.PriceInfo(-3, -1)));
career_engineer.addTrade(2, new IEVillagerTrades.EmeraldForItemstack(new ItemStack(itemMaterial, 1, 1), new EntityVillager.PriceInfo(2, 6)), new IEVillagerTrades.ItemstackForEmerald(new ItemStack(blockMetalDecoration1, 1, 1), new EntityVillager.PriceInfo(-8, -4)), new IEVillagerTrades.ItemstackForEmerald(new ItemStack(blockMetalDecoration1, 1, 5), new EntityVillager.PriceInfo(-8, -4)));
career_engineer.addTrade(3, new IEVillagerTrades.EmeraldForItemstack(new ItemStack(itemMaterial, 1, 2), new EntityVillager.PriceInfo(2, 6)), new IEVillagerTrades.EmeraldForItemstack(new ItemStack(itemMaterial, 1, 7), new EntityVillager.PriceInfo(4, 8)), new IEVillagerTrades.ItemstackForEmerald(new ItemStack(blockStoneDecoration, 1, 5), new EntityVillager.PriceInfo(-6, -2)));
VillagerRegistry.VillagerCareer career_machinist = new VillagerRegistry.VillagerCareer(villagerProfession_engineer, ImmersiveEngineering.MODID + ".machinist");
career_machinist.addTrade(1, new IEVillagerTrades.EmeraldForItemstack(new ItemStack(itemMaterial, 1, 6), new EntityVillager.PriceInfo(8, 16)), new IEVillagerTrades.ItemstackForEmerald(new ItemStack(itemTool, 1, 0), new EntityVillager.PriceInfo(4, 7)));
career_machinist.addTrade(2, new IEVillagerTrades.EmeraldForItemstack(new ItemStack(itemMetal, 1, 0), new EntityVillager.PriceInfo(4, 6)), new IEVillagerTrades.EmeraldForItemstack(new ItemStack(itemMetal, 1, 1), new EntityVillager.PriceInfo(4, 6)), new IEVillagerTrades.ItemstackForEmerald(new ItemStack(itemMaterial, 1, 9), new EntityVillager.PriceInfo(1, 3)));
career_machinist.addTrade(3, new IEVillagerTrades.ItemstackForEmerald(new ItemStack(itemToolbox, 1, 0), new EntityVillager.PriceInfo(6, 8)), new IEVillagerTrades.ItemstackForEmerald(new ItemStack(itemMaterial, 1, 10), new EntityVillager.PriceInfo(1, 3)), new IEVillagerTrades.ItemstackForEmerald(ItemEngineersBlueprint.getTypedBlueprint("specialBullet"), new EntityVillager.PriceInfo(5, 9)));
career_machinist.addTrade(4, new IEVillagerTrades.ItemstackForEmerald(new ItemStack(itemDrillhead, 1, 0), new EntityVillager.PriceInfo(28, 40)), new IEVillagerTrades.ItemstackForEmerald(itemEarmuffs, new EntityVillager.PriceInfo(4, 9)));
career_machinist.addTrade(5, new IEVillagerTrades.ItemstackForEmerald(new ItemStack(itemDrillhead, 1, 1), new EntityVillager.PriceInfo(32, 48)), new IEVillagerTrades.ItemstackForEmerald(ItemEngineersBlueprint.getTypedBlueprint("electrode"), new EntityVillager.PriceInfo(12, 24)));
VillagerRegistry.VillagerCareer career_electrician = new VillagerRegistry.VillagerCareer(villagerProfession_engineer, ImmersiveEngineering.MODID + ".electrician");
career_electrician.addTrade(1, new IEVillagerTrades.EmeraldForItemstack(new ItemStack(itemMaterial, 1, 20), new EntityVillager.PriceInfo(8, 16)), new IEVillagerTrades.ItemstackForEmerald(new ItemStack(itemTool, 1, 1), new EntityVillager.PriceInfo(4, 7)), new IEVillagerTrades.ItemstackForEmerald(new ItemStack(itemWireCoil, 1, 0), new EntityVillager.PriceInfo(-4, -2)));
career_electrician.addTrade(2, new IEVillagerTrades.EmeraldForItemstack(new ItemStack(itemMaterial, 1, 21), new EntityVillager.PriceInfo(6, 12)), new IEVillagerTrades.ItemstackForEmerald(new ItemStack(itemTool, 1, 2), new EntityVillager.PriceInfo(4, 7)), new IEVillagerTrades.ItemstackForEmerald(new ItemStack(itemWireCoil, 1, 1), new EntityVillager.PriceInfo(-4, -1)));
career_electrician.addTrade(3, new IEVillagerTrades.EmeraldForItemstack(new ItemStack(itemMaterial, 1, 22), new EntityVillager.PriceInfo(4, 8)), new IEVillagerTrades.ItemstackForEmerald(new ItemStack(itemWireCoil, 1, 1), new EntityVillager.PriceInfo(-2, -1)), new IEVillagerTrades.ItemstackForEmerald(new ItemStack(itemToolUpgrades, 1, 6), new EntityVillager.PriceInfo(8, 12)));
career_electrician.addTrade(4, new IEVillagerTrades.ItemstackForEmerald(new ItemStack(itemToolUpgrades, 1, 9), new EntityVillager.PriceInfo(8, 12)), new IEVillagerTrades.ItemstackForEmerald(new ItemStack(itemFluorescentTube), new EntityVillager.PriceInfo(8, 12)), new IEVillagerTrades.ItemstackForEmerald(new ItemStack(itemsFaradaySuit[0]), new EntityVillager.PriceInfo(5, 7)), new IEVillagerTrades.ItemstackForEmerald(new ItemStack(itemsFaradaySuit[1]), new EntityVillager.PriceInfo(9, 11)), new IEVillagerTrades.ItemstackForEmerald(new ItemStack(itemsFaradaySuit[2]), new EntityVillager.PriceInfo(5, 7)), new IEVillagerTrades.ItemstackForEmerald(new ItemStack(itemsFaradaySuit[3]), new EntityVillager.PriceInfo(11, 15)));
VillagerRegistry.VillagerCareer career_outfitter = new VillagerRegistry.VillagerCareer(villagerProfession_engineer, ImmersiveEngineering.MODID + ".outfitter");
ItemStack bag_common = new ItemStack(IEContent.itemShaderBag);
ItemNBTHelper.setString(bag_common, "rarity", EnumRarity.COMMON.toString());
ItemStack bag_uncommon = new ItemStack(IEContent.itemShaderBag);
ItemNBTHelper.setString(bag_uncommon, "rarity", EnumRarity.UNCOMMON.toString());
ItemStack bag_rare = new ItemStack(IEContent.itemShaderBag);
ItemNBTHelper.setString(bag_rare, "rarity", EnumRarity.RARE.toString());
career_outfitter.addTrade(1, new IEVillagerTrades.EmeraldForItemstack(bag_common, new EntityVillager.PriceInfo(8, 16)));
career_outfitter.addTrade(2, new IEVillagerTrades.EmeraldForItemstack(bag_uncommon, new EntityVillager.PriceInfo(12, 20)));
career_outfitter.addTrade(3, new IEVillagerTrades.EmeraldForItemstack(bag_rare, new EntityVillager.PriceInfo(16, 24)));
}
/**LOOT*/
if (IEConfig.villagerHouse)
LootTableList.register(VillageEngineersHouse.woodenCrateLoot);
for (ResourceLocation rl : EventHandler.lootInjections) LootTableList.register(rl);
// //Railcraft Compat
// if(Loader.isModLoaded("Railcraft"))
// {
// Block rcCube = GameRegistry.findBlock("Railcraft", "cube");
// if(rcCube!=null)
// OreDictionary.registerOre("blockFuelCoke", new ItemStack(rcCube,1,0));
// }
}
use of net.minecraftforge.fluids.FluidStack in project ImmersiveEngineering by BluSunrize.
the class IERecipes method initCraftingRecipes.
public static void initCraftingRecipes() {
RecipeSorter.register(ImmersiveEngineering.MODID + ":shapedIngredient", RecipeShapedIngredient.class, Category.SHAPED, "after:forge:shapedore");
RecipeSorter.register(ImmersiveEngineering.MODID + ":shapelessIngredient", RecipeShapelessIngredient.class, Category.SHAPELESS, "after:forge:shapedore");
RecipeSorter.register(ImmersiveEngineering.MODID + ":banners", RecipeBannerAdvanced.class, Category.SHAPELESS, "after:forge:shapelessore");
RecipeSorter.register(ImmersiveEngineering.MODID + ":RGBColour", RecipeRGBColouration.class, Category.SHAPELESS, "after:forge:shapelessore");
GameRegistry.addRecipe(new RecipeBannerAdvanced());
ItemStack copperCoil = new ItemStack(IEContent.blockMetalDecoration0, 1, BlockTypes_MetalDecoration0.COIL_LV.getMeta());
ItemStack electrumCoil = new ItemStack(IEContent.blockMetalDecoration0, 1, BlockTypes_MetalDecoration0.COIL_MV.getMeta());
ItemStack hvCoil = new ItemStack(IEContent.blockMetalDecoration0, 1, BlockTypes_MetalDecoration0.COIL_HV.getMeta());
ItemStack componentIron = new ItemStack(IEContent.itemMaterial, 1, 8);
ItemStack componentSteel = new ItemStack(IEContent.itemMaterial, 1, 9);
ItemStack woodenGrip = new ItemStack(IEContent.itemMaterial, 1, 13);
String[] woodenSticks = new String[] { "stickWood", "stickTreatedWood" };
String[] metalSticks = new String[] { "stickIron", "stickAluminum", "stickSteel" };
ItemStack[] cutters = new ItemStack[] { new ItemStack(IEContent.itemTool, 1, 1), new ItemStack(Items.SHEARS, 1, OreDictionary.WILDCARD_VALUE) };
ItemStack baseConveyor = ConveyorHandler.getConveyorStack(ImmersiveEngineering.MODID + ":conveyor");
addOredictRecipe(new ItemStack(IEContent.itemMaterial, 4, 0), "W", "W", 'W', "plankTreatedWood");
addOredictRecipe(new ItemStack(IEContent.itemMaterial, 4, 1), "I", "I", 'I', "ingotIron");
addOredictRecipe(new ItemStack(IEContent.itemMaterial, 4, 2), "I", "I", 'I', "ingotSteel");
addOredictRecipe(new ItemStack(IEContent.itemMaterial, 4, 3), "I", "I", 'I', "ingotAluminum");
addShapelessOredictRecipe(new ItemStack(Items.STRING), "fiberHemp", "fiberHemp", "fiberHemp");
addOredictRecipe(new ItemStack(IEContent.itemMaterial, 1, 5), "HHH", "HSH", "HHH", 'H', "fiberHemp", 'S', "stickWood");
addOredictRecipe(componentIron, "I I", " C ", "I I", 'I', "ingotIron", 'C', "ingotCopper");
addOredictRecipe(componentSteel, "I I", " C ", "I I", 'I', "ingotSteel", 'C', "ingotCopper");
addOredictRecipe(new ItemStack(IEContent.itemMaterial, 1, 10), " S ", "SBS", "BSB", 'B', "plankTreatedWood", 'S', "stickTreatedWood");
addOredictRecipe(new ItemStack(IEContent.itemMaterial, 1, 11), "BB ", "SSB", "SS ", 'B', "plankTreatedWood", 'S', "stickTreatedWood");
addShapelessOredictRecipe(new ItemStack(IEContent.itemMaterial, 1, 12), new ItemStack(IEContent.itemMaterial, 1, 11), "fabricHemp", "fabricHemp", "fabricHemp", "fabricHemp");
addOredictRecipe(new ItemStack(IEContent.itemMaterial, 1, 13), "SS", "IS", "SS", 'I', "ingotCopper", 'S', "stickTreatedWood");
addOredictRecipe(new ItemStack(IEContent.itemMaterial, 1, 14), "III", 'I', "ingotSteel");
addOredictRecipe(new ItemStack(IEContent.itemMaterial, 1, 15), " I ", "ICI", " I ", 'I', "ingotSteel", 'C', componentIron);
addOredictRecipe(new ItemStack(IEContent.itemMaterial, 1, 16), "I ", "II ", " II", 'I', "ingotSteel");
addShapelessIngredientRecipe(new ItemStack(IEContent.itemMaterial, 1, 20), "plateCopper", cutters).setToolDamageRecipe(1);
addShapelessIngredientRecipe(new ItemStack(IEContent.itemMaterial, 1, 21), "plateElectrum", cutters).setToolDamageRecipe(1);
addShapelessIngredientRecipe(new ItemStack(IEContent.itemMaterial, 1, 22), "plateAluminum", cutters).setToolDamageRecipe(1);
addShapelessIngredientRecipe(new ItemStack(IEContent.itemMaterial, 1, 23), "plateSteel", cutters).setToolDamageRecipe(1);
// addOredictRecipe(new ItemStack(IEContent.itemMaterial,4,14), "I","I", 'I',"ingotIron");
// addOredrrictRecipe(new ItemStack(IEContent.itemMaterial,4,15), "I","I", 'I',"ingotSteel");
addIngredientRecipe(new ItemStack(IEContent.itemTool, 1, 0), " IF", " SI", "S ", 'I', "ingotIron", 'S', woodenSticks, 'F', new ItemStack(Items.STRING));
addIngredientRecipe(new ItemStack(IEContent.itemTool, 1, 1), "SI", " S", 'I', "ingotIron", 'S', woodenSticks).setMirrored(true);
addIngredientRecipe(new ItemStack(IEContent.itemTool, 1, 2), " P ", "SCS", 'C', "ingotCopper", 'P', Items.COMPASS, 'S', woodenSticks);
addShapelessOredictRecipe(new ItemStack(IEContent.itemTool, 1, 3), Items.BOOK, Blocks.LEVER);
addOredictRecipe(new ItemStack(IEContent.itemRevolver, 1, 0), " I ", "BDH", "GIG", 'I', "ingotIron", 'B', new ItemStack(IEContent.itemMaterial, 1, 14), 'D', new ItemStack(IEContent.itemMaterial, 1, 15), 'G', woodenGrip, 'H', new ItemStack(IEContent.itemMaterial, 1, 16)).setMirrored(true);
addOredictRecipe(new ItemStack(IEContent.itemRevolver, 1, 1), " I", "IIS", " I", 'I', "ingotIron", 'S', "ingotSteel");
GameRegistry.addRecipe(new RecipeRevolver());
RecipeSorter.register(ImmersiveEngineering.MODID + ":revolverLoop", RecipeRevolver.class, Category.SHAPELESS, "after:forge:shapelessore");
addOredictRecipe(new ItemStack(IEContent.itemBullet, 5, 0), "I I", "I I", " I ", 'I', "ingotCopper");
addOredictRecipe(new ItemStack(IEContent.itemBullet, 5, 1), "PDP", "PDP", " I ", 'I', "ingotCopper", 'P', Items.PAPER, 'D', "dyeRed");
addOredictRecipe(ItemEngineersBlueprint.getTypedBlueprint("bullet"), "JKL", "DDD", "PPP", 'J', Items.GUNPOWDER, 'K', "ingotCopper", 'L', Items.GUNPOWDER, 'D', "dyeBlue", 'P', Items.PAPER);
addOredictRecipe(new ItemStack(IEContent.itemMold, 1, 3), " P ", "PCP", " P ", 'P', "plateSteel", 'C', new ItemStack(IEContent.itemBullet, 1, 0));
MetalPressRecipe.addRecipe(new ItemStack(IEContent.itemBullet, 2, 0), "ingotCopper", new ItemStack(IEContent.itemMold, 1, 3), 2400);
addOredictRecipe(new ItemStack(IEContent.itemSkyhook, 1, 0), "II ", "IC ", " GG", 'C', componentIron, 'I', "ingotSteel", 'G', woodenGrip);
addOredictRecipe(new ItemStack(IEContent.itemDrill, 1, 0), " G", " EG", "C ", 'C', componentSteel, 'E', new ItemStack(IEContent.blockMetalDecoration0, 1, BlockTypes_MetalDecoration0.HEAVY_ENGINEERING.getMeta()), 'G', woodenGrip);
addOredictRecipe(new ItemStack(IEContent.itemDrillhead, 1, 0), "SS ", "BBS", "SS ", 'B', "blockSteel", 'S', "ingotSteel");
addOredictRecipe(new ItemStack(IEContent.itemDrillhead, 1, 1), "SS ", "BBS", "SS ", 'B', "blockIron", 'S', "ingotIron");
addOredictRecipe(new ItemStack(IEContent.itemChemthrower, 1, 0), " OG", " EG", "PB ", 'P', new ItemStack(IEContent.blockMetalDevice1, 1, BlockTypes_MetalDevice1.FLUID_PIPE.getMeta()), 'O', new ItemStack(IEContent.itemToolUpgrades, 1, 0), 'B', Items.BUCKET, 'E', new ItemStack(IEContent.blockMetalDecoration0, 1, BlockTypes_MetalDecoration0.HEAVY_ENGINEERING.getMeta()), 'G', woodenGrip);
addOredictRecipe(new ItemStack(IEContent.itemRailgun, 1, 0), " HG", "CBH", "BC ", 'C', electrumCoil, 'H', new ItemStack(IEContent.blockMetalDevice0, 1, BlockTypes_MetalDevice0.CAPACITOR_HV.getMeta()), 'B', new ItemStack(IEContent.itemMaterial, 1, 14), 'G', woodenGrip);
addOredictRecipe(new ItemStack(IEContent.itemToolUpgrades, 1, 0), "BI ", "IBI", " IC", 'B', Items.BUCKET, 'I', "dyeBlue", 'C', componentIron);
addIngredientRecipe(new ItemStack(IEContent.itemToolUpgrades, 1, 1), "BI ", "IBI", " IC", 'B', new FluidStack(IEContent.fluidPlantoil, 1000), 'I', "ingotIron", 'C', componentIron);
addOredictRecipe(new ItemStack(IEContent.itemToolUpgrades, 1, 2), "SSS", " C ", 'S', "ingotSteel", 'C', componentSteel);
addOredictRecipe(new ItemStack(IEContent.itemToolUpgrades, 1, 3), "CS ", "SBO", " OB", 'C', componentIron, 'S', "ingotSteel", 'B', Items.BUCKET, 'O', "dyeRed");
addOredictRecipe(new ItemStack(IEContent.itemToolUpgrades, 1, 4), "SI", "IW", 'S', Items.IRON_SWORD, 'I', "ingotSteel", 'W', "plankTreatedWood");
addOredictRecipe(new ItemStack(IEContent.itemToolUpgrades, 1, 5), " CS", "C C", "IC ", 'I', componentIron, 'S', "ingotSteel", 'C', "ingotCopper");
addOredictRecipe(new ItemStack(IEContent.itemToolUpgrades, 1, 6), " G ", "GEG", "GEG", 'E', electrumCoil, 'G', "blockGlass");
addOredictRecipe(new ItemStack(IEContent.itemToolUpgrades, 1, 7), " SS", "PPH", " SS", 'P', new ItemStack(IEContent.blockMetalDevice1, 1, BlockTypes_MetalDevice1.FLUID_PIPE.getMeta()), 'H', Blocks.HOPPER, 'S', "ingotSteel");
addOredictRecipe(new ItemStack(IEContent.itemToolUpgrades, 1, 8), "GC ", "C C", " CG", 'G', "paneGlassColorless", 'C', "ingotCopper");
addOredictRecipe(new ItemStack(IEContent.itemToolUpgrades, 1, 9), "WWW", "HHH", 'W', new ItemStack(IEContent.itemWireCoil, 1, 2), 'H', new ItemStack(IEContent.blockMetalDevice0, 1, 2));
addShapelessOredictRecipe(new ItemStack(IEContent.itemMetal, 2, 15), "dustCopper", "dustNickel");
addShapelessOredictRecipe(new ItemStack(IEContent.itemMetal, 2, 16), "dustSilver", "dustGold");
addIngredientRecipe(new ItemStack(IEContent.itemWireCoil, 4, 0), " I ", "ISI", " I ", 'I', "wireCopper", 'S', woodenSticks);
addIngredientRecipe(new ItemStack(IEContent.itemWireCoil, 4, 1), " I ", "ISI", " I ", 'I', "wireElectrum", 'S', woodenSticks);
addIngredientRecipe(new ItemStack(IEContent.itemWireCoil, 4, 2), " I ", "ASA", " I ", 'I', "wireSteel", 'A', "wireAluminum", 'S', woodenSticks).allowQuarterTurn();
addIngredientRecipe(new ItemStack(IEContent.itemWireCoil, 4, 3), " I ", "ISI", " I ", 'I', new ItemStack(IEContent.itemMaterial, 1, 4), 'S', woodenSticks);
addIngredientRecipe(new ItemStack(IEContent.itemWireCoil, 4, 4), " I ", "ISI", " I ", 'I', "wireSteel", 'S', woodenSticks);
addIngredientRecipe(new ItemStack(IEContent.itemWireCoil, 4, 5), " I ", "ASA", " I ", 'I', "dustRedstone", 'A', "wireAluminum", 'S', woodenSticks).allowQuarterTurn();
addOredictRecipe(new ItemStack(IEContent.itemJerrycan), " II", "IBB", "IBB", 'I', "plateIron", 'B', Items.BUCKET);
GameRegistry.addRecipe(new RecipeJerrycan());
RecipeSorter.register(ImmersiveEngineering.MODID + ":jerrycan", RecipeJerrycan.class, Category.SHAPELESS, "after:forge:shapelessore");
addOredictRecipe(new ItemStack(IEContent.itemToolbox), "PPP", "RCR", 'P', "plateAluminum", 'C', new ItemStack(IEContent.blockWoodenDevice0, 1, BlockTypes_WoodenDevice0.CRATE.getMeta()), 'R', "dyeRed");
GameRegistry.addRecipe(new RecipeShaderBags());
RecipeSorter.register(ImmersiveEngineering.MODID + ":shaderbags", RecipeShaderBags.class, Category.SHAPELESS, "after:forge:shapelessore");
addOredictRecipe(new ItemStack(IEContent.itemEarmuffs), " S ", "S S", "W W", 'S', "stickIron", 'W', new ItemStack(Blocks.WOOL, 1, OreDictionary.WILDCARD_VALUE));
GameRegistry.addRecipe(new RecipeEarmuffs());
RecipeSorter.register(ImmersiveEngineering.MODID + ":earmuffs", RecipeEarmuffs.class, Category.SHAPELESS, "after:forge:shapelessore");
addOredictRecipe(new ItemStack(IEContent.itemsFaradaySuit[0]), "A A", "A A", 'A', "plateAluminum");
addOredictRecipe(new ItemStack(IEContent.itemsFaradaySuit[1]), "AAA", "A A", "A A", 'A', "plateAluminum");
addOredictRecipe(new ItemStack(IEContent.itemsFaradaySuit[2]), "A A", "AAA", "AAA", 'A', "plateAluminum");
addOredictRecipe(new ItemStack(IEContent.itemsFaradaySuit[3]), "AAA", "A A", 'A', "plateAluminum");
addOredictRecipe(new ItemStack(IEContent.itemFluorescentTube), "GEG", "GgG", "GgG", 'G', "blockGlass", 'E', new ItemStack(IEContent.itemGraphiteElectrode), 'g', "dustGlowstone");
//
//TREATED WOOD
//
addIngredientRecipe(new ItemStack(IEContent.blockTreatedWood, 8, 0), "WWW", "WCW", "WWW", 'W', "plankWood", 'C', new FluidStack(IEContent.fluidCreosote, 1000));
for (int i = 0; i < IEContent.blockTreatedWood.enumValues.length; i++) {
addShapelessOredictRecipe(new ItemStack(IEContent.blockTreatedWood, 1, i == IEContent.blockTreatedWood.enumValues.length - 1 ? 0 : i + 1), new ItemStack(IEContent.blockTreatedWood, 1, i));
addTwoWaySlabRecipe(new ItemStack(IEContent.blockTreatedWoodSlabs, 1, i), new ItemStack(IEContent.blockTreatedWood, 1, i));
addShapelessOredictRecipe(new ItemStack(IEContent.blockTreatedWoodSlabs, 1, i == IEContent.blockTreatedWood.enumValues.length - 1 ? 0 : i + 1), new ItemStack(IEContent.blockTreatedWoodSlabs, 1, i));
}
addStairRecipe(IEContent.blockWoodenStair, new ItemStack(IEContent.blockTreatedWood, 1, 0));
addStairRecipe(IEContent.blockWoodenStair1, new ItemStack(IEContent.blockTreatedWood, 1, 1));
addStairRecipe(IEContent.blockWoodenStair2, new ItemStack(IEContent.blockTreatedWood, 1, 2));
GameRegistry.addShapelessRecipe(new ItemStack(IEContent.blockWoodenStair, 1, 0), new ItemStack(IEContent.blockWoodenStair2, 1, 0));
GameRegistry.addShapelessRecipe(new ItemStack(IEContent.blockWoodenStair1, 1, 0), new ItemStack(IEContent.blockWoodenStair, 1, 0));
GameRegistry.addShapelessRecipe(new ItemStack(IEContent.blockWoodenStair2, 1, 0), new ItemStack(IEContent.blockWoodenStair1, 1, 0));
//
//WOODEN DECORACTION
//
addOredictRecipe(new ItemStack(IEContent.blockWoodenDecoration, 3, BlockTypes_WoodenDecoration.FENCE.getMeta()), "WSW", "WSW", 'W', "plankTreatedWood", 'S', "stickTreatedWood");
addOredictRecipe(new ItemStack(IEContent.blockWoodenDecoration, 6, BlockTypes_WoodenDecoration.SCAFFOLDING.getMeta()), "WWW", " S ", "S S", 'W', "plankTreatedWood", 'S', "stickTreatedWood");
//
//WOODEN DEVICES
//
addOredictRecipe(new ItemStack(IEContent.blockWoodenDevice0, 1, BlockTypes_WoodenDevice0.CRATE.getMeta()), "WWW", "W W", "WWW", 'W', "plankTreatedWood");
addOredictRecipe(new ItemStack(IEContent.blockWoodenDevice0, 1, BlockTypes_WoodenDevice0.BARREL.getMeta()), "SSS", "W W", "WWW", 'W', "plankTreatedWood", 'S', "slabTreatedWood");
addOredictRecipe(new ItemStack(IEContent.blockWoodenDevice0, 1, BlockTypes_WoodenDevice0.WORKBENCH.getMeta()), "WWW", "B F", 'W', "plankTreatedWood", 'B', "craftingTableWood", 'F', "fenceTreatedWood");
addIngredientRecipe(new ItemStack(IEContent.blockWoodenDevice0, 1, BlockTypes_WoodenDevice0.SORTER.getMeta()), "WRW", "IBI", "WCW", 'I', "ingotIron", 'R', "dustRedstone", 'W', "plankTreatedWood", 'B', baseConveyor, 'C', componentIron).allowQuarterTurn();
addOredictRecipe(new ItemStack(IEContent.blockWoodenDevice0, 1, BlockTypes_WoodenDevice0.GUNPOWDER_BARREL.getMeta()), " F ", "GBG", "GGG", 'F', "fiberHemp", 'G', Items.GUNPOWDER, 'B', new ItemStack(IEContent.blockWoodenDevice0, 1, BlockTypes_WoodenDevice0.BARREL.getMeta()));
addIngredientRecipe(new ItemStack(IEContent.blockWoodenDevice0, 1, BlockTypes_WoodenDevice0.REINFORCED_CRATE.getMeta()), "WPW", "RCR", "WPW", 'W', "plankTreatedWood", 'P', "plateIron", 'R', "stickIron", 'C', new ItemStack(IEContent.blockWoodenDevice0, 1, BlockTypes_WoodenDevice0.CRATE.getMeta())).setNBTCopyTargetRecipe(4).allowQuarterTurn();
addOredictRecipe(new ItemStack(IEContent.blockWoodenDevice0, 1, BlockTypes_WoodenDevice0.TURNTABLE.getMeta()), "WIW", "RCR", 'I', "ingotIron", 'C', copperCoil, 'R', "dustRedstone", 'W', "plankTreatedWood");
addIngredientRecipe(new ItemStack(IEContent.blockWoodenDevice0, 1, BlockTypes_WoodenDevice0.FLUID_SORTER.getMeta()), "WRW", "IBI", "WCW", 'I', "ingotIron", 'R', "dustRedstone", 'W', "plankTreatedWood", 'B', new ItemStack(IEContent.blockMetalDevice1, 1, BlockTypes_MetalDevice1.FLUID_PIPE.getMeta()), 'C', componentIron).allowQuarterTurn();
addOredictRecipe(new ItemStack(IEContent.blockWoodenDevice1, 1, BlockTypes_WoodenDevice1.WATERMILL.getMeta()), " P ", "PIP", " P ", 'P', new ItemStack(IEContent.itemMaterial, 1, 10), 'I', "ingotSteel");
addOredictRecipe(new ItemStack(IEContent.blockWoodenDevice1, 1, BlockTypes_WoodenDevice1.WINDMILL.getMeta()), " P ", "PIP", " P ", 'P', new ItemStack(IEContent.itemMaterial, 1, 11), 'I', "ingotIron");
addOredictRecipe(new ItemStack(IEContent.blockWoodenDevice1, 1, BlockTypes_WoodenDevice1.WINDMILL_ADVANCED.getMeta()), "PPP", "PIP", "PPP", 'P', new ItemStack(IEContent.itemMaterial, 1, 12), 'I', "ingotSteel");
addOredictRecipe(new ItemStack(IEContent.blockWoodenDevice1, 1, BlockTypes_WoodenDevice1.POST.getMeta()), "F", "F", "S", 'F', "fenceTreatedWood", 'S', "bricksStone");
addOredictRecipe(new ItemStack(IEContent.blockWoodenDevice1, 4, BlockTypes_WoodenDevice1.WALLMOUNT.getMeta()), "WW", "WS", 'W', "plankTreatedWood", 'S', "stickTreatedWood");
//
//CLOTH DEVICES
//
addOredictRecipe(new ItemStack(IEContent.blockClothDevice, 3, BlockTypes_ClothDevice.CUSHION.getMeta()), "FFF", "F F", "FFF", 'F', "fabricHemp");
addOredictRecipe(new ItemStack(IEContent.blockClothDevice, 2, BlockTypes_ClothDevice.BALLOON.getMeta()), " F ", "FTF", " S ", 'F', "fabricHemp", 'T', "torch", 'S', "slabTreatedWood");
addIngredientRecipe(new ItemStack(IEContent.blockClothDevice, 3, BlockTypes_ClothDevice.STRIPCURTAIN.getMeta()), "SSS", "FFF", "FFF", 'S', metalSticks, 'F', "fabricHemp");
final ItemStack stripCurtain = new ItemStack(IEContent.blockClothDevice, 1, BlockTypes_ClothDevice.STRIPCURTAIN.getMeta());
GameRegistry.addRecipe(new RecipeRGBColouration((s) -> (OreDictionary.itemMatches(stripCurtain, s, true)), (s) -> (ItemNBTHelper.hasKey(s, "colour") ? ItemNBTHelper.getInt(s, "colour") : 0xffffff), (s, i) -> ItemNBTHelper.setInt(s, "colour", i)));
//
//STONE DECORACTION
//
addOredictRecipe(new ItemStack(IEContent.blockStoneDecoration, 2, BlockTypes_StoneDecoration.COKEBRICK.getMeta()), "CBC", "BSB", "CBC", 'S', "sandstone", 'C', Items.CLAY_BALL, 'B', "ingotBrick");
addOredictRecipe(new ItemStack(IEContent.blockStoneDecoration, 2, BlockTypes_StoneDecoration.BLASTBRICK.getMeta()), "NBN", "BDB", "NBN", 'D', Items.BLAZE_POWDER, 'N', "ingotBrickNether", 'B', "ingotBrick");
addOredictRecipe(new ItemStack(IEContent.blockStoneDecoration, 1, BlockTypes_StoneDecoration.BLASTBRICK_REINFORCED.getMeta()), "P", "B", 'P', "plateSteel", 'B', new ItemStack(IEContent.blockStoneDecoration, 1, BlockTypes_StoneDecoration.BLASTBRICK.getMeta()));
addTwoWayStorageRecipe(new ItemStack(IEContent.blockStoneDecoration, 1, BlockTypes_StoneDecoration.COKE.getMeta()), new ItemStack(IEContent.itemMaterial, 1, 6));
addOredictRecipe(new ItemStack(IEContent.blockStoneDecoration, 6, BlockTypes_StoneDecoration.HEMPCRETE.getMeta()), "CCC", "HHH", "CCC", 'C', Items.CLAY_BALL, 'H', "fiberHemp");
addIngredientRecipe(new ItemStack(IEContent.blockStoneDecoration, 8, BlockTypes_StoneDecoration.CONCRETE.getMeta()), "SCS", "GBG", "SCS", 'C', Items.CLAY_BALL, 'S', "sand", 'G', Blocks.GRAVEL, 'B', new FluidStack(FluidRegistry.WATER, 1000)).allowQuarterTurn();
addIngredientRecipe(new ItemStack(IEContent.blockStoneDecoration, 12, BlockTypes_StoneDecoration.CONCRETE.getMeta()), "SCS", "GBG", "SCS", 'C', Items.CLAY_BALL, 'S', "itemSlag", 'G', Blocks.GRAVEL, 'B', new FluidStack(FluidRegistry.WATER, 1000)).allowQuarterTurn();
addShapelessOredictRecipe(new ItemStack(IEContent.blockStoneDecoration, 1, BlockTypes_StoneDecoration.CONCRETE.getMeta()), new ItemStack(IEContent.blockStoneDecoration, 1, BlockTypes_StoneDecoration.CONCRETE_TILE.getMeta()));
addOredictRecipe(new ItemStack(IEContent.blockStoneDecoration, 4, BlockTypes_StoneDecoration.CONCRETE_TILE.getMeta()), "CC", "CC", 'C', new ItemStack(IEContent.blockStoneDecoration, 1, BlockTypes_StoneDecoration.CONCRETE.getMeta()));
addOredictRecipe(new ItemStack(IEContent.blockStoneDecoration, 1, BlockTypes_StoneDecoration.CONCRETE_LEADED.getMeta()), "P", "B", 'P', "plateLead", 'B', new ItemStack(IEContent.blockStoneDecoration, 1, BlockTypes_StoneDecoration.CONCRETE.getMeta()));
addIngredientRecipe(new ItemStack(IEContent.blockStoneDecoration, 2, BlockTypes_StoneDecoration.INSULATING_GLASS.getMeta()), " G ", "IDI", " G ", 'G', "blockGlass", 'I', "dustIron", 'D', "dyeGreen").allowQuarterTurn();
for (int i = 0; i <= BlockTypes_StoneDecoration.values().length; i++) if (!IEContent.blockStoneDecorationSlabs.isMetaHidden(i))
addTwoWaySlabRecipe(new ItemStack(IEContent.blockStoneDecorationSlabs, 1, i), new ItemStack(IEContent.blockStoneDecoration, 1, i));
addStairRecipe(IEContent.blockStoneStair_hempcrete, new ItemStack(IEContent.blockStoneDecoration, 1, BlockTypes_StoneDecoration.HEMPCRETE.getMeta()));
addStairRecipe(IEContent.blockStoneStair_concrete0, new ItemStack(IEContent.blockStoneDecoration, 1, BlockTypes_StoneDecoration.CONCRETE.getMeta()));
addStairRecipe(IEContent.blockStoneStair_concrete1, new ItemStack(IEContent.blockStoneDecoration, 1, BlockTypes_StoneDecoration.CONCRETE_TILE.getMeta()));
addStairRecipe(IEContent.blockStoneStair_concrete2, new ItemStack(IEContent.blockStoneDecoration, 1, BlockTypes_StoneDecoration.CONCRETE_LEADED.getMeta()));
GameRegistry.addShapelessRecipe(new ItemStack(IEContent.blockStoneStair_concrete0, 1, 0), new ItemStack(IEContent.blockStoneStair_concrete1, 1, 0));
GameRegistry.addShapelessRecipe(new ItemStack(IEContent.blockStoneStair_concrete1, 1, 0), new ItemStack(IEContent.blockStoneStair_concrete0, 1, 0));
//
//METAL STORAGE
//
addTwoWayStorageRecipe(new ItemStack(Items.IRON_INGOT), new ItemStack(IEContent.itemMetal, 1, 29));
for (int i = 0; i <= 8; i++) {
addTwoWayStorageRecipe(new ItemStack(IEContent.itemMetal, 1, i), new ItemStack(IEContent.itemMetal, 1, 20 + i));
addTwoWayStorageRecipe(new ItemStack(IEContent.blockStorage, 1, i), new ItemStack(IEContent.itemMetal, 1, i));
addTwoWaySlabRecipe(new ItemStack(IEContent.blockStorageSlabs, 1, i), new ItemStack(IEContent.blockStorage, 1, i));
}
//
for (int i = 0; i < Lib.METALS_ALL.length; i++) if (!IEContent.itemMetal.isMetaHidden(30 + i)) {
addShapelessOredictRecipe(new ItemStack(IEContent.itemMetal, 1, 30 + i), "ingot" + Lib.METALS_ALL[i], new ItemStack(IEContent.itemTool, 1, 0));
addOredictRecipe(new ItemStack(IEContent.blockSheetmetal, 4, i), " P ", "P P", " P ", 'P', "plate" + Lib.METALS_ALL[i]);
addShapelessOredictRecipe(new ItemStack(IEContent.itemMetal, 1, 30 + i), new ItemStack(IEContent.blockSheetmetal, 1, i));
addTwoWaySlabRecipe(new ItemStack(IEContent.blockSheetmetalSlabs, 1, i), new ItemStack(IEContent.blockSheetmetal, 1, i));
}
//
//METAL DECORACTION
//
addOredictRecipe(copperCoil, "WWW", "WIW", "WWW", 'I', "ingotIron", 'W', new ItemStack(IEContent.itemWireCoil, 1, 0));
addOredictRecipe(electrumCoil, "WWW", "WIW", "WWW", 'I', "ingotIron", 'W', new ItemStack(IEContent.itemWireCoil, 1, 1));
addOredictRecipe(hvCoil, "WWW", "WIW", "WWW", 'I', "ingotIron", 'W', new ItemStack(IEContent.itemWireCoil, 1, 2));
addIngredientRecipe(new ItemStack(IEContent.blockMetalDecoration0, 2, BlockTypes_MetalDecoration0.RS_ENGINEERING.getMeta()), "IRI", "RCR", "IRI", 'I', "ingotIron", 'C', "ingotCopper", 'R', "dustRedstone").allowEighthTurn();
addOredictRecipe(new ItemStack(IEContent.blockMetalDecoration0, 2, BlockTypes_MetalDecoration0.LIGHT_ENGINEERING.getMeta()), "IGI", "CCC", "IGI", 'I', "ingotIron", 'C', "ingotCopper", 'G', componentIron);
addOredictRecipe(new ItemStack(IEContent.blockMetalDecoration0, 2, BlockTypes_MetalDecoration0.HEAVY_ENGINEERING.getMeta()), "IGI", "PEP", "IGI", 'I', "ingotSteel", 'E', "ingotElectrum", 'G', componentSteel, 'P', Blocks.PISTON);
addOredictRecipe(new ItemStack(IEContent.blockMetalDecoration0, 2, BlockTypes_MetalDecoration0.GENERATOR.getMeta()), "III", "EDE", "III", 'I', "ingotSteel", 'E', "ingotElectrum", 'D', new ItemStack(IEContent.blockMetalDevice1, 1, BlockTypes_MetalDevice1.DYNAMO.getMeta()));
addIngredientRecipe(new ItemStack(IEContent.blockMetalDecoration0, 2, BlockTypes_MetalDecoration0.RADIATOR.getMeta()), "ICI", "CBC", "ICI", 'I', "ingotSteel", 'C', "ingotCopper", 'B', new FluidStack(FluidRegistry.WATER, 1000)).allowEighthTurn();
addOredictRecipe(new ItemStack(IEContent.blockMetalDecoration1, 3, BlockTypes_MetalDecoration1.STEEL_FENCE.getMeta()), "IRI", "IRI", 'I', "ingotSteel", 'R', "stickSteel");
addOredictRecipe(new ItemStack(IEContent.blockMetalDecoration1, 6, BlockTypes_MetalDecoration1.STEEL_SCAFFOLDING_0.getMeta()), "III", " R ", "R R", 'I', "ingotSteel", 'R', "stickSteel");
addShapelessOredictRecipe(new ItemStack(IEContent.blockMetalDecoration1, 1, BlockTypes_MetalDecoration1.STEEL_SCAFFOLDING_1.getMeta()), new ItemStack(IEContent.blockMetalDecoration1, 1, BlockTypes_MetalDecoration1.STEEL_SCAFFOLDING_0.getMeta()));
addShapelessOredictRecipe(new ItemStack(IEContent.blockMetalDecoration1, 1, BlockTypes_MetalDecoration1.STEEL_SCAFFOLDING_2.getMeta()), new ItemStack(IEContent.blockMetalDecoration1, 1, BlockTypes_MetalDecoration1.STEEL_SCAFFOLDING_1.getMeta()));
addShapelessOredictRecipe(new ItemStack(IEContent.blockMetalDecoration1, 1, BlockTypes_MetalDecoration1.STEEL_SCAFFOLDING_0.getMeta()), new ItemStack(IEContent.blockMetalDecoration1, 1, BlockTypes_MetalDecoration1.STEEL_SCAFFOLDING_2.getMeta()));
addOredictRecipe(new ItemStack(IEContent.blockMetalDecoration1, 3, BlockTypes_MetalDecoration1.ALUMINUM_FENCE.getMeta()), "IRI", "IRI", 'I', "ingotAluminum", 'R', "stickAluminum");
addOredictRecipe(new ItemStack(IEContent.blockMetalDecoration1, 6, BlockTypes_MetalDecoration1.ALUMINUM_SCAFFOLDING_0.getMeta()), "III", " R ", "R R", 'I', "ingotAluminum", 'R', "stickAluminum");
addShapelessOredictRecipe(new ItemStack(IEContent.blockMetalDecoration1, 1, BlockTypes_MetalDecoration1.ALUMINUM_SCAFFOLDING_1.getMeta()), new ItemStack(IEContent.blockMetalDecoration1, 1, BlockTypes_MetalDecoration1.ALUMINUM_SCAFFOLDING_0.getMeta()));
addShapelessOredictRecipe(new ItemStack(IEContent.blockMetalDecoration1, 1, BlockTypes_MetalDecoration1.ALUMINUM_SCAFFOLDING_2.getMeta()), new ItemStack(IEContent.blockMetalDecoration1, 1, BlockTypes_MetalDecoration1.ALUMINUM_SCAFFOLDING_1.getMeta()));
addShapelessOredictRecipe(new ItemStack(IEContent.blockMetalDecoration1, 1, BlockTypes_MetalDecoration1.ALUMINUM_SCAFFOLDING_0.getMeta()), new ItemStack(IEContent.blockMetalDecoration1, 1, BlockTypes_MetalDecoration1.ALUMINUM_SCAFFOLDING_2.getMeta()));
addOredictRecipe(new ItemStack(IEContent.blockMetalDecoration2, 1, BlockTypes_MetalDecoration2.STEEL_POST.getMeta()), "F", "F", "S", 'F', "fenceSteel", 'S', "bricksStone");
addOredictRecipe(new ItemStack(IEContent.blockMetalDecoration2, 4, BlockTypes_MetalDecoration2.STEEL_WALLMOUNT.getMeta()), "II", "IS", 'I', "ingotSteel", 'S', "stickSteel");
addOredictRecipe(new ItemStack(IEContent.blockMetalDecoration2, 1, BlockTypes_MetalDecoration2.ALUMINUM_POST.getMeta()), "F", "F", "S", 'F', "fenceAluminum", 'S', "bricksStone");
addOredictRecipe(new ItemStack(IEContent.blockMetalDecoration2, 4, BlockTypes_MetalDecoration2.ALUMINUM_WALLMOUNT.getMeta()), "II", "IS", 'I', "ingotAluminum", 'S', "stickAluminum");
addOredictRecipe(new ItemStack(IEContent.blockMetalDecoration2, 3, BlockTypes_MetalDecoration2.LANTERN.getMeta()), " I ", "PGP", " I ", 'G', "glowstone", 'I', "plateIron", 'P', "paneGlass");
addOredictRecipe(new ItemStack(IEContent.blockMetalDecoration2, 3, BlockTypes_MetalDecoration2.RAZOR_WIRE.getMeta()), "PWP", "WWW", "PWP", 'W', "wireSteel", 'P', "plateSteel");
//
//CONNECTOR
//
addOredictRecipe(new ItemStack(IEContent.blockConnectors, 4, BlockTypes_Connector.CONNECTOR_LV.getMeta()), " I ", "BIB", "BIB", 'I', "ingotCopper", 'B', Blocks.HARDENED_CLAY);
addOredictRecipe(new ItemStack(IEContent.blockConnectors, 8, BlockTypes_Connector.RELAY_LV.getMeta()), " I ", "BIB", 'I', "ingotCopper", 'B', Blocks.HARDENED_CLAY);
addOredictRecipe(new ItemStack(IEContent.blockConnectors, 4, BlockTypes_Connector.CONNECTOR_MV.getMeta()), " I ", "BIB", "BIB", 'I', "ingotIron", 'B', Blocks.HARDENED_CLAY);
addOredictRecipe(new ItemStack(IEContent.blockConnectors, 8, BlockTypes_Connector.RELAY_MV.getMeta()), " I ", "BIB", 'I', "ingotIron", 'B', Blocks.HARDENED_CLAY);
addOredictRecipe(new ItemStack(IEContent.blockConnectors, 4, BlockTypes_Connector.CONNECTOR_HV.getMeta()), " I ", "BIB", "BIB", 'I', "ingotAluminum", 'B', Blocks.HARDENED_CLAY);
addOredictRecipe(new ItemStack(IEContent.blockConnectors, 8, BlockTypes_Connector.RELAY_HV.getMeta()), " I ", "BIB", "BIB", 'I', "ingotAluminum", 'B', new ItemStack(IEContent.blockStoneDecoration, 1, BlockTypes_StoneDecoration.INSULATING_GLASS.getMeta()));
addOredictRecipe(new ItemStack(IEContent.blockConnectors, 8, BlockTypes_Connector.CONNECTOR_STRUCTURAL.getMeta()), "ISI", "I I", 'I', "ingotSteel", 'S', "stickSteel");
addOredictRecipe(new ItemStack(IEContent.blockConnectors, 1, BlockTypes_Connector.TRANSFORMER.getMeta()), "L M", "IBI", "III", 'L', new ItemStack(IEContent.blockConnectors, 1, BlockTypes_Connector.CONNECTOR_LV.getMeta()), 'M', new ItemStack(IEContent.blockConnectors, 1, BlockTypes_Connector.CONNECTOR_MV.getMeta()), 'I', "ingotIron", 'B', electrumCoil).setMirrored(true);
addOredictRecipe(new ItemStack(IEContent.blockConnectors, 1, BlockTypes_Connector.TRANSFORMER_HV.getMeta()), "M H", "IBI", "III", 'H', new ItemStack(IEContent.blockConnectors, 1, BlockTypes_Connector.CONNECTOR_HV.getMeta()), 'M', new ItemStack(IEContent.blockConnectors, 1, BlockTypes_Connector.CONNECTOR_MV.getMeta()), 'I', "ingotIron", 'B', hvCoil).setMirrored(true);
addOredictRecipe(new ItemStack(IEContent.blockConnectors, 1, BlockTypes_Connector.BREAKERSWITCH.getMeta()), " L ", "CIC", 'L', Blocks.LEVER, 'C', Blocks.HARDENED_CLAY, 'I', "ingotCopper");
addOredictRecipe(new ItemStack(IEContent.blockConnectors, 1, BlockTypes_Connector.REDSTONE_BREAKER.getMeta()), "H H", "ICI", "IRI", 'H', new ItemStack(IEContent.blockConnectors, 1, BlockTypes_Connector.CONNECTOR_HV.getMeta()), 'I', "ingotIron", 'C', Items.REPEATER, 'R', "dustRedstone");
addOredictRecipe(new ItemStack(IEContent.blockConnectors, 1, BlockTypes_Connector.ENERGY_METER.getMeta()), " M ", "BCB", "ICI", 'M', new ItemStack(IEContent.itemTool, 1, 2), 'B', Blocks.HARDENED_CLAY, 'I', "ingotIron", 'C', copperCoil);
addOredictRecipe(new ItemStack(IEContent.blockConnectors, 4, BlockTypes_Connector.CONNECTOR_REDSTONE.getMeta()), "III", "BRB", 'I', "nuggetElectrum", 'B', Blocks.HARDENED_CLAY, 'R', "dustRedstone");
//
//METAL DEVICES
//
addOredictRecipe(new ItemStack(IEContent.blockMetalDevice0, 1, BlockTypes_MetalDevice0.CAPACITOR_LV.getMeta()), "III", "CLC", "WRW", 'L', "ingotLead", 'I', "ingotIron", 'C', "ingotCopper", 'R', "dustRedstone", 'W', "plankTreatedWood");
addOredictRecipe(new ItemStack(IEContent.blockMetalDevice0, 1, BlockTypes_MetalDevice0.CAPACITOR_MV.getMeta()), "III", "ELE", "WRW", 'L', "ingotLead", 'I', "ingotIron", 'E', "ingotElectrum", 'R', "blockRedstone", 'W', "plankTreatedWood");
addOredictRecipe(new ItemStack(IEContent.blockMetalDevice0, 1, BlockTypes_MetalDevice0.CAPACITOR_HV.getMeta()), "III", "ALA", "WRW", 'L', "blockLead", 'I', "ingotSteel", 'A', "ingotAluminum", 'R', "blockRedstone", 'W', "plankTreatedWood");
addOredictRecipe(new ItemStack(IEContent.blockMetalDevice0, 1, BlockTypes_MetalDevice0.BARREL.getMeta()), "SSS", "B B", "BBB", 'B', "blockSheetmetalIron", 'S', "slabSheetmetalIron");
addOredictRecipe(new ItemStack(IEContent.blockMetalDevice0, 1, BlockTypes_MetalDevice0.FLUID_PUMP.getMeta()), " I ", "ICI", "PPP", 'I', "plateIron", 'C', componentIron, 'P', new ItemStack(IEContent.blockMetalDevice1, 1, BlockTypes_MetalDevice1.FLUID_PIPE.getMeta()));
addOredictRecipe(new ItemStack(IEContent.blockMetalDevice0, 1, BlockTypes_MetalDevice0.FLUID_PLACER.getMeta()), "IBI", "B B", "IBI", 'I', "plateIron", 'B', Blocks.IRON_BARS);
addOredictRecipe(new ItemStack(IEContent.blockMetalDevice1, 1, BlockTypes_MetalDevice1.BLAST_FURNACE_PREHEATER.getMeta()), "SSS", "S S", "SHS", 'S', "blockSheetmetalIron", 'H', new ItemStack(IEContent.blockMetalDevice1, 1, BlockTypes_MetalDevice1.FURNACE_HEATER.getMeta()));
addOredictRecipe(new ItemStack(IEContent.blockMetalDevice1, 1, BlockTypes_MetalDevice1.FURNACE_HEATER.getMeta()), "ICI", "CBC", "IRI", 'I', "ingotIron", 'R', "dustRedstone", 'C', "ingotCopper", 'B', copperCoil);
addOredictRecipe(new ItemStack(IEContent.blockMetalDevice1, 1, BlockTypes_MetalDevice1.DYNAMO.getMeta()), "RCR", "III", 'C', copperCoil, 'I', "ingotIron", 'R', "dustRedstone");
addOredictRecipe(new ItemStack(IEContent.blockMetalDevice1, 1, BlockTypes_MetalDevice1.THERMOELECTRIC_GEN.getMeta()), "III", "CBC", "CCC", 'I', "ingotSteel", 'C', "plateConstantan", 'B', copperCoil);
addOredictRecipe(new ItemStack(IEContent.blockMetalDevice1, 3, BlockTypes_MetalDevice1.ELECTRIC_LANTERN.getMeta()), " I ", "PGP", "IRI", 'P', "paneGlass", 'I', "plateIron", 'G', "glowstone", 'R', "dustRedstone");
addOredictRecipe(new ItemStack(IEContent.blockMetalDevice1, 1, BlockTypes_MetalDevice1.CHARGING_STATION.getMeta()), "IMI", "GGG", "WCW", 'M', new ItemStack(IEContent.blockConnectors, 1, BlockTypes_Connector.CONNECTOR_MV.getMeta()), 'I', "ingotIron", 'G', "blockGlass", 'C', copperCoil, 'W', "plankTreatedWood");
addOredictRecipe(new ItemStack(IEContent.blockMetalDevice1, 8, BlockTypes_MetalDevice1.FLUID_PIPE.getMeta()), "PPP", " ", "PPP", 'P', "plateIron");
addOredictRecipe(new ItemStack(IEContent.blockMetalDevice1, 1, BlockTypes_MetalDevice1.SAMPLE_DRILL.getMeta()), "SFS", "SFS", "BFB", 'F', "fenceSteel", 'S', "scaffoldingSteel", 'B', new ItemStack(IEContent.blockMetalDecoration0, 1, BlockTypes_MetalDecoration0.LIGHT_ENGINEERING.getMeta()));
addOredictRecipe(new ItemStack(IEContent.blockMetalDevice1, 1, BlockTypes_MetalDevice1.TESLA_COIL.getMeta()), "III", " C ", "MCM", 'I', "ingotAluminum", 'C', copperCoil, 'M', new ItemStack(IEContent.blockMetalDevice0, 1, BlockTypes_MetalDevice0.CAPACITOR_MV.getMeta()));
addOredictRecipe(new ItemStack(IEContent.blockMetalDevice1, 1, BlockTypes_MetalDevice1.FLOODLIGHT.getMeta()), "III", "PGC", "ILI", 'I', "ingotIron", 'P', "paneGlass", 'G', "glowstone", 'C', copperCoil, 'L', componentIron);
addOredictRecipe(new ItemStack(IEContent.blockMetalDevice1, 1, BlockTypes_MetalDevice1.TURRET_CHEM.getMeta()), " S ", " GL", "XBR", 'S', new ItemStack(IEContent.itemToolUpgrades, 1, 8), 'G', new ItemStack(IEContent.itemChemthrower), 'L', new ItemStack(IEContent.blockMetalDecoration0, 1, BlockTypes_MetalDecoration0.LIGHT_ENGINEERING.getMeta()), 'B', new ItemStack(IEContent.blockWoodenDevice0, 1, BlockTypes_WoodenDevice0.TURNTABLE.getMeta()), 'R', new ItemStack(IEContent.blockMetalDecoration0, 1, BlockTypes_MetalDecoration0.RS_ENGINEERING.getMeta()), 'X', new ItemStack(IEContent.blockMetalDevice0, 1, BlockTypes_MetalDevice0.BARREL.getMeta()));
addOredictRecipe(new ItemStack(IEContent.blockMetalDevice1, 1, BlockTypes_MetalDevice1.TURRET_GUN.getMeta()), " S ", " GL", "XBR", 'S', new ItemStack(IEContent.itemToolUpgrades, 1, 8), 'G', new ItemStack(IEContent.itemRevolver), 'L', new ItemStack(IEContent.blockMetalDecoration0, 1, BlockTypes_MetalDecoration0.LIGHT_ENGINEERING.getMeta()), 'B', new ItemStack(IEContent.blockWoodenDevice0, 1, BlockTypes_WoodenDevice0.TURNTABLE.getMeta()), 'R', new ItemStack(IEContent.blockMetalDecoration0, 1, BlockTypes_MetalDecoration0.RS_ENGINEERING.getMeta()), 'X', new ItemStack(IEContent.itemToolUpgrades, 1, 5));
addOredictRecipe(new ItemStack(IEContent.blockMetalDevice1, 1, BlockTypes_MetalDevice1.BELLJAR.getMeta()), " L ", "G G", "WCW", 'L', new ItemStack(IEContent.blockMetalDecoration2, 1, BlockTypes_MetalDecoration2.LANTERN.getMeta()), 'G', "blockGlass", 'W', "plankTreatedWood", 'C', componentIron);
addOredictRecipe(Utils.copyStackWithAmount(baseConveyor, 8), "LLL", "IRI", 'I', "ingotIron", 'R', "dustRedstone", 'L', Items.LEATHER);
addShapelessOredictRecipe(Utils.copyStackWithAmount(ConveyorHandler.getConveyorStack(ImmersiveEngineering.MODID + ":uncontrolled"), 1), baseConveyor);
addShapelessOredictRecipe(baseConveyor, Utils.copyStackWithAmount(ConveyorHandler.getConveyorStack(ImmersiveEngineering.MODID + ":uncontrolled"), 1));
addOredictRecipe(Utils.copyStackWithAmount(ConveyorHandler.getConveyorStack(ImmersiveEngineering.MODID + ":dropper"), 1), "C", "H", 'C', baseConveyor, 'H', Blocks.IRON_TRAPDOOR);
addOredictRecipe(Utils.copyStackWithAmount(ConveyorHandler.getConveyorStack(ImmersiveEngineering.MODID + ":vertical"), 3), "CI", "C ", "CI", 'C', baseConveyor, 'I', "ingotIron");
addOredictRecipe(Utils.copyStackWithAmount(ConveyorHandler.getConveyorStack(ImmersiveEngineering.MODID + ":splitter"), 3), "CIC", " C ", 'C', baseConveyor, 'I', "ingotIron");
addOredictRecipe(Utils.copyStackWithAmount(ConveyorHandler.getConveyorStack(ImmersiveEngineering.MODID + ":covered"), 1), "S", "C", 'C', baseConveyor, 'S', "scaffoldingSteel");
// addOredictRecipe(new ItemStack(IEContent.blockMetalMultiblocks, 1,BlockMetalMultiblocks.META_lightningRod), "IFI","CBC","IHI", 'I',"ingotSteel",'F',new ItemStack(IEContent.blockMetalDecoration,1,BlockMetalDecoration.META_fence),'B',new ItemStack(IEContent.blockMetalDevice,1,BlockMetalDevice.META_capacitorHV),'C',electrumCoil,'H',hvCoil);
}
use of net.minecraftforge.fluids.FluidStack in project ImmersiveEngineering by BluSunrize.
the class TileRenderBottlingMachine method renderTileEntityAt.
@Override
public void renderTileEntityAt(TileEntityBottlingMachine te, double x, double y, double z, float partialTicks, int destroyStage) {
if (!te.formed || te.isDummy() || !te.getWorld().isBlockLoaded(te.getPos(), false))
return;
//Grab model + correct eextended state
final BlockRendererDispatcher blockRenderer = Minecraft.getMinecraft().getBlockRendererDispatcher();
BlockPos blockPos = te.getPos();
IBlockState state = getWorld().getBlockState(blockPos);
if (state.getBlock() != IEContent.blockMetalMultiblock)
return;
state = state.getBlock().getActualState(state, getWorld(), blockPos);
state = state.withProperty(IEProperties.DYNAMICRENDER, true);
IBakedModel model = blockRenderer.getBlockModelShapes().getModelForState(state);
//Initialize Tesselator and VertexBuffer
Tessellator tessellator = Tessellator.getInstance();
VertexBuffer worldRenderer = tessellator.getBuffer();
//Outer GL Wrapping, initial translation
GlStateManager.pushMatrix();
GlStateManager.translate(x + .5, y + .5, z + .5);
if (te.mirrored)
GlStateManager.scale(te.facing.getFrontOffsetX() == 0 ? -1 : 1, 1, te.facing.getFrontOffsetZ() == 0 ? -1 : 1);
//Item Displacement
float[][] itemDisplays = new float[te.bottlingProcessQueue.size()][];
//Animations
float lift = 0;
for (int i = 0; i < itemDisplays.length; i++) {
BottlingProcess process = te.bottlingProcessQueue.get(i);
if (process == null || process.processTick == process.maxProcessTick)
continue;
//+partialTicks
float processTimer = ((float) process.processTick) / process.maxProcessTick * 120;
//-1;
float itemX = -1.5f;
// -.34375f;
float itemY = -.15625f;
//-.9375f;
float itemZ = 1;
//ClientUtils.mc().thePlayer.ticksExisted%100; //0f;
float itemFill = 0;
if (//slide
processTimer <= 35) {
itemX += processTimer / 35f * 1.5;
} else if (//slide
processTimer <= 85) {
itemX = 0;
if (processTimer <= 55)
lift = (processTimer - 35) / 20f * .125f;
else if (processTimer <= 65) {
lift = .125f;
itemFill = (processTimer - 55) / 10f;
} else {
lift = (85 - processTimer) / 20f * .125f;
itemFill = 1;
}
itemY += lift;
lift += .0625;
} else {
itemX = (processTimer - 85) / 35f * 1.5f;
itemFill = 1;
}
itemDisplays[i] = new float[] { processTimer, itemX, itemY, itemZ, itemFill };
}
ClientUtils.bindAtlas();
GlStateManager.pushMatrix();
GlStateManager.translate(0, lift, 0);
renderModelPart(blockRenderer, tessellator, worldRenderer, te.getWorld(), state, model, blockPos, "lift");
GlStateManager.translate(0, -lift, 0);
RenderHelper.enableStandardItemLighting();
GlStateManager.popMatrix();
switch(te.facing) {
case NORTH:
break;
case SOUTH:
GlStateManager.rotate(180, 0, 1, 0);
break;
case WEST:
GlStateManager.rotate(90, 0, 1, 0);
break;
case EAST:
GlStateManager.rotate(-90, 0, 1, 0);
break;
}
float scale = .0625f;
FluidStack fs = te.tanks[0].getFluid();
if (fs != null) {
GlStateManager.pushMatrix();
float level = fs.amount / (float) te.tanks[0].getCapacity();
GlStateManager.translate(-.21875, .376, 1.21875);
GlStateManager.scale(scale, scale, scale);
float h = level * 9;
ClientUtils.drawRepeatedFluidSprite(fs, 0, 0, 7, h);
GlStateManager.rotate(90, 0, 1, 0);
ClientUtils.drawRepeatedFluidSprite(fs, 0, 0, 7, h);
GlStateManager.rotate(90, 0, 1, 0);
GlStateManager.translate(-7, 0, 7);
ClientUtils.drawRepeatedFluidSprite(fs, 0, 0, 7, h);
GlStateManager.rotate(90, 0, 1, 0);
ClientUtils.drawRepeatedFluidSprite(fs, 0, 0, 7, h);
GlStateManager.rotate(90, 1, 0, 0);
ClientUtils.drawRepeatedFluidSprite(fs, 0, 0, 7, 7);
GlStateManager.translate(0, 0, -h);
ClientUtils.drawRepeatedFluidSprite(fs, 0, 0, 7, 7);
GlStateManager.scale(1 / scale, 1 / scale, 1 / scale);
GlStateManager.translate(0, -1, -1);
GlStateManager.popMatrix();
}
//DRAW ITEMS HERE
for (int i = 0; i < itemDisplays.length; i++) if (itemDisplays[i] != null) {
BottlingProcess process = te.bottlingProcessQueue.get(i);
if (process == null)
continue;
ItemStack display = itemDisplays[i][4] == 0 || process.items[1] == null ? process.items[0] : process.items[1];
scale = .4375f;
GlStateManager.translate(itemDisplays[i][1], itemDisplays[i][2], itemDisplays[i][3]);
GlStateManager.scale(scale, scale, scale);
if (itemDisplays[i][4] == 0)
ClientUtils.mc().getRenderItem().renderItem(process.items[0], ItemCameraTransforms.TransformType.FIXED);
else if (itemDisplays[i][4] == 1)
ClientUtils.mc().getRenderItem().renderItem(display, ItemCameraTransforms.TransformType.FIXED);
else {
float h0 = -.5f;
float h1 = h0 + itemDisplays[i][4];
VertexBuffer worldrenderer = tessellator.getBuffer();
GL11.glEnable(GL11.GL_STENCIL_TEST);
GlStateManager.colorMask(false, false, false, false);
GlStateManager.depthMask(false);
GL11.glStencilFunc(GL11.GL_NEVER, 1, 0xFF);
GL11.glStencilOp(GL11.GL_REPLACE, GL11.GL_KEEP, GL11.GL_KEEP);
GL11.glStencilMask(0xFF);
GlStateManager.clear(GL11.GL_STENCIL_BUFFER_BIT);
GlStateManager.rotate(90.0F - ClientUtils.mc().getRenderManager().playerViewY, 0.0F, 1.0F, 0.0F);
GlStateManager.disableTexture2D();
worldrenderer.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION);
ClientUtils.renderBox(worldrenderer, -.5, h0, -.5, .5, h1, .5);
tessellator.draw();
GlStateManager.enableTexture2D();
GlStateManager.rotate(-(90.0F - ClientUtils.mc().getRenderManager().playerViewY), 0.0F, 1.0F, 0.0F);
GlStateManager.colorMask(true, true, true, true);
GlStateManager.depthMask(true);
GL11.glStencilMask(0x00);
GL11.glStencilFunc(GL11.GL_EQUAL, 0, 0xFF);
ClientUtils.mc().getRenderItem().renderItem(process.items[0], ItemCameraTransforms.TransformType.FIXED);
GL11.glStencilFunc(GL11.GL_EQUAL, 1, 0xFF);
ClientUtils.mc().getRenderItem().renderItem(display, ItemCameraTransforms.TransformType.FIXED);
GL11.glDisable(GL11.GL_STENCIL_TEST);
}
GlStateManager.scale(1 / scale, 1 / scale, 1 / scale);
GlStateManager.translate(-itemDisplays[i][1], -itemDisplays[i][2], -itemDisplays[i][3]);
}
GlStateManager.popMatrix();
}
use of net.minecraftforge.fluids.FluidStack in project ImmersiveEngineering by BluSunrize.
the class TileRenderMixer method renderTileEntityAt.
@Override
public void renderTileEntityAt(TileEntityMixer te, double x, double y, double z, float partialTicks, int destroyStage) {
if (!te.formed || te.isDummy() || !te.getWorld().isBlockLoaded(te.getPos(), false))
return;
final BlockRendererDispatcher blockRenderer = Minecraft.getMinecraft().getBlockRendererDispatcher();
BlockPos blockPos = te.getPos();
IBlockState state = getWorld().getBlockState(blockPos);
if (state.getBlock() != IEContent.blockMetalMultiblock)
return;
state = state.getBlock().getActualState(state, getWorld(), blockPos);
state = state.withProperty(IEProperties.DYNAMICRENDER, true);
IBakedModel model = blockRenderer.getBlockModelShapes().getModelForState(state);
Tessellator tessellator = Tessellator.getInstance();
VertexBuffer worldRenderer = tessellator.getBuffer();
ClientUtils.bindAtlas();
GlStateManager.pushMatrix();
GlStateManager.translate(x + .5, y + .5, z + .5);
if (te.mirrored)
GlStateManager.scale(te.facing.getFrontOffsetX() == 0 ? -1 : 1, 1, te.facing.getFrontOffsetZ() == 0 ? -1 : 1);
GlStateManager.pushMatrix();
GlStateManager.translate(te.facing == EnumFacing.SOUTH || te.facing == EnumFacing.WEST ? -.5 : .5, 0, te.facing == EnumFacing.SOUTH || te.facing == EnumFacing.EAST ? .5 : -.5);
float agitator = te.animation_agitator - (!te.shouldRenderAsActive() ? 0 : (1 - partialTicks) * 9f);
GlStateManager.rotate(agitator, 0, 1, 0);
RenderHelper.disableStandardItemLighting();
GlStateManager.blendFunc(770, 771);
GlStateManager.enableBlend();
GlStateManager.disableCull();
if (Minecraft.isAmbientOcclusionEnabled())
GlStateManager.shadeModel(7425);
else
GlStateManager.shadeModel(7424);
worldRenderer.begin(GL11.GL_QUADS, DefaultVertexFormats.BLOCK);
worldRenderer.setTranslation(-.5 - blockPos.getX(), -.5 - blockPos.getY(), -.5 - blockPos.getZ());
worldRenderer.color(255, 255, 255, 255);
blockRenderer.getBlockModelRenderer().renderModel(te.getWorld(), model, state, blockPos, worldRenderer, true);
worldRenderer.setTranslation(0.0D, 0.0D, 0.0D);
tessellator.draw();
RenderHelper.enableStandardItemLighting();
GlStateManager.popMatrix();
switch(te.facing) {
case NORTH:
break;
case SOUTH:
GlStateManager.rotate(180, 0, 1, 0);
break;
case WEST:
GlStateManager.rotate(90, 0, 1, 0);
break;
case EAST:
GlStateManager.rotate(-90, 0, 1, 0);
break;
}
GlStateManager.scale(.0625f, 1, .0625f);
GlStateManager.rotate(90, 1, 0, 0);
GlStateManager.translate(8, -8, .625f);
RenderHelper.disableStandardItemLighting();
for (int i = te.tank.getFluidTypes() - 1; i >= 0; i--) {
FluidStack fs = te.tank.fluids.get(i);
if (fs != null && fs.getFluid() != null) {
int col = fs.getFluid().getColor(fs);
GlStateManager.color((col >> 16 & 255) / 255.0f, (col >> 8 & 255) / 255.0f, (col & 255) / 255.0f, 1);
float yy = fs.amount / (float) te.tank.getCapacity() * 1.125f;
GlStateManager.translate(0, 0, -yy);
float w = (i < te.tank.getFluidTypes() - 1 || yy >= .125) ? 26 : 16 + yy / .0125f;
ClientUtils.drawRepeatedFluidSprite(fs, -w / 2, -w / 2, w, w);
}
}
GlStateManager.popMatrix();
}
Aggregations