mirror of
https://github.com/GTNewHorizons/Postea.git
synced 2026-11-20 04:09:43 +00:00
Some refactoring
This commit is contained in:
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;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user