修复了激光塔的构造函数问题
This commit is contained in:
parent
ccd74099dd
commit
a31702624f
1 changed files with 2 additions and 3 deletions
|
@ -51,6 +51,7 @@ import java.util.stream.StreamSupport;
|
||||||
import static com.atsuishio.superbwarfare.tools.ParticleTool.sendParticle;
|
import static com.atsuishio.superbwarfare.tools.ParticleTool.sendParticle;
|
||||||
|
|
||||||
public class LaserTowerEntity extends EnergyVehicleEntity implements GeoEntity, OwnableEntity {
|
public class LaserTowerEntity extends EnergyVehicleEntity implements GeoEntity, OwnableEntity {
|
||||||
|
|
||||||
public static final EntityDataAccessor<Integer> COOL_DOWN = SynchedEntityData.defineId(LaserTowerEntity.class, EntityDataSerializers.INT);
|
public static final EntityDataAccessor<Integer> COOL_DOWN = SynchedEntityData.defineId(LaserTowerEntity.class, EntityDataSerializers.INT);
|
||||||
public static final EntityDataAccessor<Boolean> ACTIVE = SynchedEntityData.defineId(LaserTowerEntity.class, EntityDataSerializers.BOOLEAN);
|
public static final EntityDataAccessor<Boolean> ACTIVE = SynchedEntityData.defineId(LaserTowerEntity.class, EntityDataSerializers.BOOLEAN);
|
||||||
public static final EntityDataAccessor<Optional<UUID>> OWNER_UUID = SynchedEntityData.defineId(LaserTowerEntity.class, EntityDataSerializers.OPTIONAL_UUID);
|
public static final EntityDataAccessor<Optional<UUID>> OWNER_UUID = SynchedEntityData.defineId(LaserTowerEntity.class, EntityDataSerializers.OPTIONAL_UUID);
|
||||||
|
@ -71,7 +72,7 @@ public class LaserTowerEntity extends EnergyVehicleEntity implements GeoEntity,
|
||||||
}
|
}
|
||||||
|
|
||||||
public LaserTowerEntity(LivingEntity owner, Level level) {
|
public LaserTowerEntity(LivingEntity owner, Level level) {
|
||||||
super(ModEntities.CLAYMORE.get(), level);
|
super(ModEntities.LASER_TOWER.get(), level);
|
||||||
this.setOwnerUUID(owner.getUUID());
|
this.setOwnerUUID(owner.getUUID());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -310,8 +311,6 @@ public class LaserTowerEntity extends EnergyVehicleEntity implements GeoEntity,
|
||||||
}).min(Comparator.comparingDouble(e -> e.distanceTo(this))).orElse(null);
|
}).min(Comparator.comparingDouble(e -> e.distanceTo(this))).orElse(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private PlayState movementPredicate(AnimationState<LaserTowerEntity> event) {
|
private PlayState movementPredicate(AnimationState<LaserTowerEntity> event) {
|
||||||
if (this.entityData.get(COOL_DOWN) > 10) {
|
if (this.entityData.get(COOL_DOWN) > 10) {
|
||||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.lt.fire"));
|
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.lt.fire"));
|
||||||
|
|
Loading…
Add table
Reference in a new issue