Replace getSpawnerTag with getChildTag

This commit is contained in:
Vincent Lee committed 2019-12-25 23:08:41 -06:00
1 parent 285511fda8
commit bca3f5c5fb
1 file changed
+1 -11
@@ -50,19 +50,9 @@ public class ItemSpawnerMover extends ItemMod {
addPropertyOverride(new ResourceLocation("botania", "full"), (stack, worldIn, entityIn) -> hasData(stack) ? 1 : 0);
}
@Nullable
private static CompoundNBT getSpawnerTag(ItemStack stack) {
CompoundNBT tag = stack.getTag();
if(tag != null && tag.contains(TAG_SPAWNER)) {
return tag.getCompound(TAG_SPAWNER);
}
return null;
}
@Nullable
private static ResourceLocation getEntityId(ItemStack stack) {
CompoundNBT tag = getSpawnerTag(stack);
CompoundNBT tag = stack.getChildTag(TAG_SPAWNER);
if(tag != null && tag.contains(TAG_SPAWN_DATA)) {
tag = tag.getCompound(TAG_SPAWN_DATA);
if(tag.contains(TAG_ID)) {