mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-17 19:05:16 +00:00
Replace getSpawnerTag with getChildTag
This commit is contained in:
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)) {
|
||||
|
||||
Reference in new issue
Block a user