diff options
author | Jordan Byrne <draknyte1@hotmail.com> | 2018-03-04 17:49:44 +1000 |
---|---|---|
committer | Jordan Byrne <draknyte1@hotmail.com> | 2018-03-04 17:49:44 +1000 |
commit | c9778e817b935174ae5efe410f469f32e47c3d15 (patch) | |
tree | b5d61aa794b89983591aa30bab9bc6207cc035f8 /src | |
parent | 9366db518e680fd3ed618826a08e33bcac573ab8 (diff) | |
download | GT5-Unofficial-c9778e817b935174ae5efe410f469f32e47c3d15.tar.gz GT5-Unofficial-c9778e817b935174ae5efe410f469f32e47c3d15.tar.bz2 GT5-Unofficial-c9778e817b935174ae5efe410f469f32e47c3d15.zip |
+ Added Plutonium 239.
% Made decayable dusts radioactive.
$ Fixed incorrect texture for decayable dusts.
$ Fixed COMET recipe expecting molten 239Pu.
Diffstat (limited to 'src')
-rw-r--r-- | src/Java/gtPlusPlus/core/item/ModItems.java | 3 | ||||
-rw-r--r-- | src/Java/gtPlusPlus/core/item/materials/DustDecayable.java | 17 | ||||
-rw-r--r-- | src/Java/gtPlusPlus/core/material/nuclear/NUCLIDE.java | 1 |
3 files changed, 16 insertions, 5 deletions
diff --git a/src/Java/gtPlusPlus/core/item/ModItems.java b/src/Java/gtPlusPlus/core/item/ModItems.java index a20686cede..1205d8ac43 100644 --- a/src/Java/gtPlusPlus/core/item/ModItems.java +++ b/src/Java/gtPlusPlus/core/item/ModItems.java @@ -408,6 +408,7 @@ public final class ModItems { //Plutonium-238 is a very powerful alpha emitter. This makes the plutonium-238 isotope suitable for usage in radioisotope thermoelectric generators (RTGs) //and radioisotope heater units - one gram of plutonium-238 generates approximately 0.5 W of thermal power. MaterialGenerator.generateNuclearMaterial(NUCLIDE.getInstance().PLUTONIUM238, false); + MaterialGenerator.generateNuclearMaterial(NUCLIDE.getInstance().PLUTONIUM239, false); //RTG Fuel Materials MaterialGenerator.generateNuclearMaterial(NUCLIDE.getInstance().STRONTIUM90, false); @@ -684,7 +685,7 @@ public final class ModItems { itemDoublePlateEuropium = new BaseItemPlateDouble(MaterialUtils.generateMaterialFromGtENUM(Materials.Europium)); } - dustNeptunium238 = new DustDecayable("dustNeptunium238", Utils.rgbtoHexValue(175, 240, 75), 50640, "Result: Plutonium 238 ("+StringUtils.superscript("238Pu")+")", CORE.GT_Tooltip_Radioactive, NUCLIDE.getInstance().PLUTONIUM238.getDust(1).getItem()); + dustNeptunium238 = new DustDecayable("dustNeptunium238", Utils.rgbtoHexValue(175, 240, 75), 50640, "Result: Plutonium 238 ("+StringUtils.superscript("238Pu")+")", CORE.GT_Tooltip_Radioactive, NUCLIDE.getInstance().PLUTONIUM238.getDust(1).getItem(), 5); itemBoilerChassis = new ItemBoilerChassis(); itemDehydratorCoilWire = new ItemDehydratorCoilWire(); diff --git a/src/Java/gtPlusPlus/core/item/materials/DustDecayable.java b/src/Java/gtPlusPlus/core/item/materials/DustDecayable.java index b7461a8558..0fad3de66a 100644 --- a/src/Java/gtPlusPlus/core/item/materials/DustDecayable.java +++ b/src/Java/gtPlusPlus/core/item/materials/DustDecayable.java @@ -10,24 +10,26 @@ import net.minecraft.world.World; import gregtech.api.util.GT_OreDictUnificator; import gtPlusPlus.core.item.base.BaseItemTickable; -import gtPlusPlus.core.item.base.ore.BaseOreComponent.ComponentTypes; +import gtPlusPlus.core.util.minecraft.EntityUtils; import gtPlusPlus.core.util.minecraft.ItemUtils; public class DustDecayable extends BaseItemTickable { private final Item turnsIntoItem; + private final int radLevel; - public DustDecayable(String unlocal, int colour, int maxTicks, String desc1, String desc2, Item turnsInto) { + public DustDecayable(String unlocal, int colour, int maxTicks, String desc1, String desc2, Item turnsInto, int radLevel) { super(true, unlocal, colour, maxTicks, desc1, desc2); this.turnsIntoItem = turnsInto; + this.radLevel = radLevel; GT_OreDictUnificator.registerOre(unlocal, ItemUtils.getSimpleStack(this)); } @Override public void registerIcons(IIconRegister reg) { - String gt = "gregtech" + ":" + "materialicons/"+"METALLIC"+"/" + ComponentTypes.DUSTIMPURE.getComponent(); + String gt = "gregtech" + ":" + "materialicons/"+"METALLIC"+"/" + "dust"; this.mIcon[0] = reg.registerIcon(gt); - String gt2 = "gregtech" + ":" + "materialicons/"+"METALLIC"+"/" + ComponentTypes.DUSTIMPURE.getComponent()+"_Overlay"; + String gt2 = "gregtech" + ":" + "materialicons/"+"METALLIC"+"/" + "dust" + "_OVERLAY"; this.mIcon[1] = reg.registerIcon(gt2); } @@ -36,6 +38,13 @@ public class DustDecayable extends BaseItemTickable { if (world == null || iStack == null) { return; } + + if (entityHolding instanceof EntityPlayer){ + if (!((EntityPlayer) entityHolding).capabilities.isCreativeMode){ + EntityUtils.applyRadiationDamageToEntity(iStack.stackSize, this.radLevel, world, entityHolding); + } + } + if (!tickItemTag(iStack)) { if (entityHolding instanceof EntityPlayer){ ItemStack replacement = ItemUtils.getSimpleStack(turnsIntoItem); diff --git a/src/Java/gtPlusPlus/core/material/nuclear/NUCLIDE.java b/src/Java/gtPlusPlus/core/material/nuclear/NUCLIDE.java index f015a7b991..0a922b7c8c 100644 --- a/src/Java/gtPlusPlus/core/material/nuclear/NUCLIDE.java +++ b/src/Java/gtPlusPlus/core/material/nuclear/NUCLIDE.java @@ -20,6 +20,7 @@ public final class NUCLIDE { public final Material URANIUM232 = new Material("Uranium 232", MaterialState.SOLID, new short[]{88, 220, 103, 0}, 1132, 4131, 92, 140, false, StringUtils.superscript("232U"), 4);//Not a GT Inherited Material public final Material URANIUM233 = new Material("Uranium 233", MaterialState.SOLID, new short[]{73, 220, 83, 0}, 1132, 4131, 92, 141, false, StringUtils.superscript("233U"), 2);//Not a GT Inherited Material public final Material THORIUM232 = new Material("Thorium 232", MaterialState.SOLID, new short[]{15, 60, 15, 0}, Materials.Thorium.mMeltingPoint, Materials.Thorium.mBlastFurnaceTemp, 90, 142, false, StringUtils.superscript("232Th"), 1, false);//Not a GT Inherited Material + public final Material PLUTONIUM239 = new Material("Plutonium-239", MaterialState.SOLID, Materials.Plutonium.mIconSet, Materials.Plutonium.mDurability, Materials.Plutonium.mRGBa, Materials.Plutonium.mMeltingPoint, Materials.Plutonium.mBlastFurnaceTemp, 94, 145, false, StringUtils.superscript("239Pu"), 4, true);//Not a GT Inherited Material //RTG Fuels public final Material PLUTONIUM238 = new Material("Plutonium-238", MaterialState.SOLID, Materials.Plutonium241.mIconSet, Materials.Plutonium241.mDurability, Materials.Plutonium241.mRGBa, Materials.Plutonium241.mMeltingPoint, Materials.Plutonium241.mBlastFurnaceTemp, 94, 144, false, StringUtils.superscript("238Pu"), 2, false);//Not a GT Inherited Material |