Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package net.roadcraft.mod.tileentity;
- import net.minecraft.nbt.NBTTagCompound;
- import net.minecraft.tileentity.TileEntity;
- public class TileEntityVerticalTrafficLight extends TileEntity
- {
- private int power;
- public TileEntityVerticalTrafficLight()
- {
- this.setPower(0);
- }
- public int getPower()
- {
- return power;
- }
- public void setPower(int ticksExisted)
- {
- power = ticksExisted;
- }
- @Override
- public void readFromNBT(NBTTagCompound nbttagcompound) {
- super.readFromNBT(nbttagcompound);
- power = nbttagcompound.getInteger("power");
- }
- @Override
- public void writeToNBT(NBTTagCompound nbttagcompound) {
- super.writeToNBT(nbttagcompound);
- nbttagcompound.setInteger("power", this.power);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement