Merge remote-tracking branch 'HbmMods/master'
@ -1,14 +1,9 @@
|
||||
package com.hbm.blocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
public class BlockEnumMulti extends BlockMulti {
|
||||
|
||||
@ -9,7 +9,7 @@ import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public abstract class BlockMulti extends BlockBase {
|
||||
public abstract class BlockMulti extends BlockBase implements IBlockMulti {
|
||||
|
||||
public BlockMulti() {
|
||||
super();
|
||||
@ -35,6 +35,4 @@ public abstract class BlockMulti extends BlockBase {
|
||||
list.add(new ItemStack(item, 1, i));
|
||||
}
|
||||
}
|
||||
|
||||
public abstract int getSubCount();
|
||||
}
|
||||
|
||||
6
src/main/java/com/hbm/blocks/IBlockMulti.java
Normal file
@ -0,0 +1,6 @@
|
||||
package com.hbm.blocks;
|
||||
|
||||
public interface IBlockMulti {
|
||||
|
||||
public int getSubCount();
|
||||
}
|
||||
@ -22,12 +22,9 @@ import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.DoorDecl;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockFalling;
|
||||
import net.minecraft.block.material.*;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
@ -325,6 +322,8 @@ public class ModBlocks {
|
||||
public static Block concrete_colored;
|
||||
public static Block concrete;
|
||||
public static Block concrete_asbestos;
|
||||
public static Block concrete_super;
|
||||
public static Block concrete_super_broken;
|
||||
public static Block ducrete_smooth;
|
||||
public static Block ducrete;
|
||||
public static Block concrete_pillar;
|
||||
@ -448,6 +447,8 @@ public class ModBlocks {
|
||||
public static Block mush_block;
|
||||
public static Block mush_block_stem;
|
||||
|
||||
public static Block plant_flower;
|
||||
|
||||
public static Block waste_earth;
|
||||
public static Block waste_mycelium;
|
||||
public static Block waste_trinitite;
|
||||
@ -742,6 +743,7 @@ public class ModBlocks {
|
||||
public static Block gas_duct;
|
||||
public static Block fluid_duct;
|
||||
public static Block fluid_duct_solid;
|
||||
public static Block fluid_duct_neo;
|
||||
|
||||
public static Block conveyor;
|
||||
|
||||
@ -945,6 +947,8 @@ public class ModBlocks {
|
||||
public static Block machine_condenser;
|
||||
public static Block machine_tower_small;
|
||||
public static Block machine_tower_large;
|
||||
|
||||
public static Block machine_electrolyser;
|
||||
|
||||
public static Block machine_deaerator;
|
||||
public static final int guiID_machine_deaerator = 74;
|
||||
@ -1456,9 +1460,9 @@ public class ModBlocks {
|
||||
block_desh = new BlockBeaconable(Material.iron).setBlockName("block_desh").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(600.0F).setBlockTextureName(RefStrings.MODID + ":block_desh");
|
||||
block_dura_steel = new BlockBeaconable(Material.iron).setBlockName("block_dura_steel").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(600.0F).setBlockTextureName(RefStrings.MODID + ":block_dura_steel");
|
||||
block_starmetal = new BlockBeaconable(Material.iron).setBlockName("block_starmetal").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(600.0F).setBlockTextureName(RefStrings.MODID + ":block_starmetal");
|
||||
block_polymer = new BlockBeaconable(Material.ground).setBlockName("block_polymer").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypePiston).setHardness(3.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_polymer");
|
||||
block_bakelite = new BlockBeaconable(Material.ground).setBlockName("block_bakelite").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypePiston).setHardness(3.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_bakelite");
|
||||
block_rubber = new BlockBeaconable(Material.ground).setBlockName("block_rubber").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypePiston).setHardness(3.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_rubber");
|
||||
block_polymer = new BlockBeaconable(Material.rock).setBlockName("block_polymer").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypePiston).setHardness(3.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_polymer");
|
||||
block_bakelite = new BlockBeaconable(Material.rock).setBlockName("block_bakelite").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypePiston).setHardness(3.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_bakelite");
|
||||
block_rubber = new BlockBeaconable(Material.rock).setBlockName("block_rubber").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypePiston).setHardness(3.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_rubber");
|
||||
block_yellowcake = new BlockHazardFalling().makeBeaconable().setBlockName("block_yellowcake").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeSand).setHardness(5.0F).setResistance(600.0F).setBlockTextureName(RefStrings.MODID + ":block_yellowcake");
|
||||
block_insulator = new BlockRotatablePillar(Material.cloth, RefStrings.MODID + ":block_insulator_top").setBlockName("block_insulator").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeCloth).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_insulator_side");
|
||||
block_fiberglass = new BlockRotatablePillar(Material.cloth, RefStrings.MODID + ":block_fiberglass_top").setBlockName("block_fiberglass").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeCloth).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_fiberglass_side");
|
||||
@ -1543,6 +1547,8 @@ public class ModBlocks {
|
||||
concrete_colored = new BlockConcreteColored(Material.rock).setBlockName("concrete_colored").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(4000.0F).setBlockTextureName(RefStrings.MODID + ":concrete");
|
||||
concrete = new BlockGeneric(Material.rock).setBlockName("concrete").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(4000.0F).setBlockTextureName(RefStrings.MODID + ":concrete_tile");
|
||||
concrete_asbestos = new BlockGeneric(Material.rock).setBlockName("concrete_asbestos").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(4000.0F).setBlockTextureName(RefStrings.MODID + ":concrete_asbestos");
|
||||
concrete_super = new BlockUberConcrete().setBlockName("concrete_super").setCreativeTab(MainRegistry.blockTab).setHardness(150.0F).setResistance(10000.0F);
|
||||
concrete_super_broken = new BlockFalling(Material.rock).setBlockName("concrete_super_broken").setCreativeTab(MainRegistry.blockTab).setHardness(10.0F).setResistance(20.0F).setBlockTextureName(RefStrings.MODID + ":concrete_super_broken");
|
||||
concrete_pillar = new BlockRotatablePillar(Material.rock, RefStrings.MODID + ":concrete_pillar_top").setBlockName("concrete_pillar").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(4000.0F).setBlockTextureName(RefStrings.MODID + ":concrete_pillar_side");
|
||||
brick_concrete = new BlockGeneric(Material.rock).setBlockName("brick_concrete").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(6000.0F).setBlockTextureName(RefStrings.MODID + ":brick_concrete");
|
||||
brick_concrete_mossy = new BlockGeneric(Material.rock).setBlockName("brick_concrete_mossy").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(6000.0F).setBlockTextureName(RefStrings.MODID + ":brick_concrete_mossy");
|
||||
@ -1665,6 +1671,8 @@ public class ModBlocks {
|
||||
mush = new BlockMush(Material.plants).setBlockName("mush").setCreativeTab(MainRegistry.blockTab).setLightLevel(0.5F).setStepSound(Block.soundTypeGrass).setBlockTextureName(RefStrings.MODID + ":mush");
|
||||
mush_block = new BlockMushHuge(Material.plants).setBlockName("mush_block").setLightLevel(1.0F).setStepSound(Block.soundTypeGrass).setHardness(0.2F).setBlockTextureName(RefStrings.MODID + ":mush_block_skin");
|
||||
mush_block_stem = new BlockMushHuge(Material.plants).setBlockName("mush_block_stem").setLightLevel(1.0F).setStepSound(Block.soundTypeGrass).setHardness(0.2F).setBlockTextureName(RefStrings.MODID + ":mush_block_stem");
|
||||
|
||||
plant_flower = new BlockNTMFlower().setBlockName("plant_flower").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeGrass).setHardness(0.0F);
|
||||
|
||||
waste_earth = new WasteEarth(Material.ground, true).setBlockName("waste_earth").setStepSound(Block.soundTypeGrass).setCreativeTab(MainRegistry.blockTab).setHardness(0.6F).setBlockTextureName(RefStrings.MODID + ":waste_earth");
|
||||
waste_mycelium = new WasteEarth(Material.ground, true).setBlockName("waste_mycelium").setStepSound(Block.soundTypeGrass).setLightLevel(1F).setCreativeTab(MainRegistry.blockTab).setHardness(0.6F).setBlockTextureName(RefStrings.MODID + ":waste_mycelium_side");
|
||||
@ -1875,6 +1883,7 @@ public class ModBlocks {
|
||||
fluid_duct = new BlockFluidDuct(Material.iron).setBlockName("fluid_duct").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":fluid_duct_icon");
|
||||
fluid_duct_solid = new BlockFluidDuctSolid(Material.iron).setBlockName("fluid_duct_solid").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":fluid_duct_solid");
|
||||
conveyor = new BlockConveyor(Material.iron).setBlockName("conveyor").setHardness(0.0F).setResistance(2.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":conveyor");
|
||||
fluid_duct_neo = new FluidDuctStandard(Material.iron).setBlockName("fluid_duct_neo").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":pipe_neo");
|
||||
|
||||
chain = new BlockChain(Material.iron).setBlockName("dungeon_chain").setHardness(0.25F).setResistance(2.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":chain");
|
||||
|
||||
@ -2136,6 +2145,8 @@ public class ModBlocks {
|
||||
machine_liquefactor = new MachineLiquefactor().setBlockName("machine_liquefactor").setHardness(10.0F).setResistance(20.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
machine_solidifier = new MachineSolidifier().setBlockName("machine_solidifier").setHardness(10.0F).setResistance(20.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel_machine");
|
||||
|
||||
machine_electrolyser = new MachineElectrolyser().setBlockName("machine_electrolyser").setHardness(10.0F).setResistance(20.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel_machine");
|
||||
|
||||
anvil_iron = new NTMAnvil(Material.iron, 1).setBlockName("anvil_iron").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":anvil_iron");
|
||||
anvil_lead = new NTMAnvil(Material.iron, 1).setBlockName("anvil_lead").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":anvil_lead");
|
||||
anvil_steel = new NTMAnvil(Material.iron, 2).setBlockName("anvil_steel").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":anvil_steel");
|
||||
@ -2586,6 +2597,8 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(concrete_colored, ItemBlockColoredConcrete.class, concrete_colored.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(concrete, ItemBlockBlastInfo.class, concrete.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(concrete_asbestos, ItemBlockBlastInfo.class, concrete_asbestos.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(concrete_super, ItemBlockBlastInfo.class, concrete_super.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(concrete_super_broken, ItemBlockBlastInfo.class, concrete_super_broken.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(ducrete_smooth, ItemBlockBlastInfo.class, ducrete_smooth.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(ducrete, ItemBlockBlastInfo.class, ducrete.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(concrete_pillar, ItemBlockBlastInfo.class, concrete_pillar.getUnlocalizedName());
|
||||
@ -2688,6 +2701,7 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(deco_pipe_quad_green_rusted, ItemBlockBase.class, deco_pipe_quad_green_rusted.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(deco_pipe_quad_red, ItemBlockBase.class, deco_pipe_quad_red.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(deco_pipe_quad_marked, ItemBlockBase.class, deco_pipe_quad_marked.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(plant_flower, ItemBlockBase.class, plant_flower.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(mush, mush.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(mush_block, mush_block.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(mush_block_stem, mush_block_stem.getUnlocalizedName());
|
||||
@ -2996,6 +3010,7 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(gas_duct, gas_duct.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(gas_duct_solid, gas_duct_solid.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(fluid_duct, fluid_duct.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(fluid_duct_neo, ItemBlockBase.class, fluid_duct_neo.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(fluid_duct_solid, fluid_duct_solid.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(conveyor, conveyor.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(chain, chain.getUnlocalizedName());
|
||||
@ -3054,6 +3069,7 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(machine_deuterium_tower, machine_deuterium_tower.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_liquefactor, ItemBlockBase.class, machine_liquefactor.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_solidifier, ItemBlockBase.class, machine_solidifier.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_electrolyser, machine_electrolyser.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_deaerator, machine_deaerator.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_waste_drum, machine_waste_drum.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_storage_drum, machine_storage_drum.getUnlocalizedName());
|
||||
|
||||
107
src/main/java/com/hbm/blocks/generic/BlockNTMFlower.java
Normal file
@ -0,0 +1,107 @@
|
||||
package com.hbm.blocks.generic;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.BlockEnumMulti;
|
||||
import com.hbm.blocks.ITooltipProvider;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.EnumPlantType;
|
||||
import net.minecraftforge.common.IPlantable;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class BlockNTMFlower extends BlockEnumMulti implements IPlantable, ITooltipProvider {
|
||||
|
||||
public BlockNTMFlower() {
|
||||
super(Material.plants, EnumFlowerType.class, true, true);
|
||||
}
|
||||
|
||||
public static enum EnumFlowerType {
|
||||
FOXGLOVE,
|
||||
TOBACCO,
|
||||
NIGHTSHADE,
|
||||
WEED
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPlantType getPlantType(IBlockAccess world, int x, int y, int z) {
|
||||
return EnumPlantType.Plains;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Block getPlant(IBlockAccess world, int x, int y, int z) {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPlantMetadata(IBlockAccess world, int x, int y, int z) {
|
||||
return world.getBlockMetadata(x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlaceBlockAt(World world, int x, int y, int z) {
|
||||
return super.canPlaceBlockAt(world, x, y, z) && this.canBlockStay(world, x, y, z);
|
||||
}
|
||||
|
||||
protected boolean canPlaceBlockOn(Block block) {
|
||||
return block == Blocks.grass || block == Blocks.dirt || block == Blocks.farmland;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(World world, int x, int y, int z, Block block) {
|
||||
super.onNeighborBlockChange(world, x, y, z, block);
|
||||
this.checkAndDropBlock(world, x, y, z);
|
||||
}
|
||||
|
||||
protected void checkAndDropBlock(World world, int x, int y, int z) {
|
||||
if(!this.canBlockStay(world, x, y, z)) {
|
||||
this.dropBlockAsItem(world, x, y, z, world.getBlockMetadata(x, y, z), 0);
|
||||
world.setBlock(x, y, z, getBlockById(0), 0, 2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canBlockStay(World world, int x, int y, int z) {
|
||||
return world.getBlock(x, y - 1, z).canSustainPlant(world, x, y - 1, z, ForgeDirection.UP, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(int meta) {
|
||||
return meta;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
|
||||
if(stack.getItemDamage() == 3) {
|
||||
list.add("haha get it? it's funny because drugs");
|
||||
}
|
||||
}
|
||||
}
|
||||
91
src/main/java/com/hbm/blocks/generic/BlockUberConcrete.java
Normal file
@ -0,0 +1,91 @@
|
||||
package com.hbm.blocks.generic;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.BlockBase;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.lib.RefStrings;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.item.EntityFallingBlock;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import scala.actors.threadpool.Arrays;
|
||||
|
||||
public class BlockUberConcrete extends BlockBase {
|
||||
|
||||
public BlockUberConcrete() {
|
||||
super();
|
||||
this.setTickRandomly(true);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
protected IIcon[] brokenIcons;
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
super.registerBlockIcons(iconRegister);
|
||||
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":concrete_super");
|
||||
brokenIcons = new IIcon[4];
|
||||
|
||||
for(int i = 0; i < 4; i++) {
|
||||
this.brokenIcons[i] = iconRegister.registerIcon(RefStrings.MODID + ":concrete_super_m" + i);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
|
||||
if(meta == 15) return brokenIcons[3];
|
||||
if(meta == 14) return brokenIcons[2];
|
||||
if(meta > 11) return brokenIcons[1];
|
||||
if(meta > 9) return brokenIcons[0];
|
||||
|
||||
return this.blockIcon;
|
||||
}
|
||||
|
||||
public void updateTick(World world, int x, int y, int z, Random rand) {
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
|
||||
if(rand.nextInt(meta + 1) > 0)
|
||||
return;
|
||||
|
||||
if(meta < 15) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, meta + 1, 3);
|
||||
} else {
|
||||
world.setBlockToAir(x, y, z);
|
||||
|
||||
if(world.getBlock(x, y - 1, z) == Blocks.air) {
|
||||
world.setBlock(x, y, z, ModBlocks.concrete_super_broken);
|
||||
return;
|
||||
}
|
||||
|
||||
List<Integer> sides = new ArrayList(); //i wish the fucking homunculus that made the standard list implementation the nastiest fucking diarrhea of his life
|
||||
Collections.addAll(sides, 2, 3, 4, 5);
|
||||
Collections.shuffle(sides);
|
||||
|
||||
for(Integer i : sides) {
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(i);
|
||||
if(world.getBlock(x + dir.offsetX, y, z + dir.offsetZ) == Blocks.air && world.getBlock(x + dir.offsetX, y - 1, z + dir.offsetZ) == Blocks.air) {
|
||||
EntityFallingBlock debris = new EntityFallingBlock(world, x + 0.5 + dir.offsetX, y + 0.5, z + 0.5 + dir.offsetZ, ModBlocks.concrete_super_broken);
|
||||
debris.field_145812_b = 2;
|
||||
debris.field_145813_c = false;
|
||||
debris.func_145806_a(true);
|
||||
world.spawnEntityInWorld(debris);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
world.setBlock(x, y, z, ModBlocks.concrete_super_broken);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -12,7 +12,6 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.item.EntityFallingBlock;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@ -1,16 +1,23 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.TileEntityDeuteriumTower;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class DeuteriumTower extends BlockDummyable {
|
||||
public class DeuteriumTower extends BlockDummyable implements ILookOverlay {
|
||||
|
||||
public DeuteriumTower(Material mat) {
|
||||
super(mat);
|
||||
@ -30,7 +37,7 @@ public class DeuteriumTower extends BlockDummyable {
|
||||
|
||||
@Override
|
||||
public int[] getDimensions() {
|
||||
return new int[] {9, 0, 1, 0, 0, 1};
|
||||
return new int[] { 9, 0, 1, 0, 0, 1 };
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -45,10 +52,33 @@ public class DeuteriumTower extends BlockDummyable {
|
||||
x = x + dir.offsetX * o;
|
||||
z = z + dir.offsetZ * o;
|
||||
|
||||
ForgeDirection dr2 = dir.getRotation(ForgeDirection.UP);
|
||||
ForgeDirection dr2 = dir.getRotation(ForgeDirection.UP);
|
||||
|
||||
this.makeExtra(world, x - dir.offsetX - dr2.offsetX, y, z - dir.offsetZ - dr2.offsetZ);
|
||||
this.makeExtra(world, x, y, z - dir.offsetZ - dr2.offsetZ);
|
||||
this.makeExtra(world, x - dir.offsetX - dr2.offsetX, y, z);
|
||||
this.makeExtra(world, x - dir.offsetX - dr2.offsetX, y, z - dir.offsetZ - dr2.offsetZ);
|
||||
this.makeExtra(world, x, y, z - dir.offsetZ - dr2.offsetZ);
|
||||
this.makeExtra(world, x - dir.offsetX - dr2.offsetX, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void printHook(Pre event, World world, int x, int y, int z) {
|
||||
int[] pos = this.findCore(world, x, y, z);
|
||||
|
||||
if(pos == null)
|
||||
return;
|
||||
|
||||
TileEntity te = world.getTileEntity(pos[0], pos[1], pos[2]);
|
||||
|
||||
if(!(te instanceof TileEntityDeuteriumTower))
|
||||
return;
|
||||
|
||||
TileEntityDeuteriumTower tower = (TileEntityDeuteriumTower) te;
|
||||
|
||||
List<String> text = new ArrayList();
|
||||
text.add((tower.power < tower.maxPower / 10 ? EnumChatFormatting.RED : EnumChatFormatting.GREEN) + "Power: " + BobMathUtil.getShortNumber(tower.power) + "HE");
|
||||
|
||||
for(int i = 0; i < tower.tanks.length; i++)
|
||||
text.add((i < 1 ? (EnumChatFormatting.GREEN + "-> ") : (EnumChatFormatting.RED + "<- ")) + EnumChatFormatting.RESET + I18nUtil.resolveKey("hbmfluid." + tower.tanks[i].getTankType().getName().toLowerCase()) + ": " + tower.tanks[i].getFill() + "/" + tower.tanks[i].getMaxFill() + "mB");
|
||||
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
}
|
||||
}
|
||||
@ -1,64 +1,64 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineChemfac;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class MachineChemfac extends BlockDummyable {
|
||||
|
||||
public MachineChemfac(Material mat) {
|
||||
super(mat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
if(meta >= 12) return new TileEntityMachineChemfac();
|
||||
if(meta >= 6) return new TileEntityProxyCombo(false, true, true);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getDimensions() {
|
||||
return new int[] {3, 0, 4, 3, 4, 3};
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
return this.standardOpenBehavior(world, x, y, z, player, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOffset() {
|
||||
return 3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
super.fillSpace(world, x, y, z, dir, o);
|
||||
|
||||
x += dir.offsetX * o;
|
||||
z += dir.offsetZ * o;
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.DOWN);
|
||||
|
||||
this.safeRem = true;
|
||||
|
||||
for(int i = -3; i < 3; i++) {
|
||||
this.makeExtra(world, x + rot.offsetX * 2 + dir.offsetX * i, y + 3, z + rot.offsetZ * 2 + dir.offsetZ * i);
|
||||
this.makeExtra(world, x - rot.offsetX * 3 + dir.offsetX * i, y + 3, z - rot.offsetZ * 3 + dir.offsetZ * i);
|
||||
|
||||
this.makeExtra(world, x + rot.offsetX * 3 + dir.offsetX * i, y + 1, z + rot.offsetZ * 3 + dir.offsetZ * i);
|
||||
this.makeExtra(world, x + rot.offsetX * 3 + dir.offsetX * i, y + 2, z + rot.offsetZ * 3 + dir.offsetZ * i);
|
||||
|
||||
this.makeExtra(world, x - rot.offsetX * 4 + dir.offsetX * i, y + 1, z - rot.offsetZ * 4 + dir.offsetZ * i);
|
||||
this.makeExtra(world, x - rot.offsetX * 4 + dir.offsetX * i, y + 2, z - rot.offsetZ * 4 + dir.offsetZ * i);
|
||||
}
|
||||
|
||||
this.safeRem = false;
|
||||
}
|
||||
}
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineChemfac;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class MachineChemfac extends BlockDummyable {
|
||||
|
||||
public MachineChemfac(Material mat) {
|
||||
super(mat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
if(meta >= 12) return new TileEntityMachineChemfac();
|
||||
if(meta >= 6) return new TileEntityProxyCombo(false, true, true);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getDimensions() {
|
||||
return new int[] {3, 0, 4, 3, 4, 3};
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
return this.standardOpenBehavior(world, x, y, z, player, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOffset() {
|
||||
return 3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
super.fillSpace(world, x, y, z, dir, o);
|
||||
|
||||
x += dir.offsetX * o;
|
||||
z += dir.offsetZ * o;
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.DOWN);
|
||||
|
||||
this.safeRem = true;
|
||||
|
||||
for(int i = -3; i < 3; i++) {
|
||||
this.makeExtra(world, x + rot.offsetX * 2 + dir.offsetX * i, y + 3, z + rot.offsetZ * 2 + dir.offsetZ * i);
|
||||
this.makeExtra(world, x - rot.offsetX * 3 + dir.offsetX * i, y + 3, z - rot.offsetZ * 3 + dir.offsetZ * i);
|
||||
|
||||
this.makeExtra(world, x + rot.offsetX * 3 + dir.offsetX * i, y + 1, z + rot.offsetZ * 3 + dir.offsetZ * i);
|
||||
this.makeExtra(world, x + rot.offsetX * 3 + dir.offsetX * i, y + 2, z + rot.offsetZ * 3 + dir.offsetZ * i);
|
||||
|
||||
this.makeExtra(world, x - rot.offsetX * 4 + dir.offsetX * i, y + 1, z - rot.offsetZ * 4 + dir.offsetZ * i);
|
||||
this.makeExtra(world, x - rot.offsetX * 4 + dir.offsetX * i, y + 2, z - rot.offsetZ * 4 + dir.offsetZ * i);
|
||||
}
|
||||
|
||||
this.safeRem = false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,13 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.machine.TileEntityDeuteriumExtractor;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -9,10 +15,12 @@ import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
|
||||
|
||||
public class MachineDeuteriumExtractor extends BlockContainer {
|
||||
public class MachineDeuteriumExtractor extends BlockContainer implements ILookOverlay {
|
||||
|
||||
public MachineDeuteriumExtractor(Material mat) {
|
||||
super(mat);
|
||||
@ -43,4 +51,23 @@ public class MachineDeuteriumExtractor extends BlockContainer {
|
||||
return blockIcon;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void printHook(Pre event, World world, int x, int y, int z) {
|
||||
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
|
||||
if(!(te instanceof TileEntityDeuteriumExtractor))
|
||||
return;
|
||||
|
||||
TileEntityDeuteriumExtractor extractor = (TileEntityDeuteriumExtractor) te;
|
||||
|
||||
List<String> text = new ArrayList();
|
||||
text.add((extractor.power < extractor.maxPower / 10 ? EnumChatFormatting.RED : EnumChatFormatting.GREEN) + "Power: " + BobMathUtil.getShortNumber(extractor.power) + "HE");
|
||||
|
||||
for(int i = 0; i < extractor.tanks.length; i++)
|
||||
text.add((i < 1 ? (EnumChatFormatting.GREEN + "-> ") : (EnumChatFormatting.RED + "<- ")) + EnumChatFormatting.RESET + I18nUtil.resolveKey("hbmfluid." + extractor.tanks[i].getTankType().getName().toLowerCase()) + ": " + extractor.tanks[i].getFill() + "/" + extractor.tanks[i].getMaxFill() + "mB");
|
||||
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,76 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.handler.MultiblockHandlerXR;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.TileEntityElectrolyser;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class MachineElectrolyser extends BlockDummyable {
|
||||
|
||||
public MachineElectrolyser() {
|
||||
super(Material.iron);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
if(meta >= 12) return new TileEntityElectrolyser();
|
||||
if(meta >= 6) return new TileEntityProxyCombo(false, true, true);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getDimensions() {
|
||||
return new int[] {0, 0, 4, 4, 2, 2};
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOffset() {
|
||||
return 4;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
return this.standardOpenBehavior(world, x, y, z, player, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
super.fillSpace(world, x, y, z, dir, o);
|
||||
MultiblockHandlerXR.fillSpace(world, x + dir.offsetX * o , y + dir.offsetY * o, z + dir.offsetZ * o, new int[] {1, 0, 4, 4, 1, 1}, this, dir);
|
||||
MultiblockHandlerXR.fillSpace(world, x + dir.offsetX * o , y + dir.offsetY * o, z + dir.offsetZ * o, new int[] {3, -1, 4, 4, 0, 0}, this, dir);
|
||||
MultiblockHandlerXR.fillSpace(world, x + dir.offsetX * o , y + dir.offsetY * o, z + dir.offsetZ * o, new int[] {3, 0, 1, -1, -2, 2}, this, dir);
|
||||
MultiblockHandlerXR.fillSpace(world, x + dir.offsetX * o , 3 + y + dir.offsetY * o, z + dir.offsetZ * o, new int[] {0, 0, 1, -1, -1, 1}, this, dir);
|
||||
MultiblockHandlerXR.fillSpace(world, x + dir.offsetX * o , y + dir.offsetY * o, z + dir.offsetZ * o, new int[] {3, 0, 3, -3, -2, 2}, this, dir);
|
||||
MultiblockHandlerXR.fillSpace(world, x + dir.offsetX * o , 3 + y + dir.offsetY * o, z + dir.offsetZ * o, new int[] {0, 0, 3, -3, -1, 1}, this, dir);
|
||||
MultiblockHandlerXR.fillSpace(world, x + dir.offsetX * o , y + dir.offsetY * o, z + dir.offsetZ * o, new int[] {3, 0, -1, 1, -2, 2}, this, dir);
|
||||
MultiblockHandlerXR.fillSpace(world, x + dir.offsetX * o , 3 + y + dir.offsetY * o, z + dir.offsetZ * o, new int[] {0, 0, -1, 1, -1, 1}, this, dir);
|
||||
MultiblockHandlerXR.fillSpace(world, x + dir.offsetX * o , y + dir.offsetY * o, z + dir.offsetZ * o, new int[] {3, 0, -3, 3, -2, 2}, this, dir);
|
||||
MultiblockHandlerXR.fillSpace(world, x + dir.offsetX * o , 3 + y + dir.offsetY * o, z + dir.offsetZ * o, new int[] {0, 0, -3, 3, -1, 1}, this, dir);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
|
||||
if(!MultiblockHandlerXR.checkSpace(world, x + dir.offsetX * o , y + dir.offsetY * o, z + dir.offsetZ * o, getDimensions(), x, y, z, dir)) return false;
|
||||
if(!MultiblockHandlerXR.checkSpace(world, x + dir.offsetX * o , y + dir.offsetY * o, z + dir.offsetZ * o, new int[] {1, 0, 4, 4, 1, 1}, x, y, z, dir)) return false;
|
||||
if(!MultiblockHandlerXR.checkSpace(world, x + dir.offsetX * o , y + dir.offsetY * o, z + dir.offsetZ * o, new int[] {3, -1, 4, 4, 0, 0}, x, y, z, dir)) return false;
|
||||
if(!MultiblockHandlerXR.checkSpace(world, x + dir.offsetX * o , y + dir.offsetY * o, z + dir.offsetZ * o, new int[] {3, 0, 1, -1, -2, 2}, x, y, z, dir)) return false;
|
||||
if(!MultiblockHandlerXR.checkSpace(world, x + dir.offsetX * o , 3 + y + dir.offsetY * o, z + dir.offsetZ * o, new int[] {0, 0, 1, -1, -1, 1}, x, y, z, dir)) return false;
|
||||
if(!MultiblockHandlerXR.checkSpace(world, x + dir.offsetX * o , y + dir.offsetY * o, z + dir.offsetZ * o, new int[] {3, 0, 3, -3, -2, 2}, x, y, z, dir)) return false;
|
||||
if(!MultiblockHandlerXR.checkSpace(world, x + dir.offsetX * o , 3 + y + dir.offsetY * o, z + dir.offsetZ * o, new int[] {0, 0, 3, -3, -1, 1}, x, y, z, dir)) return false;
|
||||
if(!MultiblockHandlerXR.checkSpace(world, x + dir.offsetX * o , y + dir.offsetY * o, z + dir.offsetZ * o, new int[] {3, 0, -1, 1, -2, 2}, x, y, z, dir)) return false;
|
||||
if(!MultiblockHandlerXR.checkSpace(world, x + dir.offsetX * o , 3 + y + dir.offsetY * o, z + dir.offsetZ * o, new int[] {0, 0, -1, 1, -1, 1}, x, y, z, dir)) return false;
|
||||
if(!MultiblockHandlerXR.checkSpace(world, x + dir.offsetX * o , y + dir.offsetY * o, z + dir.offsetZ * o, new int[] {3, 0, -3, 3, -2, 2}, x, y, z, dir)) return false;
|
||||
if(!MultiblockHandlerXR.checkSpace(world, x + dir.offsetX * o , 3 + y + dir.offsetY * o, z + dir.offsetZ * o, new int[] {0, 0, -3, 3, -1, 1}, x, y, z, dir)) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,21 +1,28 @@
|
||||
package com.hbm.blocks.network;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.IBlockMulti;
|
||||
import com.hbm.blocks.test.TestPipe;
|
||||
import com.hbm.lib.RefStrings;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
public class FluidDuctStandard extends FluidDuctBase {
|
||||
public class FluidDuctStandard extends FluidDuctBase implements IBlockMulti {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
protected IIcon[] icon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
protected IIcon[] overlay;
|
||||
|
||||
protected FluidDuctStandard(Material mat) {
|
||||
public FluidDuctStandard(Material mat) {
|
||||
super(mat);
|
||||
}
|
||||
|
||||
@ -40,6 +47,13 @@ public class FluidDuctStandard extends FluidDuctBase {
|
||||
return side == 0 ? this.icon[rectify(metadata)] : this.overlay[rectify(metadata)];
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List list) {
|
||||
for(int i = 0; i < 3; ++i) {
|
||||
list.add(new ItemStack(item, 1, i));
|
||||
}
|
||||
}
|
||||
|
||||
public int damageDropped(int meta) {
|
||||
return rectify(meta);
|
||||
}
|
||||
@ -47,4 +61,24 @@ public class FluidDuctStandard extends FluidDuctBase {
|
||||
private int rectify(int meta) {
|
||||
return Math.abs(meta % 3);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return TestPipe.renderID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSubCount() {
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
|
||||
@ -20,6 +20,7 @@ public class CommonConfig {
|
||||
public static final String CATEGORY_TOOLS = "11_tools";
|
||||
public static final String CATEGORY_MOBS = "12_mobs";
|
||||
public static final String CATEGORY_RADIATION = "13_radiation";
|
||||
public static final String CATEGORY_HAZARD = "14_hazard";
|
||||
|
||||
public static final String CATEGORY_528 = "528";
|
||||
|
||||
|
||||
@ -24,6 +24,7 @@ public class GeneralConfig {
|
||||
public static boolean enableBabyMode = false;
|
||||
public static boolean enableReflectorCompat = false;
|
||||
public static boolean enableRenderDistCheck = true;
|
||||
public static boolean enableCustomDashKeybind = false;
|
||||
|
||||
public static boolean enable528 = false;
|
||||
public static boolean enable528ReasimBoilers = true;
|
||||
@ -57,6 +58,7 @@ public class GeneralConfig {
|
||||
enableBabyMode = config.get(CATEGORY_GENERAL, "1.23_enableBabyMode", false).getBoolean(false);
|
||||
enableReflectorCompat = config.get(CATEGORY_GENERAL, "1.24_enableReflectorCompat", false).getBoolean(false);
|
||||
enableRenderDistCheck = config.get(CATEGORY_GENERAL, "1.25_enableRenderDistCheck", true).getBoolean(true);
|
||||
enableCustomDashKeybind = config.get(CATEGORY_GENERAL, "1.26_enableCustomDashKeybind", false).getBoolean(false);
|
||||
|
||||
final String CATEGORY_528 = CommonConfig.CATEGORY_528;
|
||||
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
package com.hbm.config;
|
||||
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
import net.minecraftforge.common.config.Property;
|
||||
|
||||
public class RadiationConfig {
|
||||
|
||||
@ -15,6 +14,14 @@ public class RadiationConfig {
|
||||
|
||||
public static boolean enableContamination = true;
|
||||
public static boolean enableChunkRads = true;
|
||||
|
||||
public static boolean disableAsbestos = false;
|
||||
public static boolean disableCoal = false;
|
||||
public static boolean disableHot = false;
|
||||
public static boolean disableExplosive = false;
|
||||
public static boolean disableHydro = false;
|
||||
public static boolean disableBlinding = false;
|
||||
public static boolean disableFibrosis = false;
|
||||
|
||||
public static void loadFromConfig(Configuration config) {
|
||||
|
||||
@ -32,5 +39,15 @@ public class RadiationConfig {
|
||||
enableChunkRads = CommonConfig.createConfigBool(config, CATEGORY_NUKE, "RADIATION_01_enableChunkRads", "Toggles the world radiation system (chunk radiation only, some blocks use an AoE!)", true);
|
||||
|
||||
fogCh = CommonConfig.setDef(fogCh, 20);
|
||||
|
||||
final String CATEGORY_HAZ = CommonConfig.CATEGORY_HAZARD;
|
||||
|
||||
disableAsbestos = CommonConfig.createConfigBool(config, CATEGORY_HAZ, "HAZ_00_disableAsbestos", "When turned off, all asbestos hazards are disabled", false);
|
||||
disableCoal = CommonConfig.createConfigBool(config, CATEGORY_HAZ, "HAZ_01_disableCoaldust", "When turned off, all coal dust hazards are disabled", false);
|
||||
disableHot = CommonConfig.createConfigBool(config, CATEGORY_HAZ, "HAZ_02_disableHot", "When turned off, all hot hazards are disabled", false);
|
||||
disableExplosive = CommonConfig.createConfigBool(config, CATEGORY_HAZ, "HAZ_03_disableExplosive", "When turned off, all explosive hazards are disabled", false);
|
||||
disableHydro = CommonConfig.createConfigBool(config, CATEGORY_HAZ, "HAZ_04_disableHydroactive", "When turned off, all hydroactive hazards are disabled", false);
|
||||
disableBlinding = CommonConfig.createConfigBool(config, CATEGORY_HAZ, "HAZ_05_disableBlinding", "When turned off, all blinding hazards are disabled", false);
|
||||
disableFibrosis = CommonConfig.createConfigBool(config, CATEGORY_HAZ, "HAZ_06_disableFibrosis", "When turned off, all firbosis hazards are disabled", false);
|
||||
}
|
||||
}
|
||||
|
||||
@ -76,7 +76,6 @@ public class HbmLivingProps implements IExtendedEntityProperties {
|
||||
}
|
||||
|
||||
public static void incrementRadiation(EntityLivingBase entity, float rad) {
|
||||
|
||||
if(!RadiationConfig.enableContamination)
|
||||
return;
|
||||
|
||||
@ -189,10 +188,12 @@ public class HbmLivingProps implements IExtendedEntityProperties {
|
||||
|
||||
/// ASBESTOS ///
|
||||
public static int getAsbestos(EntityLivingBase entity) {
|
||||
if(RadiationConfig.disableAsbestos) return 0;
|
||||
return getData(entity).asbestos;
|
||||
}
|
||||
|
||||
public static void setAsbestos(EntityLivingBase entity, int asbestos) {
|
||||
if(RadiationConfig.disableAsbestos) return;
|
||||
getData(entity).asbestos = asbestos;
|
||||
|
||||
if(asbestos >= maxAsbestos) {
|
||||
@ -202,6 +203,7 @@ public class HbmLivingProps implements IExtendedEntityProperties {
|
||||
}
|
||||
|
||||
public static void incrementAsbestos(EntityLivingBase entity, int asbestos) {
|
||||
if(RadiationConfig.disableAsbestos) return;
|
||||
setAsbestos(entity, getAsbestos(entity) + asbestos);
|
||||
incrementFibrosis(entity, asbestos);
|
||||
}
|
||||
@ -209,10 +211,12 @@ public class HbmLivingProps implements IExtendedEntityProperties {
|
||||
|
||||
/// BLACK LUNG DISEASE ///
|
||||
public static int getBlackLung(EntityLivingBase entity) {
|
||||
if(RadiationConfig.disableCoal) return 0;
|
||||
return getData(entity).blacklung;
|
||||
}
|
||||
|
||||
public static void setBlackLung(EntityLivingBase entity, int blacklung) {
|
||||
if(RadiationConfig.disableCoal) return;
|
||||
getData(entity).blacklung = blacklung;
|
||||
|
||||
if(blacklung >= maxBlacklung) {
|
||||
@ -222,16 +226,19 @@ public class HbmLivingProps implements IExtendedEntityProperties {
|
||||
}
|
||||
|
||||
public static void incrementBlackLung(EntityLivingBase entity, int blacklung) {
|
||||
if(RadiationConfig.disableCoal) return;
|
||||
setBlackLung(entity, getBlackLung(entity) + blacklung);
|
||||
incrementFibrosis(entity, blacklung);
|
||||
}
|
||||
|
||||
/// PULMONARY FIBROSIS ///
|
||||
public static int getFibrosis(EntityLivingBase entity) {
|
||||
if(RadiationConfig.disableFibrosis) return 0;
|
||||
return getData(entity).fibrosis;
|
||||
}
|
||||
|
||||
public static void setFibrosis(EntityLivingBase entity, int fibrosis) {
|
||||
if(RadiationConfig.disableFibrosis) return;
|
||||
getData(entity).fibrosis = fibrosis;
|
||||
|
||||
if (fibrosis >= maxFibrosis) {
|
||||
@ -241,6 +248,7 @@ public class HbmLivingProps implements IExtendedEntityProperties {
|
||||
}
|
||||
|
||||
public static void incrementFibrosis(EntityLivingBase entity, int fibrosis) {
|
||||
if(RadiationConfig.disableFibrosis) return;
|
||||
setFibrosis(entity, getFibrosis(entity) + fibrosis);
|
||||
}
|
||||
|
||||
|
||||
@ -20,6 +20,8 @@ public class HbmPlayerProps implements IExtendedEntityProperties {
|
||||
|
||||
private boolean[] keysPressed = new boolean[EnumKeybind.values().length];
|
||||
|
||||
public boolean dashActivated = true;
|
||||
|
||||
public static final int dashCooldownLength = 5;
|
||||
public int dashCooldown = 0;
|
||||
|
||||
|
||||
@ -11,6 +11,7 @@ import com.hbm.explosion.ExplosionNukeSmall;
|
||||
import com.hbm.extprop.HbmLivingProps;
|
||||
import com.hbm.extprop.HbmPlayerProps;
|
||||
import com.hbm.extprop.HbmLivingProps.ContaminationEffect;
|
||||
import com.hbm.handler.HbmKeybinds.EnumKeybind;
|
||||
import com.hbm.handler.radiation.ChunkRadiationManager;
|
||||
import com.hbm.interfaces.IArmorModDash;
|
||||
import com.hbm.items.armor.ArmorFSB;
|
||||
@ -454,6 +455,15 @@ public class EntityEffectHandler {
|
||||
}
|
||||
|
||||
int dashCount = armorDashCount + armorModDashCount;
|
||||
|
||||
boolean dashActivated = false;
|
||||
|
||||
|
||||
if(!GeneralConfig.enableCustomDashKeybind) {
|
||||
dashActivated = !player.capabilities.isFlying && player.isSneaking();
|
||||
} else {
|
||||
dashActivated = props.getKeyPressed(EnumKeybind.DASH);
|
||||
}
|
||||
|
||||
//System.out.println(dashCount);
|
||||
|
||||
@ -470,7 +480,7 @@ public class EntityEffectHandler {
|
||||
|
||||
if(props.getDashCooldown() <= 0) {
|
||||
|
||||
if(!player.capabilities.isFlying && player.isSneaking() && stamina >= perDash) {
|
||||
if(dashActivated && stamina >= perDash) {
|
||||
|
||||
Vec3 lookingIn = player.getLookVec();
|
||||
Vec3 strafeVec = player.getLookVec();
|
||||
|
||||
@ -31,6 +31,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
if(entity instanceof TileEntityMachineSolidifier) { return new ContainerSolidifier(player.inventory, (TileEntityMachineSolidifier) entity); }
|
||||
if(entity instanceof TileEntityMachineRadiolysis) { return new ContainerRadiolysis(player.inventory, (TileEntityMachineRadiolysis) entity); }
|
||||
if(entity instanceof TileEntityMachineChemfac) { return new ContainerChemfac(player.inventory, (TileEntityMachineChemfac) entity); }
|
||||
if(entity instanceof TileEntityElectrolyser) { return new ContainerElectrolyser(player.inventory, (TileEntityElectrolyser) entity); }
|
||||
|
||||
switch(ID) {
|
||||
case ModBlocks.guiID_test_difurnace: {
|
||||
@ -872,6 +873,7 @@ public class GUIHandler implements IGuiHandler {
|
||||
if(entity instanceof TileEntityMachineSolidifier) { return new GUISolidifier(player.inventory, (TileEntityMachineSolidifier) entity); }
|
||||
if(entity instanceof TileEntityMachineRadiolysis) { return new GUIRadiolysis(player.inventory, (TileEntityMachineRadiolysis) entity); }
|
||||
if(entity instanceof TileEntityMachineChemfac) { return new GUIChemfac(player.inventory, (TileEntityMachineChemfac) entity); }
|
||||
if(entity instanceof TileEntityElectrolyser) { return new GUIElectrolyser(player.inventory, (TileEntityElectrolyser) entity); }
|
||||
|
||||
switch(ID) {
|
||||
case ModBlocks.guiID_test_difurnace: {
|
||||
|
||||
@ -1,75 +1,79 @@
|
||||
package com.hbm.handler;
|
||||
|
||||
import com.hbm.inventory.gui.GUICalculator;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import com.hbm.extprop.HbmPlayerProps;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.packet.KeybindPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import cpw.mods.fml.client.registry.ClientRegistry;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.gameevent.InputEvent.KeyInputEvent;
|
||||
import net.minecraft.client.settings.KeyBinding;
|
||||
|
||||
public class HbmKeybinds {
|
||||
|
||||
public static final String category = "hbm.key";
|
||||
|
||||
public static KeyBinding calculatorKey = new KeyBinding(category + ".calculator", Keyboard.KEY_N, category);
|
||||
public static KeyBinding jetpackKey = new KeyBinding(category + ".toggleBack", Keyboard.KEY_C, category);
|
||||
public static KeyBinding hudKey = new KeyBinding(category + ".toggleHUD", Keyboard.KEY_V, category);
|
||||
public static KeyBinding reloadKey = new KeyBinding(category + ".reload", Keyboard.KEY_R, category);
|
||||
|
||||
public static KeyBinding craneUpKey = new KeyBinding(category + ".craneMoveUp", Keyboard.KEY_UP, category);
|
||||
public static KeyBinding craneDownKey = new KeyBinding(category + ".craneMoveDown", Keyboard.KEY_DOWN, category);
|
||||
public static KeyBinding craneLeftKey = new KeyBinding(category + ".craneMoveLeft", Keyboard.KEY_LEFT, category);
|
||||
public static KeyBinding craneRightKey = new KeyBinding(category + ".craneMoveRight", Keyboard.KEY_RIGHT, category);
|
||||
public static KeyBinding craneLoadKey = new KeyBinding(category + ".craneLoad", Keyboard.KEY_RETURN, category);
|
||||
|
||||
public static void register() {
|
||||
ClientRegistry.registerKeyBinding(calculatorKey);
|
||||
ClientRegistry.registerKeyBinding(jetpackKey);
|
||||
ClientRegistry.registerKeyBinding(hudKey);
|
||||
ClientRegistry.registerKeyBinding(reloadKey);
|
||||
|
||||
ClientRegistry.registerKeyBinding(craneUpKey);
|
||||
ClientRegistry.registerKeyBinding(craneDownKey);
|
||||
ClientRegistry.registerKeyBinding(craneLeftKey);
|
||||
ClientRegistry.registerKeyBinding(craneRightKey);
|
||||
ClientRegistry.registerKeyBinding(craneLoadKey);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void keyEvent(KeyInputEvent event) {
|
||||
if (calculatorKey.getIsKeyPressed()) { // handle the calculator client-side only
|
||||
FMLCommonHandler.instance().showGuiScreen(new GUICalculator());
|
||||
}
|
||||
|
||||
HbmPlayerProps props = HbmPlayerProps.getData(MainRegistry.proxy.me());
|
||||
|
||||
for(EnumKeybind key : EnumKeybind.values()) {
|
||||
boolean last = props.getKeyPressed(key);
|
||||
boolean current = MainRegistry.proxy.getIsKeyPressed(key);
|
||||
|
||||
if(last != current) {
|
||||
PacketDispatcher.wrapper.sendToServer(new KeybindPacket(key, current));
|
||||
props.setKeyPressed(key, current);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static enum EnumKeybind {
|
||||
JETPACK,
|
||||
TOGGLE_JETPACK,
|
||||
TOGGLE_HEAD,
|
||||
RELOAD,
|
||||
CRANE_UP,
|
||||
CRANE_DOWN,
|
||||
CRANE_LEFT,
|
||||
CRANE_RIGHT,
|
||||
CRANE_LOAD
|
||||
}
|
||||
}
|
||||
package com.hbm.handler;
|
||||
|
||||
import com.hbm.inventory.gui.GUICalculator;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import com.hbm.extprop.HbmPlayerProps;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.packet.KeybindPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import cpw.mods.fml.client.registry.ClientRegistry;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.gameevent.InputEvent.KeyInputEvent;
|
||||
import net.minecraft.client.settings.KeyBinding;
|
||||
|
||||
public class HbmKeybinds {
|
||||
|
||||
public static final String category = "hbm.key";
|
||||
|
||||
public static KeyBinding calculatorKey = new KeyBinding(category + ".calculator", Keyboard.KEY_N, category);
|
||||
public static KeyBinding jetpackKey = new KeyBinding(category + ".toggleBack", Keyboard.KEY_C, category);
|
||||
public static KeyBinding hudKey = new KeyBinding(category + ".toggleHUD", Keyboard.KEY_V, category);
|
||||
public static KeyBinding reloadKey = new KeyBinding(category + ".reload", Keyboard.KEY_R, category);
|
||||
public static KeyBinding dashKey = new KeyBinding(category + ".dash", Keyboard.KEY_F, category);
|
||||
|
||||
public static KeyBinding craneUpKey = new KeyBinding(category + ".craneMoveUp", Keyboard.KEY_UP, category);
|
||||
public static KeyBinding craneDownKey = new KeyBinding(category + ".craneMoveDown", Keyboard.KEY_DOWN, category);
|
||||
public static KeyBinding craneLeftKey = new KeyBinding(category + ".craneMoveLeft", Keyboard.KEY_LEFT, category);
|
||||
public static KeyBinding craneRightKey = new KeyBinding(category + ".craneMoveRight", Keyboard.KEY_RIGHT, category);
|
||||
public static KeyBinding craneLoadKey = new KeyBinding(category + ".craneLoad", Keyboard.KEY_RETURN, category);
|
||||
|
||||
public static void register() {
|
||||
ClientRegistry.registerKeyBinding(calculatorKey);
|
||||
ClientRegistry.registerKeyBinding(jetpackKey);
|
||||
ClientRegistry.registerKeyBinding(hudKey);
|
||||
ClientRegistry.registerKeyBinding(reloadKey);
|
||||
ClientRegistry.registerKeyBinding(dashKey);
|
||||
|
||||
ClientRegistry.registerKeyBinding(craneUpKey);
|
||||
ClientRegistry.registerKeyBinding(craneDownKey);
|
||||
ClientRegistry.registerKeyBinding(craneLeftKey);
|
||||
ClientRegistry.registerKeyBinding(craneRightKey);
|
||||
ClientRegistry.registerKeyBinding(craneLoadKey);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void keyEvent(KeyInputEvent event) {
|
||||
if (calculatorKey.getIsKeyPressed()) { // handle the calculator client-side only
|
||||
FMLCommonHandler.instance().showGuiScreen(new GUICalculator());
|
||||
}
|
||||
|
||||
HbmPlayerProps props = HbmPlayerProps.getData(MainRegistry.proxy.me());
|
||||
|
||||
for(EnumKeybind key : EnumKeybind.values()) {
|
||||
boolean last = props.getKeyPressed(key);
|
||||
boolean current = MainRegistry.proxy.getIsKeyPressed(key);
|
||||
|
||||
if(last != current) {
|
||||
PacketDispatcher.wrapper.sendToServer(new KeybindPacket(key, current));
|
||||
props.setKeyPressed(key, current);
|
||||
System.out.println(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static enum EnumKeybind {
|
||||
JETPACK,
|
||||
TOGGLE_JETPACK,
|
||||
TOGGLE_HEAD,
|
||||
RELOAD,
|
||||
DASH,
|
||||
CRANE_UP,
|
||||
CRANE_DOWN,
|
||||
CRANE_LEFT,
|
||||
CRANE_RIGHT,
|
||||
CRANE_LOAD
|
||||
}
|
||||
}
|
||||
|
||||
@ -206,6 +206,7 @@ public abstract class ToolAbility {
|
||||
EnchantmentUtil.removeEnchantment(stack, Enchantment.silkTouch);
|
||||
|
||||
world.setBlockToAir(x, y, z);
|
||||
player.getHeldItem().damageItem(1, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -252,6 +253,7 @@ public abstract class ToolAbility {
|
||||
EnchantmentUtil.removeEnchantment(stack, Enchantment.fortune);
|
||||
|
||||
world.setBlockToAir(x, y, z);
|
||||
player.getHeldItem().damageItem(1, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -294,6 +296,7 @@ public abstract class ToolAbility {
|
||||
}
|
||||
|
||||
world.setBlockToAir(x, y, z);
|
||||
player.getHeldItem().damageItem(1, player);
|
||||
|
||||
for(ItemStack stack : drops)
|
||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, stack.copy()));
|
||||
@ -335,6 +338,7 @@ public abstract class ToolAbility {
|
||||
if(result != null && result.getItem() != ModItems.scrap) {
|
||||
world.setBlockToAir(x, y, z);
|
||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, result.copy()));
|
||||
player.getHeldItem().damageItem(1, player);
|
||||
}
|
||||
}
|
||||
|
||||
@ -373,6 +377,7 @@ public abstract class ToolAbility {
|
||||
|
||||
if(result != null) {
|
||||
world.setBlockToAir(x, y, z);
|
||||
player.getHeldItem().damageItem(1, player);
|
||||
|
||||
for(ItemStack st : result) {
|
||||
if(st != null)
|
||||
@ -417,6 +422,7 @@ public abstract class ToolAbility {
|
||||
if(result != null) {
|
||||
world.setBlockToAir(x, y, z);
|
||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, result.copy()));
|
||||
player.getHeldItem().damageItem(1, player);
|
||||
}
|
||||
}
|
||||
|
||||
@ -460,6 +466,7 @@ public abstract class ToolAbility {
|
||||
if(mercury > 0) {
|
||||
world.setBlockToAir(x, y, z);
|
||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModItems.ingot_mercury, mercury)));
|
||||
player.getHeldItem().damageItem(1, player);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -146,7 +146,7 @@ public class SILEXRecipeHandler extends TemplateRecipeHandler {
|
||||
|
||||
if(recipe.getKey() instanceof ItemStack) {
|
||||
|
||||
if (NEIServerUtils.areStacksSameType(ingredient, (ItemStack)recipe.getKey()))
|
||||
if (NEIServerUtils.areStacksSameTypeCrafting(ingredient, (ItemStack)recipe.getKey()))
|
||||
this.arecipes.add(new RecipeSet(recipe.getKey(), recipe.getValue()));
|
||||
|
||||
} else if (recipe.getKey() instanceof ArrayList) {
|
||||
@ -154,7 +154,7 @@ public class SILEXRecipeHandler extends TemplateRecipeHandler {
|
||||
for(Object o : (ArrayList)recipe.getKey()) {
|
||||
ItemStack stack = (ItemStack)o;
|
||||
|
||||
if (NEIServerUtils.areStacksSameType(ingredient, stack))
|
||||
if (NEIServerUtils.areStacksSameTypeCrafting(ingredient, stack))
|
||||
this.arecipes.add(new RecipeSet(stack, recipe.getValue()));
|
||||
}
|
||||
}
|
||||
|
||||
@ -22,7 +22,7 @@ public class HazardTransformerRadiationME extends HazardTransformerBase {
|
||||
float radiation = 0;
|
||||
|
||||
for(ItemStack held : stacks) {
|
||||
radiation += HazardSystem.getHazardLevelFromStack(held, HazardRegistry.RADIATION);
|
||||
radiation += HazardSystem.getHazardLevelFromStack(held, HazardRegistry.RADIATION) * held.stackSize;
|
||||
}
|
||||
|
||||
if(radiation > 0) {
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.hazard.type;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.config.RadiationConfig;
|
||||
import com.hbm.extprop.HbmLivingProps;
|
||||
import com.hbm.hazard.modifier.HazardModifier;
|
||||
import com.hbm.util.ArmorRegistry;
|
||||
@ -20,6 +21,9 @@ public class HazardTypeAsbestos extends HazardTypeBase {
|
||||
@Override
|
||||
public void onUpdate(EntityLivingBase target, float level, ItemStack stack) {
|
||||
|
||||
if(RadiationConfig.disableAsbestos)
|
||||
return;
|
||||
|
||||
if(!ArmorRegistry.hasProtection(target, 3, HazardClass.PARTICLE_FINE))
|
||||
HbmLivingProps.incrementAsbestos(target, (int) Math.min(level, 10));
|
||||
else
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.hazard.type;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.config.RadiationConfig;
|
||||
import com.hbm.hazard.modifier.HazardModifier;
|
||||
import com.hbm.util.ArmorRegistry;
|
||||
import com.hbm.util.I18nUtil;
|
||||
@ -19,6 +20,9 @@ public class HazardTypeBlinding extends HazardTypeBase {
|
||||
|
||||
@Override
|
||||
public void onUpdate(EntityLivingBase target, float level, ItemStack stack) {
|
||||
|
||||
if(RadiationConfig.disableBlinding)
|
||||
return;
|
||||
|
||||
if(!ArmorRegistry.hasProtection(target, 3, HazardClass.LIGHT)) {
|
||||
target.addPotionEffect(new PotionEffect(Potion.blindness.id, (int)Math.ceil(level), 0));
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.hazard.type;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.config.RadiationConfig;
|
||||
import com.hbm.extprop.HbmLivingProps;
|
||||
import com.hbm.hazard.modifier.HazardModifier;
|
||||
import com.hbm.util.ArmorRegistry;
|
||||
@ -20,6 +21,9 @@ public class HazardTypeCoal extends HazardTypeBase {
|
||||
@Override
|
||||
public void onUpdate(EntityLivingBase target, float level, ItemStack stack) {
|
||||
|
||||
if(RadiationConfig.disableCoal)
|
||||
return;
|
||||
|
||||
if(!ArmorRegistry.hasProtection(target, 3, HazardClass.PARTICLE_COARSE))
|
||||
HbmLivingProps.incrementBlackLung(target, (int) Math.min(level, 10));
|
||||
else
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.hazard.type;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.config.RadiationConfig;
|
||||
import com.hbm.hazard.modifier.HazardModifier;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
@ -15,6 +16,9 @@ public class HazardTypeExplosive extends HazardTypeBase {
|
||||
|
||||
@Override
|
||||
public void onUpdate(EntityLivingBase target, float level, ItemStack stack) {
|
||||
|
||||
if(RadiationConfig.disableExplosive)
|
||||
return;
|
||||
|
||||
if(!target.worldObj.isRemote && target.isBurning()) {
|
||||
stack.stackSize = 0;
|
||||
@ -24,6 +28,10 @@ public class HazardTypeExplosive extends HazardTypeBase {
|
||||
|
||||
@Override
|
||||
public void updateEntity(EntityItem item, float level) {
|
||||
|
||||
if(RadiationConfig.disableExplosive)
|
||||
return;
|
||||
|
||||
if(item.isBurning()) {
|
||||
item.setDead();
|
||||
item.worldObj.newExplosion(null, item.posX, item.posY + item.height * 0.5, item.posZ, level, false, true);
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.hazard.type;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.config.RadiationConfig;
|
||||
import com.hbm.handler.ArmorModHandler;
|
||||
import com.hbm.hazard.modifier.HazardModifier;
|
||||
import com.hbm.items.ModItems;
|
||||
@ -21,6 +22,9 @@ public class HazardTypeHot extends HazardTypeBase {
|
||||
@Override
|
||||
public void onUpdate(EntityLivingBase target, float level, ItemStack stack) {
|
||||
|
||||
if(RadiationConfig.disableHot)
|
||||
return;
|
||||
|
||||
boolean reacher = false;
|
||||
boolean gloves = false;
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.hazard.type;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.config.RadiationConfig;
|
||||
import com.hbm.hazard.modifier.HazardModifier;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
@ -16,6 +17,10 @@ public class HazardTypeHydroactive extends HazardTypeBase {
|
||||
|
||||
@Override
|
||||
public void onUpdate(EntityLivingBase target, float level, ItemStack stack) {
|
||||
|
||||
if(RadiationConfig.disableHydro)
|
||||
return;
|
||||
|
||||
if(target.isWet()) {
|
||||
stack.stackSize = 0;
|
||||
target.worldObj.newExplosion(null, target.posX, target.posY + target.getEyeHeight() - target.getYOffset(), target.posZ, level, false, true);
|
||||
@ -24,6 +29,10 @@ public class HazardTypeHydroactive extends HazardTypeBase {
|
||||
|
||||
@Override
|
||||
public void updateEntity(EntityItem item, float level) {
|
||||
|
||||
if(RadiationConfig.disableHydro)
|
||||
return;
|
||||
|
||||
if(item.worldObj.getBlock((int)Math.floor(item.posX), (int)Math.floor(item.posY), (int)Math.floor(item.posZ)).getMaterial() == Material.water) {
|
||||
item.setDead();
|
||||
item.worldObj.newExplosion(null, item.posX, item.posY + item.height * 0.5, item.posZ, level, false, true);
|
||||
|
||||
@ -0,0 +1,87 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
import com.hbm.inventory.SlotMachineOutput;
|
||||
import com.hbm.tileentity.machine.TileEntityElectrolyser;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ContainerElectrolyser extends Container {
|
||||
|
||||
TileEntityElectrolyser electrolyser;
|
||||
|
||||
public ContainerElectrolyser(InventoryPlayer invPlayer, TileEntityElectrolyser tile) {
|
||||
|
||||
electrolyser = tile;
|
||||
|
||||
//0 - battery
|
||||
//1-2 - upgrade slots
|
||||
|
||||
//3-4 - fluid ID
|
||||
//5-10 - fluid I/O
|
||||
//11-13 - dissolved outputs
|
||||
|
||||
//14 - crystal input
|
||||
//15 - niter input
|
||||
//16-17 - casting slots
|
||||
//18-23 - other material outputs
|
||||
|
||||
this.addSlotToContainer(new Slot(tile, 0, 186, 109));
|
||||
|
||||
this.addSlotToContainer(new Slot(tile, 1, 186, 140));
|
||||
this.addSlotToContainer(new Slot(tile, 2, 186, 158));
|
||||
|
||||
this.addSlotToContainer(new Slot(tile, 3, 6, 18));
|
||||
this.addSlotToContainer(new SlotMachineOutput(tile, 4, 6, 54));
|
||||
|
||||
this.addSlotToContainer(new Slot(tile, 5, 24, 18));
|
||||
this.addSlotToContainer(new SlotMachineOutput(tile, 6, 24, 54));
|
||||
|
||||
this.addSlotToContainer(new Slot(tile, 7, 78, 18));
|
||||
this.addSlotToContainer(new SlotMachineOutput(tile, 8, 78, 54));
|
||||
|
||||
this.addSlotToContainer(new Slot(tile, 9, 134, 18));
|
||||
this.addSlotToContainer(new SlotMachineOutput(tile, 10, 134, 54));
|
||||
|
||||
for(int i = 0; i < 3; i++) {
|
||||
this.addSlotToContainer(new SlotMachineOutput(tile, 11+i, 154, 18+(18*i)));
|
||||
}
|
||||
|
||||
this.addSlotToContainer(new Slot(tile, 14, 10, 90));
|
||||
|
||||
this.addSlotToContainer(new Slot(tile, 15, 37, 122));
|
||||
|
||||
this.addSlotToContainer(new SlotMachineOutput(tile, 16, 60, 112));
|
||||
this.addSlotToContainer(new SlotMachineOutput(tile, 16, 98, 112));
|
||||
|
||||
for(int i = 0; i < 2; i++) {
|
||||
for(int j = 0; j < 3; j++) {
|
||||
this.addSlotToContainer(new SlotMachineOutput(tile, 17+(i*3)+j, 136+(18*i), 86+(18*j)));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 3; i++) {
|
||||
for(int j = 0; j < 9; j++) {
|
||||
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 165 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 9; i++) {
|
||||
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 223));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return electrolyser.isUseableByPlayer(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int index) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
51
src/main/java/com/hbm/inventory/gui/GUIElectrolyser.java
Normal file
@ -0,0 +1,51 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.inventory.container.ContainerElectrolyser;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.machine.TileEntityElectrolyser;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUIElectrolyser extends GuiInfoContainer {
|
||||
|
||||
public static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/processing/gui_electrolyser.png");
|
||||
private TileEntityElectrolyser electrolyser;
|
||||
|
||||
public GUIElectrolyser(InventoryPlayer invPlayer, TileEntityElectrolyser electrolyser) {
|
||||
super(new ContainerElectrolyser(invPlayer, electrolyser));
|
||||
this.electrolyser = electrolyser;
|
||||
|
||||
this.xSize = 210;
|
||||
this.ySize = 247;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||
super.drawScreen(mouseX, mouseY, f);
|
||||
}
|
||||
|
||||
protected void mouseClicked(int x, int y, int i) {
|
||||
super.mouseClicked(x, y, i);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
||||
String name = this.electrolyser.hasCustomInventoryName() ? this.electrolyser.getInventoryName() : I18n.format(this.electrolyser.getInventoryName());
|
||||
|
||||
this.fontRendererObj.drawString(name, (this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2) - 16, 7, 0xffffff);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 94, 4210752);
|
||||
}
|
||||
}
|
||||
@ -284,6 +284,10 @@ public class AnvilRecipes {
|
||||
new AnvilOutput(new ItemStack(ModItems.plate_armor_dnt))).setTier(7));
|
||||
|
||||
pullFromAssembler(new ComparableStack(ModItems.plate_mixed, 4), 3);
|
||||
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||
new AStack[] {new ComparableStack(ModItems.ingot_arsenic), new OreDictStack(REDSTONE.dust(), 4), new OreDictStack(ASBESTOS.ingot(), 2)},
|
||||
new AnvilOutput(new ItemStack(ModItems.circuit_arsenic_raw))).setTier(5));
|
||||
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.ingot_u233, 1), new AnvilOutput(new ItemStack(ModItems.plate_fuel_u233))).setTier(4));
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.ingot_u235, 1), new AnvilOutput(new ItemStack(ModItems.plate_fuel_u235))).setTier(4));
|
||||
|
||||
@ -61,16 +61,7 @@ public class ItemModGasmask extends ItemArmorMod implements IGasMask {
|
||||
@Override
|
||||
public void addDesc(List list, ItemStack stack, ItemStack armor) {
|
||||
|
||||
int i = 0;
|
||||
|
||||
ItemStack filter = ArmorUtil.getGasMaskFilter(stack);
|
||||
|
||||
if(filter != null) {
|
||||
i = filter.getItemDamage() / filter.getMaxDamage();
|
||||
}
|
||||
|
||||
list.add(EnumChatFormatting.GREEN + " " + stack.getDisplayName() + " (gas protection)");
|
||||
|
||||
ArmorUtil.addGasMaskTooltip(stack, MainRegistry.proxy.me(), list, false);
|
||||
}
|
||||
|
||||
@ -87,6 +78,7 @@ public class ItemModGasmask extends ItemArmorMod implements IGasMask {
|
||||
EntityPlayer player = event.entityPlayer;
|
||||
|
||||
modelM65.isSneak = model.isSneak;
|
||||
modelM65.isChild = renderer.modelBipedMain.isChild;
|
||||
|
||||
float interp = event.partialRenderTick;
|
||||
float yawHead = player.prevRotationYawHead + (player.rotationYawHead - player.prevRotationYawHead) * interp;
|
||||
|
||||
@ -3,22 +3,25 @@ package com.hbm.items.block;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.BlockEnumMulti;
|
||||
import com.hbm.blocks.BlockMulti;
|
||||
import com.hbm.blocks.IBlockMulti;
|
||||
import com.hbm.blocks.ITooltipProvider;
|
||||
import com.hbm.util.EnumUtil;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
public class ItemBlockBase extends ItemBlock {
|
||||
|
||||
public ItemBlockBase(Block block) {
|
||||
super(block);
|
||||
|
||||
if(block instanceof BlockMulti) {
|
||||
if(block instanceof IBlockMulti) {
|
||||
this.setMaxDamage(0);
|
||||
this.setHasSubtypes(true);
|
||||
}
|
||||
@ -26,7 +29,7 @@ public class ItemBlockBase extends ItemBlock {
|
||||
|
||||
@Override
|
||||
public int getMetadata(int meta) {
|
||||
if(field_150939_a instanceof BlockMulti)
|
||||
if(field_150939_a instanceof IBlockMulti)
|
||||
return meta;
|
||||
else
|
||||
return super.getMetadata(meta);
|
||||
@ -52,6 +55,11 @@ public class ItemBlockBase extends ItemBlock {
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamage(int meta) {
|
||||
return this.field_150939_a.getIcon(1, meta); //fuck you mojang
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack stack) {
|
||||
|
||||
|
||||
@ -102,7 +102,7 @@ public class ItemFluidIdentifier extends Item implements IItemFluidIdentifier {
|
||||
}
|
||||
}
|
||||
|
||||
//world.markBlockForUpdate(x, y, z);
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
|
||||
player.swingItem();
|
||||
}
|
||||
|
||||
@ -212,6 +212,8 @@ public class ItemToolAbility extends ItemTool implements IItemAbility, IDepthRoc
|
||||
}
|
||||
|
||||
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
|
||||
|
||||
System.out.println("PRE " + world.isRemote + " " + stack.getItemDamage());
|
||||
|
||||
if(world.isRemote || this.breakAbility.size() < 2 || !canOperate(stack))
|
||||
return super.onItemRightClick(stack, world, player);
|
||||
@ -241,6 +243,8 @@ public class ItemToolAbility extends ItemTool implements IItemAbility, IDepthRoc
|
||||
}
|
||||
|
||||
world.playSoundAtEntity(player, "random.orb", 0.25F, getCurrentAbility(stack) == null ? 0.75F : 1.25F);
|
||||
|
||||
System.out.println("POST " + world.isRemote + " " + stack.getItemDamage());
|
||||
|
||||
return stack;
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.items.tool;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.entity.mob.siege.EntitySiegeTunneler;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.special.ItemKitCustom;
|
||||
@ -29,13 +30,6 @@ public class ItemWandD extends Item {
|
||||
|
||||
if(pos != null) {
|
||||
|
||||
List<EntityZombie> zombies = world.getEntitiesWithinAABB(EntityZombie.class, AxisAlignedBB.getBoundingBox(pos.blockX - 2, pos.blockY - 2, pos.blockZ - 2, pos.blockX + 2, pos.blockY + 2, pos.blockZ + 2));
|
||||
|
||||
for(EntityZombie zombie : zombies) {
|
||||
zombie.setChild(true);
|
||||
zombie.setCurrentItemOrArmor(4, new ItemStack(ModItems.gas_mask_m65));
|
||||
}
|
||||
|
||||
/*EntitySiegeTunneler tunneler = new EntitySiegeTunneler(world);
|
||||
tunneler.setPosition(pos.blockX, pos.blockY + 1, pos.blockZ);
|
||||
tunneler.onSpawnWithEgg(null);
|
||||
@ -43,17 +37,19 @@ public class ItemWandD extends Item {
|
||||
|
||||
//CellularDungeonFactory.meteor.generate(world, x, y, z, world.rand);
|
||||
|
||||
/*int r = 5;
|
||||
int r = 5;
|
||||
|
||||
int x = pos.blockX;
|
||||
int y = pos.blockY;
|
||||
int z = pos.blockZ;
|
||||
for(int i = x - r; i <= x + r; i++) {
|
||||
for(int j = y - r; j <= y + r; j++) {
|
||||
for(int k = z - r; k <= z + r; k++) {
|
||||
|
||||
world.setBlock(i, j, k, ModBlocks.vacuum);
|
||||
//world.getBlock(i, j, k).updateTick(world, i, j, k, world.rand);
|
||||
if(world.getBlock(i, j, k) == ModBlocks.concrete_super)
|
||||
world.getBlock(i, j, k).updateTick(world, i, j, k, world.rand);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
//new Bunker().generate(world, world.rand, x, y, z);
|
||||
|
||||
|
||||
@ -4,6 +4,7 @@ import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.generic.BlockMotherOfAllOres;
|
||||
import com.hbm.blocks.generic.BlockNTMFlower.EnumFlowerType;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.config.WorldConfig;
|
||||
import com.hbm.items.ModItems;
|
||||
@ -44,6 +45,8 @@ import net.minecraft.tileentity.TileEntitySkull;
|
||||
import net.minecraft.util.WeightedRandomChestContent;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraft.world.biome.BiomeGenForest;
|
||||
import net.minecraft.world.biome.BiomeGenJungle;
|
||||
import net.minecraft.world.chunk.IChunkProvider;
|
||||
import net.minecraft.world.gen.feature.WorldGenMinable;
|
||||
import cpw.mods.fml.common.IWorldGenerator;
|
||||
@ -66,6 +69,22 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
}
|
||||
|
||||
private void generateSurface(World world, Random rand, int i, int j) {
|
||||
|
||||
BiomeGenBase biome = world.getWorldChunkManager().getBiomeGenAt(i, j);
|
||||
|
||||
if(biome instanceof BiomeGenForest && rand.nextInt(16) == 0) {
|
||||
DungeonToolbox.generateFlowers(world, rand, i, j, ModBlocks.plant_flower, EnumFlowerType.FOXGLOVE.ordinal());
|
||||
}
|
||||
if(biome == BiomeGenBase.roofedForest && rand.nextInt(8) == 0) {
|
||||
DungeonToolbox.generateFlowers(world, rand, i, j, ModBlocks.plant_flower, EnumFlowerType.NIGHTSHADE.ordinal());
|
||||
}
|
||||
if(biome instanceof BiomeGenJungle && rand.nextInt(8) == 0) {
|
||||
DungeonToolbox.generateFlowers(world, rand, i, j, ModBlocks.plant_flower, EnumFlowerType.TOBACCO.ordinal());
|
||||
}
|
||||
|
||||
if(rand.nextInt(64) == 0) {
|
||||
DungeonToolbox.generateFlowers(world, rand, i, j, ModBlocks.plant_flower, EnumFlowerType.WEED.ordinal());
|
||||
}
|
||||
|
||||
if(WorldConfig.oilcoalSpawn > 0 && rand.nextInt(WorldConfig.oilcoalSpawn) == 0)
|
||||
DungeonToolbox.generateOre(world, rand, i, j, 1, 64, 32, 32, ModBlocks.ore_coal_oil);
|
||||
@ -176,8 +195,6 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
|
||||
if (GeneralConfig.enableDungeons && world.provider.isSurfaceWorld()) {
|
||||
|
||||
BiomeGenBase biome = world.getWorldChunkManager().getBiomeGenAt(i, j);
|
||||
|
||||
if (biome == BiomeGenBase.plains || biome == BiomeGenBase.desert) {
|
||||
if (WorldConfig.radioStructure > 0 && rand.nextInt(WorldConfig.radioStructure) == 0) {
|
||||
for (int a = 0; a < 1; a++) {
|
||||
|
||||
@ -28,6 +28,8 @@ import com.hbm.tileentity.machine.TileEntityDummy;
|
||||
import api.hbm.energy.IBatteryItem;
|
||||
import api.hbm.energy.IEnergyConnector;
|
||||
import api.hbm.energy.IEnergyConnectorBlock;
|
||||
import api.hbm.fluid.IFluidConnector;
|
||||
import api.hbm.fluid.IFluidConnectorBlock;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
@ -128,6 +130,31 @@ public class Library {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean canConnectFluid(IBlockAccess world, int x, int y, int z, ForgeDirection dir, FluidType type) {
|
||||
|
||||
if(y > 255 || y < 0)
|
||||
return false;
|
||||
|
||||
Block b = world.getBlock(x, y, z);
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
|
||||
if(b instanceof IFluidConnectorBlock) {
|
||||
IFluidConnectorBlock con = (IFluidConnectorBlock) b;
|
||||
|
||||
if(con.canConnect(type, world, x, y, z, dir))
|
||||
return true;
|
||||
}
|
||||
|
||||
if(te instanceof IFluidConnector) {
|
||||
IFluidConnector con = (IFluidConnector) te;
|
||||
|
||||
if(con.canConnect(type, dir))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean checkFluidConnectables(World world, int x, int y, int z, FluidType type)
|
||||
{
|
||||
|
||||
@ -3,7 +3,7 @@ package com.hbm.lib;
|
||||
public class RefStrings {
|
||||
public static final String MODID = "hbm";
|
||||
public static final String NAME = "Hbm's Nuclear Tech Mod";
|
||||
public static final String VERSION = "1.0.27 BETA (4193)";
|
||||
public static final String VERSION = "1.0.27 BETA (4200)";
|
||||
//HBM's Beta Naming Convention:
|
||||
//V T (X)
|
||||
//V -> next release version
|
||||
|
||||
@ -241,6 +241,7 @@ public class ClientProxy extends ServerProxy {
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineLiquefactor.class, new RenderLiquefactor());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineSolidifier.class, new RenderSolidifier());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineRadiolysis.class, new RenderRadiolysis());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityElectrolyser.class, new RenderElectrolyser());
|
||||
//AMS
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityAMSBase.class, new RenderAMSBase());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityAMSEmitter.class, new RenderAMSEmitter());
|
||||
@ -387,7 +388,7 @@ public class ClientProxy extends ServerProxy {
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver_schrabidium, new ItemRenderWeaponFFColt(ResourceManager.ff_schrabidium, ResourceManager.ff_schrabidium, ResourceManager.ff_gun_dark));
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver_cursed, new ItemRenderWeaponFFCursed());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver_nightmare, new ItemRenderWeaponFFNightmare());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver_nightmare2, new ItemRenderRevolverNightmare(ModItems.gun_revolver_nightmare2));
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver_nightmare2, new ItemRenderWeaponFFNightmareDark());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_fatman, new ItemRenderFatMan());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_proto, new ItemRenderFatMan());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_mirv, new ItemRenderMIRVLauncher());
|
||||
@ -1631,6 +1632,7 @@ public class ClientProxy extends ServerProxy {
|
||||
case TOGGLE_JETPACK: return HbmKeybinds.jetpackKey.getIsKeyPressed();
|
||||
case TOGGLE_HEAD: return HbmKeybinds.hudKey.getIsKeyPressed();
|
||||
case RELOAD: return HbmKeybinds.reloadKey.getIsKeyPressed();
|
||||
case DASH: return HbmKeybinds.dashKey.getIsKeyPressed();
|
||||
case CRANE_UP: return HbmKeybinds.craneUpKey.getIsKeyPressed();
|
||||
case CRANE_DOWN: return HbmKeybinds.craneDownKey.getIsKeyPressed();
|
||||
case CRANE_LEFT: return HbmKeybinds.craneLeftKey.getIsKeyPressed();
|
||||
|
||||
@ -14,6 +14,7 @@ import net.minecraft.stats.Achievement;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.WeightedRandomChestContent;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraftforge.common.AchievementPage;
|
||||
import net.minecraftforge.common.ChestGenHooks;
|
||||
import net.minecraftforge.common.ForgeChunkManager;
|
||||
@ -39,6 +40,7 @@ import org.apache.logging.log4j.Logger;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.generic.BlockMotherOfAllOres;
|
||||
import com.hbm.blocks.generic.BlockNTMFlower.EnumFlowerType;
|
||||
import com.hbm.config.*;
|
||||
import com.hbm.creativetabs.*;
|
||||
import com.hbm.entity.effect.*;
|
||||
@ -981,6 +983,12 @@ public class MainRegistry {
|
||||
new OreCave(ModBlocks.stone_resource, 0).setThreshold(1.5D).setRangeMult(20).setYLevel(30).setMaxRange(20).withFluid(ModBlocks.sulfuric_acid_block); //sulfur
|
||||
new OreCave(ModBlocks.stone_resource, 1).setThreshold(1.75D).setRangeMult(20).setYLevel(25).setMaxRange(20); //asbestos
|
||||
//new OreLayer(Blocks.coal_ore, 0.2F).setThreshold(4).setRangeMult(3).setYLevel(70);
|
||||
|
||||
//imagine adding flower entries but they don't actually do shit with the world generator
|
||||
//"well but at least they work with bone meal, as advertised" except they fucking don't
|
||||
/*BiomeGenBase.plains.addFlower(ModBlocks.plant_flower, EnumFlowerType.FOXGLOVE.ordinal(), 10);
|
||||
BiomeGenBase.roofedForest.addFlower(ModBlocks.plant_flower, EnumFlowerType.NIGHTSHADE.ordinal(), 10);
|
||||
BiomeGenBase.jungle.addFlower(ModBlocks.plant_flower, EnumFlowerType.TOBACCO.ordinal(), 10);*/
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
||||
@ -291,6 +291,9 @@ public class ResourceManager {
|
||||
//Radiolysis
|
||||
public static final IModelCustom radiolysis = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/radiolysis.obj"));
|
||||
|
||||
//Electrolyser
|
||||
public static final IModelCustom electrolyser = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/electrolyser.obj"));
|
||||
|
||||
////Textures TEs
|
||||
|
||||
public static final ResourceLocation universal = new ResourceLocation(RefStrings.MODID, "textures/models/TheGadget3_.png");
|
||||
@ -597,6 +600,9 @@ public class ResourceManager {
|
||||
//Radiolysis
|
||||
public static final ResourceLocation radiolysis_tex = new ResourceLocation(RefStrings.MODID, "textures/models/radiolysis.png");
|
||||
|
||||
//Electrolyser
|
||||
public static final ResourceLocation electrolyser_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/electrolyser.png");
|
||||
|
||||
////Obj Items
|
||||
|
||||
//Shimmer Sledge
|
||||
@ -632,6 +638,7 @@ public class ResourceManager {
|
||||
public static final IModelCustom cursed_revolver = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/cursed.obj"));
|
||||
public static final IModelCustom detonator_laser = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/detonator_laser.obj"));
|
||||
public static final IModelCustom spas_12 = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/spas-12.obj"));
|
||||
public static final IModelCustom nightmare_dark = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/nightmare_dark.obj"));
|
||||
|
||||
public static final IModelCustom lance = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/lance.obj"));
|
||||
|
||||
@ -719,6 +726,7 @@ public class ResourceManager {
|
||||
public static final ResourceLocation ff_wood = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/ff/wood.png");
|
||||
public static final ResourceLocation ff_wood_red = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/ff/wood_red.png");
|
||||
public static final ResourceLocation ff_cursed = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/ff/cursed.png");
|
||||
public static final ResourceLocation ff_nightmare_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/ff/nightmare.png");
|
||||
|
||||
public static final ResourceLocation grenade_mk2 = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/grenade_mk2.png");
|
||||
public static final ResourceLocation grenade_aschrab_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/grenade_aschrab.png");
|
||||
|
||||
@ -3,6 +3,9 @@ package com.hbm.render.block;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.test.TestPipe;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.util.ObjUtil;
|
||||
import com.hbm.tileentity.network.TileEntityPipeBaseNT;
|
||||
@ -24,7 +27,8 @@ public class RenderTestPipe implements ISimpleBlockRenderingHandler {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
IIcon iicon = block.getIcon(0, 0);
|
||||
IIcon iicon = block.getIcon(0, metadata);
|
||||
IIcon overlay = block.getIcon(1, metadata);
|
||||
tessellator.setColorOpaque_F(1, 1, 1);
|
||||
|
||||
if(renderer.hasOverrideBlockTexture()) {
|
||||
@ -39,6 +43,14 @@ public class RenderTestPipe implements ISimpleBlockRenderingHandler {
|
||||
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.pipe_neo, "pZ", iicon, tessellator, 0, false);
|
||||
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.pipe_neo, "nZ", iicon, tessellator, 0, false);
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
ObjUtil.setColor(Fluids.NONE.getColor());
|
||||
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.pipe_neo, "pX", overlay, tessellator, 0, false);
|
||||
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.pipe_neo, "nX", overlay, tessellator, 0, false);
|
||||
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.pipe_neo, "pZ", overlay, tessellator, 0, false);
|
||||
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.pipe_neo, "nZ", overlay, tessellator, 0, false);
|
||||
ObjUtil.clearColor();
|
||||
tessellator.draw();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
@ -47,35 +59,39 @@ public class RenderTestPipe implements ISimpleBlockRenderingHandler {
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
|
||||
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
IIcon iicon = block.getIcon(0, 0);
|
||||
IIcon overlay = block.getIcon(1, 0);
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
IIcon iicon = block.getIcon(0, meta);
|
||||
IIcon overlay = block.getIcon(1, meta);
|
||||
tessellator.setColorOpaque_F(1, 1, 1);
|
||||
|
||||
if(renderer.hasOverrideBlockTexture()) {
|
||||
iicon = renderer.overrideBlockTexture;
|
||||
}
|
||||
|
||||
tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z));
|
||||
tessellator.setColorOpaque_F(1, 1, 1);
|
||||
|
||||
boolean pX = world.getTileEntity(x + 1, y, z) instanceof IFluidConnector;
|
||||
boolean nX = world.getTileEntity(x - 1, y, z) instanceof IFluidConnector;
|
||||
boolean pY = world.getTileEntity(x, y + 1, z) instanceof IFluidConnector;
|
||||
boolean nY = world.getTileEntity(x, y - 1, z) instanceof IFluidConnector;
|
||||
boolean pZ = world.getTileEntity(x, y, z + 1) instanceof IFluidConnector;
|
||||
boolean nZ = world.getTileEntity(x, y, z - 1) instanceof IFluidConnector;
|
||||
|
||||
int mask = 0 + (pX ? 32 : 0) + (nX ? 16 : 0) + (pY ? 8 : 0) + (nY ? 4 : 0) + (pZ ? 2 : 0) + (nZ ? 1 : 0);
|
||||
|
||||
tessellator.addTranslation(x + 0.5F, y + 0.5F, z + 0.5F);
|
||||
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
|
||||
int color = 0xff00ff;
|
||||
FluidType type = Fluids.NONE;
|
||||
|
||||
if(te instanceof TileEntityPipeBaseNT) {
|
||||
color = ((TileEntityPipeBaseNT) te).getType().getColor();
|
||||
TileEntityPipeBaseNT pipe = (TileEntityPipeBaseNT) te;
|
||||
color = pipe.getType().getColor();
|
||||
type = pipe.getType();
|
||||
}
|
||||
|
||||
tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z));
|
||||
tessellator.setColorOpaque_F(1, 1, 1);
|
||||
|
||||
boolean pX = Library.canConnectFluid(world, x + 1, y, z, Library.NEG_X, type);
|
||||
boolean nX = Library.canConnectFluid(world, x - 1, y, z, Library.POS_X, type);
|
||||
boolean pY = Library.canConnectFluid(world, x, y + 1, z, Library.NEG_Y, type);
|
||||
boolean nY = Library.canConnectFluid(world, x, y - 1, z, Library.POS_Y, type);
|
||||
boolean pZ = Library.canConnectFluid(world, x, y, z + 1, Library.NEG_Z, type);
|
||||
boolean nZ = Library.canConnectFluid(world, x, y, z - 1, Library.POS_Z, type);
|
||||
|
||||
int mask = 0 + (pX ? 32 : 0) + (nX ? 16 : 0) + (pY ? 8 : 0) + (nY ? 4 : 0) + (pZ ? 2 : 0) + (nZ ? 1 : 0);
|
||||
|
||||
tessellator.addTranslation(x + 0.5F, y + 0.5F, z + 0.5F);
|
||||
|
||||
if(mask == 0) {
|
||||
renderDuct(iicon, overlay, color, tessellator, "pX");
|
||||
|
||||
@ -1237,6 +1237,17 @@ public class ItemRenderLibrary {
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}});
|
||||
|
||||
renderers.put(Item.getItemFromBlock(ModBlocks.machine_electrolyser), new ItemRenderBase( ) {
|
||||
public void renderInventory() {
|
||||
GL11.glScaled(3, 3, 3);
|
||||
}
|
||||
public void renderCommon() {
|
||||
GL11.glScaled(0.5, 0.5, 0.5);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
bindTexture(ResourceManager.electrolyser_tex); ResourceManager.electrolyser.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}});
|
||||
|
||||
renderers.put(Item.getItemFromBlock(ModBlocks.red_pylon_large), new ItemRenderBase( ) {
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -5, 0);
|
||||
|
||||
@ -0,0 +1,91 @@
|
||||
package com.hbm.render.item.weapon;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.main.ResourceManager;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class ItemRenderWeaponFFNightmareDark implements IItemRenderer {
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
switch(type) {
|
||||
case EQUIPPED:
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
case ENTITY:
|
||||
case INVENTORY:
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
|
||||
|
||||
return type == ItemRenderType.ENTITY && (helper == ItemRendererHelper.ENTITY_ROTATION || helper == ItemRendererHelper.ENTITY_BOBBING);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
|
||||
switch(type) {
|
||||
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
|
||||
double s0 = 0.4D;
|
||||
GL11.glTranslated(0.75, 0.45, 0);
|
||||
GL11.glScaled(s0, s0, s0);
|
||||
GL11.glRotated(170, 0, 1, 0);
|
||||
GL11.glRotated(25, 0, 0, -1);
|
||||
|
||||
break;
|
||||
|
||||
case EQUIPPED:
|
||||
|
||||
double scale = 0.4D;
|
||||
GL11.glRotated(105, 0, 1, 0);
|
||||
GL11.glRotated(-10, 1, 0, 0);
|
||||
GL11.glRotated(10, 0, 0, 1);
|
||||
GL11.glTranslated(-0.125, 0.1, 0.5);
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
|
||||
break;
|
||||
|
||||
case ENTITY:
|
||||
|
||||
double s1 = 0.25D;
|
||||
GL11.glScaled(s1, s1, s1);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
|
||||
break;
|
||||
|
||||
case INVENTORY:
|
||||
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
|
||||
double s = 3D;
|
||||
GL11.glTranslated(10, 9, 0);
|
||||
GL11.glRotated(-135, 0, 0, 1);
|
||||
GL11.glRotated(180, 0, 1, 0);
|
||||
GL11.glScaled(s, s, -s);
|
||||
|
||||
break;
|
||||
|
||||
default: break;
|
||||
}
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.ff_nightmare_tex);
|
||||
ResourceManager.nightmare_dark.renderAll();
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,43 @@
|
||||
package com.hbm.render.tileentity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.tileentity.machine.TileEntityElectrolyser;
|
||||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public class RenderElectrolyser extends TileEntitySpecialRenderer {
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity te, double x, double y, double z, float interp) {
|
||||
|
||||
TileEntityElectrolyser electrolyser = (TileEntityElectrolyser) te;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5D, y, z + 0.5D);
|
||||
|
||||
switch(te.getBlockMetadata() - BlockDummyable.offset) {
|
||||
case 4: GL11.glRotatef(90, 0F, 1F, 0F); break;
|
||||
case 3: GL11.glRotatef(180, 0F, 1F, 0F); break;
|
||||
case 5: GL11.glRotatef(270, 0F, 1F, 0F); break;
|
||||
case 2: GL11.glRotatef(0, 0F, 1F, 0F); break;
|
||||
}
|
||||
|
||||
GL11.glRotated(180, 0, 1, 0);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
|
||||
bindTexture(ResourceManager.electrolyser_tex);
|
||||
ResourceManager.electrolyser.renderAll();
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -85,11 +85,16 @@ public class ObjUtil {
|
||||
normal.rotateAroundY(rot);
|
||||
tes.setNormal((float)normal.xCoord, (float)normal.yCoord, (float)normal.zCoord);
|
||||
|
||||
if(shadow) {
|
||||
float brightness = ((float)normal.yCoord + 0.7F) * 0.9F - (float)Math.abs(normal.xCoord) * 0.1F + (float)Math.abs(normal.zCoord) * 0.1F;
|
||||
|
||||
if(brightness < 0.45F)
|
||||
brightness = 0.45F;
|
||||
if(shadow || hasColor) {
|
||||
|
||||
float brightness = 1.0F;
|
||||
|
||||
if(shadow) {
|
||||
brightness = ((float)normal.yCoord + 0.7F) * 0.9F - (float)Math.abs(normal.xCoord) * 0.1F + (float)Math.abs(normal.zCoord) * 0.1F;
|
||||
|
||||
if(brightness < 0.45F)
|
||||
brightness = 0.45F;
|
||||
}
|
||||
|
||||
if(hasColor) {
|
||||
tes.setColorOpaque((int)(red * brightness), (int)(green * brightness), (int)(blue * brightness));
|
||||
|
||||
@ -250,6 +250,7 @@ public class TileMappings {
|
||||
put(TileEntityDeuteriumTower.class, "tileentity_deuterium_tower");
|
||||
put(TileEntityMachineLiquefactor.class, "tileentity_liquefactor");
|
||||
put(TileEntityMachineSolidifier.class, "tileentity_solidifier");
|
||||
put(TileEntityElectrolyser.class, "tileentity_electrolyser");
|
||||
|
||||
put(TileEntityMachineChemplant.class, "tileentity_chemical_plant");
|
||||
put(TileEntityMachineChemfac.class, "tileentity_chemfac");
|
||||
|
||||
@ -87,7 +87,7 @@ public class TileEntityDeuteriumExtractor extends TileEntityMachineBase implemen
|
||||
}
|
||||
|
||||
public boolean hasPower() {
|
||||
return power > 0;
|
||||
return power >= maxPower / 10;
|
||||
}
|
||||
|
||||
public boolean hasEnoughWater() {
|
||||
@ -195,5 +195,4 @@ public class TileEntityDeuteriumExtractor extends TileEntityMachineBase implemen
|
||||
public long getMaxPower() {
|
||||
return maxPower;
|
||||
}
|
||||
|
||||
}
|
||||
@ -119,4 +119,9 @@ public class TileEntityDeuteriumTower extends TileEntityDeuteriumExtractor {
|
||||
public double getMaxRenderDistanceSquared() {
|
||||
return 65536.0D;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getMaxPower() {
|
||||
return maxPower;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,187 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.interfaces.IFluidSource;
|
||||
import com.hbm.inventory.FluidTank;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
|
||||
import api.hbm.energy.IEnergyUser;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityElectrolyser extends TileEntityMachineBase implements IEnergyUser, IFluidSource, IFluidAcceptor{
|
||||
|
||||
public long power;
|
||||
public static final long maxPower = 20000000;
|
||||
public static final int usageBase = 10000;
|
||||
public int usage;
|
||||
|
||||
public int progressFluid;
|
||||
public static final int processFluidTimeBase = 100;
|
||||
public int processFluidTime;
|
||||
public int progressOre;
|
||||
public static final int processOreTimeBase = 1000;
|
||||
public int processOreTime;
|
||||
|
||||
public FluidTank[] tanks;
|
||||
|
||||
public TileEntityElectrolyser() {
|
||||
super(24);
|
||||
tanks = new FluidTank[3];
|
||||
tanks[0] = new FluidTank(Fluids.WATER, 16000, 0);
|
||||
tanks[1] = new FluidTank(Fluids.HYDROGEN, 16000, 1);
|
||||
tanks[2] = new FluidTank(Fluids.OXYGEN, 16000, 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "container.machineElectrolyser";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
this.tanks[0].updateTank(xCoord, yCoord, zCoord, worldObj.provider.dimensionId);
|
||||
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setLong("power", this.power);
|
||||
data.setInteger("progressFluid", this.progressFluid);
|
||||
data.setInteger("progressOre", this.progressOre);
|
||||
data.setInteger("usage", this.usage);
|
||||
data.setInteger("processFluidTime", this.processFluidTime);
|
||||
data.setInteger("processOreTime", this.processOreTime);
|
||||
this.networkPack(data, 50);
|
||||
|
||||
fillFluidInit(tanks[1].getTankType());
|
||||
fillFluidInit(tanks[2].getTankType());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluidInit(FluidType type) {
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset);
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||
|
||||
fillFluid(xCoord + dir.offsetX * 5 + rot.offsetX * -1, yCoord-1, zCoord + dir.offsetZ * 5 + rot.offsetZ * -1, getTact(), type);
|
||||
fillFluid(xCoord + dir.offsetX * 5 + rot.offsetX * -1, yCoord-1, zCoord + dir.offsetZ * 5 + rot.offsetZ * 1, getTact(), type);
|
||||
fillFluid(xCoord + dir.offsetX * -5 + rot.offsetX * -1, yCoord-1, zCoord + dir.offsetZ * 5 + rot.offsetZ * -1, getTact(), type);
|
||||
fillFluid(xCoord + dir.offsetX * -5 + rot.offsetX * -1, yCoord-1, zCoord + dir.offsetZ * 5 + rot.offsetZ * 1, getTact(), type);
|
||||
|
||||
}
|
||||
|
||||
AxisAlignedBB bb = null;
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
|
||||
if(bb == null) {
|
||||
bb = AxisAlignedBB.getBoundingBox(
|
||||
xCoord - 3,
|
||||
yCoord - 0,
|
||||
zCoord - 4,
|
||||
xCoord + 3,
|
||||
yCoord + 4,
|
||||
zCoord + 4
|
||||
);
|
||||
}
|
||||
|
||||
return bb;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public double getMaxRenderDistanceSquared() {
|
||||
return 65536.0D;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getPower() {
|
||||
return this.power;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getMaxPower() {
|
||||
return maxPower;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillForSync(int fill, int index) {
|
||||
tanks[index].setFill(fill);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int fill, FluidType type) {
|
||||
for(int i = 0; i < 3; i++) {
|
||||
if(type == tanks[i].getTankType())
|
||||
tanks[i].setFill(fill);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
tanks[index].setTankType(type);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
for(int i = 0; i < 3; i++) {
|
||||
if(type == tanks[i].getTankType() && tanks[i].getFill() != 0)
|
||||
return tanks[i].getFill();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
for(int i = 0; i < 3; i++) {
|
||||
if(type == tanks[i].getTankType() && tanks[i].getMaxFill() != 0)
|
||||
return tanks[i].getMaxFill();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) {
|
||||
Library.transmitFluid(x, y, z, newTact, this, worldObj, type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getTact() {
|
||||
return worldObj.getTotalWorldTime() % 20 < 10;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||
return new ArrayList<IFluidAcceptor>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearFluidList(FluidType type) {
|
||||
return;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPower(long power) {
|
||||
this.power = power;
|
||||
}
|
||||
|
||||
}
|
||||
@ -227,7 +227,7 @@ public class TileEntityMachineArcFurnace extends TileEntityLoadedBase implements
|
||||
}
|
||||
|
||||
public boolean hasPower() {
|
||||
return power > 0;
|
||||
return power >= 250;
|
||||
}
|
||||
|
||||
public boolean isProcessing() {
|
||||
@ -317,7 +317,6 @@ public class TileEntityMachineArcFurnace extends TileEntityLoadedBase implements
|
||||
//TODO: fix this punjabi trash
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
this.hasPower();
|
||||
boolean flag1 = false;
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
@ -261,7 +261,7 @@ public class TileEntityMachineBoilerElectric extends TileEntityLoadedBase implem
|
||||
heat -= 30;
|
||||
}
|
||||
|
||||
if(power > 0) {
|
||||
if(power >= 150) {
|
||||
power -= 150;
|
||||
heat += Math.min(((double)power / (double)maxPower * 300), 150);
|
||||
} else {
|
||||
|
||||
@ -1,81 +1,81 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import com.hbm.inventory.FluidTank;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityTowerLarge extends TileEntityCondenser {
|
||||
|
||||
public TileEntityTowerLarge() {
|
||||
tanks = new FluidTank[2];
|
||||
tanks[0] = new FluidTank(Fluids.SPENTSTEAM, 10000, 0);
|
||||
tanks[1] = new FluidTank(Fluids.WATER, 10000, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
super.updateEntity();
|
||||
|
||||
if(worldObj.isRemote) {
|
||||
|
||||
if(this.waterTimer > 0 && this.worldObj.getTotalWorldTime() % 4 == 0) {
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setString("type", "tower");
|
||||
data.setFloat("lift", 0.5F);
|
||||
data.setFloat("base", 1F);
|
||||
data.setFloat("max", 10F);
|
||||
data.setInteger("life", 750 + worldObj.rand.nextInt(250));
|
||||
|
||||
data.setDouble("posX", xCoord + 0.5 + worldObj.rand.nextDouble() * 3 - 1.5);
|
||||
data.setDouble("posZ", zCoord + 0.5 + worldObj.rand.nextDouble() * 3 - 1.5);
|
||||
data.setDouble("posY", yCoord + 1);
|
||||
|
||||
MainRegistry.proxy.effectNT(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluidInit(FluidType type) {
|
||||
|
||||
for(int i = 2; i <= 6; i++) {
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(i);
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||
fillFluid(xCoord + dir.offsetX * 5, yCoord, zCoord + dir.offsetZ * 5, getTact(), type);
|
||||
fillFluid(xCoord + dir.offsetX * 5 + rot.offsetX * 3, yCoord, zCoord + dir.offsetZ * 5 + rot.offsetZ * 3, getTact(), type);
|
||||
fillFluid(xCoord + dir.offsetX * 5 + rot.offsetX * -3, yCoord, zCoord + dir.offsetZ * 5 + rot.offsetZ * -3, getTact(), type);
|
||||
}
|
||||
}
|
||||
|
||||
AxisAlignedBB bb = null;
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
|
||||
if(bb == null) {
|
||||
bb = AxisAlignedBB.getBoundingBox(
|
||||
xCoord - 4,
|
||||
yCoord,
|
||||
zCoord - 4,
|
||||
xCoord + 5,
|
||||
yCoord + 13,
|
||||
zCoord + 5
|
||||
);
|
||||
}
|
||||
|
||||
return bb;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public double getMaxRenderDistanceSquared() {
|
||||
return 65536.0D;
|
||||
}
|
||||
}
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import com.hbm.inventory.FluidTank;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityTowerLarge extends TileEntityCondenser {
|
||||
|
||||
public TileEntityTowerLarge() {
|
||||
tanks = new FluidTank[2];
|
||||
tanks[0] = new FluidTank(Fluids.SPENTSTEAM, 10000, 0);
|
||||
tanks[1] = new FluidTank(Fluids.WATER, 10000, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
super.updateEntity();
|
||||
|
||||
if(worldObj.isRemote) {
|
||||
|
||||
if(this.waterTimer > 0 && this.worldObj.getTotalWorldTime() % 4 == 0) {
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setString("type", "tower");
|
||||
data.setFloat("lift", 0.5F);
|
||||
data.setFloat("base", 1F);
|
||||
data.setFloat("max", 10F);
|
||||
data.setInteger("life", 750 + worldObj.rand.nextInt(250));
|
||||
|
||||
data.setDouble("posX", xCoord + 0.5 + worldObj.rand.nextDouble() * 3 - 1.5);
|
||||
data.setDouble("posZ", zCoord + 0.5 + worldObj.rand.nextDouble() * 3 - 1.5);
|
||||
data.setDouble("posY", yCoord + 1);
|
||||
|
||||
MainRegistry.proxy.effectNT(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluidInit(FluidType type) {
|
||||
|
||||
for(int i = 2; i <= 6; i++) {
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(i);
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||
fillFluid(xCoord + dir.offsetX * 5, yCoord, zCoord + dir.offsetZ * 5, getTact(), type);
|
||||
fillFluid(xCoord + dir.offsetX * 5 + rot.offsetX * 3, yCoord, zCoord + dir.offsetZ * 5 + rot.offsetZ * 3, getTact(), type);
|
||||
fillFluid(xCoord + dir.offsetX * 5 + rot.offsetX * -3, yCoord, zCoord + dir.offsetZ * 5 + rot.offsetZ * -3, getTact(), type);
|
||||
}
|
||||
}
|
||||
|
||||
AxisAlignedBB bb = null;
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
|
||||
if(bb == null) {
|
||||
bb = AxisAlignedBB.getBoundingBox(
|
||||
xCoord - 4,
|
||||
yCoord,
|
||||
zCoord - 4,
|
||||
xCoord + 5,
|
||||
yCoord + 13,
|
||||
zCoord + 5
|
||||
);
|
||||
}
|
||||
|
||||
return bb;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public double getMaxRenderDistanceSquared() {
|
||||
return 65536.0D;
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,17 +7,25 @@ import api.hbm.fluid.IFluidConductor;
|
||||
import api.hbm.fluid.IPipeNet;
|
||||
import api.hbm.fluid.PipeNet;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.NetworkManager;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.WorldServer;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityPipeBaseNT extends TileEntity implements IFluidConductor {
|
||||
|
||||
private IPipeNet network;
|
||||
protected FluidType type = Fluids.NONE;
|
||||
protected FluidType lastType = Fluids.NONE;
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(worldObj.isRemote && lastType != type) {
|
||||
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
lastType = type;
|
||||
}
|
||||
|
||||
if(!worldObj.isRemote && canUpdate()) {
|
||||
|
||||
@ -40,10 +48,13 @@ public class TileEntityPipeBaseNT extends TileEntity implements IFluidConductor
|
||||
this.type = type;
|
||||
this.markDirty();
|
||||
|
||||
if(worldObj instanceof WorldServer) {
|
||||
WorldServer world = (WorldServer) worldObj;
|
||||
world.getPlayerManager().markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
}
|
||||
if(this.network != null)
|
||||
this.network.destroy();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canConnect(FluidType type, ForgeDirection dir) {
|
||||
return dir != ForgeDirection.UNKNOWN && type == this.type;
|
||||
}
|
||||
|
||||
protected void connect() {
|
||||
@ -113,6 +124,18 @@ public class TileEntityPipeBaseNT extends TileEntity implements IFluidConductor
|
||||
this.network = network;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Packet getDescriptionPacket() {
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
this.writeToNBT(nbt);
|
||||
return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, 0, nbt);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) {
|
||||
this.readFromNBT(pkt.func_148857_g());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
|
||||
@ -9,6 +9,7 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.gen.feature.WorldGenFlowers;
|
||||
import net.minecraft.world.gen.feature.WorldGenMinable;
|
||||
|
||||
public class DungeonToolbox {
|
||||
@ -87,4 +88,13 @@ public class DungeonToolbox {
|
||||
(new WorldGenMinable(ore, meta, amount, target)).generate(world, rand, x, y, z);
|
||||
}
|
||||
}
|
||||
|
||||
private static WorldGenFlowers genFlowers = new WorldGenFlowers(null);
|
||||
public static void generateFlowers(World world, Random rand, int chunkX, int chunkZ, Block flower, int meta) {
|
||||
int x = chunkX + rand.nextInt(16);
|
||||
int z = chunkZ + rand.nextInt(16);
|
||||
int y = world.getHeightValue(x, z);
|
||||
genFlowers.func_150550_a(flower, meta);
|
||||
genFlowers.generate(world, rand, x, y, z);
|
||||
}
|
||||
}
|
||||
|
||||
@ -109,6 +109,7 @@ bomb.triggered=Erfolgreich ausgelöst!
|
||||
|
||||
book.test.page1=Testseite 1
|
||||
|
||||
chem.ARSENIC=Arsenextraktion
|
||||
chem.ASPHALT=Asphaltherstellung
|
||||
chem.BAKELITE=Bakelitherstellung
|
||||
chem.BALEFIRE=BF-Raketentreibstoffherstellung
|
||||
@ -527,6 +528,7 @@ hbmfluid.schrabidic=Schrabidische Säure
|
||||
hbmfluid.smear=Industrieöl
|
||||
hbmfluid.spentsteam=Niedrigdruckdampf
|
||||
hbmfluid.steam=Dampf
|
||||
hbmfluid.sulfuric_acid=Schwefelsäure
|
||||
hbmfluid.superhotsteam=Superverdichteter Dampf
|
||||
hbmfluid.tritium=Tritium
|
||||
hbmfluid.uf6=Uranhexafluorid
|
||||
@ -938,6 +940,7 @@ item.briquette_lignite.name=Braunkohlebrikett
|
||||
item.bucket_acid.name=Säureeimer
|
||||
item.bucket_mud.name=Eimer mit giftigem Schlamm
|
||||
item.bucket_schrabidic_acid.name=Eimer mit Schrabidischer Säure
|
||||
item.bucket_sulfuric_acid.name=Eimer mit Schwefelsäure
|
||||
item.bucket_toxic.name=Eimer mit stereotypischem grünen Schleim
|
||||
item.burnt_bark.name=Verbrannte Rinde
|
||||
item.can_bepis.name=Bepis
|
||||
@ -2139,7 +2142,7 @@ item.pin.name=Haarklammer
|
||||
item.pipes_steel.name=Stahlrohre
|
||||
item.pirfenidone.name=Pirfenidon
|
||||
item.pipes_steel.desc=Auf Recycling-Rezepte wurden wegen$Steuerhinterziehung verzichtet.
|
||||
item.piston_selenium.name=Sternmotorenkolben
|
||||
item.piston_selenium.name=Motorkolben
|
||||
item.plan_c.name=Plan C
|
||||
item.plate_advanced_alloy.name=Fortgeschrittene Legierungsplatte
|
||||
item.plate_aluminium.name=Aluminiumplatte
|
||||
@ -3072,6 +3075,8 @@ tile.concrete_colored.white.name=Weißer Beton
|
||||
tile.concrete_colored.yellow.name=Gelber Beton
|
||||
tile.concrete_pillar.name=Stahlbetonsäule
|
||||
tile.concrete_smooth.name=Beton
|
||||
tile.concrete_super.name=Super Beton
|
||||
tile.concrete_super_broken.name=Schimmliger Schutt
|
||||
tile.corium_block.name=Corium
|
||||
tile.crashed_bomb.name=Blindgänger
|
||||
tile.crate.name=Vorratskiste
|
||||
@ -3257,6 +3262,7 @@ tile.lamp_tritium_green_off.name=Grüne Tritiumlampe
|
||||
tile.lamp_tritium_green_on.name=Grüne Tritiumlampe
|
||||
tile.launch_pad.name=Raketenabschussrampe
|
||||
tile.launch_table.name=Große Startrampe
|
||||
tile.leaves_layer.name=Totes Laub
|
||||
tile.lox_barrel.name=LOX-Fass
|
||||
tile.machine_amgen.name=Umgebungsstrahlungs-Generator
|
||||
tile.machine_arc_furnace_off.name=Lichtbogenofen
|
||||
@ -3473,6 +3479,10 @@ tile.pink_log.name=Pinkes Holz
|
||||
tile.pink_planks.name=Pinke Holzbretter
|
||||
tile.pink_slab.name=Pinke Holzstufe
|
||||
tile.pink_stairs.name=Pinke Holztreppen
|
||||
tile.plant_flower.foxglove.name=Roter Fingerhut
|
||||
tile.plant_flower.nightshade.name=Schwarze Tollkirsche
|
||||
tile.plant_flower.tobacco.name=Tabakpflanze
|
||||
tile.plant_flower.weed.name=Weed Version 420(0)
|
||||
tile.plasma.name=Plasma
|
||||
tile.plasma_heater.name=Plasmaerhitzer
|
||||
tile.pole_satellite_receiver.name=Satellitenschüssel
|
||||
@ -3574,6 +3584,7 @@ tile.steel_poles.name=Stahlmasten
|
||||
tile.steel_roof.name=Flaches Stachldach
|
||||
tile.steel_scaffold.name=Stahlgerüst
|
||||
tile.steel_wall.name=Stahlwand
|
||||
tile.stone_cracked.name=Rissiger Stein
|
||||
tile.stone_depth.name=Tiefenfels
|
||||
tile.stone_depth_nether.name=Nether-Tiefenfels
|
||||
tile.stone_gneiss.name=Graphitschiefer
|
||||
|
||||
@ -277,6 +277,7 @@ book.starter.page18=vær is just a guy who has been trapped in the grey void fea
|
||||
#book.rbmk.title16=Meltdown
|
||||
#book.rbmk.page16=§4§lAvoid.
|
||||
|
||||
chem.ARSENIC=Arsenic Extraction
|
||||
chem.ASPHALT=Asphalt Production
|
||||
chem.BAKELITE=Bakelite Production
|
||||
chem.BALEFIRE=BF Rocket Fuel Mixing
|
||||
@ -652,6 +653,7 @@ hbm.key.craneMoveDown=Move Crane Backward
|
||||
hbm.key.craneMoveLeft=Move Crane Left
|
||||
hbm.key.craneMoveRight=Move Crane Right
|
||||
hbm.key.craneMoveUp=Move Crane Forward
|
||||
hbm.key.dash=Dash (Unbind from Crouch in config)
|
||||
hbm.key.toggleBack=Toggle Backpack
|
||||
hbm.key.toggleHUD=Toggle HUD
|
||||
hbm.key.reload=Reload
|
||||
@ -720,6 +722,7 @@ hbmfluid.schrabidic=Schrabidic Acid
|
||||
hbmfluid.smear=Industrial Oil
|
||||
hbmfluid.spentsteam=Low-Pressure Steam
|
||||
hbmfluid.steam=Steam
|
||||
hbmfluid.sulfuric_acid=Sulfuric Acid
|
||||
hbmfluid.superhotsteam=Super Dense Steam
|
||||
hbmfluid.tritium=Tritium
|
||||
hbmfluid.uf6=Uranium Hexafluoride
|
||||
@ -1147,6 +1150,7 @@ item.briquette_lignite.name=Lignite Briquette
|
||||
item.bucket_acid.name=Bucket of Acid
|
||||
item.bucket_mud.name=Bucket of Poisonous Mud
|
||||
item.bucket_schrabidic_acid.name=Bucket of Schrabidic Acid
|
||||
item.bucket_sulfuric_acid.name=Bucket of Sulfuric Acid
|
||||
item.bucket_toxic.name=Bucket of Stereotypical Green Ooze
|
||||
item.burnt_bark.name=Burnt Bark
|
||||
item.burnt_bark.desc=A piece of bark from an exploded golden oak tree.
|
||||
@ -2429,7 +2433,7 @@ item.pin.desc="*Unmodified* success rate of picking a standard lock is ~10%.
|
||||
item.pipes_steel.name=Steel Pipes
|
||||
item.pipes_steel.desc=Uncrafting was omitted due to tax evasion.
|
||||
item.pirfenidone.name=Pirfenidone
|
||||
item.piston_selenium.name=Radial Engine Piston
|
||||
item.piston_selenium.name=Combustion Engine Piston
|
||||
item.plan_c.name=Plan C
|
||||
item.plate_advanced_alloy.name=Advanced Alloy Plate
|
||||
item.plate_aluminium.name=Aluminium Plate
|
||||
@ -3444,6 +3448,8 @@ tile.concrete_colored.white.name=White Concrete
|
||||
tile.concrete_colored.yellow.name=Yellow Concrete
|
||||
tile.concrete_pillar.name=Rebar Reinforced Concrete Pillar
|
||||
tile.concrete_smooth.name=Concrete
|
||||
tile.concrete_super.name=Über Concrete
|
||||
tile.concrete_super_broken.name=Moldy Debris
|
||||
tile.corium_block.name=Corium
|
||||
tile.crashed_bomb.name=Dud
|
||||
tile.crate.name=Supply Crate
|
||||
@ -3629,6 +3635,7 @@ tile.lamp_tritium_green_off.name=Green Tritium Lamp
|
||||
tile.lamp_tritium_green_on.name=Green Tritium Lamp
|
||||
tile.launch_pad.name=Missile Launch Pad
|
||||
tile.launch_table.name=Large Launch Pad
|
||||
tile.leaves_layer.name=Fallen Leaves
|
||||
tile.lox_barrel.name=LOX Barrel
|
||||
tile.machine_amgen.name=Ambience Radiation Generator
|
||||
tile.machine_arc_furnace_off.name=Arc Furnace
|
||||
@ -3846,6 +3853,10 @@ tile.pink_log.name=Pink Log
|
||||
tile.pink_planks.name=Pink Wood Planks
|
||||
tile.pink_slab.name=Pink Wood Slab
|
||||
tile.pink_stairs.name=Pink Wood Stairs
|
||||
tile.plant_flower.foxglove.name=Foxglove
|
||||
tile.plant_flower.nightshade.name=Deadly Nightshade
|
||||
tile.plant_flower.tobacco.name=Tobacco Plant
|
||||
tile.plant_flower.weed.name=Weed Version 420(0)
|
||||
tile.plasma.name=Plasma
|
||||
tile.plasma_heater.name=Plasma Heater
|
||||
tile.pole_satellite_receiver.name=Satellite Dish
|
||||
@ -3947,6 +3958,7 @@ tile.steel_poles.name=Steel Pole
|
||||
tile.steel_roof.name=Flat Steel Roof
|
||||
tile.steel_scaffold.name=Steel Scaffold
|
||||
tile.steel_wall.name=Steel Wall
|
||||
tile.stone_cracked.name=Cracked Stone
|
||||
tile.stone_depth.name=Depth Rock
|
||||
tile.stone_depth_nether.name=Nether Depth Rock
|
||||
tile.stone_gneiss.name=Graphitic Schist
|
||||
|
||||
@ -301,6 +301,7 @@ hbm.key.craneMoveDown=Двигать кран назад
|
||||
hbm.key.craneMoveLeft=Двигать кран влево
|
||||
hbm.key.craneMoveRight=Двигать кран вправо
|
||||
hbm.key.craneMoveUp=Двигать кран вперёд
|
||||
hbm.key.dash=Деш
|
||||
hbm.key.toggleBack=Включить ранец
|
||||
hbm.key.toggleHUD=Включить HUD
|
||||
hbm.key.reload=Перезарядить
|
||||
@ -854,6 +855,7 @@ hbmfluid.coalgas=Угольный газ
|
||||
hbmfluid.enderjuice=Эндер-сок
|
||||
hbmfluid.xpjuice=Жидкий опыт
|
||||
hbmfluid.coalgas_leaded=Этилированный угольный газ
|
||||
hbmfluid.sulfuric_acid=Серная кислота
|
||||
|
||||
//Special for 1.12.2 version//
|
||||
fluid.hbmsteam=Пар
|
||||
@ -1035,6 +1037,7 @@ chem.PETROIL_LEADED=Смешивание этилированного бензи
|
||||
chem.RUBBER=Производство резины
|
||||
chem.TNT=Синтез ТНТ
|
||||
chem.DYNAMITE=Синтез динамита
|
||||
chem.ARSENIC=Экстракция мышьяка
|
||||
|
||||
item.record.lc.desc=Valve - Diabolic Adrenaline Guitar/Lambda Core
|
||||
item.record.ss.desc=Valve - Sector Sweep
|
||||
@ -1897,6 +1900,8 @@ item.ingot_fiberglass.name=Стекловолокно
|
||||
item.ingot_fiberglass.desc=С высоким содержанием волокна, с высоким содержанием стекла. Все, что нужно организму.
|
||||
item.ingot_asbestos.name=Асбестовый лист
|
||||
item.ingot_asbestos.desc=§o"Наполненный жизнью, неуверенностью в себе и асбестом. Это приходит вместе с воздухом."§r
|
||||
item.ingot_arsenic.name=Слиток мышьяка
|
||||
item.nugget_arsenic.name=Самородок мышьяка
|
||||
|
||||
item.solid_fuel.name=Твердое топливо
|
||||
item.solid_fuel_presto.name=Топливное полено
|
||||
@ -1999,6 +2004,7 @@ item.wire_gold.name=Золотой провод
|
||||
item.wire_schrabidium.name=Шрабидиевый провод
|
||||
item.circuit_raw.name=Сборка простой микросхемы
|
||||
item.circuit_bismuth_raw.name=Сборка универсального чипсета
|
||||
item.circuit_arsenic_raw.name=Сборка гибкой микросхемы
|
||||
item.circuit_tantalium_raw.name=Сборка конденсаторной платы
|
||||
item.circuit_aluminium.name=Простая микросхема
|
||||
item.circuit_copper.name=Продвинутая микросхема
|
||||
@ -2006,6 +2012,7 @@ item.circuit_red_copper.name=Усовершенствованная микрос
|
||||
item.circuit_gold.name=Разогнанная микросхема
|
||||
item.circuit_schrabidium.name=Высокопроизводительная микросхема
|
||||
item.circuit_bismuth.name=Универсальный чипсет
|
||||
item.circuit_arsenic.name=Гибкая микросхема
|
||||
item.circuit_tantalium.name=Конденсаторная плата
|
||||
item.circuit_targeting_tier1.name=Печатная плата военного класса (Уровень 1)
|
||||
item.circuit_targeting_tier2.name=Печатная плата военного класса (Уровень 2)
|
||||
@ -2072,7 +2079,7 @@ item.assembly_actionexpress.name=Сборка .50 AE пули
|
||||
item.assembly_calamity.name=Сборка .50 BMG пули
|
||||
item.assembly_lacunae.name=Сборка .5мм пули
|
||||
|
||||
item.piston_selenium.name=Поршень радиального двигателя
|
||||
item.piston_selenium.name=Поршень двигателя внутреннего сгорания
|
||||
|
||||
tile.block_aluminium.name=Алюминиевый блок
|
||||
tile.block_copper.name=Медный блок
|
||||
@ -2284,7 +2291,12 @@ tile.block_cap_sunset.name=Блок крышек от Сансет Сарсап
|
||||
tile.block_tritium.name=Блок тритиевых пробирок
|
||||
tile.hazmat.name=Блок защитной ткани
|
||||
tile.deco_emitter.name=Декоративный источник света
|
||||
tile.plant_flower.foxglove.name=Наперстянка
|
||||
tile.plant_flower.nightshade.name=Белладонна
|
||||
tile.plant_flower.tobacco.name=Табак
|
||||
tile.plant_flower.weed.name=Травка Версия 420(0)
|
||||
|
||||
tile.stone_cracked.name=Треснутый камень
|
||||
tile.reinforced_brick.name=Усиленный камень
|
||||
tile.reinforced_glass.name=Усиленное стекло
|
||||
tile.reinforced_sand.name=Усиленный песчаник
|
||||
@ -2396,6 +2408,8 @@ tile.ladder_sturdy.name=Прочная деревянная лестница
|
||||
tile.ladder_titanium.name=Титановая лестница
|
||||
tile.ladder_tungsten.name=Вольфрамовая лестница
|
||||
tile.volcano_core.name=Вулканическое ядро
|
||||
tile.concrete_super.name=Убер-бетон
|
||||
tile.concrete_super_broken.name=Замшелый бетонные обломки
|
||||
|
||||
tile.gravel_obsidian.name=Измельченный обсидиан
|
||||
tile.gravel_diamond.name=Измельченные алмазы
|
||||
@ -2995,11 +3009,13 @@ tile.dirt_oily.name=Пропитанная нефтью земля
|
||||
tile.waste_trinitite.name=Тринититовая руда
|
||||
tile.waste_trinitite_red.name=Красная тринититовая руда
|
||||
tile.waste_leaves.name=Мёртвые листья
|
||||
tile.leaves_layer.name=Упавшие листья
|
||||
tile.waste_log.name=Обугленное бревно
|
||||
tile.waste_planks.name=Обугленные деревянные доски
|
||||
item.trinitite.name=Тринитит
|
||||
item.nuclear_waste.name=Ядерные отходы
|
||||
item.scrap_nuclear.name=Радиоактивный мусор
|
||||
item.scrap_oil.name=Нефтяные отходы
|
||||
item.scrap_plastic.name=Куски пластмассы
|
||||
item.nuclear_waste_tiny.name=Маленькая кучка ядерных отходов
|
||||
item.nuclear_waste_vitrified.name=Остеклованные ядерные отходы
|
||||
@ -4289,6 +4305,7 @@ tile.toxic_block.name=Стереотипная зелёная слизь
|
||||
fluid.toxic_fluid=Стереотипная зелёная слизь
|
||||
item.bucket_toxic.name=Ведро стереотипной зелёной слизи
|
||||
item.bucket_schrabidic_acid.name=Ведро шрабидиевой кислоты
|
||||
item.bucket_sulfuric_acid.name=Ведро серной кислоты
|
||||
item.tank_waste_0.name=Контейнер с отходами
|
||||
item.tank_waste_1.name=Контейнер с отходами
|
||||
item.tank_waste_2.name=Контейнер с отходами
|
||||
@ -4510,6 +4527,7 @@ item.rbmk_tool.linked=Позиция установлена!
|
||||
item.rbmk_tool.set=РБМК соединён!
|
||||
item.bismuth_tool.name=Магнитный экстрактор
|
||||
item.reacher.name=Вольфрамовые хваталки
|
||||
item.power_net_tool.name=Анализатор энергосети
|
||||
|
||||
item.multitool_dig.name=Силовая перчатка (Добывающий коготь)
|
||||
item.multitool_silk.name=Силовая перчатка (Коготь шёлкового касания)
|
||||
|
||||
1779
src/main/resources/assets/hbm/models/machines/electrolyser.obj
Normal file
12086
src/main/resources/assets/hbm/models/weapons/nightmare_dark.obj
Normal file
BIN
src/main/resources/assets/hbm/textures/blocks/concrete_super.png
Normal file
|
After Width: | Height: | Size: 486 B |
|
After Width: | Height: | Size: 879 B |
|
After Width: | Height: | Size: 625 B |
|
After Width: | Height: | Size: 694 B |
|
After Width: | Height: | Size: 733 B |
|
After Width: | Height: | Size: 764 B |
|
Before Width: | Height: | Size: 168 B After Width: | Height: | Size: 128 B |
|
Before Width: | Height: | Size: 193 B After Width: | Height: | Size: 221 B |
|
After Width: | Height: | Size: 575 B |
|
After Width: | Height: | Size: 468 B |
|
After Width: | Height: | Size: 451 B |
|
After Width: | Height: | Size: 267 B |
|
After Width: | Height: | Size: 6.5 KiB |
|
After Width: | Height: | Size: 624 B |
BIN
src/main/resources/assets/hbm/textures/items/plasma_spear.png
Normal file
|
After Width: | Height: | Size: 241 B |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 327 B |
@ -3,7 +3,7 @@
|
||||
"modid": "hbm",
|
||||
"name": "Hbm's Nuclear Tech",
|
||||
"description": "A mod that adds weapons, nuclear themed stuff and machines",
|
||||
"version":"1.0.27_X4193",
|
||||
"version":"1.0.27_X4200",
|
||||
"mcversion": "1.7.10",
|
||||
"url": "",
|
||||
"updateUrl": "",
|
||||
|
||||