mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-20 04:09:40 +00:00
Change material-item-mapping IMC to have the item in an item-subtag like the partbuilder IMC
This commit is contained in:
1 parent
f4d9d54d41
commit
6be78f4edb
1 file changed
+7
-2
@@ -202,12 +202,17 @@ public final class IMCHandler {
|
||||
|
||||
NBTTagCompound tag = message.getNBTValue();
|
||||
|
||||
if (!checkRequiredTags("Material Item", tag, "MaterialId", "Value", "id", "Count", "Damage"))
|
||||
if (!checkRequiredTags("Material Item", tag, "MaterialId", "Value", "Item"))
|
||||
continue;
|
||||
|
||||
int id = tag.getInteger("MaterialId");
|
||||
int value = tag.getInteger("Value");
|
||||
ItemStack stack = ItemStack.loadItemStackFromNBT(tag);
|
||||
ItemStack stack = ItemStack.loadItemStackFromNBT(tag.getCompoundTag("Item"));
|
||||
|
||||
if(stack == null) {
|
||||
TConstruct.logger.error("Material Item IMC: Item for Material %d is null", id);
|
||||
continue;
|
||||
}
|
||||
|
||||
if(TConstructRegistry.getMaterial(id) == null) {
|
||||
TConstruct.logger.error("Material Item IMC: Material with ID %d does not exist", id);
|
||||
|
||||
Reference in new issue
Block a user