mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-20 12:19:48 +00:00
Register a dynamic tool shard if no shard is present in the PatternBuilder IMC
This commit is contained in:
1 parent
9672f95efc
commit
c05cdf03c6
1 file changed
+7
@@ -78,6 +78,13 @@ public final class IMCHandler {
|
||||
ItemStack shard = ItemStack.loadItemStackFromNBT(tag.getCompoundTag("Shard")); // optional
|
||||
ItemStack rod = new ItemStack(TinkerTools.toolRod, 1, matID);
|
||||
|
||||
// default shard if none present. Has to exist because old code.
|
||||
if(shard == null)
|
||||
{
|
||||
TConstructRegistry.addDefaultShardMaterial(matID);
|
||||
shard = new ItemStack(TinkerTools.toolShard, 1, matID);
|
||||
}
|
||||
|
||||
// register the material
|
||||
PatternBuilder.instance.registerFullMaterial(item, value, TConstructRegistry.getMaterial(matID).materialName, shard, rod, matID);
|
||||
|
||||
|
||||
Reference in new issue
Block a user