aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/block/machine
diff options
context:
space:
mode:
authorAlkalus <draknyte1@hotmail.com>2017-09-28 12:52:31 +1000
committerAlkalus <draknyte1@hotmail.com>2017-09-28 12:52:31 +1000
commit19749c79884682301e292b52d0ddb15e6d35a580 (patch)
treed34cc6f5ffe3aebb2354761ca9a9e2a53b853b38 /src/Java/gtPlusPlus/core/block/machine
parent4ab32e96512efaccb63fc2024e44dbc675afc5f0 (diff)
downloadGT5-Unofficial-19749c79884682301e292b52d0ddb15e6d35a580.tar.gz
GT5-Unofficial-19749c79884682301e292b52d0ddb15e6d35a580.tar.bz2
GT5-Unofficial-19749c79884682301e292b52d0ddb15e6d35a580.zip
+ Added Base Tile Entity Class.
% Changed Trade Table to inherit from the base class. + Added functionality to the base TE to store the owners name and UUID. + Added Base NBT Block Class. $ Fixed ItemBlockNBT handling of NBT.
Diffstat (limited to 'src/Java/gtPlusPlus/core/block/machine')
-rw-r--r--src/Java/gtPlusPlus/core/block/machine/Machine_TradeTable.java28
1 files changed, 5 insertions, 23 deletions
diff --git a/src/Java/gtPlusPlus/core/block/machine/Machine_TradeTable.java b/src/Java/gtPlusPlus/core/block/machine/Machine_TradeTable.java
index a5ba90013d..540ba61837 100644
--- a/src/Java/gtPlusPlus/core/block/machine/Machine_TradeTable.java
+++ b/src/Java/gtPlusPlus/core/block/machine/Machine_TradeTable.java
@@ -5,6 +5,7 @@ import cpw.mods.fml.common.registry.LanguageRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gtPlusPlus.GTplusplus;
+import gtPlusPlus.core.block.base.BlockBaseNBT;
import gtPlusPlus.core.creative.AddToCreativeTab;
import gtPlusPlus.core.item.base.itemblock.ItemBlockNBT;
import gtPlusPlus.core.lib.CORE;
@@ -18,7 +19,7 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
-public class Machine_TradeTable extends BlockContainer
+public class Machine_TradeTable extends BlockBaseNBT
{
@SideOnly(Side.CLIENT)
private IIcon textureTop;
@@ -27,31 +28,13 @@ public class Machine_TradeTable extends BlockContainer
@SideOnly(Side.CLIENT)
private IIcon textureFront;
- @SuppressWarnings("deprecation")
- public Machine_TradeTable()
- {
- super(Material.leaves);
- this.setBlockName("blockTradeBench");
- this.setCreativeTab(AddToCreativeTab.tabMachines);
- GameRegistry.registerBlock(this, ItemBlockNBT.class, "blockTradeBench");
- LanguageRegistry.addName(this, "Trade-o-Mat");
-
- }
-
- /**
- * Gets the block's texture. Args: side, meta
- */
- @Override
- @SideOnly(Side.CLIENT)
- public IIcon getIcon(final int p_149691_1_, final int p_149691_2_)
- {
- return p_149691_1_ == 1 ? this.textureTop : (p_149691_1_ == 0 ? this.textureBottom : ((p_149691_1_ != 2) && (p_149691_1_ != 4) ? this.blockIcon : this.textureFront));
+ public Machine_TradeTable(){
+ super(Material.leaves, "blockTradeBench", "Trade-o-Mat");
}
@Override
@SideOnly(Side.CLIENT)
- public void registerBlockIcons(final IIconRegister p_149651_1_)
- {
+ public void registerBlockIcons(final IIconRegister p_149651_1_){
this.blockIcon = p_149651_1_.registerIcon(CORE.MODID + ":" + "SwirlYellow");
this.textureTop = p_149651_1_.registerIcon(CORE.MODID + ":" + "workbench_top");
this.textureBottom = p_149651_1_.registerIcon(CORE.MODID + ":" + "SwirlYellow");
@@ -63,7 +46,6 @@ public class Machine_TradeTable 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){
-
if (world.isRemote) {
return true;
}