This commit is contained in:
Raoul Van den Berge
2016-02-03 22:44:44 +01:00
parent bb7e2a5e7d
commit d2883825de
3 changed files with 13 additions and 5 deletions

View File

@@ -19,11 +19,11 @@ public class ItemPattern extends ItemBase
}
@Override
public void addInformation(ItemStack cell, EntityPlayer player, List list, boolean b)
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean b)
{
if (isValid(player.worldObj, cell))
if (isValid(player.worldObj, stack))
{
list.add(getPatternResult(player.worldObj, cell).getDisplayName());
list.add(getPatternResult(player.worldObj, stack).getDisplayName());
}
}

View File

@@ -96,7 +96,14 @@ public class ClientProxy extends CommonProxy
@Override
public ModelResourceLocation getModelLocation(ItemStack stack)
{
return new ModelResourceLocation("storagecraft:" + (!ItemPattern.hasPattern(stack) ? "blank_" : "") + "pattern", "inventory");
if (ItemPattern.hasPattern(stack))
{
return new ModelResourceLocation("storagecraft:pattern", "inventory");
}
else
{
return new ModelResourceLocation("storagecraft:blank_pattern", "inventory");
}
}
});
@@ -106,6 +113,7 @@ public class ClientProxy extends CommonProxy
ModelLoader.setCustomModelResourceLocation(StorageCraftItems.CORE, ItemCore.TYPE_DESTRUCTION, new ModelResourceLocation("storagecraft:destruction_core", "inventory"));
ModelLoader.setCustomModelResourceLocation(StorageCraftItems.WIRELESS_GRID_PLATE, 0, new ModelResourceLocation("storagecraft:wireless_grid_plate", "inventory"));
ModelLoader.setCustomMeshDefinition(StorageCraftItems.WIRELESS_GRID, new ItemMeshDefinition()
{
@Override

View File

@@ -158,7 +158,7 @@ public class TileGrid extends TileMachine
{
ItemStack result = patternCraftingResultInventory.getStackInSlot(0);
if (result != null && patternInventory.getStackInSlot(0).stackSize > 0 && patternInventory.getStackInSlot(1) == null)
if (result != null && patternInventory.getStackInSlot(0) != null && patternInventory.getStackInSlot(0).stackSize > 0 && patternInventory.getStackInSlot(1) == null)
{
ItemStack pattern = new ItemStack(StorageCraftItems.PATTERN);