Made battlesigns have editable text

This commit is contained in:
Arthur Uzulin committed 2014-09-12 23:59:13 +10:00
1 parent fc0d73dbf6
commit 3d028e7123
20 files changed
+545 -205

No files matched your search

@@ -1,8 +1,10 @@
package tconstruct.tools.blocks;
import cpw.mods.fml.relauncher.*;
import java.util.List;
import net.minecraft.block.material.Material;
import net.minecraft.entity.*;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.*;
@@ -17,7 +19,7 @@ public class BattlesignBlock extends EquipBlock
{
super(material);
this.setBlockBounds(0.45F, 0F, 0.45F, 0.55F, 1F, 0.55F);
this.setBlockBounds(0.45F, 0F, 0.45F, 0.55F, 1.125F, 0.55F);
}
@Override
@@ -26,6 +28,13 @@ public class BattlesignBlock extends EquipBlock
return BattlesignRender.battlesignModelID;
}
@SideOnly(Side.CLIENT)
@Override
public boolean shouldSideBeRendered (IBlockAccess p_149646_1_, int p_149646_2_, int p_149646_3_, int p_149646_4_, int p_149646_5_)
{
return p_149646_5_ == 0 && this.minY > 0.0D ? true : (p_149646_5_ == 1 && this.maxY < 1.0D ? true : (p_149646_5_ == 2 && this.minZ > 0.0D ? true : (p_149646_5_ == 3 && this.maxZ < 1.0D ? true : (p_149646_5_ == 4 && this.minX > 0.0D ? true : (p_149646_5_ == 5 && this.maxX < 1.0D ? true : !(p_149646_1_.getBlock(p_149646_2_, p_149646_3_, p_149646_4_).isOpaqueCube() && p_149646_1_.getBlock(p_149646_2_, p_149646_3_ + 1, p_149646_4_).isOpaqueCube()))))));
}
@Override
public TileEntity createNewTileEntity (World world, int metadata)
{
@@ -84,7 +93,7 @@ public class BattlesignBlock extends EquipBlock
setBlockBoundsBasedOnState(world, x, y, z);
super.addCollisionBoxesToList(world, x, y, z, aabb, list, entity);
setBlockBounds(0.45F, 0F, 0.45F, 0.55F, 1F, 0.55F);
setBlockBounds(0.45F, 0F, 0.45F, 0.55F, 1.125F, 0.55F);
super.addCollisionBoxesToList(world, x, y, z, aabb, list, entity);
this.setBlockBoundsForItemRender();
@@ -96,4 +105,10 @@ public class BattlesignBlock extends EquipBlock
return new BattlesignLogic();
}
@Override
public Integer getGui (World world, int x, int y, int z, EntityPlayer entityplayer)
{
return null;
}
}