aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gregtech')
-rw-r--r--src/main/java/gregtech/common/GT_Worldgen_Stone.java7
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Ores.java7
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Stones.java7
-rw-r--r--src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java8
4 files changed, 14 insertions, 15 deletions
diff --git a/src/main/java/gregtech/common/GT_Worldgen_Stone.java b/src/main/java/gregtech/common/GT_Worldgen_Stone.java
index 8654ac3f57..2febb35f1e 100644
--- a/src/main/java/gregtech/common/GT_Worldgen_Stone.java
+++ b/src/main/java/gregtech/common/GT_Worldgen_Stone.java
@@ -60,12 +60,13 @@ public class GT_Worldgen_Stone
if (tTargetedBlock instanceof GT_Block_Ores_Abstract) {
TileEntity tTileEntity = aWorld.getTileEntity(eX, eY, eZ);
if ((tTileEntity instanceof GT_TileEntity_Ores)) {
- if(tTargetedBlock != GregTech_API.sBlockOres1) {
- ((GT_TileEntity_Ores) tTileEntity).convertOreBlock(aWorld, ((GT_TileEntity_Ores) tTileEntity).mMetaData, eX, eY, eZ);
+ short aMeta = ((GT_TileEntity_Ores) tTileEntity).mMetaData;
+ if (tTargetedBlock != GregTech_API.sBlockOres1) {
+ ((GT_TileEntity_Ores) tTileEntity).convertOreBlock(aWorld, aMeta, eX, eY, eZ);
}
((GT_TileEntity_Ores)tTileEntity).overrideOreBlockMaterial(this.mBlock, (byte) this.mBlockMeta);
}
- } else if (((this.mAllowToGenerateinVoid) && (aWorld.getBlock(eX, eY, eZ).isAir(aWorld, eX, eY, eZ))) || ((tTargetedBlock != null) && ((tTargetedBlock.isReplaceableOreGen(aWorld, eX, eY, eZ, Blocks.stone)) || (tTargetedBlock.isReplaceableOreGen(aWorld, eX, eY, eZ, Blocks.end_stone)) || (tTargetedBlock.isReplaceableOreGen(aWorld, eX, eY, eZ, Blocks.netherrack))))) {
+ } else if (((this.mAllowToGenerateinVoid) && (aWorld.getBlock(eX, eY, eZ).isAir(aWorld, eX, eY, eZ))) || ((tTargetedBlock != null) && ((tTargetedBlock.isReplaceableOreGen(aWorld, eX, eY, eZ, Blocks.stone)) || (tTargetedBlock.isReplaceableOreGen(aWorld, eX, eY, eZ, Blocks.end_stone)) || (tTargetedBlock.isReplaceableOreGen(aWorld, eX, eY, eZ, Blocks.netherrack)) || (tTargetedBlock.isReplaceableOreGen(aWorld, eX, eY, eZ, GregTech_API.sBlockGranites)) || (tTargetedBlock.isReplaceableOreGen(aWorld, eX, eY, eZ, GregTech_API.sBlockStones))))) {
aWorld.setBlock(eX, eY, eZ, this.mBlock, this.mBlockMeta, 0);
}
}
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Ores.java b/src/main/java/gregtech/common/blocks/GT_Block_Ores.java
index 4b9211623c..ff8543bdd6 100644
--- a/src/main/java/gregtech/common/blocks/GT_Block_Ores.java
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Ores.java
@@ -41,7 +41,8 @@ public class GT_Block_Ores extends GT_Block_Ores_Abstract {
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (i + 18000) + ".name", "Small " + getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (i + 19000) + ".name", "Small " + getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (i + 20000) + ".name", "Small " + getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
-
+ GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (i + 21000) + ".name", "Small " + getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
+ GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (i + 22000) + ".name", "Small " + getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
if ((GregTech_API.sGeneratedMaterials[i].mTypes & 0x8) != 0) {
GT_OreDictUnificator.registerOre(OrePrefixes.ore.get(GregTech_API.sGeneratedMaterials[i]), new ItemStack(this, 1, i));
GT_OreDictUnificator.registerOre(OrePrefixes.oreNetherrack.get(GregTech_API.sGeneratedMaterials[i]), new ItemStack(this, 1, i + 1000));
@@ -62,6 +63,8 @@ public class GT_Block_Ores extends GT_Block_Ores_Abstract {
codechicken.nei.api.API.hideItem(new ItemStack(this, 1, i + 18000));
codechicken.nei.api.API.hideItem(new ItemStack(this, 1, i + 19000));
codechicken.nei.api.API.hideItem(new ItemStack(this, 1, i + 20000));
+ codechicken.nei.api.API.hideItem(new ItemStack(this, 1, i + 21000));
+ codechicken.nei.api.API.hideItem(new ItemStack(this, 1, i + 22000));
}
}
}
@@ -110,6 +113,8 @@ public class GT_Block_Ores extends GT_Block_Ores_Abstract {
aList.add(new ItemStack(aItem, 1, i + 18000));
aList.add(new ItemStack(aItem, 1, i + 19000));
aList.add(new ItemStack(aItem, 1, i + 20000));
+ aList.add(new ItemStack(aItem, 1, i + 21000));
+ aList.add(new ItemStack(aItem, 1, i + 22000));
}
}
}
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Stones.java b/src/main/java/gregtech/common/blocks/GT_Block_Stones.java
index 1db5ab9b4e..8da05da7b2 100644
--- a/src/main/java/gregtech/common/blocks/GT_Block_Stones.java
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Stones.java
@@ -4,12 +4,9 @@ import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
import gregtech.api.util.GT_LanguageManager;
import gregtech.api.util.GT_OreDictUnificator;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.boss.EntityWither;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
-import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
public class GT_Block_Stones extends GT_Block_Stones_Abstract {
@@ -64,8 +61,4 @@ public class GT_Block_Stones extends GT_Block_Stones_Abstract {
}
return gregtech.api.enums.Textures.BlockIcons.STONES[0].getIcon();
}
-
- public boolean canEntityDestroy(IBlockAccess world, int x, int y, int z, Entity entity) {
- return !(entity instanceof EntityWither);
- }
}
diff --git a/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java b/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java
index 99a8b3d924..e7566b6b70 100644
--- a/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java
+++ b/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java
@@ -126,7 +126,6 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit
}
public void overrideOreBlockMaterial(Block aOverridingStoneBlock, byte aOverridingStoneMeta) {
- if (this.mMetaData < 3000) { //Avoid existing "stone" vein having it's ore meta changed if a new vein is generated around it.
this.mMetaData = ((short) (int) (this.mMetaData % 1000L + this.mMetaData / 16000L * 16000L));
if (aOverridingStoneBlock.isReplaceableOreGen(this.worldObj, this.xCoord, this.yCoord, this.zCoord, Blocks.netherrack)) {
this.mMetaData = ((short) (this.mMetaData + 1000));
@@ -149,18 +148,19 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit
} else {
this.mMetaData = ((short) (this.mMetaData + 6000));
}
+ } else {
+ this.mMetaData = ((short) (this.mMetaData + 5000));
}
}
this.worldObj.setBlockMetadataWithNotify(this.xCoord, this.yCoord, this.zCoord, getHarvestData(this.mMetaData), 0);
- }
}
public void convertOreBlock(World aWorld, short aMeta, int aX, int aY, int aZ) {
aWorld.setBlock(aX, aY, aZ, GregTech_API.sBlockOres1);
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
if (tTileEntity instanceof GT_TileEntity_Ores) {
- ((GT_TileEntity_Ores) tTileEntity).mMetaData = aMeta;
- this.worldObj.setBlockMetadataWithNotify(this.xCoord, this.yCoord, this.zCoord, getHarvestData(this.mMetaData), 0);
+ ((GT_TileEntity_Ores) tTileEntity).mMetaData = (short)(aMeta % 1000);
+ this.worldObj.setBlockMetadataWithNotify(this.xCoord, this.yCoord, this.zCoord, getHarvestData((short)(aMeta % 1000)), 0);
}
}