Hbm-s-Nuclear-Tech-GIT/com/hbm/tileentity/bomb/TileEntityTurretCheapo.java
2018-03-15 22:34:01 +01:00

31 lines
566 B
Java

package com.hbm.tileentity.bomb;
import com.hbm.packet.AuxGaugePacket;
import com.hbm.packet.PacketDispatcher;
import net.minecraft.tileentity.TileEntity;
public class TileEntityTurretCheapo extends TileEntityTurretBase {
public int spin;
public int rotation;
@Override
public void updateEntity() {
super.updateEntity();
if(!worldObj.isRemote) {
if(spin > 0)
spin -= 1;
rotation += spin;
rotation = rotation % 360;
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, rotation, 0));
}
}
}