aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core
diff options
context:
space:
mode:
authorAlkalus <draknyte1@hotmail.com>2017-11-20 16:48:02 +1000
committerAlkalus <draknyte1@hotmail.com>2017-11-20 16:48:02 +1000
commitfd15ae499c11112c282a93c6cf342bc88698e8ac (patch)
treec93ac973d4923f8359dc97ca4d777f8712524329 /src/Java/gtPlusPlus/core
parent04344136279524749cc07dc979c18baee6a72e4d (diff)
downloadGT5-Unofficial-fd15ae499c11112c282a93c6cf342bc88698e8ac.tar.gz
GT5-Unofficial-fd15ae499c11112c282a93c6cf342bc88698e8ac.tar.bz2
GT5-Unofficial-fd15ae499c11112c282a93c6cf342bc88698e8ac.zip
+ Added a faster TC Alchemical Furnace.
+ Added a Wither-Proof block. % Tweaked Grindle GUI.
Diffstat (limited to 'src/Java/gtPlusPlus/core')
-rw-r--r--src/Java/gtPlusPlus/core/block/ModBlocks.java4
-rw-r--r--src/Java/gtPlusPlus/core/block/general/antigrief/BlockWitherProof.java104
-rw-r--r--src/Java/gtPlusPlus/core/gui/item/GuiBaseGrindle.java7
-rw-r--r--src/Java/gtPlusPlus/core/handler/COMPAT_IntermodStaging.java4
4 files changed, 115 insertions, 4 deletions
diff --git a/src/Java/gtPlusPlus/core/block/ModBlocks.java b/src/Java/gtPlusPlus/core/block/ModBlocks.java
index a469acfc49..6ebb21bb9c 100644
--- a/src/Java/gtPlusPlus/core/block/ModBlocks.java
+++ b/src/Java/gtPlusPlus/core/block/ModBlocks.java
@@ -4,6 +4,7 @@ import cpw.mods.fml.common.registry.GameRegistry;
import gtPlusPlus.core.block.base.BasicBlock.BlockTypes;
import gtPlusPlus.core.block.base.BlockBaseOre;
import gtPlusPlus.core.block.general.*;
+import gtPlusPlus.core.block.general.antigrief.BlockWitherProof;
import gtPlusPlus.core.block.machine.*;
import gtPlusPlus.core.fluids.FluidRegistryHandler;
import gtPlusPlus.core.lib.CORE;
@@ -45,6 +46,8 @@ public final class ModBlocks {
public static Block blockProjectTable;
public static Block blockTradeTable;
public static Block blockModularTable;
+
+ public static Block blockWitherGuard;
public static void init() {
Utils.LOG_INFO("Initializing Blocks.");
@@ -74,6 +77,7 @@ public final class ModBlocks {
blockProjectTable = new Machine_ProjectTable();
blockTradeTable = new Machine_TradeTable();
blockModularTable = new Machine_ModularityTable();
+ blockWitherGuard = new BlockWitherProof();
}
diff --git a/src/Java/gtPlusPlus/core/block/general/antigrief/BlockWitherProof.java b/src/Java/gtPlusPlus/core/block/general/antigrief/BlockWitherProof.java
new file mode 100644
index 0000000000..297bcb3061
--- /dev/null
+++ b/src/Java/gtPlusPlus/core/block/general/antigrief/BlockWitherProof.java
@@ -0,0 +1,104 @@
+package gtPlusPlus.core.block.general.antigrief;
+
+import cpw.mods.fml.common.registry.GameRegistry;
+import cpw.mods.fml.common.registry.LanguageRegistry;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import gtPlusPlus.core.creative.AddToCreativeTab;
+import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.core.util.math.MathUtils;
+import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.boss.EntityDragon;
+import net.minecraft.entity.boss.EntityWither;
+import net.minecraft.entity.boss.IBossDisplayData;
+import net.minecraft.world.Explosion;
+import net.minecraft.world.IBlockAccess;
+import net.minecraft.world.World;
+
+public class BlockWitherProof extends Block{
+
+ public BlockWitherProof(){
+ super(Material.redstoneLight);
+ this.setBlockName(Utils.sanitizeString("blockBlackGate"));
+ this.setBlockTextureName(CORE.MODID + ":" + "blockFrameGt");
+ this.setCreativeTab(AddToCreativeTab.tabBlock);
+ this.setHardness(-1F);
+ this.setResistance(5000.0F);
+ this.setHarvestLevel("pickaxe", 3);
+ this.setStepSound(soundTypeMetal);
+ LanguageRegistry.addName(this, "Wither Cage");
+ GameRegistry.registerBlock(this, Utils.sanitizeString("blockBlackGate"));
+
+ }
+
+ public String GetProperName(){
+ return "Wither Cage";
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public int getRenderBlockPass(){
+ return 1;
+ }
+
+ @Override
+ public boolean isOpaqueCube(){
+ return false;
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void registerBlockIcons(final IIconRegister iIcon){
+ this.blockIcon = iIcon.registerIcon(CORE.MODID + ":" + "blockFrameGt");
+ }
+
+ public void onBlockExploded(World world, int x, int y, int z, Explosion explosion){
+ //prevent from being destroyed by wither and nukes.
+ }
+
+ @Override
+ public void onBlockDestroyedByExplosion(World p_149723_1_, int p_149723_2_,
+ int p_149723_3_, int p_149723_4_, Explosion p_149723_5_) {
+
+ }
+
+ @Override
+ public boolean canDropFromExplosion(Explosion p_149659_1_) {
+ return false;
+ }
+
+ @Override
+ public boolean canEntityDestroy(IBlockAccess world, int x, int y, int z,
+ Entity entity) {
+ if (entity == null || !entity.isEntityAlive()){
+ return false;
+ }
+ if (entity instanceof EntityWither || entity instanceof EntityDragon || entity instanceof IBossDisplayData){
+ return false;
+ }
+ else {
+ return super.canEntityDestroy(world, x, y, z, entity);
+ }
+ }
+
+
+ //Colour Handling
+ private static final int mWitherColour = Utils.rgbtoHexValue(32, 32, 32);
+
+ @Override
+ public int colorMultiplier(final IBlockAccess par1IBlockAccess, final int par2, final int par3, final int par4){
+ return mWitherColour;
+ }
+
+ @Override
+ public int getRenderColor(final int aMeta) {
+ return mWitherColour;
+ }
+
+
+
+}
diff --git a/src/Java/gtPlusPlus/core/gui/item/GuiBaseGrindle.java b/src/Java/gtPlusPlus/core/gui/item/GuiBaseGrindle.java
index 798b74b48f..c7c14e9103 100644
--- a/src/Java/gtPlusPlus/core/gui/item/GuiBaseGrindle.java
+++ b/src/Java/gtPlusPlus/core/gui/item/GuiBaseGrindle.java
@@ -59,9 +59,9 @@ public class GuiBaseGrindle extends GuiContainer {
if (this.inventory.getStackInSlot(0) != null){
this.fontRendererObj.drawString(I18n.format(""+NBTUtils.getBookTitle(this.inventory.getStackInSlot(0)), new Object[0]), 10, 8, Utils.rgbtoHexValue(125, 255, 125));
- if (!NBTUtils.tryIterateNBTData(this.inventory.getStackInSlot(0))){
- this.fontRendererObj.drawString(I18n.format("Very Bad prospection data.", new Object[0]), 10, 38, Utils.rgbtoHexValue(255, 125, 125));
- }
+ //if (!NBTUtils.tryIterateNBTData(this.inventory.getStackInSlot(0))){
+ // this.fontRendererObj.drawString(I18n.format("Very Bad prospection data.", new Object[0]), 10, 38, Utils.rgbtoHexValue(255, 125, 125));
+ //}
NBTTagCompound tNBT = ItemNBT.getNBT(this.inventory.getStackInSlot(0));
byte tTier = tNBT.getByte("prospection_tier");
@@ -94,7 +94,6 @@ public class GuiBaseGrindle extends GuiContainer {
this.fontRendererObj.drawString(I18n.format(mOreTypes[i], new Object[0]), 10, 68+((i-6)*8), Utils.rgbtoHexValue(125, 255, 125));
}
}
- Utils.LOG_INFO("test - "+tOres);
tNBTList.appendTag(new NBTTagString("Prospection Data From: X" + tDataArray[0] + " Z:" + tDataArray[2] + " Dim:" + tDataArray[3] + " Produces " + tDataArray[4] + "L " + tDataArray[5] + " " + tOres));
tNBT.setTag("pages", tNBTList);
diff --git a/src/Java/gtPlusPlus/core/handler/COMPAT_IntermodStaging.java b/src/Java/gtPlusPlus/core/handler/COMPAT_IntermodStaging.java
index fe46e2befa..1bf729cdc6 100644
--- a/src/Java/gtPlusPlus/core/handler/COMPAT_IntermodStaging.java
+++ b/src/Java/gtPlusPlus/core/handler/COMPAT_IntermodStaging.java
@@ -7,6 +7,7 @@ import gtPlusPlus.xmod.gregtech.HANDLER_GT;
import gtPlusPlus.xmod.growthcraft.HANDLER_GC;
import gtPlusPlus.xmod.ic2.HANDLER_IC2;
import gtPlusPlus.xmod.mekanism.HANDLER_Mekanism;
+import gtPlusPlus.xmod.thaumcraft.common.HANDLER_Thaumcraft;
import gtPlusPlus.xmod.thermalfoundation.HANDLER_TF;
public class COMPAT_IntermodStaging {
@@ -20,6 +21,7 @@ public class COMPAT_IntermodStaging {
HANDLER_Computronics.preInit();
HANDLER_BiomesOPlenty.preInit();
HANDLER_Mekanism.preInit();
+ HANDLER_Thaumcraft.preInit();
}
@@ -32,6 +34,7 @@ public class COMPAT_IntermodStaging {
HANDLER_Computronics.init();
HANDLER_BiomesOPlenty.init();
HANDLER_Mekanism.init();
+ HANDLER_Thaumcraft.init();
}
public static void postInit(){
@@ -43,6 +46,7 @@ public class COMPAT_IntermodStaging {
HANDLER_Computronics.postInit();
HANDLER_BiomesOPlenty.postInit();
HANDLER_Mekanism.postInit();
+ HANDLER_Thaumcraft.postInit();
}