mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-02-21 13:32:28 +00:00
post merge cleanup
This commit is contained in:
parent
2f8b0dde49
commit
76c6222f45
@ -49,13 +49,6 @@ public class BlockEnums {
|
|||||||
GOLD,
|
GOLD,
|
||||||
SCHRABIDIUM
|
SCHRABIDIUM
|
||||||
}
|
}
|
||||||
|
|
||||||
public static enum EnumAbsorberTier {
|
|
||||||
BASE,
|
|
||||||
RED,
|
|
||||||
GREEN,
|
|
||||||
PINK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** DECO / STRUCTURE ENUMS */
|
/** DECO / STRUCTURE ENUMS */
|
||||||
//i apologize in advance
|
//i apologize in advance
|
||||||
|
|||||||
@ -1172,11 +1172,11 @@ public class ModBlocks {
|
|||||||
public static Block gas_explosive;
|
public static Block gas_explosive;
|
||||||
public static Block vacuum;
|
public static Block vacuum;
|
||||||
|
|
||||||
public static Block absorber;
|
@Deprecated public static Block absorber;
|
||||||
public static Block absorber_red;
|
@Deprecated public static Block absorber_red;
|
||||||
public static Block absorber_green;
|
@Deprecated public static Block absorber_green;
|
||||||
public static Block absorber_pink;
|
@Deprecated public static Block absorber_pink;
|
||||||
public static BlockAbsorber rad_absorber;
|
public static Block rad_absorber;
|
||||||
public static Block decon;
|
public static Block decon;
|
||||||
|
|
||||||
public static Block mud_block;
|
public static Block mud_block;
|
||||||
@ -2334,13 +2334,11 @@ public class ModBlocks {
|
|||||||
gas_explosive = new BlockGasExplosive().setBlockName("gas_explosive").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":gas_explosive");
|
gas_explosive = new BlockGasExplosive().setBlockName("gas_explosive").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":gas_explosive");
|
||||||
vacuum = new BlockVacuum().setBlockName("vacuum").setResistance(1000000F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":vacuum");
|
vacuum = new BlockVacuum().setBlockName("vacuum").setResistance(1000000F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":vacuum");
|
||||||
|
|
||||||
// OLD ABSORBERS
|
absorber = new BlockGeneric(Material.iron).setBlockName("absorber").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_deprecated");
|
||||||
absorber = new BlockAbsorberOLD(Material.iron).setBlockName("absorber").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":absorber");
|
absorber_red = new BlockGeneric(Material.iron).setBlockName("absorber_red").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_deprecated");
|
||||||
absorber_red = new BlockAbsorberOLD(Material.iron).setBlockName("absorber_red").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":absorber_red");
|
absorber_green = new BlockGeneric(Material.iron).setBlockName("absorber_green").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_deprecated");
|
||||||
absorber_green = new BlockAbsorberOLD(Material.iron).setBlockName("absorber_green").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":absorber_green");
|
absorber_pink = new BlockGeneric(Material.iron).setBlockName("absorber_pink").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_deprecated");
|
||||||
absorber_pink = new BlockAbsorberOLD(Material.iron).setBlockName("absorber_pink").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":absorber_pink");
|
|
||||||
|
|
||||||
//NEW ABSORBER
|
|
||||||
rad_absorber = new BlockAbsorber(Material.iron).setBlockName("rad_absorber").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
rad_absorber = new BlockAbsorber(Material.iron).setBlockName("rad_absorber").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||||
decon = new BlockDecon(Material.iron).setBlockName("decon").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":decon_side");
|
decon = new BlockDecon(Material.iron).setBlockName("decon").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":decon_side");
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
package com.hbm.blocks.generic;
|
package com.hbm.blocks.generic;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
import com.hbm.blocks.BlockEnumMulti;
|
import com.hbm.blocks.BlockEnumMulti;
|
||||||
@ -11,133 +10,71 @@ import com.hbm.lib.RefStrings;
|
|||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.IIcon;
|
import net.minecraft.util.IIcon;
|
||||||
import net.minecraft.util.StatCollector;
|
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
public class BlockAbsorber extends BlockEnumMulti implements IBlockMulti {
|
public class BlockAbsorber extends BlockEnumMulti implements IBlockMulti {
|
||||||
|
|
||||||
// Enum for tiers they are in order of meta data, 0, 1, 2, 3 for Base, Red, Green, Pink
|
// Enum for tiers they are in order of meta data, 0, 1, 2, 3 for Base, Red, Green, Pink
|
||||||
public static enum EnumAbsorberTier {
|
public static enum EnumAbsorberTier {
|
||||||
|
|
||||||
BASE(2.5F, "absorber"),
|
|
||||||
RED(10F, "absorber_red"),
|
|
||||||
GREEN(100F, "absorber_green"),
|
|
||||||
PINK(10000F, "absorber_pink");
|
|
||||||
|
|
||||||
public final float absorbAmount;
|
|
||||||
public final String textureName;
|
|
||||||
|
|
||||||
private EnumAbsorberTier(float absorb, String texture) {
|
BASE(2.5F, "absorber"), RED(10F, "absorber_red"), GREEN(100F, "absorber_green"), PINK(10000F, "absorber_pink");
|
||||||
this.absorbAmount = absorb;
|
|
||||||
this.textureName = texture;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private IIcon[] icons;
|
public final float absorbAmount;
|
||||||
|
public final String textureName;
|
||||||
|
|
||||||
public BlockAbsorber(Material mat) {
|
private EnumAbsorberTier(float absorb, String texture) {
|
||||||
super(mat, EnumAbsorberTier.class, true, true);
|
this.absorbAmount = absorb;
|
||||||
this.setTickRandomly(true);
|
this.textureName = texture;
|
||||||
this.setBlockName("rad_absorber");
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//More Enum stuff I copied from the other enum blocks, I have no idea how this really works tbh
|
public BlockAbsorber(Material mat) {
|
||||||
|
super(mat, EnumAbsorberTier.class, true, true);
|
||||||
|
this.setTickRandomly(true);
|
||||||
|
this.setBlockName("rad_absorber");
|
||||||
|
}
|
||||||
|
|
||||||
public EnumAbsorberTier getTier(int meta) {
|
public EnumAbsorberTier getTier(int meta) {
|
||||||
return EnumAbsorberTier.values()[rectify(meta)];
|
return EnumAbsorberTier.values()[rectify(meta)];
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getSubCount() {
|
public String getUnlocalizedName(ItemStack stack) {
|
||||||
return EnumAbsorberTier.values().length;
|
EnumAbsorberTier tier = getTier(stack.getItemDamage());
|
||||||
}
|
String tierName = net.minecraft.util.StatCollector.translateToLocal("tile.rad_absorber." + tier.name().toLowerCase());
|
||||||
|
return tierName;
|
||||||
|
|
||||||
@Override
|
}
|
||||||
public int damageDropped(int meta) {
|
|
||||||
return meta;
|
|
||||||
}
|
|
||||||
|
|
||||||
//HARDEST PART WORK GODDAMMIT WORK
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public void registerBlockIcons(net.minecraft.client.renderer.texture.IIconRegister reg) {
|
||||||
|
icons = new IIcon[EnumAbsorberTier.values().length];
|
||||||
|
for(int i = 0; i < icons.length; i++) {
|
||||||
|
icons[i] = reg.registerIcon(RefStrings.MODID + ":" + EnumAbsorberTier.values()[i].textureName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
// All that rad math shit that was on there already, did not touch this
|
||||||
public String getUnlocalizedName(ItemStack stack) {
|
// -Wolf
|
||||||
EnumAbsorberTier tier = getTier(stack.getItemDamage());
|
|
||||||
String tierName = net.minecraft.util.StatCollector.translateToLocal("tile.rad_absorber." + tier.name().toLowerCase());
|
|
||||||
return tierName;
|
|
||||||
|
|
||||||
}
|
@Override
|
||||||
|
public int tickRate(World world) {
|
||||||
//Creative tab && textures
|
return 10;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getSubBlocks(Item item, CreativeTabs tab, List list) {
|
public void updateTick(World world, int x, int y, int z, Random rand) {
|
||||||
for (int i = 0; i < EnumAbsorberTier.values().length; i++) {
|
EnumAbsorberTier tier = getTier(world.getBlockMetadata(x, y, z));
|
||||||
list.add(new ItemStack(item, 1, i));
|
ChunkRadiationManager.proxy.decrementRad(world, x, y, z, tier.absorbAmount);
|
||||||
}
|
world.scheduleBlockUpdate(x, y, z, this, tickRate(world));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
public void onBlockAdded(World world, int x, int y, int z) {
|
||||||
public void registerBlockIcons(net.minecraft.client.renderer.texture.IIconRegister reg) {
|
super.onBlockAdded(world, x, y, z);
|
||||||
icons = new IIcon[EnumAbsorberTier.values().length];
|
world.scheduleBlockUpdate(x, y, z, this, tickRate(world));
|
||||||
for (int i = 0; i < icons.length; i++) {
|
}
|
||||||
icons[i] = reg.registerIcon(RefStrings.MODID + ":" + EnumAbsorberTier.values()[i].textureName);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public IIcon getIcon(int side, int meta) {
|
|
||||||
return icons[rectify(meta)];
|
|
||||||
}
|
|
||||||
|
|
||||||
//All that rad math shit that was on there already, did not touch this -Wolf
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int tickRate(World world) {
|
|
||||||
return 10;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void updateTick(World world, int x, int y, int z, Random rand) {
|
|
||||||
EnumAbsorberTier tier = getTier(world.getBlockMetadata(x, y, z));
|
|
||||||
ChunkRadiationManager.proxy.decrementRad(world, x, y, z, tier.absorbAmount);
|
|
||||||
world.scheduleBlockUpdate(x, y, z, this, tickRate(world));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onBlockAdded(World world, int x, int y, int z) {
|
|
||||||
super.onBlockAdded(world, x, y, z);
|
|
||||||
world.scheduleBlockUpdate(x, y, z, this, tickRate(world));
|
|
||||||
}
|
|
||||||
|
|
||||||
//Block wanted these or no work, probably a better way to do it but I dont know it.
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BlockAbsorber setBlockName(String name) {
|
|
||||||
super.setBlockName(name);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BlockAbsorber setHardness(float hardness) {
|
|
||||||
super.setHardness(hardness);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BlockAbsorber setResistance(float resistance) {
|
|
||||||
super.setResistance(resistance);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BlockAbsorber setCreativeTab(CreativeTabs tab) {
|
|
||||||
super.setCreativeTab(tab);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,12 +0,0 @@
|
|||||||
package com.hbm.blocks.generic;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.block.material.Material;
|
|
||||||
|
|
||||||
public class BlockAbsorberOLD extends Block {
|
|
||||||
|
|
||||||
public BlockAbsorberOLD(Material mat) {
|
|
||||||
super(mat);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@ -3,6 +3,7 @@ package com.hbm.main;
|
|||||||
import com.hbm.blocks.BlockEnums.DecoCabinetEnum;
|
import com.hbm.blocks.BlockEnums.DecoCabinetEnum;
|
||||||
import com.hbm.blocks.BlockEnums.LightstoneType;
|
import com.hbm.blocks.BlockEnums.LightstoneType;
|
||||||
import com.hbm.blocks.ModBlocks;
|
import com.hbm.blocks.ModBlocks;
|
||||||
|
import com.hbm.blocks.generic.BlockAbsorber.EnumAbsorberTier;
|
||||||
import com.hbm.blocks.generic.BlockConcreteColoredExt.EnumConcreteType;
|
import com.hbm.blocks.generic.BlockConcreteColoredExt.EnumConcreteType;
|
||||||
import com.hbm.blocks.generic.BlockGenericStairs;
|
import com.hbm.blocks.generic.BlockGenericStairs;
|
||||||
import com.hbm.blocks.generic.BlockMultiSlab;
|
import com.hbm.blocks.generic.BlockMultiSlab;
|
||||||
@ -643,11 +644,11 @@ public class CraftingManager {
|
|||||||
addRecipeAuto(new ItemStack(ModItems.ammo_bag, 1), new Object[] { "LLL", "MGM", "LLL", 'L', Items.leather, 'G', WEAPONSTEEL.plate(), 'M', WEAPONSTEEL.mechanism() });
|
addRecipeAuto(new ItemStack(ModItems.ammo_bag, 1), new Object[] { "LLL", "MGM", "LLL", 'L', Items.leather, 'G', WEAPONSTEEL.plate(), 'M', WEAPONSTEEL.mechanism() });
|
||||||
addRecipeAuto(new ItemStack(ModItems.ammo_bag, 1), new Object[] { "LLL", "MGM", "LLL", 'L', ANY_RUBBER.ingot(), 'G', WEAPONSTEEL.plate(), 'M', WEAPONSTEEL.mechanism() });
|
addRecipeAuto(new ItemStack(ModItems.ammo_bag, 1), new Object[] { "LLL", "MGM", "LLL", 'L', ANY_RUBBER.ingot(), 'G', WEAPONSTEEL.plate(), 'M', WEAPONSTEEL.mechanism() });
|
||||||
|
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.absorber, 1), new Object[] { "ICI", "CPC", "ICI", 'I', CU.ingot(), 'C', COAL.dust(), 'P', PB.dust() });
|
addRecipeAuto(new ItemStack(ModBlocks.rad_absorber, 1, EnumAbsorberTier.BASE.ordinal()),new Object[] { "ICI", "CPC", "ICI", 'I', CU.ingot(), 'C', COAL.dust(), 'P', PB.dust() });
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.absorber_red, 1), new Object[] { "ICI", "CPC", "ICI", 'I', TI.ingot(), 'C', COAL.dust(), 'P', ModBlocks.absorber });
|
addRecipeAuto(new ItemStack(ModBlocks.rad_absorber, 1, EnumAbsorberTier.RED.ordinal()),new Object[] { "ICI", "CPC", "ICI", 'I', TI.ingot(), 'C', COAL.dust(),'P', new ItemStack(ModBlocks.rad_absorber, 1, EnumAbsorberTier.BASE.ordinal()) });
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.absorber_green, 1), new Object[] { "ICI", "CPC", "ICI", 'I', ANY_PLASTIC.ingot(), 'C', ModItems.powder_desh_mix, 'P', ModBlocks.absorber_red });
|
addRecipeAuto(new ItemStack(ModBlocks.rad_absorber, 1, EnumAbsorberTier.GREEN.ordinal()),new Object[] { "ICI", "CPC", "ICI", 'I', ANY_PLASTIC.ingot(), 'C', ModItems.powder_desh_mix,'P', new ItemStack(ModBlocks.rad_absorber, 1, EnumAbsorberTier.RED.ordinal()) });
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.absorber_pink, 1), new Object[] { "ICI", "CPC", "ICI", 'I', BIGMT.ingot(), 'C', ModItems.powder_nitan_mix, 'P', ModBlocks.absorber_green });
|
addRecipeAuto(new ItemStack(ModBlocks.rad_absorber, 1, EnumAbsorberTier.PINK.ordinal()), new Object[] { "ICI", "CPC", "ICI", 'I', BIGMT.ingot(), 'C', ModItems.powder_nitan_mix,'P', new ItemStack(ModBlocks.rad_absorber, 1, EnumAbsorberTier.GREEN.ordinal()) });
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.decon, 1), new Object[] { "BGB", "SAS", "BSB", 'B', BE.ingot(), 'G', Blocks.iron_bars, 'S', STEEL.ingot(), 'A', ModBlocks.absorber });
|
addRecipeAuto(new ItemStack(ModBlocks.decon, 1), new Object[] { "BGB", "SAS", "BSB", 'B', BE.ingot(), 'G', Blocks.iron_bars, 'S', STEEL.ingot(), 'A', new ItemStack(ModBlocks.rad_absorber, 1, EnumAbsorberTier.BASE.ordinal()) });
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.machine_minirtg, 1), new Object[] { "LLL", "PPP", "TRT", 'L', PB.plate(), 'P', PU238.billet(), 'T', ModItems.thermo_element, 'R', ModItems.rtg_unit });
|
addRecipeAuto(new ItemStack(ModBlocks.machine_minirtg, 1), new Object[] { "LLL", "PPP", "TRT", 'L', PB.plate(), 'P', PU238.billet(), 'T', ModItems.thermo_element, 'R', ModItems.rtg_unit });
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.machine_powerrtg, 1), new Object[] { "SRS", "PTP", "SRS", 'S', STAR.ingot(), 'R', ModItems.rtg_unit, 'P', PO210.billet(), 'T', TS.dust() });
|
addRecipeAuto(new ItemStack(ModBlocks.machine_powerrtg, 1), new Object[] { "SRS", "PTP", "SRS", 'S', STAR.ingot(), 'R', ModItems.rtg_unit, 'P', PO210.billet(), 'T', TS.dust() });
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user