aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/block
diff options
context:
space:
mode:
authorAlkalus <3060479+draknyte1@users.noreply.github.com>2018-10-29 05:09:01 +0000
committerAlkalus <3060479+draknyte1@users.noreply.github.com>2018-10-29 05:09:01 +0000
commit6205a2088bbbc31a09d0a2a3d460add1a7622801 (patch)
tree497380cea05b2a394fe303e8fcc2d688bed6f6d1 /src/Java/gtPlusPlus/core/block
parent7f2c38ccc6fb2734ac6655b9dd7003c4b6dee4a3 (diff)
downloadGT5-Unofficial-6205a2088bbbc31a09d0a2a3d460add1a7622801.tar.gz
GT5-Unofficial-6205a2088bbbc31a09d0a2a3d460add1a7622801.tar.bz2
GT5-Unofficial-6205a2088bbbc31a09d0a2a3d460add1a7622801.zip
+ Added recipe for heating Titanium Ingots, required for Krypton processing.
+ Added custom GT TextureSets. $ Lots of small fixes to Material, Material Generation & Recipe Generation. $ Lots of small fixes to Fluids, Fluid Generation and Fluid Cell Generation. $ Fixed Creative Tabs. $ Possibly fixed issue where tickable items would instantly tick to 0. $ Fixed display names of Throwable Potions. $ Fixed NPE in removeCrudeTurbineRotors(). % Adjusted lots of textures. % Adjusted handling of Thermal Foundation Fluids. % Moved Furnace/EBF and Maceration recipes out of BaseItemDust.java. % Made Tooltips of GT++ Material Blocks, Frames and ores more informational. % Made Bromine a Fluid Material, this will remove all Bromine solid material items from the world. (Ingots, Blocks, etc.) % Increased cost of GT++ Ores in processing. - Broke lots of recipes. > EBF/ABS & All Table Crafting. TBA~
Diffstat (limited to 'src/Java/gtPlusPlus/core/block')
-rw-r--r--src/Java/gtPlusPlus/core/block/base/BlockBaseModular.java39
-rw-r--r--src/Java/gtPlusPlus/core/block/base/BlockBaseOre.java2
2 files changed, 28 insertions, 13 deletions
diff --git a/src/Java/gtPlusPlus/core/block/base/BlockBaseModular.java b/src/Java/gtPlusPlus/core/block/base/BlockBaseModular.java
index 101e568188..634dc4c022 100644
--- a/src/Java/gtPlusPlus/core/block/base/BlockBaseModular.java
+++ b/src/Java/gtPlusPlus/core/block/base/BlockBaseModular.java
@@ -6,7 +6,7 @@ import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.world.IBlockAccess;
-
+import gregtech.api.enums.TextureSet;
import gregtech.api.util.GT_OreDictUnificator;
import gtPlusPlus.core.item.base.itemblock.ItemBlockGtBlock;
@@ -26,17 +26,17 @@ public class BlockBaseModular extends BasicBlock {
protected String thisBlockMaterial;
protected final String thisBlockType;
+ public BlockBaseModular(final Material material, final BlockTypes blockType) {
+ this(material, blockType, material.getRgbAsHex());
+ }
+
public BlockBaseModular(final Material material, final BlockTypes blockType, final int colour) {
this(material.getUnlocalizedName(), material.getLocalizedName(), net.minecraft.block.material.Material.iron,
- blockType, colour, 2);
- }
-
- public BlockBaseModular(final String unlocalizedName, final String blockMaterial, final BlockTypes blockType,
- final int colour) {
- this(unlocalizedName, blockMaterial, net.minecraft.block.material.Material.iron, blockType, colour, 2);
+ blockType, colour, Math.min(Math.max(material.vTier, 1), 5));
+ blockMaterial = material;
}
- public BlockBaseModular(final String unlocalizedName, final String blockMaterial,
+ protected BlockBaseModular(final String unlocalizedName, final String blockMaterial,
final net.minecraft.block.material.Material vanillaMaterial, final BlockTypes blockType, final int colour,
final int miningLevel) {
super(unlocalizedName, vanillaMaterial);
@@ -57,7 +57,7 @@ public class BlockBaseModular extends BasicBlock {
ItemUtils.getSimpleStack(this));
}
else if (this.thisBlockType.equals(BlockTypes.FRAME.name().toUpperCase())) {
- GameRegistry.registerBlock(this, ItemBlockGtFrameBox.class,
+ GameRegistry.registerBlock(this, ItemBlockGtBlock.class,
Utils.sanitizeString(blockType.getTexture() + unlocalizedName));
GT_OreDictUnificator.registerOre(
"frameGt" + getUnlocalizedName().replace("tile.", "").replace("tile.BlockGtFrame", "")
@@ -111,12 +111,27 @@ public class BlockBaseModular extends BasicBlock {
return false;
}
+ public Material getMaterialEx(){
+ return this.blockMaterial;
+ }
+
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(final IIconRegister iIcon) {
- if (this.thisBlock != BlockTypes.ORE) {
- this.blockIcon = iIcon.registerIcon(CORE.MODID + ":" + this.thisBlock.getTexture());
- }
+ if (!CORE.ConfigSwitches.useGregtechTextures || this.blockMaterial == null || this.thisBlock == BlockTypes.ORE){
+ this.blockIcon = iIcon.registerIcon(CORE.MODID + ":" + this.thisBlock.getTexture());
+ }
+ String metType = "9j4852jyo3rjmh3owlhw9oe";
+ if (this.blockMaterial != null) {
+ TextureSet u = this.blockMaterial.getTextureSet();
+ if (u != null) {
+ metType = u.mSetName;
+ }
+ }
+ metType = (metType.equals("9j4852jyo3rjmh3owlhw9oe") ? "METALLIC" : metType);
+ int tier = this.blockMaterial.vTier;
+ String aType = (this.thisBlock == BlockTypes.FRAME) ? "frameGt" : (tier < 3 ? "block1" : tier < 6 ? "block6" : "block5");
+ this.blockIcon = iIcon.registerIcon("gregtech" + ":" + "materialicons/"+ "METALLIC" +"/" + aType);
}
@Override
diff --git a/src/Java/gtPlusPlus/core/block/base/BlockBaseOre.java b/src/Java/gtPlusPlus/core/block/base/BlockBaseOre.java
index ab1fd5e08a..526f2b245c 100644
--- a/src/Java/gtPlusPlus/core/block/base/BlockBaseOre.java
+++ b/src/Java/gtPlusPlus/core/block/base/BlockBaseOre.java
@@ -35,7 +35,7 @@ public class BlockBaseOre extends BasicBlock implements ITexturedBlock {
this.setHardness(2.0f);
this.setResistance(6.0F);
this.setLightLevel(0.0F);
- this.setHarvestLevel("pickaxe", 3);
+ this.setHarvestLevel("pickaxe", Math.min(Math.max(material.vTier, 1), 5));
this.setStepSound(soundTypeStone);
this.setBlockName("Ore"+Utils.sanitizeString(Utils.sanitizeString(material.getUnlocalizedName())));
this.setBlockTextureName("stone");