mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-21 04:32:26 +00:00
Fix JABBA-related issues with crafting station slots (#54)
* Fix shift-merging tools voiding items fixes <https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues/11392> * Change 0-sized ItemStacks into null stacks in crafting station attached slots Fixes <https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues/10425> * Update buildscript * spotlessApply
This commit is contained in:
1 parent
18bfeaff32
commit
39be06c23b
571 files changed
+25959
-28223
No files matched your search
@@ -21,63 +21,69 @@ import tconstruct.tools.logic.ToolForgeLogic;
|
||||
import tconstruct.tools.model.TableRender;
|
||||
import tconstruct.world.TinkerWorld;
|
||||
|
||||
public class ToolForgeBlock extends InventoryBlock
|
||||
{
|
||||
public class ToolForgeBlock extends InventoryBlock {
|
||||
|
||||
public ToolForgeBlock(Material material)
|
||||
{
|
||||
public ToolForgeBlock(Material material) {
|
||||
super(material);
|
||||
this.setCreativeTab(TConstructRegistry.blockTab);
|
||||
this.setHardness(2f);
|
||||
this.setStepSound(Block.soundTypeMetal);
|
||||
}
|
||||
|
||||
String[] textureNames = { "toolforge_iron", "toolforge_gold", "toolforge_diamond", "toolforge_emerald", "toolforge_cobalt", "toolforge_ardite", "toolforge_manyullyn", "toolforge_copper", "toolforge_bronze", "toolforge_tin", "toolforge_aluminum", "toolforge_alubrass", "toolforge_alumite", "toolforge_steel" };
|
||||
String[] textureNames = {
|
||||
"toolforge_iron",
|
||||
"toolforge_gold",
|
||||
"toolforge_diamond",
|
||||
"toolforge_emerald",
|
||||
"toolforge_cobalt",
|
||||
"toolforge_ardite",
|
||||
"toolforge_manyullyn",
|
||||
"toolforge_copper",
|
||||
"toolforge_bronze",
|
||||
"toolforge_tin",
|
||||
"toolforge_aluminum",
|
||||
"toolforge_alubrass",
|
||||
"toolforge_alumite",
|
||||
"toolforge_steel"
|
||||
};
|
||||
|
||||
/* Rendering */
|
||||
@Override
|
||||
public String[] getTextureNames ()
|
||||
{
|
||||
public String[] getTextureNames() {
|
||||
return textureNames;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTextureDomain (int textureNameIndex)
|
||||
{
|
||||
public String getTextureDomain(int textureNameIndex) {
|
||||
return "tinker";
|
||||
}
|
||||
|
||||
IIcon textureTop;
|
||||
|
||||
@Override
|
||||
public void registerBlockIcons (IIconRegister iconRegister)
|
||||
{
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
super.registerBlockIcons(iconRegister);
|
||||
textureTop = iconRegister.registerIcon("tinker:toolforge_top");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon (int side, int meta)
|
||||
{
|
||||
if (side == 1)
|
||||
{
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
if (side == 1) {
|
||||
return textureTop;
|
||||
}
|
||||
if (side == 0)
|
||||
{
|
||||
switch (meta)
|
||||
{
|
||||
case 0:
|
||||
return Blocks.iron_block.getIcon(side, 0);
|
||||
case 1:
|
||||
return Blocks.gold_block.getIcon(side, 0);
|
||||
case 2:
|
||||
return Blocks.diamond_block.getIcon(side, 0);
|
||||
case 3:
|
||||
return Blocks.emerald_block.getIcon(side, 0);
|
||||
default:
|
||||
return TinkerWorld.metalBlock.getIcon(side, meta - 4);
|
||||
if (side == 0) {
|
||||
switch (meta) {
|
||||
case 0:
|
||||
return Blocks.iron_block.getIcon(side, 0);
|
||||
case 1:
|
||||
return Blocks.gold_block.getIcon(side, 0);
|
||||
case 2:
|
||||
return Blocks.diamond_block.getIcon(side, 0);
|
||||
case 3:
|
||||
return Blocks.emerald_block.getIcon(side, 0);
|
||||
default:
|
||||
return TinkerWorld.metalBlock.getIcon(side, meta - 4);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,58 +91,48 @@ public class ToolForgeBlock extends InventoryBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock ()
|
||||
{
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube ()
|
||||
{
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSideSolid (IBlockAccess world, int x, int y, int z, ForgeDirection side)
|
||||
{
|
||||
public boolean isSideSolid(IBlockAccess world, int x, int y, int z, ForgeDirection side) {
|
||||
return side == ForgeDirection.UP;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType ()
|
||||
{
|
||||
public int getRenderType() {
|
||||
return TableRender.model;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldSideBeRendered (IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
|
||||
{
|
||||
public boolean shouldSideBeRendered(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity (World world, int metadata)
|
||||
{
|
||||
public TileEntity createNewTileEntity(World world, int metadata) {
|
||||
return new ToolForgeLogic();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getGui (World world, int x, int y, int z, EntityPlayer entityplayer)
|
||||
{
|
||||
public Integer getGui(World world, int x, int y, int z, EntityPlayer entityplayer) {
|
||||
return ToolProxyCommon.toolForgeID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getModInstance ()
|
||||
{
|
||||
public Object getModInstance() {
|
||||
return TConstruct.instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubBlocks (Item b, CreativeTabs tab, List list)
|
||||
{
|
||||
for (int iter = 0; iter < textureNames.length; iter++)
|
||||
{
|
||||
public void getSubBlocks(Item b, CreativeTabs tab, List list) {
|
||||
for (int iter = 0; iter < textureNames.length; iter++) {
|
||||
list.add(new ItemStack(b, 1, iter));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user