mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-27 06:12:56 +00:00
Hex Color Update
This commit is contained in:
1 parent
3c610e7105
commit
3a00d08304
50 files changed
+456
-360
No files matched your search
@@ -1,6 +1,32 @@
|
||||
package noppes.npcs.blocks.tiles;
|
||||
|
||||
public class TileSign extends TileBanner {
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
|
||||
public class TileSign extends TileVariant {
|
||||
|
||||
public ItemStack icon;
|
||||
public long time = 0;
|
||||
|
||||
public void readFromNBT(NBTTagCompound compound){
|
||||
super.readFromNBT(compound);
|
||||
icon = ItemStack.loadItemStackFromNBT(compound.getCompoundTag("BannerIcon"));
|
||||
}
|
||||
|
||||
public void writeToNBT(NBTTagCompound compound){
|
||||
super.writeToNBT(compound);
|
||||
if(icon != null)
|
||||
compound.setTag("BannerIcon", icon.writeToNBT(new NBTTagCompound()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox(){
|
||||
return AxisAlignedBB.getBoundingBox(xCoord, yCoord, zCoord, xCoord + 1, yCoord + 2, zCoord + 1);
|
||||
}
|
||||
|
||||
public boolean canEdit(){
|
||||
return System.currentTimeMillis() - time < 20000;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user