cn.nukkit.entity.EntityHuman Java Examples

The following examples show how to use cn.nukkit.entity.EntityHuman. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PlayerInventory.java    From Jupiter with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void onSlotChange(int index, Item before, boolean send) {
    EntityHuman holder = this.getHolder();
    if (holder instanceof Player && !((Player) holder).spawned) {
        return;
    }

    if (index >= this.getSize()) {
        this.sendArmorSlot(index, this.getViewers());
        this.sendArmorSlot(index, this.getHolder().getViewers().values());
    } else {
        super.onSlotChange(index, before, send);
    }
}
 
Example #2
Source File: PlayerOffhandInventory.java    From Jupiter with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void onSlotChange(int index, Item before, boolean send) {
	EntityHuman holder = this.getHolder();
	if (holder instanceof Player && !((Player) holder).spawned) {
		return;
	}
	sendOffhandItem(this.getHolder().getViewers().values().stream().toArray(Player[]::new));
	super.onSlotChange(index, before, send);
}
 
Example #3
Source File: PlayerInventory.java    From Nukkit with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void onSlotChange(int index, Item before, boolean send) {
    EntityHuman holder = this.getHolder();
    if (holder instanceof Player && !((Player) holder).spawned) {
        return;
    }

    if (index >= this.getSize()) {
        this.sendArmorSlot(index, this.getViewers());
        this.sendArmorSlot(index, this.getHolder().getViewers().values());
    } else {
        super.onSlotChange(index, before, send);
    }
}
 
Example #4
Source File: PlayerInventory.java    From Nukkit with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void onSlotChange(int index, Item before, boolean send) {
    EntityHuman holder = this.getHolder();
    if (holder instanceof Player && !((Player) holder).spawned) {
        return;
    }

    if (index >= this.getSize()) {
        this.sendArmorSlot(index, this.getViewers());
        this.sendArmorSlot(index, this.getHolder().getViewers().values());
    } else {
        super.onSlotChange(index, before, send);
    }
}
 
Example #5
Source File: PlayerOffhandInventory.java    From Nukkit with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void onSlotChange(int index, Item before, boolean send) {
    EntityHuman holder = this.getHolder();
    if (holder instanceof Player && !((Player) holder).spawned) {
        return;
    }

    this.sendContents(this.getViewers());
    this.sendContents(holder.getViewers().values());
}
 
Example #6
Source File: PlayerInventory.java    From Nukkit with GNU General Public License v3.0 4 votes vote down vote up
@Override
public EntityHuman getHolder() {
    return (EntityHuman) super.getHolder();
}
 
Example #7
Source File: EntitySpawnEvent.java    From Nukkit with GNU General Public License v3.0 4 votes vote down vote up
public boolean isHuman() {
    return this.entity instanceof EntityHuman;
}
 
Example #8
Source File: EntityDespawnEvent.java    From Nukkit with GNU General Public License v3.0 4 votes vote down vote up
public boolean isHuman() {
    return this.entity instanceof EntityHuman;
}
 
Example #9
Source File: PlayerEnderChestInventory.java    From Nukkit with GNU General Public License v3.0 4 votes vote down vote up
@Override
public EntityHuman getHolder() {
    return (EntityHuman) this.holder;
}
 
Example #10
Source File: PlayerInventory.java    From Nukkit with GNU General Public License v3.0 4 votes vote down vote up
@Override
public EntityHuman getHolder() {
    return (EntityHuman) super.getHolder();
}
 
Example #11
Source File: Server.java    From Nukkit with GNU General Public License v3.0 4 votes vote down vote up
private void registerEntities() {
    Entity.registerEntity("Arrow", EntityArrow.class);
    Entity.registerEntity("Item", EntityItem.class);
    Entity.registerEntity("FallingSand", EntityFallingBlock.class);
    Entity.registerEntity("PrimedTnt", EntityPrimedTNT.class);
    Entity.registerEntity("Snowball", EntitySnowball.class);
    Entity.registerEntity("EnderPearl", EntityEnderPearl.class);
    Entity.registerEntity("Painting", EntityPainting.class);
    //Monsters
    Entity.registerEntity("Creeper", EntityCreeper.class);
    Entity.registerEntity("Blaze", EntityBlaze.class);
    Entity.registerEntity("CaveSpider", EntityCaveSpider.class);
    Entity.registerEntity("ElderGuardian", EntityElderGuardian.class);
    Entity.registerEntity("EnderDragon", EntityEnderDragon.class);
    Entity.registerEntity("Enderman", EntityEnderman.class);
    Entity.registerEntity("Endermite", EntityEndermite.class);
    Entity.registerEntity("Evoker", EntityEvoker.class);
    Entity.registerEntity("Ghast", EntityGhast.class);
    Entity.registerEntity("Guardian", EntityGuardian.class);
    Entity.registerEntity("Husk", EntityHusk.class);
    Entity.registerEntity("MagmaCube", EntityMagmaCube.class);
    Entity.registerEntity("Shulker", EntityShulker.class);
    Entity.registerEntity("Silverfish", EntitySilverfish.class);
    Entity.registerEntity("Skeleton", EntitySkeleton.class);
    Entity.registerEntity("SkeletonHorse", EntitySkeletonHorse.class);
    Entity.registerEntity("Slime", EntitySlime.class);
    Entity.registerEntity("Spider", EntitySpider.class);
    Entity.registerEntity("Stray", EntityStray.class);
    Entity.registerEntity("Vindicator", EntityVindicator.class);
    Entity.registerEntity("Vex", EntityVex.class);
    Entity.registerEntity("WitherSkeleton", EntityWitherSkeleton.class);
    Entity.registerEntity("Wither", EntityWither.class);
    Entity.registerEntity("Witch", EntityWitch.class);
    Entity.registerEntity("ZombiePigman", EntityZombiePigman.class);
    Entity.registerEntity("ZombieVillager", EntityZombieVillager.class);
    Entity.registerEntity("Zombie", EntityZombie.class);

    //Passive
    Entity.registerEntity("Bat", EntityBat.class);
    Entity.registerEntity("Chicken", EntityChicken.class);
    Entity.registerEntity("Cow", EntityCow.class);
    Entity.registerEntity("Donkey", EntityDonkey.class);
    Entity.registerEntity("Horse", EntityHorse.class);
    Entity.registerEntity("Llama", EntityLlama.class);
    Entity.registerEntity("Mooshroom", EntityMooshroom.class);
    Entity.registerEntity("Mule", EntityMule.class);
    Entity.registerEntity("PolarBear", EntityPolarBear.class);
    Entity.registerEntity("Pig", EntityPig.class);
    Entity.registerEntity("Rabbit", EntityRabbit.class);
    Entity.registerEntity("Sheep", EntitySheep.class);
    Entity.registerEntity("Squid", EntitySquid.class);
    Entity.registerEntity("Wolf", EntityWolf.class);
    Entity.registerEntity("Ocelot", EntityOcelot.class);
    Entity.registerEntity("Villager", EntityVillager.class);

    Entity.registerEntity("ThrownExpBottle", EntityExpBottle.class);
    Entity.registerEntity("XpOrb", EntityXPOrb.class);
    Entity.registerEntity("ThrownPotion", EntityPotion.class);
    Entity.registerEntity("Egg", EntityEgg.class);

    Entity.registerEntity("Human", EntityHuman.class, true);

    Entity.registerEntity("MinecartRideable", EntityMinecartEmpty.class);
    // TODO: 2016/1/30 all finds of minecart
    Entity.registerEntity("Boat", EntityBoat.class);

    //Entity.registerEntity("Lightning", EntityLightning.class); lightning shouldn't be saved as entity
}
 
Example #12
Source File: EntityMinecartAbstract.java    From Nukkit with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void applyEntityCollision(Entity entity) {
    if (entity != riding) {
        if (entity instanceof EntityLiving
                && !(entity instanceof EntityHuman)
                && motionX * motionX + motionZ * motionZ > 0.01D
                && linkedEntity == null
                && entity.riding == null
                && blockInside == null) {
            if (riding == null && devs) {
                mountEntity(entity);// TODO: rewrite (weird riding)
            }
        }

        double motiveX = entity.x - x;
        double motiveZ = entity.z - z;
        double square = motiveX * motiveX + motiveZ * motiveZ;

        if (square >= 9.999999747378752E-5D) {
            square = Math.sqrt(square);
            motiveX /= square;
            motiveZ /= square;
            double next = 1 / square;

            if (next > 1) {
                next = 1;
            }

            motiveX *= next;
            motiveZ *= next;
            motiveX *= 0.10000000149011612D;
            motiveZ *= 0.10000000149011612D;
            motiveX *= 1 + entityCollisionReduction;
            motiveZ *= 1 + entityCollisionReduction;
            motiveX *= 0.5D;
            motiveZ *= 0.5D;
            if (entity instanceof EntityMinecartAbstract) {
                EntityMinecartAbstract mine = (EntityMinecartAbstract) entity;
                double desinityX = mine.x - x;
                double desinityZ = mine.z - z;
                Vector3 vector = new Vector3(desinityX, 0, desinityZ).normalize();
                Vector3 vec = new Vector3((double) MathHelper.cos((float) yaw * 0.017453292F), 0, (double) MathHelper.sin((float) yaw * 0.017453292F)).normalize();
                double desinityXZ = Math.abs(vector.dot(vec));

                if (desinityXZ < 0.800000011920929D) {
                    return;
                }

                double motX = mine.motionX + motionX;
                double motZ = mine.motionZ + motionZ;

                if (mine.getType().getId() == 2 && getType().getId() != 2) {
                    motionX *= 0.20000000298023224D;
                    motionZ *= 0.20000000298023224D;
                    motionX += mine.motionX - motiveX;
                    motionZ += mine.motionZ - motiveZ;
                    mine.motionX *= 0.949999988079071D;
                    mine.motionZ *= 0.949999988079071D;
                } else if (mine.getType().getId() != 2 && getType().getId() == 2) {
                    mine.motionX *= 0.20000000298023224D;
                    mine.motionZ *= 0.20000000298023224D;
                    motionX += mine.motionX + motiveX;
                    motionZ += mine.motionZ + motiveZ;
                    motionX *= 0.949999988079071D;
                    motionZ *= 0.949999988079071D;
                } else {
                    motX /= 2;
                    motZ /= 2;
                    motionX *= 0.20000000298023224D;
                    motionZ *= 0.20000000298023224D;
                    motionX += motX - motiveX;
                    motionZ += motZ - motiveZ;
                    mine.motionX *= 0.20000000298023224D;
                    mine.motionZ *= 0.20000000298023224D;
                    mine.motionX += motX + motiveX;
                    mine.motionZ += motZ + motiveZ;
                }
            } else {
                motionX -= motiveX;
                motionZ -= motiveZ;
            }                
        }
    }
}
 
Example #13
Source File: EntitySpawnEvent.java    From Nukkit with GNU General Public License v3.0 4 votes vote down vote up
public boolean isHuman() {
    return this.entity instanceof EntityHuman;
}
 
Example #14
Source File: EntityDespawnEvent.java    From Nukkit with GNU General Public License v3.0 4 votes vote down vote up
public boolean isHuman() {
    return this.entity instanceof EntityHuman;
}
 
Example #15
Source File: PlayerOffhandInventory.java    From Nukkit with GNU General Public License v3.0 4 votes vote down vote up
@Override
public EntityHuman getHolder() {
    return (EntityHuman) super.getHolder();
}
 
Example #16
Source File: PlayerEnderChestInventory.java    From Nukkit with GNU General Public License v3.0 4 votes vote down vote up
@Override
public EntityHuman getHolder() {
    return (EntityHuman) this.holder;
}
 
Example #17
Source File: EntityMinecartAbstract.java    From Jupiter with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void applyEntityCollision(Entity entity) {
    if (entity != riding) {
        if (entity instanceof EntityLiving
                && !(entity instanceof EntityHuman)
                && motionX * motionX + motionZ * motionZ > 0.01D
                && linkedEntity == null
                && entity.riding == null
                && blockInside == null) {
            if (riding == null && devs) {
                mountEntity(entity);// TODO: rewrite (weird riding)
            }
        }

        double motiveX = entity.x - x;
        double motiveZ = entity.z - z;
        double square = motiveX * motiveX + motiveZ * motiveZ;

        if (square >= 9.999999747378752E-5D) {
            square = Math.sqrt(square);
            motiveX /= square;
            motiveZ /= square;
            double next = 1 / square;

            if (next > 1) {
                next = 1;
            }

            motiveX *= next;
            motiveZ *= next;
            motiveX *= 0.10000000149011612D;
            motiveZ *= 0.10000000149011612D;
            motiveX *= 1 + entityCollisionReduction;
            motiveZ *= 1 + entityCollisionReduction;
            motiveX *= 0.5D;
            motiveZ *= 0.5D;
            if (entity instanceof EntityMinecartAbstract) {
                EntityMinecartAbstract mine = (EntityMinecartAbstract) entity;
                double desinityX = mine.x - x;
                double desinityZ = mine.z - z;
                Vector3 vector = new Vector3(desinityX, 0, desinityZ).normalize();
                Vector3 vec = new Vector3((double) MathHelper.cos((float) yaw * 0.017453292F), 0, (double) MathHelper.sin((float) yaw * 0.017453292F)).normalize();
                double desinityXZ = Math.abs(vector.dot(vec));

                if (desinityXZ < 0.800000011920929D) {
                    return;
                }

                double motX = mine.motionX + motionX;
                double motZ = mine.motionZ + motionZ;

                if (mine.getType().getId() == 2 && getType().getId() != 2) {
                    motionX *= 0.20000000298023224D;
                    motionZ *= 0.20000000298023224D;
                    motionX += mine.motionX - motiveX;
                    motionZ += mine.motionZ - motiveZ;
                    mine.motionX *= 0.949999988079071D;
                    mine.motionZ *= 0.949999988079071D;
                } else if (mine.getType().getId() != 2 && getType().getId() == 2) {
                    mine.motionX *= 0.20000000298023224D;
                    mine.motionZ *= 0.20000000298023224D;
                    motionX += mine.motionX - motiveX;
                    motionZ += mine.motionZ - motiveZ;
                    motionX *= 0.949999988079071D;
                    motionZ *= 0.949999988079071D;
                } else {
                    motX /= 2;
                    motZ /= 2;
                    motionX *= 0.20000000298023224D;
                    motionZ *= 0.20000000298023224D;
                    motionX += motX - motiveX;
                    motionZ += motZ - motiveZ;
                    mine.motionX *= 0.20000000298023224D;
                    mine.motionZ *= 0.20000000298023224D;
                    mine.motionX += motX - motiveX;
                    mine.motionZ += motZ - motiveZ;
                }
            } else {
                motionX -= motiveX;
                motionZ -= motiveZ;
            }
        }
    }
}
 
Example #18
Source File: Server.java    From Nukkit with GNU General Public License v3.0 4 votes vote down vote up
private void registerEntities() {
    Entity.registerEntity("Lightning", EntityLightning.class);
    Entity.registerEntity("Arrow", EntityArrow.class);
    Entity.registerEntity("EnderPearl", EntityEnderPearl.class);
    Entity.registerEntity("FallingSand", EntityFallingBlock.class);
    Entity.registerEntity("Firework", EntityFirework.class);
    Entity.registerEntity("Item", EntityItem.class);
    Entity.registerEntity("Painting", EntityPainting.class);
    Entity.registerEntity("PrimedTnt", EntityPrimedTNT.class);
    Entity.registerEntity("Snowball", EntitySnowball.class);
    //Monsters
    Entity.registerEntity("Blaze", EntityBlaze.class);
    Entity.registerEntity("CaveSpider", EntityCaveSpider.class);
    Entity.registerEntity("Creeper", EntityCreeper.class);
    Entity.registerEntity("Drowned", EntityDrowned.class);
    Entity.registerEntity("ElderGuardian", EntityElderGuardian.class);
    Entity.registerEntity("EnderDragon", EntityEnderDragon.class);
    Entity.registerEntity("Enderman", EntityEnderman.class);
    Entity.registerEntity("Endermite", EntityEndermite.class);
    Entity.registerEntity("Evoker", EntityEvoker.class);
    Entity.registerEntity("Ghast", EntityGhast.class);
    Entity.registerEntity("Guardian", EntityGuardian.class);
    Entity.registerEntity("Husk", EntityHusk.class);
    Entity.registerEntity("MagmaCube", EntityMagmaCube.class);
    Entity.registerEntity("Phantom", EntityPhantom.class);
    Entity.registerEntity("Pillager", EntityPillager.class);
    Entity.registerEntity("Ravager", EntityRavager.class);
    Entity.registerEntity("Shulker", EntityShulker.class);
    Entity.registerEntity("Silverfish", EntitySilverfish.class);
    Entity.registerEntity("Skeleton", EntitySkeleton.class);
    Entity.registerEntity("Slime", EntitySlime.class);
    Entity.registerEntity("Spider", EntitySpider.class);
    Entity.registerEntity("Stray", EntityStray.class);
    Entity.registerEntity("Vex", EntityVex.class);
    Entity.registerEntity("Vindicator", EntityVindicator.class);
    Entity.registerEntity("Witch", EntityWitch.class);
    Entity.registerEntity("Wither", EntityWither.class);
    Entity.registerEntity("WitherSkeleton", EntityWitherSkeleton.class);
    Entity.registerEntity("Zombie", EntityZombie.class);
    Entity.registerEntity("ZombiePigman", EntityZombiePigman.class);
    Entity.registerEntity("ZombieVillager", EntityZombieVillager.class);
    Entity.registerEntity("ZombieVillagerV1", EntityZombieVillagerV1.class);
    //Passive
    Entity.registerEntity("Bat", EntityBat.class);
    Entity.registerEntity("Cat", EntityCat.class);
    Entity.registerEntity("Chicken", EntityChicken.class);
    Entity.registerEntity("Cod", EntityCod.class);
    Entity.registerEntity("Cow", EntityCow.class);
    Entity.registerEntity("Dolphin", EntityDolphin.class);
    Entity.registerEntity("Donkey", EntityDonkey.class);
    Entity.registerEntity("Horse", EntityHorse.class);
    Entity.registerEntity("Llama", EntityLlama.class);
    Entity.registerEntity("Mooshroom", EntityMooshroom.class);
    Entity.registerEntity("Mule", EntityMule.class);
    Entity.registerEntity("Ocelot", EntityOcelot.class);
    Entity.registerEntity("Panda", EntityPanda.class);
    Entity.registerEntity("Parrot", EntityParrot.class);
    Entity.registerEntity("Pig", EntityPig.class);
    Entity.registerEntity("PolarBear", EntityPolarBear.class);
    Entity.registerEntity("Pufferfish", EntityPufferfish.class);
    Entity.registerEntity("Rabbit", EntityRabbit.class);
    Entity.registerEntity("Salmon", EntitySalmon.class);
    Entity.registerEntity("Sheep", EntitySheep.class);
    Entity.registerEntity("SkeletonHorse", EntitySkeletonHorse.class);
    Entity.registerEntity("Squid", EntitySquid.class);
    Entity.registerEntity("TropicalFish", EntityTropicalFish.class);
    Entity.registerEntity("Turtle", EntityTurtle.class);
    Entity.registerEntity("Villager", EntityVillager.class);
    Entity.registerEntity("VillagerV1", EntityVillagerV1.class);
    Entity.registerEntity("WanderingTrader", EntityWanderingTrader.class);
    Entity.registerEntity("Wolf", EntityWolf.class);
    Entity.registerEntity("ZombieHorse", EntityZombieHorse.class);
    //Projectile
    Entity.registerEntity("Egg", EntityEgg.class);
    Entity.registerEntity("ThrownExpBottle", EntityExpBottle.class);
    Entity.registerEntity("ThrownPotion", EntityPotion.class);
    Entity.registerEntity("ThrownTrident", EntityThrownTrident.class);
    Entity.registerEntity("XpOrb", EntityXPOrb.class);

    Entity.registerEntity("Human", EntityHuman.class, true);
    //Vehicle
    Entity.registerEntity("Boat", EntityBoat.class);
    Entity.registerEntity("MinecartChest", EntityMinecartChest.class);
    Entity.registerEntity("MinecartHopper", EntityMinecartHopper.class);
    Entity.registerEntity("MinecartRideable", EntityMinecartEmpty.class);
    Entity.registerEntity("MinecartTnt", EntityMinecartTNT.class);

    Entity.registerEntity("EndCrystal", EntityEndCrystal.class);
    Entity.registerEntity("FishingHook", EntityFishingHook.class);
}
 
Example #19
Source File: EntityMinecartAbstract.java    From Nukkit with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void applyEntityCollision(cn.nukkit.entity.Entity entity) {
    if (entity != riding && !(entity instanceof Player && ((Player) entity).getGamemode() == Player.SPECTATOR)) {
        if (entity instanceof EntityLiving
                && !(entity instanceof EntityHuman)
                && motionX * motionX + motionZ * motionZ > 0.01D
                && passengers.isEmpty()
                && entity.riding == null
                && blockInside == null) {
            if (riding == null && devs) {
                mountEntity(entity);// TODO: rewrite (weird riding)
            }
        }

        double motiveX = entity.x - x;
        double motiveZ = entity.z - z;
        double square = motiveX * motiveX + motiveZ * motiveZ;

        if (square >= 9.999999747378752E-5D) {
            square = Math.sqrt(square);
            motiveX /= square;
            motiveZ /= square;
            double next = 1 / square;

            if (next > 1) {
                next = 1;
            }

            motiveX *= next;
            motiveZ *= next;
            motiveX *= 0.10000000149011612D;
            motiveZ *= 0.10000000149011612D;
            motiveX *= 1 + entityCollisionReduction;
            motiveZ *= 1 + entityCollisionReduction;
            motiveX *= 0.5D;
            motiveZ *= 0.5D;
            if (entity instanceof EntityMinecartAbstract) {
                EntityMinecartAbstract mine = (EntityMinecartAbstract) entity;
                double desinityX = mine.x - x;
                double desinityZ = mine.z - z;
                Vector3 vector = new Vector3(desinityX, 0, desinityZ).normalize();
                Vector3 vec = new Vector3((double) MathHelper.cos((float) yaw * 0.017453292F), 0, (double) MathHelper.sin((float) yaw * 0.017453292F)).normalize();
                double desinityXZ = Math.abs(vector.dot(vec));

                if (desinityXZ < 0.800000011920929D) {
                    return;
                }

                double motX = mine.motionX + motionX;
                double motZ = mine.motionZ + motionZ;

                if (mine.getType().getId() == 2 && getType().getId() != 2) {
                    motionX *= 0.20000000298023224D;
                    motionZ *= 0.20000000298023224D;
                    motionX += mine.motionX - motiveX;
                    motionZ += mine.motionZ - motiveZ;
                    mine.motionX *= 0.949999988079071D;
                    mine.motionZ *= 0.949999988079071D;
                } else if (mine.getType().getId() != 2 && getType().getId() == 2) {
                    mine.motionX *= 0.20000000298023224D;
                    mine.motionZ *= 0.20000000298023224D;
                    motionX += mine.motionX + motiveX;
                    motionZ += mine.motionZ + motiveZ;
                    motionX *= 0.949999988079071D;
                    motionZ *= 0.949999988079071D;
                } else {
                    motX /= 2;
                    motZ /= 2;
                    motionX *= 0.20000000298023224D;
                    motionZ *= 0.20000000298023224D;
                    motionX += motX - motiveX;
                    motionZ += motZ - motiveZ;
                    mine.motionX *= 0.20000000298023224D;
                    mine.motionZ *= 0.20000000298023224D;
                    mine.motionX += motX + motiveX;
                    mine.motionZ += motZ + motiveZ;
                }
            } else {
                motionX -= motiveX;
                motionZ -= motiveZ;
            }
        }
    }
}
 
Example #20
Source File: EntitySpawnEvent.java    From Jupiter with GNU General Public License v3.0 4 votes vote down vote up
public boolean isHuman() {
    return this.entity instanceof EntityHuman;
}
 
Example #21
Source File: EntityDespawnEvent.java    From Jupiter with GNU General Public License v3.0 4 votes vote down vote up
public boolean isHuman() {
    return this.entity instanceof EntityHuman;
}
 
Example #22
Source File: PlayerOffhandInventory.java    From Jupiter with GNU General Public License v3.0 4 votes vote down vote up
@Override
public EntityHuman getHolder() {
	return (EntityHuman) super.getHolder();
}
 
Example #23
Source File: PlayerEnderChestInventory.java    From Jupiter with GNU General Public License v3.0 4 votes vote down vote up
@Override
public EntityHuman getHolder() {
    return (EntityHuman) this.holder;
}
 
Example #24
Source File: PlayerInventory.java    From Jupiter with GNU General Public License v3.0 4 votes vote down vote up
@Override
public EntityHuman getHolder() {
    return (EntityHuman) super.getHolder();
}
 
Example #25
Source File: Server.java    From Jupiter with GNU General Public License v3.0 4 votes vote down vote up
private void registerEntities() {
    //mob
    Entity.registerEntity("Blaze", EntityBlaze.class);
    Entity.registerEntity("CaveSpider", EntityCaveSpider.class);
    Entity.registerEntity("Creeper", EntityCreeper.class);
    Entity.registerEntity("Enderman", EntityEnderman.class);
    Entity.registerEntity("Endermite", EntityEndermite.class);
    Entity.registerEntity("Evoker", EntityEvoker.class);
    Entity.registerEntity("Ghast", EntityGhast.class);
    Entity.registerEntity("Guardian", EntityGuardian.class);
    Entity.registerEntity("Hask", EntityHask.class);
    Entity.registerEntity("MagmaCube", EntityMagmaCube.class);
    Entity.registerEntity("Shulker", EntityShulker.class);
    Entity.registerEntity("Silverfish", EntitySilverfish.class);
    Entity.registerEntity("Skeleton", EntitySkeleton.class);
    Entity.registerEntity("Slime", EntitySlime.class);
    Entity.registerEntity("Spider", EntitySpider.class);
    Entity.registerEntity("Stray", EntityStray.class);
    Entity.registerEntity("Vex", EntityVex.class);
    Entity.registerEntity("Vindicator", EntityVindicator.class);
    Entity.registerEntity("Witch", EntityWitch.class);
    Entity.registerEntity("WitherSkeleton", EntityWitherSkeleton.class);
    Entity.registerEntity("Zombie", EntityZombie.class);
    Entity.registerEntity("ZombiePigman", EntityZombiePigman.class);
    Entity.registerEntity("ZombieVillager", EntityZombieVillager.class);
    //passive
    Entity.registerEntity("Bat", EntityBat.class);
    Entity.registerEntity("Chicken", EntityChicken.class);
    Entity.registerEntity("Cow", EntityCow.class);
    Entity.registerEntity("Donkey", EntityDonkey.class);
    Entity.registerEntity("Horse", EntityHorse.class);
    Entity.registerEntity("IronGolem", EntityIronGolem.class);
    Entity.registerEntity("Llama", EntityLlama.class);
    Entity.registerEntity("Mooshroom", EntityMooshroom.class);
    Entity.registerEntity("Mule", EntityMule.class);
    Entity.registerEntity("Ocelot", EntityOcelot.class);
    Entity.registerEntity("Parrot", EntityParrot.class);
    Entity.registerEntity("Pig", EntityPig.class);
    Entity.registerEntity("PolarBear", EntityPolarBear.class);
    Entity.registerEntity("Rabbit", EntityRabbit.class);
    Entity.registerEntity("Sheep", EntitySheep.class);
    Entity.registerEntity("SkeletonHorse", EntitySkeletonHorse.class);
    Entity.registerEntity("SnowGolem", EntitySnowGolem.class);
    Entity.registerEntity("Squid", EntitySquid.class);
    Entity.registerEntity("Villager", EntityVillager.class);
    Entity.registerEntity("Wolf", EntityWolf.class);
    Entity.registerEntity("ZombieHorse", EntityZombieHorse.class);

    //Bosses
    Entity.registerEntity("ElderGuardian", EntityElderGuardian.class);
    Entity.registerEntity("EnderDragon", EntityEnderDragon.class);
    Entity.registerEntity("EnderWither", EntityWither.class);

    //item
    Entity.registerEntity("ArmorStand", EntityArmorStand.class);
    Entity.registerEntity("EnderCrystal", EntityEnderCrystal.class);
    Entity.registerEntity("FallingSand", EntityFallingBlock.class);
    Entity.registerEntity("PrimedTnt", EntityPrimedTNT.class);
    Entity.registerEntity("Painting", EntityPainting.class);
    Entity.registerEntity("XpOrb", EntityXPOrb.class);
    Entity.registerEntity("MinecartRideable", EntityMinecartEmpty.class);
    Entity.registerEntity("MinecartChest", EntityMinecartChest.class);
    Entity.registerEntity("MinecartHopper", EntityMinecartHopper.class);
    Entity.registerEntity("MinecartTnt", EntityMinecartTNT.class);
    Entity.registerEntity("Boat", EntityBoat.class);

    //projectile
    Entity.registerEntity("Arrow", EntityArrow.class);
    Entity.registerEntity("DragonFireball", EntityDragonFireball.class);
    Entity.registerEntity("Egg", EntityEgg.class);
    Entity.registerEntity("EnderPearl", EntityEnderPearl.class);
    Entity.registerEntity("ThrownExpBottle", EntityExpBottle.class);
    Entity.registerEntity("Fireball", EntityFireball.class);
    Entity.registerEntity("FireworkRocket", EntityFireworkRocket.class);
    Entity.registerEntity("FishingHook", EntityFishingHook.class);
    Entity.registerEntity("ThrownPotion", EntityPotion.class);
    Entity.registerEntity("ThrownLingeringPotion", EntityPotionLingering.class);
    Entity.registerEntity("ShulkerBullet", EntityShulkerBullet.class);
    Entity.registerEntity("Snowball", EntitySnowball.class);

    //weather
    Entity.registerEntity("Lightning", EntityLightning.class);

    //other
    Entity.registerEntity("Human", EntityHuman.class, true);
}