fix rendering issues

This commit is contained in:
Raoul Van den Berge
2016-02-03 23:02:27 +01:00
parent d2883825de
commit f84bd3ffa1
2 changed files with 24 additions and 1 deletions

View File

@@ -27,6 +27,17 @@ public class ItemPattern extends ItemBase
}
}
@Override
public int getItemStackLimit(ItemStack stack)
{
if (hasPattern(stack))
{
return 1;
}
return 64;
}
@Override
public String getUnlocalizedName(ItemStack stack)
{

View File

@@ -69,6 +69,11 @@ public class ClientProxy extends CommonProxy
new ResourceLocation("storagecraft:wireless_grid_disconnected")
);
ModelBakery.registerItemVariants(StorageCraftItems.PATTERN,
new ResourceLocation("storagecraft:pattern"),
new ResourceLocation("storagecraft:blank_pattern")
);
// Items
ModelLoader.setCustomModelResourceLocation(StorageCraftItems.STORAGE_CELL, ItemStorageCell.TYPE_1K, new ModelResourceLocation("storagecraft:1k_storage_cell", "inventory"));
ModelLoader.setCustomModelResourceLocation(StorageCraftItems.STORAGE_CELL, ItemStorageCell.TYPE_4K, new ModelResourceLocation("storagecraft:4k_storage_cell", "inventory"));
@@ -119,7 +124,14 @@ public class ClientProxy extends CommonProxy
@Override
public ModelResourceLocation getModelLocation(ItemStack stack)
{
return new ModelResourceLocation("storagecraft:wireless_grid_" + (ItemWirelessGrid.isValid(stack) ? "connected" : "disconnected"), "inventory");
if (ItemWirelessGrid.isValid(stack))
{
return new ModelResourceLocation("storagecraft:wireless_grid_connected", "inventory");
}
else
{
return new ModelResourceLocation("storagecraft:wireless_grid_disconnected", "inventory");
}
}
});