buildcraft/common/buildcraft/core/EntityPowerLaser.java
psxlover 6d5942bc8a Refactored lasers.
Moved PowerLaser logic from EntityLaser.
2012-09-30 22:42:09 +03:00

44 lines
850 B
Java

package buildcraft.core;
import net.minecraft.src.World;
import buildcraft.api.core.Position;
public class EntityPowerLaser extends EntityLaser {
private String texture;
public EntityPowerLaser(World world) {
super(world);
}
public EntityPowerLaser(World world, Position head, Position tail) {
super(world, head, tail);
}
@Override
protected void entityInit() {
super.entityInit();
dataWatcher.addObject(15, "");
}
@Override
public String getTexture() {
return texture;
}
public void setTexture(String texture) {
this.texture = texture;
needsUpdate = true;
}
@Override
protected void updateDataClient() {
super.updateDataClient();
texture = dataWatcher.getWatchableObjectString(15);
}
@Override
protected void updateDataServer() {
super.updateDataServer();
dataWatcher.updateObject(15, texture);
}
}