Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.nextlevelminecraft.cad435.objloader.ColoredLamp;
- import com.nextlevelminecraft.cad435.TNL_Client_Dependencies.libs.RGBVec;
- import net.minecraft.nbt.NBTTagCompound;
- import net.minecraft.tileentity.TileEntity;
- /**
- * Created by Alexander on 24.01.2015.
- */
- public class LampTileEntity extends TileEntity {
- RGBVec RGB_VALUES = new RGBVec("255:255:255");
- @Override
- public void writeToNBT(NBTTagCompound var1) {
- var1.setIntArray("RGB_VALUE", RGB_VALUES.toIntArray());
- super.writeToNBT(var1);
- }
- @Override
- public void readFromNBT(NBTTagCompound var1)
- {
- try {
- RGB_VALUES = new RGBVec(var1.getIntArray("RGB_VALUE"));
- super.readFromNBT(var1);
- }
- catch (Exception e)
- {
- System.out.println("Found an empty Lamp...");
- RGB_VALUES = new RGBVec("255:255:255");
- super.readFromNBT(var1);
- }
- }
- public void setRGB_VALUES(RGBVec vec)
- {
- RGB_VALUES = vec;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement