Search in sources :

Example 1 with ChemthrowerEffect

use of blusunrize.immersiveengineering.api.tool.ChemthrowerHandler.ChemthrowerEffect in project ImmersiveEngineering by BluSunrize.

the class EntityChemthrowerShot method onImpact.

@Override
public void onImpact(RayTraceResult mop) {
    if (!this.world.isRemote && getFluid() != null) {
        FluidStack fluidStack = getFluid();
        Fluid fluid = fluidStack.getFluid();
        ChemthrowerEffect effect = ChemthrowerHandler.getEffect(fluid);
        boolean fire = fluid.getTemperature(fluidStack) > 1000;
        if (effect != null) {
            ItemStack thrower = ItemStack.EMPTY;
            EntityPlayer shooter = (EntityPlayer) this.getShooter();
            if (shooter != null)
                thrower = shooter.getHeldItem(EnumHand.MAIN_HAND);
            if (mop.typeOfHit == Type.ENTITY && mop.entityHit instanceof EntityLivingBase)
                effect.applyToEntity((EntityLivingBase) mop.entityHit, shooter, thrower, fluidStack);
            else if (mop.typeOfHit == Type.BLOCK)
                effect.applyToBlock(world, mop, shooter, thrower, fluidStack);
        } else if (mop.entityHit != null && fluid.getTemperature(fluidStack) > 500) {
            int tempDiff = fluid.getTemperature(fluidStack) - 300;
            int damage = Math.abs(tempDiff) / 500;
            if (mop.entityHit.attackEntityFrom(DamageSource.LAVA, damage))
                mop.entityHit.hurtResistantTime = (int) (mop.entityHit.hurtResistantTime * .75);
        }
        if (mop.entityHit != null) {
            int f = this.isBurning() ? this.fire : fire ? 3 : 0;
            if (f > 0) {
                mop.entityHit.setFire(f);
                if (mop.entityHit.attackEntityFrom(DamageSource.IN_FIRE, 2))
                    mop.entityHit.hurtResistantTime = (int) (mop.entityHit.hurtResistantTime * .75);
            }
        }
    }
}
Also used : FluidStack(net.minecraftforge.fluids.FluidStack) IEFluid(blusunrize.immersiveengineering.common.util.IEFluid) Fluid(net.minecraftforge.fluids.Fluid) EntityLivingBase(net.minecraft.entity.EntityLivingBase) EntityPlayer(net.minecraft.entity.player.EntityPlayer) ItemStack(net.minecraft.item.ItemStack) ChemthrowerEffect(blusunrize.immersiveengineering.api.tool.ChemthrowerHandler.ChemthrowerEffect)

Example 2 with ChemthrowerEffect

use of blusunrize.immersiveengineering.api.tool.ChemthrowerHandler.ChemthrowerEffect in project ImmersiveEngineering by BluSunrize.

the class IEContent method init.

public static void init() {
    /*ARC FURNACE RECYCLING*/
    if (IEConfig.Machines.arcfurnace_recycle) {
        arcRecycleThread = new ArcRecyclingThreadHandler();
        arcRecycleThread.start();
    }
    /*MINING LEVELS*/
    blockOre.setHarvestLevel("pickaxe", 1, blockOre.getStateFromMeta(BlockTypes_Ore.COPPER.getMeta()));
    blockOre.setHarvestLevel("pickaxe", 1, blockOre.getStateFromMeta(BlockTypes_Ore.ALUMINUM.getMeta()));
    blockOre.setHarvestLevel("pickaxe", 2, blockOre.getStateFromMeta(BlockTypes_Ore.LEAD.getMeta()));
    blockOre.setHarvestLevel("pickaxe", 2, blockOre.getStateFromMeta(BlockTypes_Ore.SILVER.getMeta()));
    blockOre.setHarvestLevel("pickaxe", 2, blockOre.getStateFromMeta(BlockTypes_Ore.NICKEL.getMeta()));
    blockOre.setHarvestLevel("pickaxe", 2, blockOre.getStateFromMeta(BlockTypes_Ore.URANIUM.getMeta()));
    blockStorage.setHarvestLevel("pickaxe", 1, blockStorage.getStateFromMeta(BlockTypes_MetalsIE.COPPER.getMeta()));
    blockStorage.setHarvestLevel("pickaxe", 1, blockStorage.getStateFromMeta(BlockTypes_MetalsIE.ALUMINUM.getMeta()));
    blockStorage.setHarvestLevel("pickaxe", 2, blockStorage.getStateFromMeta(BlockTypes_MetalsIE.LEAD.getMeta()));
    blockStorage.setHarvestLevel("pickaxe", 2, blockStorage.getStateFromMeta(BlockTypes_MetalsIE.SILVER.getMeta()));
    blockStorage.setHarvestLevel("pickaxe", 2, blockStorage.getStateFromMeta(BlockTypes_MetalsIE.NICKEL.getMeta()));
    blockStorage.setHarvestLevel("pickaxe", 2, blockStorage.getStateFromMeta(BlockTypes_MetalsIE.URANIUM.getMeta()));
    blockStorage.setHarvestLevel("pickaxe", 2, blockStorage.getStateFromMeta(BlockTypes_MetalsIE.CONSTANTAN.getMeta()));
    blockStorage.setHarvestLevel("pickaxe", 2, blockStorage.getStateFromMeta(BlockTypes_MetalsIE.ELECTRUM.getMeta()));
    blockStorage.setHarvestLevel("pickaxe", 2, blockStorage.getStateFromMeta(BlockTypes_MetalsIE.STEEL.getMeta()));
    /*WORLDGEN*/
    addConfiguredWorldgen(blockOre.getStateFromMeta(0), "copper", IEConfig.Ores.ore_copper);
    addConfiguredWorldgen(blockOre.getStateFromMeta(1), "bauxite", IEConfig.Ores.ore_bauxite);
    addConfiguredWorldgen(blockOre.getStateFromMeta(2), "lead", IEConfig.Ores.ore_lead);
    addConfiguredWorldgen(blockOre.getStateFromMeta(3), "silver", IEConfig.Ores.ore_silver);
    addConfiguredWorldgen(blockOre.getStateFromMeta(4), "nickel", IEConfig.Ores.ore_nickel);
    addConfiguredWorldgen(blockOre.getStateFromMeta(5), "uranium", IEConfig.Ores.ore_uranium);
    /*TILEENTITIES*/
    registerTile(TileEntityIESlab.class);
    registerTile(TileEntityBalloon.class);
    registerTile(TileEntityStripCurtain.class);
    registerTile(TileEntityShaderBanner.class);
    registerTile(TileEntityCokeOven.class);
    registerTile(TileEntityBlastFurnace.class);
    registerTile(TileEntityBlastFurnaceAdvanced.class);
    registerTile(TileEntityCoresample.class);
    registerTile(TileEntityAlloySmelter.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(TileEntityWoodenPost.class);
    registerTile(TileEntityWallmount.class);
    registerTile(TileEntityLadder.class);
    registerTile(TileEntityLantern.class);
    registerTile(TileEntityRazorWire.class);
    registerTile(TileEntityToolbox.class);
    registerTile(TileEntityStructuralArm.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(TileEntityConnectorProbe.class);
    registerTile(TileEntityFeedthrough.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(TileEntityFakeLight.class);
    /*ENTITIES*/
    int i = 0;
    EntityRegistry.registerModEntity(new ResourceLocation(ImmersiveEngineering.MODID, "revolverShot"), EntityRevolvershot.class, "revolverShot", i++, ImmersiveEngineering.instance, 64, 1, true);
    EntityRegistry.registerModEntity(new ResourceLocation(ImmersiveEngineering.MODID, "skylineHook"), EntitySkylineHook.class, "skylineHook", i++, ImmersiveEngineering.instance, 64, 1, true);
    // EntityRegistry.registerModEntity(EntitySkycrate.class, "skylineCrate", 2, ImmersiveEngineering.instance, 64, 1, true);
    EntityRegistry.registerModEntity(new ResourceLocation(ImmersiveEngineering.MODID, "revolverShotHoming"), EntityRevolvershotHoming.class, "revolverShotHoming", i++, ImmersiveEngineering.instance, 64, 1, true);
    EntityRegistry.registerModEntity(new ResourceLocation(ImmersiveEngineering.MODID, "revolverShotWolfpack"), EntityWolfpackShot.class, "revolverShotWolfpack", i++, ImmersiveEngineering.instance, 64, 1, true);
    EntityRegistry.registerModEntity(new ResourceLocation(ImmersiveEngineering.MODID, "chemthrowerShot"), EntityChemthrowerShot.class, "chemthrowerShot", i++, ImmersiveEngineering.instance, 64, 1, true);
    EntityRegistry.registerModEntity(new ResourceLocation(ImmersiveEngineering.MODID, "railgunShot"), EntityRailgunShot.class, "railgunShot", i++, ImmersiveEngineering.instance, 64, 5, true);
    EntityRegistry.registerModEntity(new ResourceLocation(ImmersiveEngineering.MODID, "revolverShotFlare"), EntityRevolvershotFlare.class, "revolverShotFlare", i++, ImmersiveEngineering.instance, 64, 1, true);
    EntityRegistry.registerModEntity(new ResourceLocation(ImmersiveEngineering.MODID, "explosive"), EntityIEExplosive.class, "explosive", i++, ImmersiveEngineering.instance, 64, 1, true);
    EntityRegistry.registerModEntity(new ResourceLocation(ImmersiveEngineering.MODID, "fluorescentTube"), EntityFluorescentTube.class, "fluorescentTube", i++, ImmersiveEngineering.instance, 64, 1, true);
    CapabilityShader.register();
    CapabilitySkyhookData.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));
    /*SMELTING*/
    itemMaterial.setBurnTime(6, 3200);
    Item itemBlockStoneDecoration = Item.getItemFromBlock(blockStoneDecoration);
    if (itemBlockStoneDecoration instanceof ItemBlockIEBase)
        ((ItemBlockIEBase) itemBlockStoneDecoration).setBurnTime(3, 3200 * 10);
    /*BANNERS*/
    addBanner("hammer", "hmr", new ItemStack(itemTool, 1, 0));
    addBanner("bevels", "bvl", "plateIron");
    addBanner("ornate", "orn", "dustSilver");
    addBanner("treated_wood", "twd", "plankTreatedWood");
    addBanner("windmill", "wnd", new ItemStack[] { new ItemStack(blockWoodenDevice1, 1, BlockTypes_WoodenDevice1.WINDMILL.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);
    }
    /*ASSEMBLER RECIPE ADAPTERS*/
    // Fluid Ingredients
    AssemblerHandler.registerSpecialQueryConverters((o) -> {
        if (o instanceof IngredientFluidStack)
            return new RecipeQuery(((IngredientFluidStack) o).getFluid(), ((IngredientFluidStack) o).getFluid().amount);
        else
            return null;
    });
    // Potion bullets
    AssemblerHandler.registerRecipeAdapter(RecipePotionBullets.class, new IRecipeAdapter<RecipePotionBullets>() {

        @Nullable
        @Override
        public RecipeQuery[] getQueriedInputs(RecipePotionBullets recipe, NonNullList<ItemStack> input) {
            RecipeQuery bullet = null;
            RecipeQuery potion = null;
            for (int i = 0; i < input.size() - 1; ++i) {
                ItemStack s = input.get(i);
                if (!s.isEmpty()) {
                    if (bullet == null && RecipePotionBullets.isPotionBullet(s))
                        bullet = AssemblerHandler.createQueryFromItemStack(s);
                    else if (potion == null && s.getItem() instanceof ItemPotion)
                        potion = AssemblerHandler.createQuery(MixerPotionHelper.getFluidStackForType(PotionUtils.getPotionFromItem(s), 250));
                    else
                        return null;
                }
            }
            if (bullet == null || potion == null)
                return null;
            return new RecipeQuery[] { bullet, potion };
        }
    });
    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 world, RayTraceResult mop, @Nullable EntityPlayer shooter, ItemStack thrower, FluidStack fluid) {
        }

        @Override
        public void applyToBlock(World world, RayTraceResult mop, @Nullable EntityPlayer shooter, ItemStack thrower, Fluid fluid) {
        }
    });
    ChemthrowerHandler.registerEffect(fluidConcrete, new ChemthrowerEffect() {

        @Override
        public void applyToEntity(EntityLivingBase target, @Nullable EntityPlayer shooter, ItemStack thrower, FluidStack fluid) {
            hit(target.world, target.getPosition(), EnumFacing.UP);
        }

        @Override
        public void applyToEntity(EntityLivingBase target, @Nullable EntityPlayer shooter, ItemStack thrower, Fluid fluid) {
        }

        @Override
        public void applyToBlock(World world, RayTraceResult mop, @Nullable EntityPlayer shooter, ItemStack thrower, FluidStack fluid) {
            IBlockState hit = world.getBlockState(mop.getBlockPos());
            if (hit.getBlock() != blockStoneDecoration || hit.getBlock().getMetaFromState(hit) != BlockTypes_StoneDecoration.CONCRETE_SPRAYED.getMeta()) {
                BlockPos pos = mop.getBlockPos().offset(mop.sideHit);
                if (!world.isAirBlock(pos))
                    return;
                AxisAlignedBB aabb = new AxisAlignedBB(pos);
                List<EntityChemthrowerShot> otherProjectiles = world.getEntitiesWithinAABB(EntityChemthrowerShot.class, aabb);
                if (otherProjectiles.size() >= 8)
                    hit(world, pos, mop.sideHit);
            }
        }

        @Override
        public void applyToBlock(World world, RayTraceResult mop, @Nullable EntityPlayer shooter, ItemStack thrower, Fluid fluid) {
        }

        private void hit(World world, BlockPos pos, EnumFacing side) {
            AxisAlignedBB aabb = new AxisAlignedBB(pos);
            List<EntityChemthrowerShot> otherProjectiles = world.getEntitiesWithinAABB(EntityChemthrowerShot.class, aabb);
            for (EntityChemthrowerShot shot : otherProjectiles) shot.setDead();
            world.setBlockState(pos, blockStoneDecoration.getStateFromMeta(BlockTypes_StoneDecoration.CONCRETE_SPRAYED.getMeta()));
            for (EntityLivingBase living : world.getEntitiesWithinAABB(EntityLivingBase.class, aabb)) living.addPotionEffect(new PotionEffect(IEPotions.concreteFeet, Integer.MAX_VALUE));
        }
    });
    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"), 15, 1.25).setColourMap(new int[][] { { 0xd8d8d8, 0xd8d8d8, 0xd8d8d8, 0xa8a8a8, 0x686868, 0x686868 } });
    RailgunHandler.registerProjectileProperties(new IngredientStack("stickAluminum"), 13, 1.05).setColourMap(new int[][] { { 0xd8d8d8, 0xd8d8d8, 0xd8d8d8, 0xa8a8a8, 0x686868, 0x686868 } });
    RailgunHandler.registerProjectileProperties(new IngredientStack("stickSteel"), 18, 1.25).setColourMap(new int[][] { { 0xb4b4b4, 0xb4b4b4, 0xb4b4b4, 0x7a7a7a, 0x555555, 0x555555 } });
    RailgunHandler.registerProjectileProperties(new ItemStack(itemGraphiteElectrode), 24, .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());
    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.registerSource(new IngredientStack(new ItemStack(Blocks.MAGMA)), 1300);
    ThermoelectricHandler.registerSourceInKelvin("blockIce", 273);
    ThermoelectricHandler.registerSourceInKelvin("blockPackedIce", 200);
    ThermoelectricHandler.registerSourceInKelvin("blockUranium", 2000);
    ThermoelectricHandler.registerSourceInKelvin("blockYellorium", 2000);
    ThermoelectricHandler.registerSourceInKelvin("blockPlutonium", 4000);
    ThermoelectricHandler.registerSourceInKelvin("blockBlutonium", 4000);
    /*MULTIBLOCKS*/
    MultiblockHandler.registerMultiblock(MultiblockCokeOven.instance);
    MultiblockHandler.registerMultiblock(MultiblockAlloySmelter.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);
    MultiblockHandler.registerMultiblock(MultiblockFeedthrough.instance);
    /*VILLAGE*/
    IEVillagerHandler.initIEVillagerHouse();
    IEVillagerHandler.initIEVillagerTrades();
    /*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));
    // }
    /*BLOCK ITEMS FROM CRATES*/
    IEApi.forbiddenInCrates.add((stack) -> {
        if (stack.getItem() == IEContent.itemToolbox)
            return true;
        if (stack.getItem() == IEContent.itemToolbox)
            return true;
        if (OreDictionary.itemMatches(new ItemStack(IEContent.blockWoodenDevice0, 1, 0), stack, true))
            return true;
        if (OreDictionary.itemMatches(new ItemStack(IEContent.blockWoodenDevice0, 1, 5), stack, true))
            return true;
        return stack.getItem() instanceof ItemShulkerBox;
    });
    TileEntityFluidPipe.initCovers();
    IEDataFixers.register();
}
Also used : AxisAlignedBB(net.minecraft.util.math.AxisAlignedBB) ItemPotion(net.minecraft.item.ItemPotion) FluidStack(net.minecraftforge.fluids.FluidStack) EnumFacing(net.minecraft.util.EnumFacing) ItemShulkerBox(net.minecraft.item.ItemShulkerBox) World(net.minecraft.world.World) ChemthrowerEffect_Potion(blusunrize.immersiveengineering.api.tool.ChemthrowerHandler.ChemthrowerEffect_Potion) TileEntity(net.minecraft.tileentity.TileEntity) Item(net.minecraft.item.Item) ChemthrowerEffect_Extinguish(blusunrize.immersiveengineering.api.tool.ChemthrowerHandler.ChemthrowerEffect_Extinguish) ResourceLocation(net.minecraft.util.ResourceLocation) NonNullList(net.minecraft.util.NonNullList) LootTableList(net.minecraft.world.storage.loot.LootTableList) BlockPos(net.minecraft.util.math.BlockPos) ChemthrowerEffect(blusunrize.immersiveengineering.api.tool.ChemthrowerHandler.ChemthrowerEffect) IBlockState(net.minecraft.block.state.IBlockState) Fluid(net.minecraftforge.fluids.Fluid) IEFluid(blusunrize.immersiveengineering.common.util.IEFluid) RayTraceResult(net.minecraft.util.math.RayTraceResult) DefaultFurnaceAdapter(blusunrize.immersiveengineering.api.tool.ExternalHeaterHandler.DefaultFurnaceAdapter) RecipeQuery(blusunrize.immersiveengineering.api.tool.AssemblerHandler.RecipeQuery) EntityLivingBase(net.minecraft.entity.EntityLivingBase) EntityPlayer(net.minecraft.entity.player.EntityPlayer) ItemStack(net.minecraft.item.ItemStack) Nullable(javax.annotation.Nullable)

Aggregations

ChemthrowerEffect (blusunrize.immersiveengineering.api.tool.ChemthrowerHandler.ChemthrowerEffect)2 IEFluid (blusunrize.immersiveengineering.common.util.IEFluid)2 EntityLivingBase (net.minecraft.entity.EntityLivingBase)2 EntityPlayer (net.minecraft.entity.player.EntityPlayer)2 ItemStack (net.minecraft.item.ItemStack)2 Fluid (net.minecraftforge.fluids.Fluid)2 FluidStack (net.minecraftforge.fluids.FluidStack)2 RecipeQuery (blusunrize.immersiveengineering.api.tool.AssemblerHandler.RecipeQuery)1 ChemthrowerEffect_Extinguish (blusunrize.immersiveengineering.api.tool.ChemthrowerHandler.ChemthrowerEffect_Extinguish)1 ChemthrowerEffect_Potion (blusunrize.immersiveengineering.api.tool.ChemthrowerHandler.ChemthrowerEffect_Potion)1 DefaultFurnaceAdapter (blusunrize.immersiveengineering.api.tool.ExternalHeaterHandler.DefaultFurnaceAdapter)1 Nullable (javax.annotation.Nullable)1 IBlockState (net.minecraft.block.state.IBlockState)1 Item (net.minecraft.item.Item)1 ItemPotion (net.minecraft.item.ItemPotion)1 ItemShulkerBox (net.minecraft.item.ItemShulkerBox)1 TileEntity (net.minecraft.tileentity.TileEntity)1 EnumFacing (net.minecraft.util.EnumFacing)1 NonNullList (net.minecraft.util.NonNullList)1 ResourceLocation (net.minecraft.util.ResourceLocation)1