mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
magnifique
delicious
This commit is contained in:
parent
e63afbee10
commit
9bf5082236
@ -24,6 +24,7 @@ public class BlockGraphiteDrilled extends BlockGraphiteDrilledBase implements IT
|
|||||||
|
|
||||||
if(side == cfg * 2 || side == cfg * 2 + 1) {
|
if(side == cfg * 2 || side == cfg * 2 + 1) {
|
||||||
if(checkInteraction(world, x, y, z, meta, player, ModItems.pile_rod_uranium, ModBlocks.block_graphite_fuel)) return true;
|
if(checkInteraction(world, x, y, z, meta, player, ModItems.pile_rod_uranium, ModBlocks.block_graphite_fuel)) return true;
|
||||||
|
if(checkInteraction(world, x, y, z, meta | 8, player, ModItems.pile_rod_pu239, ModBlocks.block_graphite_fuel)) return true;
|
||||||
if(checkInteraction(world, x, y, z, meta, player, ModItems.pile_rod_plutonium, ModBlocks.block_graphite_plutonium)) return true;
|
if(checkInteraction(world, x, y, z, meta, player, ModItems.pile_rod_plutonium, ModBlocks.block_graphite_plutonium)) return true;
|
||||||
if(checkInteraction(world, x, y, z, meta, player, ModItems.pile_rod_source, ModBlocks.block_graphite_source)) return true;
|
if(checkInteraction(world, x, y, z, meta, player, ModItems.pile_rod_source, ModBlocks.block_graphite_source)) return true;
|
||||||
if(checkInteraction(world, x, y, z, meta, player, ModItems.pile_rod_boron, ModBlocks.block_graphite_rod)) return true;
|
if(checkInteraction(world, x, y, z, meta, player, ModItems.pile_rod_boron, ModBlocks.block_graphite_rod)) return true;
|
||||||
|
|||||||
@ -51,10 +51,10 @@ public abstract class BlockGraphiteDrilledBase extends BlockFlammable implements
|
|||||||
public IIcon getIcon(int side, int metadata) {
|
public IIcon getIcon(int side, int metadata) {
|
||||||
|
|
||||||
int cfg = metadata & 3;
|
int cfg = metadata & 3;
|
||||||
int meta = metadata >> 2;
|
int meta = metadata & 4;
|
||||||
|
|
||||||
if(side == cfg * 2 || side == cfg * 2 + 1) {
|
if(side == cfg * 2 || side == cfg * 2 + 1) {
|
||||||
if(meta == 1)
|
if(meta == 4)
|
||||||
return this.blockIconAluminum;
|
return this.blockIconAluminum;
|
||||||
|
|
||||||
return this.blockIcon;
|
return this.blockIcon;
|
||||||
@ -97,6 +97,11 @@ public abstract class BlockGraphiteDrilledBase extends BlockFlammable implements
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Thank god getDrops passes meta
|
||||||
|
protected Item getInsertedItem(int meta) {
|
||||||
|
return getInsertedItem();
|
||||||
|
}
|
||||||
|
|
||||||
protected Item getInsertedItem() {
|
protected Item getInsertedItem() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -108,7 +113,7 @@ public abstract class BlockGraphiteDrilledBase extends BlockFlammable implements
|
|||||||
if((meta & 4) == 4)
|
if((meta & 4) == 4)
|
||||||
drops.add(new ItemStack(ModItems.hull_small_aluminium, 1));
|
drops.add(new ItemStack(ModItems.hull_small_aluminium, 1));
|
||||||
if(getInsertedItem() != null)
|
if(getInsertedItem() != null)
|
||||||
drops.add(new ItemStack(getInsertedItem(), 1));
|
drops.add(new ItemStack(getInsertedItem(meta), 1));
|
||||||
return drops;
|
return drops;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -40,14 +40,15 @@ public class BlockGraphiteFuel extends BlockGraphiteDrilledTE implements IToolab
|
|||||||
|
|
||||||
if(!world.isRemote) {
|
if(!world.isRemote) {
|
||||||
|
|
||||||
|
int meta = world.getBlockMetadata(x, y, z);
|
||||||
|
|
||||||
if(tool == ToolType.SCREWDRIVER) {
|
if(tool == ToolType.SCREWDRIVER) {
|
||||||
|
|
||||||
int meta = world.getBlockMetadata(x, y, z);
|
|
||||||
int cfg = meta & 3;
|
int cfg = meta & 3;
|
||||||
|
|
||||||
if(side == cfg * 2 || side == cfg * 2 + 1) {
|
if(side == cfg * 2 || side == cfg * 2 + 1) {
|
||||||
world.setBlock(x, y, z, ModBlocks.block_graphite_drilled, meta, 3);
|
world.setBlock(x, y, z, ModBlocks.block_graphite_drilled, meta & 7, 3);
|
||||||
this.ejectItem(world, x, y, z, ForgeDirection.getOrientation(side), new ItemStack(ModItems.pile_rod_uranium));
|
this.ejectItem(world, x, y, z, ForgeDirection.getOrientation(side), new ItemStack(getInsertedItem(meta)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -57,6 +58,8 @@ public class BlockGraphiteFuel extends BlockGraphiteDrilledTE implements IToolab
|
|||||||
player.addChatComponentMessage(new ChatComponentText("HEAT: " + pile.heat + "/" + pile.maxHeat).setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)));
|
player.addChatComponentMessage(new ChatComponentText("HEAT: " + pile.heat + "/" + pile.maxHeat).setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)));
|
||||||
player.addChatComponentMessage(new ChatComponentText("DEPLETION: " + pile.progress + "/" + pile.maxProgress).setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)));
|
player.addChatComponentMessage(new ChatComponentText("DEPLETION: " + pile.progress + "/" + pile.maxProgress).setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)));
|
||||||
player.addChatComponentMessage(new ChatComponentText("FLUX: " + pile.lastNeutrons).setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)));
|
player.addChatComponentMessage(new ChatComponentText("FLUX: " + pile.lastNeutrons).setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)));
|
||||||
|
if((meta & 8) == 8)
|
||||||
|
player.addChatComponentMessage(new ChatComponentText("PU-239 RICH").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.DARK_GREEN)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -64,7 +67,7 @@ public class BlockGraphiteFuel extends BlockGraphiteDrilledTE implements IToolab
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Item getInsertedItem() {
|
protected Item getInsertedItem(int meta) {
|
||||||
return ModItems.pile_rod_uranium;
|
return (meta & 8) == 8 ? ModItems.pile_rod_pu239 : ModItems.pile_rod_uranium;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -335,6 +335,7 @@ public class HazardRegistry {
|
|||||||
HazardSystem.register(new ItemStack(pellet_rtg_depleted, 1, DepletedRTGMaterial.NEPTUNIUM.ordinal()), makeData(RADIATION, np237 * rtg));
|
HazardSystem.register(new ItemStack(pellet_rtg_depleted, 1, DepletedRTGMaterial.NEPTUNIUM.ordinal()), makeData(RADIATION, np237 * rtg));
|
||||||
|
|
||||||
HazardSystem.register(pile_rod_uranium, makeData(RADIATION, u * billet * 3));
|
HazardSystem.register(pile_rod_uranium, makeData(RADIATION, u * billet * 3));
|
||||||
|
HazardSystem.register(pile_rod_pu239, makeData(RADIATION, !GeneralConfig.enable528 ? purg * billet + pu239 * billet + u * billet : purg * billet + pu239 * billet + wst * billet));
|
||||||
HazardSystem.register(pile_rod_plutonium, makeData(RADIATION, !GeneralConfig.enable528 ? purg * billet * 3 : purg * billet * 2 + wst * billet));
|
HazardSystem.register(pile_rod_plutonium, makeData(RADIATION, !GeneralConfig.enable528 ? purg * billet * 3 : purg * billet * 2 + wst * billet));
|
||||||
HazardSystem.register(pile_rod_source, makeData(RADIATION, rabe * billet * 3));
|
HazardSystem.register(pile_rod_source, makeData(RADIATION, rabe * billet * 3));
|
||||||
|
|
||||||
|
|||||||
@ -669,6 +669,13 @@ public class AnvilRecipes {
|
|||||||
new AnvilOutput(new ItemStack(ModItems.billet_pu_mix, 3)),
|
new AnvilOutput(new ItemStack(ModItems.billet_pu_mix, 3)),
|
||||||
new AnvilOutput(new ItemStack(ModItems.plate_iron, 2))
|
new AnvilOutput(new ItemStack(ModItems.plate_iron, 2))
|
||||||
}).setTier(2));
|
}).setTier(2));
|
||||||
|
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||||
|
new ComparableStack(ModItems.pile_rod_pu239), new AnvilOutput[] {
|
||||||
|
new AnvilOutput(new ItemStack(ModItems.billet_pu239, 1)), //Might need to be cut to 3 nuggets, but a full billet is nice and round
|
||||||
|
new AnvilOutput(new ItemStack(ModItems.billet_pu_mix, 1)),
|
||||||
|
new AnvilOutput(new ItemStack(ModItems.billet_uranium, 1)),
|
||||||
|
new AnvilOutput(new ItemStack(ModItems.plate_iron, 2))
|
||||||
|
}).setTier(2));
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
constructionRecipes.add(new AnvilConstructionRecipe(
|
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||||
@ -677,6 +684,13 @@ public class AnvilRecipes {
|
|||||||
new AnvilOutput(new ItemStack(ModItems.billet_nuclear_waste, 1)),
|
new AnvilOutput(new ItemStack(ModItems.billet_nuclear_waste, 1)),
|
||||||
new AnvilOutput(new ItemStack(ModItems.plate_iron, 1))
|
new AnvilOutput(new ItemStack(ModItems.plate_iron, 1))
|
||||||
}).setTier(2));
|
}).setTier(2));
|
||||||
|
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||||
|
new ComparableStack(ModItems.pile_rod_pu239), new AnvilOutput[] {
|
||||||
|
new AnvilOutput(new ItemStack(ModItems.billet_pu239, 1)),
|
||||||
|
new AnvilOutput(new ItemStack(ModItems.billet_pu_mix, 1)),
|
||||||
|
new AnvilOutput(new ItemStack(ModItems.billet_nuclear_waste, 1)),
|
||||||
|
new AnvilOutput(new ItemStack(ModItems.plate_iron, 2))
|
||||||
|
}).setTier(2));
|
||||||
}
|
}
|
||||||
|
|
||||||
constructionRecipes.add(new AnvilConstructionRecipe(
|
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||||
|
|||||||
@ -1054,6 +1054,7 @@ public class ModItems {
|
|||||||
public static Item waste_plate_pu238be;
|
public static Item waste_plate_pu238be;
|
||||||
|
|
||||||
public static Item pile_rod_uranium;
|
public static Item pile_rod_uranium;
|
||||||
|
public static Item pile_rod_pu239;
|
||||||
public static Item pile_rod_plutonium;
|
public static Item pile_rod_plutonium;
|
||||||
public static Item pile_rod_source;
|
public static Item pile_rod_source;
|
||||||
public static Item pile_rod_boron;
|
public static Item pile_rod_boron;
|
||||||
@ -3600,6 +3601,7 @@ public class ModItems {
|
|||||||
waste_plate_pu238be = new ItemDepletedFuel().setUnlocalizedName("waste_plate_pu238be").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_plate_pu238be");
|
waste_plate_pu238be = new ItemDepletedFuel().setUnlocalizedName("waste_plate_pu238be").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":waste_plate_pu238be");
|
||||||
|
|
||||||
pile_rod_uranium = new ItemPileRod().setUnlocalizedName("pile_rod_uranium").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pile_rod_uranium");
|
pile_rod_uranium = new ItemPileRod().setUnlocalizedName("pile_rod_uranium").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pile_rod_uranium");
|
||||||
|
pile_rod_pu239 = new ItemPileRod().setUnlocalizedName("pile_rod_pu239").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pile_rod_pu239");
|
||||||
pile_rod_plutonium = new ItemPileRod().setUnlocalizedName("pile_rod_plutonium").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pile_rod_plutonium");
|
pile_rod_plutonium = new ItemPileRod().setUnlocalizedName("pile_rod_plutonium").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pile_rod_plutonium");
|
||||||
pile_rod_source = new ItemPileRod().setUnlocalizedName("pile_rod_source").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pile_rod_source");
|
pile_rod_source = new ItemPileRod().setUnlocalizedName("pile_rod_source").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pile_rod_source");
|
||||||
pile_rod_boron = new ItemPileRod().setUnlocalizedName("pile_rod_boron").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pile_rod_boron");
|
pile_rod_boron = new ItemPileRod().setUnlocalizedName("pile_rod_boron").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pile_rod_boron");
|
||||||
@ -6750,6 +6752,7 @@ public class ModItems {
|
|||||||
|
|
||||||
//Pile parts
|
//Pile parts
|
||||||
GameRegistry.registerItem(pile_rod_uranium, pile_rod_uranium.getUnlocalizedName());
|
GameRegistry.registerItem(pile_rod_uranium, pile_rod_uranium.getUnlocalizedName());
|
||||||
|
GameRegistry.registerItem(pile_rod_pu239, pile_rod_pu239.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(pile_rod_plutonium, pile_rod_plutonium.getUnlocalizedName());
|
GameRegistry.registerItem(pile_rod_plutonium, pile_rod_plutonium.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(pile_rod_source, pile_rod_source.getUnlocalizedName());
|
GameRegistry.registerItem(pile_rod_source, pile_rod_source.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(pile_rod_boron, pile_rod_boron.getUnlocalizedName());
|
GameRegistry.registerItem(pile_rod_boron, pile_rod_boron.getUnlocalizedName());
|
||||||
|
|||||||
@ -21,6 +21,7 @@ public class TileEntityPileFuel extends TileEntityPileBase implements IPileNeutr
|
|||||||
if(!worldObj.isRemote) {
|
if(!worldObj.isRemote) {
|
||||||
dissipateHeat();
|
dissipateHeat();
|
||||||
react();
|
react();
|
||||||
|
transmute();
|
||||||
|
|
||||||
if(this.heat >= this.maxHeat) {
|
if(this.heat >= this.maxHeat) {
|
||||||
worldObj.newExplosion(null, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, 4, true, true);
|
worldObj.newExplosion(null, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, 4, true, true);
|
||||||
@ -28,7 +29,7 @@ public class TileEntityPileFuel extends TileEntityPileBase implements IPileNeutr
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(this.progress >= this.maxProgress) {
|
if(this.progress >= this.maxProgress) {
|
||||||
worldObj.setBlock(xCoord, yCoord, zCoord, ModBlocks.block_graphite_plutonium, this.getBlockMetadata(), 3);
|
worldObj.setBlock(xCoord, yCoord, zCoord, ModBlocks.block_graphite_plutonium, this.getBlockMetadata() & 7, 3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -55,6 +56,19 @@ public class TileEntityPileFuel extends TileEntityPileBase implements IPileNeutr
|
|||||||
this.castRay((int) Math.max(reaction * 0.25, 1), 5);
|
this.castRay((int) Math.max(reaction * 0.25, 1), 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void transmute() {
|
||||||
|
|
||||||
|
if((this.getBlockMetadata() & 8) == 8) {
|
||||||
|
if(this.progress < this.maxProgress - 1000) //Might be subject to change, but 1000 seems like a good number.
|
||||||
|
this.progress = maxProgress - 1000;
|
||||||
|
|
||||||
|
return;
|
||||||
|
} else if(this.progress >= maxProgress - 1000) {
|
||||||
|
worldObj.setBlockMetadataWithNotify(this.xCoord, this.yCoord, this.zCoord, this.getBlockMetadata() | 8, 3);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void receiveNeutrons(int n) {
|
public void receiveNeutrons(int n) {
|
||||||
this.neutrons += n;
|
this.neutrons += n;
|
||||||
|
|||||||
@ -9,7 +9,7 @@ public class TileEntityPileSource extends TileEntityPileBase {
|
|||||||
|
|
||||||
if(!worldObj.isRemote) {
|
if(!worldObj.isRemote) {
|
||||||
|
|
||||||
int n = this.getBlockType() == ModBlocks.block_graphite_source ? 1 : 3;
|
int n = this.getBlockType() == ModBlocks.block_graphite_source ? 1 : 2;
|
||||||
|
|
||||||
for(int i = 0; i < 12; i++) {
|
for(int i = 0; i < 12; i++) {
|
||||||
this.castRay(n, 5);
|
this.castRay(n, 5);
|
||||||
|
|||||||
@ -82,6 +82,8 @@ public class MapGenNTMFeatures extends MapGenStructure {
|
|||||||
|
|
||||||
public static class Start extends StructureStart {
|
public static class Start extends StructureStart {
|
||||||
|
|
||||||
|
public Start() {}
|
||||||
|
|
||||||
public Start(World world, Random rand, int chunkX, int chunkZ) {
|
public Start(World world, Random rand, int chunkX, int chunkZ) {
|
||||||
super(chunkX, chunkZ);
|
super(chunkX, chunkZ);
|
||||||
|
|
||||||
|
|||||||
@ -2450,6 +2450,8 @@ item.pile_rod_lithium.name=Chicago Pile Lithium Cell
|
|||||||
item.pile_rod_lithium.desc=§a[Breedable Fuel]$§eUse hand drill to inspect core
|
item.pile_rod_lithium.desc=§a[Breedable Fuel]$§eUse hand drill to inspect core
|
||||||
item.pile_rod_plutonium.name=Chicago Pile Plutonium Rod
|
item.pile_rod_plutonium.name=Chicago Pile Plutonium Rod
|
||||||
item.pile_rod_plutonium.desc=§d[Neutron Source]
|
item.pile_rod_plutonium.desc=§d[Neutron Source]
|
||||||
|
item.pile_rod_pu239.name=Chicago Pile Bred Uranium Rod
|
||||||
|
item.pile_rod_pu239.desc=§a[Reactive Fuel]$§eRich in Plutonium-239.
|
||||||
item.pile_rod_source.name=Chicago Pile Ra226Be Neutron Source
|
item.pile_rod_source.name=Chicago Pile Ra226Be Neutron Source
|
||||||
item.pile_rod_source.desc=§d[Neutron Source]
|
item.pile_rod_source.desc=§d[Neutron Source]
|
||||||
item.pile_rod_uranium.name=Chicago Pile Uranium Rod
|
item.pile_rod_uranium.name=Chicago Pile Uranium Rod
|
||||||
|
|||||||
BIN
src/main/resources/assets/hbm/textures/items/pile_rod_pu239.png
Normal file
BIN
src/main/resources/assets/hbm/textures/items/pile_rod_pu239.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 242 B |
Loading…
x
Reference in New Issue
Block a user