mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 03:49:29 +00:00
Add an extra check to projectile loading that ensures that the contained item is still valid, in case something got scrambled.
This commit is contained in:
1 parent
291db565ee
commit
6361efc825
1 file changed
+5
@@ -605,6 +605,11 @@ public abstract class ProjectileBase extends EntityArrow implements IEntityAddit
|
||||
this.returnStack = ItemStack.loadItemStackFromNBT(tags.getCompoundTag("Throwable"));
|
||||
onGround = tags.getByte("onGround") == 1;
|
||||
//doNotRetrieve = tags.getBoolean("Retrieval");
|
||||
|
||||
// ensure that nothing can crash because something went wrong in the world...
|
||||
if(this.returnStack == null || !(this.returnStack.getItem() instanceof ToolCore)) {
|
||||
this.setDead();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user