aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/block
diff options
context:
space:
mode:
authorAlkalus <3060479+draknyte1@users.noreply.github.com>2019-01-13 12:43:44 +0000
committerAlkalus <3060479+draknyte1@users.noreply.github.com>2019-01-13 12:43:44 +0000
commit05efaa691d2ebe9fd4811444dbf6f0de1ca142b6 (patch)
treef73e13eacabcd4f6d2ea851ea7bf078d70ce3c1a /src/Java/gtPlusPlus/core/block
parentf2638119215ec2c6a507087f0399d8c8cd193647 (diff)
downloadGT5-Unofficial-05efaa691d2ebe9fd4811444dbf6f0de1ca142b6.tar.gz
GT5-Unofficial-05efaa691d2ebe9fd4811444dbf6f0de1ca142b6.tar.bz2
GT5-Unofficial-05efaa691d2ebe9fd4811444dbf6f0de1ca142b6.zip
+ Added Xp conversion brewing recipes.
- Made Xp Convertor redundant. $ Hopefully fixed ExtraUtils complaining about rendering. $ Additional 5.08 support. $ Possibly fixed recipes for some items which don't display in NEI correctly.
Diffstat (limited to 'src/Java/gtPlusPlus/core/block')
-rw-r--r--src/Java/gtPlusPlus/core/block/general/BlockTankXpConverter.java36
-rw-r--r--src/Java/gtPlusPlus/core/block/machine/DecayablesChest.java133
2 files changed, 83 insertions, 86 deletions
diff --git a/src/Java/gtPlusPlus/core/block/general/BlockTankXpConverter.java b/src/Java/gtPlusPlus/core/block/general/BlockTankXpConverter.java
index 215c79ed10..f7f0b446ce 100644
--- a/src/Java/gtPlusPlus/core/block/general/BlockTankXpConverter.java
+++ b/src/Java/gtPlusPlus/core/block/general/BlockTankXpConverter.java
@@ -1,37 +1,24 @@
package gtPlusPlus.core.block.general;
-import java.util.HashMap;
-import java.util.Map;
import java.util.Random;
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.item.base.itemblock.ItemBlockEntityBase;
+import gtPlusPlus.core.lib.CORE;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.EnumCreatureType;
import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
-import gregtech.common.items.GT_MetaGenerated_Tool_01;
-
-import gtPlusPlus.api.objects.data.Triplet;
-import gtPlusPlus.core.creative.AddToCreativeTab;
-import gtPlusPlus.core.item.base.itemblock.ItemBlockEntityBase;
-import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.tileentities.general.TileEntityXpConverter;
-import gtPlusPlus.core.util.Utils;
-import gtPlusPlus.core.util.minecraft.EnchantingUtils;
-import gtPlusPlus.core.util.minecraft.PlayerUtils;
-
public class BlockTankXpConverter extends BlockContainer {
@SideOnly(Side.CLIENT)
@@ -41,10 +28,6 @@ public class BlockTankXpConverter extends BlockContainer {
@SideOnly(Side.CLIENT)
private IIcon textureFront;
- private int mRainbowTick = 0;
- private int mRainbowTickMax = 0;
- private final Map<Integer, Triplet<Integer, Integer, Integer>> mRainbowMap = new HashMap<Integer, Triplet<Integer, Integer, Integer>>();
-
@SuppressWarnings("deprecation")
public BlockTankXpConverter() {
super(Material.iron);
@@ -84,6 +67,10 @@ public class BlockTankXpConverter extends BlockContainer {
@Override
public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer player,
final int side, final float lx, final float ly, final float lz) {
+
+ return true;
+
+ /*
if (world.isRemote) {
return true;
}
@@ -136,7 +123,7 @@ public class BlockTankXpConverter extends BlockContainer {
}
}
return true;
- }
+ */}
@Override
public int getRenderBlockPass() {
@@ -150,7 +137,8 @@ public class BlockTankXpConverter extends BlockContainer {
@Override
public TileEntity createNewTileEntity(final World world, final int p_149915_2_) {
- return new TileEntityXpConverter();
+ //return new TileEntityXpConverter();
+ return null;
}
@Override
@@ -198,7 +186,7 @@ public class BlockTankXpConverter extends BlockContainer {
@Override
public int getLightValue() {
- return 6;
- }
+ return 6;
+ }
}
diff --git a/src/Java/gtPlusPlus/core/block/machine/DecayablesChest.java b/src/Java/gtPlusPlus/core/block/machine/DecayablesChest.java
index 90b005afbd..efd6f88885 100644
--- a/src/Java/gtPlusPlus/core/block/machine/DecayablesChest.java
+++ b/src/Java/gtPlusPlus/core/block/machine/DecayablesChest.java
@@ -6,6 +6,7 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gtPlusPlus.GTplusplus;
import gtPlusPlus.api.interfaces.ITileTooltip;
+import gtPlusPlus.core.client.renderer.RenderDecayChest;
import gtPlusPlus.core.creative.AddToCreativeTab;
import gtPlusPlus.core.handler.GuiHandler;
import gtPlusPlus.core.item.base.itemblock.ItemBlockBasicTile;
@@ -38,7 +39,7 @@ public class DecayablesChest extends BlockContainer implements ITileTooltip
* Determines which tooltip is displayed within the itemblock.
*/
private final int mTooltipID = 5;
- public final int field_149956_a = 0;
+ public final int field_149956_a = 0;
@Override
public int getTooltipID() {
@@ -53,62 +54,70 @@ public class DecayablesChest extends BlockContainer implements ITileTooltip
this.setCreativeTab(AddToCreativeTab.tabMachines);
GameRegistry.registerBlock(this, ItemBlockBasicTile.class, "blockDecayablesChest");
LanguageRegistry.addName(this, "Lead Lined Box");
- this.setBlockBounds(0.0625F, 0.0F, 0.0625F, 0.9375F, 0.875F, 0.9375F);
-
- }
-
- /**
- * Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two
- * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
- */
- public boolean isOpaqueCube()
- {
- return false;
- }
-
- /**
- * If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
- */
- public boolean renderAsNormalBlock()
- {
- return false;
- }
-
- /**
- * The type of render function that is called for this block
- */
- public int getRenderType()
- {
- return gtPlusPlus.core.client.renderer.RenderDecayChest.INSTANCE.mRenderID;
- }
-
- /**
- * Updates the blocks bounds based on its current state. Args: world, x, y, z
- */
- public void setBlockBoundsBasedOnState(IBlockAccess p_149719_1_, int p_149719_2_, int p_149719_3_, int p_149719_4_)
- {
- if (p_149719_1_.getBlock(p_149719_2_, p_149719_3_, p_149719_4_ - 1) == this)
- {
- this.setBlockBounds(0.0625F, 0.0F, 0.0F, 0.9375F, 0.875F, 0.9375F);
- }
- else if (p_149719_1_.getBlock(p_149719_2_, p_149719_3_, p_149719_4_ + 1) == this)
- {
- this.setBlockBounds(0.0625F, 0.0F, 0.0625F, 0.9375F, 0.875F, 1.0F);
- }
- else if (p_149719_1_.getBlock(p_149719_2_ - 1, p_149719_3_, p_149719_4_) == this)
- {
- this.setBlockBounds(0.0F, 0.0F, 0.0625F, 0.9375F, 0.875F, 0.9375F);
- }
- else if (p_149719_1_.getBlock(p_149719_2_ + 1, p_149719_3_, p_149719_4_) == this)
- {
- this.setBlockBounds(0.0625F, 0.0F, 0.0625F, 1.0F, 0.875F, 0.9375F);
- }
- else
- {
- this.setBlockBounds(0.0625F, 0.0F, 0.0625F, 0.9375F, 0.875F, 0.9375F);
- }
- }
-
+ this.setBlockBounds(0.0625F, 0.0F, 0.0625F, 0.9375F, 0.875F, 0.9375F);
+
+ }
+
+ /**
+ * Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two
+ * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
+ */
+ public boolean isOpaqueCube()
+ {
+ return false;
+ }
+
+ /**
+ * If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
+ */
+ public boolean renderAsNormalBlock()
+ {
+ return false;
+ }
+
+ /**
+ * The type of render function that is called for this block
+ */
+ @SideOnly(Side.CLIENT)
+ public int getRenderType(){
+ try {
+ if (RenderDecayChest.INSTANCE != null){
+ return RenderDecayChest.INSTANCE.mRenderID;
+ }
+ return super.getRenderType();
+ }
+ catch (NullPointerException n) {
+ return 0;
+ }
+ }
+
+ /**
+ * Updates the blocks bounds based on its current state. Args: world, x, y, z
+ */
+ public void setBlockBoundsBasedOnState(IBlockAccess p_149719_1_, int p_149719_2_, int p_149719_3_, int p_149719_4_)
+ {
+ if (p_149719_1_.getBlock(p_149719_2_, p_149719_3_, p_149719_4_ - 1) == this)
+ {
+ this.setBlockBounds(0.0625F, 0.0F, 0.0F, 0.9375F, 0.875F, 0.9375F);
+ }
+ else if (p_149719_1_.getBlock(p_149719_2_, p_149719_3_, p_149719_4_ + 1) == this)
+ {
+ this.setBlockBounds(0.0625F, 0.0F, 0.0625F, 0.9375F, 0.875F, 1.0F);
+ }
+ else if (p_149719_1_.getBlock(p_149719_2_ - 1, p_149719_3_, p_149719_4_) == this)
+ {
+ this.setBlockBounds(0.0F, 0.0F, 0.0625F, 0.9375F, 0.875F, 0.9375F);
+ }
+ else if (p_149719_1_.getBlock(p_149719_2_ + 1, p_149719_3_, p_149719_4_) == this)
+ {
+ this.setBlockBounds(0.0625F, 0.0F, 0.0625F, 1.0F, 0.875F, 0.9375F);
+ }
+ else
+ {
+ this.setBlockBounds(0.0625F, 0.0F, 0.0625F, 0.9375F, 0.875F, 0.9375F);
+ }
+ }
+
/**
* Gets the block's texture. Args: side, meta
@@ -204,9 +213,9 @@ public class DecayablesChest extends BlockContainer implements ITileTooltip
* @param zPos
*/
@Deprecated
- public void func_149954_e(World aWorld, int xPos, int yPos, int zPos)
- {
-
- }
-
+ public void func_149954_e(World aWorld, int xPos, int yPos, int zPos)
+ {
+
+ }
+
} \ No newline at end of file