impove camera entity handling
This commit is contained in:
parent
8a72694a74
commit
3960bff398
4 changed files with 14 additions and 7 deletions
Binary file not shown.
Before Width: | Height: | Size: 1.5 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2 KiB |
|
@ -5,8 +5,8 @@ import common.rng.Random;
|
|||
import common.world.World;
|
||||
|
||||
public class EntityCameraHolder extends EntityNPC {
|
||||
public EntityCameraHolder(World worldIn) {
|
||||
super(worldIn);
|
||||
public EntityCameraHolder(World world) {
|
||||
super(world);
|
||||
}
|
||||
|
||||
public int getBaseHealth(Random rand) {
|
||||
|
@ -42,7 +42,13 @@ public class EntityCameraHolder extends EntityNPC {
|
|||
protected void damageEntity(DamageSource damageSrc, int damageAmount) {
|
||||
}
|
||||
|
||||
public boolean canNaturallyFly() {
|
||||
return true;
|
||||
}
|
||||
public boolean canNaturallyFly() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
if(!this.isPlayer())
|
||||
this.setDead();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,6 +31,7 @@ import common.entity.animal.EntitySheep;
|
|||
import common.entity.animal.EntityWolf;
|
||||
import common.entity.npc.EntityArachnoid;
|
||||
import common.entity.npc.EntityBloodElf;
|
||||
import common.entity.npc.EntityCameraHolder;
|
||||
import common.entity.npc.EntityCultivator;
|
||||
import common.entity.npc.EntityElf;
|
||||
import common.entity.npc.EntityFireDemon;
|
||||
|
@ -737,7 +738,7 @@ public abstract class UniverseRegistry extends DimensionRegistry {
|
|||
.addLiquid(Blocks.flowing_water.getState(), 1, 8, 255, false)
|
||||
.addLiquid(Blocks.flowing_lava.getState(), 40, 8, 255, true);
|
||||
for(Class<? extends Entity> clazz : EntityRegistry.getAllClasses()) {
|
||||
if(EntityLiving.class.isAssignableFrom(clazz))
|
||||
if(EntityLiving.class.isAssignableFrom(clazz) && clazz != EntityCameraHolder.class)
|
||||
warp.addSpawn((Class<? extends EntityLiving>)clazz, 1, 1, 8);
|
||||
}
|
||||
registerSemi("warp", "Der Warp", new Semi(0x0c001f, 0x190033, 124072917, 285.0f, 3, Blocks.obsidian.getState(), Blocks.lava.getState(), 63)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue