aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core
diff options
context:
space:
mode:
authorJordan Byrne <draknyte1@hotmail.com>2017-12-29 14:12:35 +1000
committerJordan Byrne <draknyte1@hotmail.com>2017-12-29 14:12:35 +1000
commit29183be2ec89ee54d748ac6ca64ed67f89f50f90 (patch)
tree5329e51436cff7a2b4b3af507d88eb971583cfa0 /src/Java/gtPlusPlus/core
parentd1963f3f97fb6478fdfb0a5c64dd7c5a2d156c93 (diff)
downloadGT5-Unofficial-29183be2ec89ee54d748ac6ca64ed67f89f50f90.tar.gz
GT5-Unofficial-29183be2ec89ee54d748ac6ca64ed67f89f50f90.tar.bz2
GT5-Unofficial-29183be2ec89ee54d748ac6ca64ed67f89f50f90.zip
+ Add Gadolinium, Samarium, Ytterbium & Lanthanum if they do not exist.
+ Added new recipe for production of Fluorite. % Some Alloys now use Phosphor instead of Phosphorus. % Changed Ore Block unlocalized name. $ Fixed ore itemblock not showing Chemical Formula. $ Greatly improved radiation handler. $ Fixed old fluorite ore not generating properly.
Diffstat (limited to 'src/Java/gtPlusPlus/core')
-rw-r--r--src/Java/gtPlusPlus/core/block/base/BlockBaseOre.java57
-rw-r--r--src/Java/gtPlusPlus/core/item/ModItems.java21
-rw-r--r--src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockOre.java14
-rw-r--r--src/Java/gtPlusPlus/core/material/ELEMENT.java2
-rw-r--r--src/Java/gtPlusPlus/core/material/Material.java2
-rw-r--r--src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java14
-rw-r--r--src/Java/gtPlusPlus/core/util/entity/EntityUtils.java25
7 files changed, 70 insertions, 65 deletions
diff --git a/src/Java/gtPlusPlus/core/block/base/BlockBaseOre.java b/src/Java/gtPlusPlus/core/block/base/BlockBaseOre.java
index abcccd1005..0a74a9f2aa 100644
--- a/src/Java/gtPlusPlus/core/block/base/BlockBaseOre.java
+++ b/src/Java/gtPlusPlus/core/block/base/BlockBaseOre.java
@@ -40,7 +40,7 @@ public class BlockBaseOre extends BasicBlock implements ITexturedTileEntity {
this.setHarvestLevel("pickaxe", 3);
this.setCreativeTab(AddToCreativeTab.tabBlock);
this.setStepSound(soundTypeStone);
- this.setBlockName(Utils.sanitizeString(Utils.sanitizeString(material.getUnlocalizedName())));
+ this.setBlockName("Ore"+Utils.sanitizeString(Utils.sanitizeString(material.getUnlocalizedName())));
//this.setBlockTextureName(CORE.MODID+":"+blockType.getTexture());
@@ -97,64 +97,18 @@ public class BlockBaseOre extends BasicBlock implements ITexturedTileEntity {
}
public static class oldOreBlock extends BlockBaseModular{
+
@SuppressWarnings("unused")
private IIcon base;
@SuppressWarnings("unused")
private IIcon overlay;
- protected Material blockMaterial;
-
- protected int blockColour;
- protected BlockTypes thisBlock;
- protected String thisBlockMaterial;
- protected final String thisBlockType;
-
- public oldOreBlock(final Material material, final BlockTypes blockType, final int colour) {
- this(material.getUnlocalizedName(), material.getLocalizedName(), net.minecraft.block.material.Material.iron, blockType, colour, 3);
- blockMaterial = material;
- }
-
public oldOreBlock(final String unlocalizedName, final String blockMaterial, final BlockTypes blockType, final int colour) {
this(unlocalizedName, blockMaterial, net.minecraft.block.material.Material.iron, blockType, colour, 2);
}
public oldOreBlock(final String unlocalizedName, final String blockMaterial, final net.minecraft.block.material.Material vanillaMaterial, final BlockTypes blockType, final int colour, final int miningLevel) {
super(unlocalizedName, blockMaterial, vanillaMaterial, blockType, colour, miningLevel);
- this.blockColour = colour;
- this.thisBlock = blockType;
- this.thisBlockMaterial = blockMaterial;
- this.thisBlockType = blockType.name().toUpperCase();
- this.setBlockTextureName(CORE.MODID+":"+blockType.getTexture());
- }
-
- /**
- * Returns which pass should this block be rendered on. 0 for solids and 1 for alpha
- */
-
- @Override
- @SideOnly(Side.CLIENT)
- public int getRenderBlockPass(){
- return 0;
- }
-
- @Override
- public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) {
- return false;
- }
-
- @Override
- public int getRenderType() {
- return 0;
- }
-
- @Override
- public IIcon getIcon(IBlockAccess aIBlockAccess, int aX, int aY, int aZ, int aSide) {
- return Blocks.stone.getIcon(0, 0);
- }
-
- @Override
- public IIcon getIcon(int aSide, int aMeta) {
- return Blocks.stone.getIcon(0, 0);
}
@Override
@@ -162,6 +116,8 @@ public class BlockBaseOre extends BasicBlock implements ITexturedTileEntity {
public void registerBlockIcons(final IIconRegister iIcon)
{
this.blockIcon = iIcon.registerIcon(CORE.MODID + ":" + this.thisBlock.getTexture());
+ //this.base = iIcon.registerIcon(CORE.MODID + ":" + "blockStone");
+ //this.overlay = iIcon.registerIcon(CORE.MODID + ":" + "blockOre_Overlay");
}
@Override
@@ -180,6 +136,11 @@ public class BlockBaseOre extends BasicBlock implements ITexturedTileEntity {
return this.blockColour;
}
+ @Override
+ public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) {
+ return false;
+ }
+
}
}
diff --git a/src/Java/gtPlusPlus/core/item/ModItems.java b/src/Java/gtPlusPlus/core/item/ModItems.java
index 09b7dc3b21..3a4f4d5137 100644
--- a/src/Java/gtPlusPlus/core/item/ModItems.java
+++ b/src/Java/gtPlusPlus/core/item/ModItems.java
@@ -346,6 +346,27 @@ public final class ModItems {
try{
+
+ /**
+ * Try generate dusts for missing rare earth materials if they don't exist
+ */
+
+ if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustGadolinium", 1) == null){
+ ItemUtils.generateSpecialUseDusts("Gadolinium", "Gadolinium", Utils.rgbtoHexValue(Materials.Gadolinium.mRGBa[0], Materials.Gadolinium.mRGBa[1], Materials.Gadolinium.mRGBa[2]));
+ }
+ if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dystYtterbium", 1) == null){
+ ItemUtils.generateSpecialUseDusts("Ytterbium", "Ytterbium", Utils.rgbtoHexValue(Materials.Ytterbium.mRGBa[0], Materials.Ytterbium.mRGBa[1], Materials.Ytterbium.mRGBa[2]));
+ }
+ if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustSamarium", 1) == null){
+ ItemUtils.generateSpecialUseDusts("Samarium", "Samarium", Utils.rgbtoHexValue(Materials.Samarium.mRGBa[0], Materials.Samarium.mRGBa[1], Materials.Samarium.mRGBa[2]));
+ }
+ if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustLanthanum", 1) == null){
+ ItemUtils.generateSpecialUseDusts("Lanthanum", "Lanthanum", Utils.rgbtoHexValue(Materials.Lanthanum.mRGBa[0], Materials.Lanthanum.mRGBa[1], Materials.Lanthanum.mRGBa[2]));
+ }
+ /*if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("dustGadolinium", 1) == null){
+ ItemUtils.generateSpecialUseDusts("Gadolinium", "Gadolinium", Utils.rgbtoHexValue(Materials.Gadolinium.mRGBa[0], Materials.Gadolinium.mRGBa[1], Materials.Gadolinium.mRGBa[2]));
+ }*/
+
//Elements generate first so they can be used in compounds.
//Missing Elements
diff --git a/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockOre.java b/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockOre.java
index cb3455f0c5..8a72b4d629 100644
--- a/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockOre.java
+++ b/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockOre.java
@@ -45,6 +45,10 @@ public class ItemBlockOre extends ItemBlock{
@Override
public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) {
+ if (this.mThisMaterial != null){
+ list.add(this.mThisMaterial.vChemicalFormula);
+ }
+
//Radioactive?
if (this.mThisRadiation > 0){
list.add(CORE.GT_Tooltip_Radioactive);
@@ -64,8 +68,14 @@ public class ItemBlockOre extends ItemBlock{
@Override
public void onUpdate(final ItemStack iStack, final World world, final Entity entityHolding, final int p_77663_4_, final boolean p_77663_5_) {
- if (this.mThisRadiation > 0){
- EntityUtils.applyRadiationDamageToEntity(iStack.stackSize, this.mThisRadiation, world, entityHolding);
+ if (this.mThisMaterial != null){
+ if (this.mThisRadiation > 0){
+ if (entityHolding instanceof EntityPlayer){
+ if (!((EntityPlayer) entityHolding).capabilities.isCreativeMode){
+ EntityUtils.applyRadiationDamageToEntity(iStack.stackSize, this.mThisMaterial.vRadiationLevel, world, entityHolding);
+ }
+ }
+ }
}
}
diff --git a/src/Java/gtPlusPlus/core/material/ELEMENT.java b/src/Java/gtPlusPlus/core/material/ELEMENT.java
index eccd283da9..f98eb3552e 100644
--- a/src/Java/gtPlusPlus/core/material/ELEMENT.java
+++ b/src/Java/gtPlusPlus/core/material/ELEMENT.java
@@ -43,7 +43,7 @@ public final class ELEMENT {
public final Material MAGNESIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Magnesium);
public final Material ALUMINIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Aluminium);
public final Material SILICON = MaterialUtils.generateMaterialFromGtENUM(Materials.Silicon);
- public final Material PHOSPHORUS = MaterialUtils.generateMaterialFromGtENUM(Materials.Phosphorus);
+ public final Material PHOSPHORUS = MaterialUtils.generateMaterialFromGtENUM(Materials.Phosphor);
public final Material SULFUR = MaterialUtils.generateMaterialFromGtENUM(Materials.Sulfur);
public final Material CHLORINE = MaterialUtils.generateMaterialFromGtENUM(Materials.Chlorine);
public final Material ARGON = MaterialUtils.generateMaterialFromGtENUM(Materials.Argon);
diff --git a/src/Java/gtPlusPlus/core/material/Material.java b/src/Java/gtPlusPlus/core/material/Material.java
index 62fd0ebb80..3884920c96 100644
--- a/src/Java/gtPlusPlus/core/material/Material.java
+++ b/src/Java/gtPlusPlus/core/material/Material.java
@@ -481,7 +481,7 @@ public class Material {
*/
public final ItemStack getOre(final int stacksize){
- return ItemUtils.getItemStackOfAmountFromOreDictNoBroken("block"+this.unlocalizedName+"Ore", stacksize);
+ return ItemUtils.getItemStackOfAmountFromOreDictNoBroken("ore"+Utils.sanitizeString(this.getUnlocalizedName()), stacksize);
}
public final ItemStack getCrushed(final int stacksize){
return ItemUtils.getItemStackOfAmountFromOreDictNoBroken("crushed"+this.unlocalizedName, stacksize);
diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java
index a95e972139..a09a865743 100644
--- a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java
+++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java
@@ -903,6 +903,16 @@ public class RECIPES_GREGTECH {
chances,
30*20,
240);
+
+ GT_Values.RA.addChemicalBathRecipe(
+ FLUORIDES.FLUORITE.getCrushed(2),
+ FluidUtils.getFluidStack("hydrogen", 2000),
+ FLUORIDES.FLUORITE.getCrushedPurified(8),
+ FLUORIDES.FLUORITE.getDustImpure(4),
+ FLUORIDES.FLUORITE.getDustPurified(2),
+ new int[]{10000, 5000, 1000},
+ 30*20,
+ 240);
GT_Values.RA.addChemicalBathRecipe(
ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumCarbonate", 10),
@@ -1079,9 +1089,9 @@ public class RECIPES_GREGTECH {
GT_ModHandler.addPulverisationRecipe(
ItemUtils.getItemStackOfAmountFromOreDict("pelletZirconium", 1),
ItemUtils.getItemStackOfAmountFromOreDict("dustZrCl4", 1));
- GT_ModHandler.addPulverisationRecipe(
+ /*GT_ModHandler.addPulverisationRecipe(
FLUORIDES.FLUORITE.getOre(1),
- FLUORIDES.FLUORITE.getDust(4));
+ FLUORIDES.FLUORITE.getDust(4));*/
if (ItemUtils.simpleMetaStack("chisel:limestone", 0, 1) != null){
GT_ModHandler.addPulverisationRecipe(
diff --git a/src/Java/gtPlusPlus/core/util/entity/EntityUtils.java b/src/Java/gtPlusPlus/core/util/entity/EntityUtils.java
index 90b4b2b22c..79c643a95d 100644
--- a/src/Java/gtPlusPlus/core/util/entity/EntityUtils.java
+++ b/src/Java/gtPlusPlus/core/util/entity/EntityUtils.java
@@ -11,6 +11,7 @@ import ic2.core.IC2Potion;
import ic2.core.item.armor.ItemArmorHazmat;
import net.minecraft.block.Block;
import net.minecraft.entity.*;
+import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.DamageSource;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
@@ -58,18 +59,20 @@ public class EntityUtils {
if (!world.isRemote){
if ((radiationLevel > 0) && (entityHolding instanceof EntityLivingBase)) {
final EntityLivingBase entityLiving = (EntityLivingBase) entityHolding;
- if (!ItemArmorHazmat.hasCompleteHazmat(entityLiving) || !GT_Utility.isWearingFullRadioHazmat(entityLiving)) {
- int duration;
- if (entityLiving.getActivePotionEffect(IC2Potion.radiation) != null){
- //Utils.LOG_INFO("t");
- duration = (radiationLevel*5)+entityLiving.getActivePotionEffect(IC2Potion.radiation).getDuration();
+ if (!((EntityPlayer) entityHolding).capabilities.isCreativeMode){
+ if (!ItemArmorHazmat.hasCompleteHazmat(entityLiving) && !GT_Utility.isWearingFullRadioHazmat(entityLiving)) {
+ int duration;
+ if (entityLiving.getActivePotionEffect(IC2Potion.radiation) != null){
+ //Utils.LOG_INFO("t");
+ duration = (radiationLevel*5)+entityLiving.getActivePotionEffect(IC2Potion.radiation).getDuration();
+ }
+ else {
+ //Utils.LOG_INFO("f");
+ duration = radiationLevel*30;
+ }
+ //IC2Potion.radiation.applyTo(entityLiving, duration, damage * 15);
+ GT_Utility.applyRadioactivity(entityLiving, radiationLevel, stackSize);
}
- else {
- //Utils.LOG_INFO("f");
- duration = radiationLevel*30;
- }
- //IC2Potion.radiation.applyTo(entityLiving, duration, damage * 15);
- GT_Utility.applyRadioactivity(entityLiving, radiationLevel, stackSize);
}
}
return true;