Some refactoring

This commit is contained in:
Connor Colenso committed 2023-10-31 00:27:30 +00:00
1 parent 40b70bfec3
commit 980f2c3ec2
7 files changed
+134 -64

No files matched your search

@@ -0,0 +1,19 @@
package com.colen.postea.Utility;
import net.minecraft.nbt.NBTTagCompound;
public abstract class PosteaUtilities {
@SuppressWarnings("unused")
public static NBTTagCompound cleanseNBT(String newTileEntityID, NBTTagCompound tag) {
// Cleans the NBT, so that it replaces the ID and adds the x, y, z coordinates.
NBTTagCompound tagCompound = new NBTTagCompound();
tagCompound.setString("id", newTileEntityID);
tagCompound.setInteger("x", tag.getInteger("x"));
tagCompound.setInteger("y", tag.getInteger("y"));
tagCompound.setInteger("z", tag.getInteger("z"));
return tagCompound;
}
}