mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-03 23:17:48 +01:00
Start Entity abstraction, add some missing entities.
This commit is contained in:
parent
67db1d6568
commit
f1f3885751
@ -5,7 +5,7 @@ import net.minestom.server.entity.LivingEntity;
|
||||
import net.minestom.server.entity.ai.goal.MeleeAttackGoal;
|
||||
import net.minestom.server.entity.ai.target.ClosestEntityTarget;
|
||||
import net.minestom.server.entity.damage.DamageType;
|
||||
import net.minestom.server.entity.type.EntityChicken;
|
||||
import net.minestom.server.entity.type.animal.EntityChicken;
|
||||
import net.minestom.server.event.entity.EntityAttackEvent;
|
||||
import net.minestom.server.utils.Position;
|
||||
import net.minestom.server.utils.Vector;
|
||||
|
@ -1,7 +1,7 @@
|
||||
package fr.themode.demo.entity;
|
||||
|
||||
import net.minestom.server.entity.ai.goal.RandomLookAroundGoal;
|
||||
import net.minestom.server.entity.type.EntityZombie;
|
||||
import net.minestom.server.entity.type.monster.EntityZombie;
|
||||
import net.minestom.server.utils.Position;
|
||||
|
||||
public class ZombieCreature extends EntityZombie {
|
||||
|
@ -3,7 +3,7 @@ package net.minestom.server.entity.hologram;
|
||||
import net.minestom.server.Viewable;
|
||||
import net.minestom.server.chat.ColoredText;
|
||||
import net.minestom.server.entity.Player;
|
||||
import net.minestom.server.entity.type.EntityArmorStand;
|
||||
import net.minestom.server.entity.type.decoration.EntityArmorStand;
|
||||
import net.minestom.server.instance.Instance;
|
||||
import net.minestom.server.utils.Position;
|
||||
import net.minestom.server.utils.validate.Check;
|
||||
|
@ -0,0 +1,4 @@
|
||||
package net.minestom.server.entity.type;
|
||||
|
||||
public interface Animal {
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
package net.minestom.server.entity.type;
|
||||
|
||||
public interface Constructable {
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
package net.minestom.server.entity.type;
|
||||
|
||||
public interface Monster {
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
package net.minestom.server.entity.type;
|
||||
|
||||
public interface Projectile {
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
package net.minestom.server.entity.type;
|
||||
|
||||
public interface TameableAnimal extends Animal {
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
package net.minestom.server.entity.type;
|
||||
|
||||
public interface Vehicle {
|
||||
}
|
@ -1,13 +1,14 @@
|
||||
package net.minestom.server.entity.type;
|
||||
package net.minestom.server.entity.type.ambient;
|
||||
|
||||
import net.minestom.server.entity.EntityCreature;
|
||||
import net.minestom.server.entity.EntityType;
|
||||
import net.minestom.server.entity.type.Animal;
|
||||
import net.minestom.server.network.packet.PacketWriter;
|
||||
import net.minestom.server.utils.Position;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
public class EntityBat extends EntityCreature {
|
||||
public class EntityBat extends EntityCreature implements Animal {
|
||||
|
||||
private boolean hanging;
|
||||
|
@ -0,0 +1,13 @@
|
||||
package net.minestom.server.entity.type.animal;
|
||||
|
||||
import net.minestom.server.entity.EntityCreature;
|
||||
import net.minestom.server.entity.EntityType;
|
||||
import net.minestom.server.entity.type.Animal;
|
||||
import net.minestom.server.utils.Position;
|
||||
|
||||
public class EntityBee extends EntityCreature implements Animal {
|
||||
public EntityBee(Position spawnPosition) {
|
||||
super(EntityType.BEE, spawnPosition);
|
||||
setBoundingBox(0.7f,0.6f,0.7f);
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package net.minestom.server.entity.type.animal;
|
||||
|
||||
import net.minestom.server.entity.EntityCreature;
|
||||
import net.minestom.server.entity.EntityType;
|
||||
import net.minestom.server.entity.type.TameableAnimal;
|
||||
import net.minestom.server.utils.Position;
|
||||
|
||||
public class EntityCat extends EntityCreature implements TameableAnimal {
|
||||
public EntityCat(Position spawnPosition) {
|
||||
super(EntityType.CAT, spawnPosition);
|
||||
setBoundingBox(0.6f, 0.7f, 0.6f);
|
||||
}
|
||||
}
|
@ -1,10 +1,11 @@
|
||||
package net.minestom.server.entity.type;
|
||||
package net.minestom.server.entity.type.animal;
|
||||
|
||||
import net.minestom.server.entity.EntityCreature;
|
||||
import net.minestom.server.entity.EntityType;
|
||||
import net.minestom.server.entity.type.Animal;
|
||||
import net.minestom.server.utils.Position;
|
||||
|
||||
public class EntityChicken extends EntityCreature {
|
||||
public class EntityChicken extends EntityCreature implements Animal {
|
||||
public EntityChicken(Position spawnPosition) {
|
||||
super(EntityType.CHICKEN, spawnPosition);
|
||||
setBoundingBox(0.4f, 0.7f, 0.4f);
|
@ -1,10 +1,11 @@
|
||||
package net.minestom.server.entity.type;
|
||||
package net.minestom.server.entity.type.animal;
|
||||
|
||||
import net.minestom.server.entity.EntityCreature;
|
||||
import net.minestom.server.entity.EntityType;
|
||||
import net.minestom.server.entity.type.Animal;
|
||||
import net.minestom.server.utils.Position;
|
||||
|
||||
public class EntityCow extends EntityCreature {
|
||||
public class EntityCow extends EntityCreature implements Animal {
|
||||
public EntityCow(Position spawnPosition) {
|
||||
super(EntityType.COW, spawnPosition);
|
||||
setBoundingBox(0.9f, 1.4f, 0.9f);
|
@ -0,0 +1,13 @@
|
||||
package net.minestom.server.entity.type.animal;
|
||||
|
||||
import net.minestom.server.entity.EntityCreature;
|
||||
import net.minestom.server.entity.EntityType;
|
||||
import net.minestom.server.entity.type.Animal;
|
||||
import net.minestom.server.utils.Position;
|
||||
|
||||
public class EntityDolphin extends EntityCreature implements Animal {
|
||||
public EntityDolphin(Position spawnPosition) {
|
||||
super(EntityType.DOLPHIN, spawnPosition);
|
||||
setBoundingBox(0.6f,0.6f,0.9f);
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package net.minestom.server.entity.type.animal;
|
||||
|
||||
import net.minestom.server.entity.EntityCreature;
|
||||
import net.minestom.server.entity.EntityType;
|
||||
import net.minestom.server.entity.type.Animal;
|
||||
import net.minestom.server.utils.Position;
|
||||
|
||||
public class EntityFox extends EntityCreature implements Animal {
|
||||
public EntityFox(Position spawnPosition) {
|
||||
super(EntityType.FOX, spawnPosition);
|
||||
setBoundingBox(0.6f, 0.7f, 0.6f);
|
||||
}
|
||||
}
|
@ -1,13 +1,14 @@
|
||||
package net.minestom.server.entity.type;
|
||||
package net.minestom.server.entity.type.animal;
|
||||
|
||||
import net.minestom.server.entity.EntityCreature;
|
||||
import net.minestom.server.entity.EntityType;
|
||||
import net.minestom.server.entity.type.Animal;
|
||||
import net.minestom.server.network.packet.PacketWriter;
|
||||
import net.minestom.server.utils.Position;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
public class EntityMooshroom extends EntityCreature {
|
||||
public class EntityMooshroom extends EntityCreature implements Animal {
|
||||
|
||||
private MooshroomType mooshroomType;
|
||||
|
@ -0,0 +1,13 @@
|
||||
package net.minestom.server.entity.type.animal;
|
||||
|
||||
import net.minestom.server.entity.EntityCreature;
|
||||
import net.minestom.server.entity.EntityType;
|
||||
import net.minestom.server.entity.type.Animal;
|
||||
import net.minestom.server.utils.Position;
|
||||
|
||||
public class EntityOcelot extends EntityCreature implements Animal {
|
||||
public EntityOcelot(Position spawnPosition) {
|
||||
super(EntityType.OCELOT, spawnPosition);
|
||||
setBoundingBox(0.6f, 0.7f, 0.6f);
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package net.minestom.server.entity.type.animal;
|
||||
|
||||
import net.minestom.server.entity.EntityCreature;
|
||||
import net.minestom.server.entity.EntityType;
|
||||
import net.minestom.server.entity.type.Animal;
|
||||
import net.minestom.server.utils.Position;
|
||||
|
||||
public class EntityPanda extends EntityCreature implements Animal {
|
||||
public EntityPanda(Position spawnPosition) {
|
||||
super(EntityType.PANDA, spawnPosition);
|
||||
setBoundingBox(1.3f, 1.25f, 1.3f);
|
||||
}
|
||||
}
|
@ -1,13 +1,14 @@
|
||||
package net.minestom.server.entity.type;
|
||||
package net.minestom.server.entity.type.animal;
|
||||
|
||||
import net.minestom.server.entity.EntityCreature;
|
||||
import net.minestom.server.entity.EntityType;
|
||||
import net.minestom.server.entity.type.Animal;
|
||||
import net.minestom.server.network.packet.PacketWriter;
|
||||
import net.minestom.server.utils.Position;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
public class EntityPig extends EntityCreature {
|
||||
public class EntityPig extends EntityCreature implements Animal {
|
||||
|
||||
private boolean saddle;
|
||||
|
@ -1,13 +1,14 @@
|
||||
package net.minestom.server.entity.type;
|
||||
package net.minestom.server.entity.type.animal;
|
||||
|
||||
import net.minestom.server.entity.EntityCreature;
|
||||
import net.minestom.server.entity.EntityType;
|
||||
import net.minestom.server.entity.type.Animal;
|
||||
import net.minestom.server.network.packet.PacketWriter;
|
||||
import net.minestom.server.utils.Position;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
public class EntityPolarBear extends EntityCreature {
|
||||
public class EntityPolarBear extends EntityCreature implements Animal {
|
||||
|
||||
private boolean standingUp;
|
||||
|
@ -1,13 +1,14 @@
|
||||
package net.minestom.server.entity.type;
|
||||
package net.minestom.server.entity.type.animal;
|
||||
|
||||
import net.minestom.server.entity.EntityCreature;
|
||||
import net.minestom.server.entity.EntityType;
|
||||
import net.minestom.server.entity.type.Animal;
|
||||
import net.minestom.server.network.packet.PacketWriter;
|
||||
import net.minestom.server.utils.Position;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
public class EntityRabbit extends EntityCreature {
|
||||
public class EntityRabbit extends EntityCreature implements Animal {
|
||||
|
||||
private int type;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package net.minestom.server.entity.type;
|
||||
package net.minestom.server.entity.type.decoration;
|
||||
|
||||
import net.minestom.server.entity.EntityType;
|
||||
import net.minestom.server.entity.ObjectEntity;
|
@ -1,4 +1,4 @@
|
||||
package net.minestom.server.entity.type;
|
||||
package net.minestom.server.entity.type.decoration;
|
||||
|
||||
import net.minestom.server.entity.EntityType;
|
||||
import net.minestom.server.entity.ObjectEntity;
|
@ -1,13 +1,14 @@
|
||||
package net.minestom.server.entity.type;
|
||||
package net.minestom.server.entity.type.monster;
|
||||
|
||||
import net.minestom.server.entity.EntityCreature;
|
||||
import net.minestom.server.entity.EntityType;
|
||||
import net.minestom.server.entity.type.Monster;
|
||||
import net.minestom.server.network.packet.PacketWriter;
|
||||
import net.minestom.server.utils.Position;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
public class EntityBlaze extends EntityCreature {
|
||||
public class EntityBlaze extends EntityCreature implements Monster {
|
||||
|
||||
public EntityBlaze(Position spawnPosition) {
|
||||
super(EntityType.BLAZE, spawnPosition);
|
@ -1,12 +1,14 @@
|
||||
package net.minestom.server.entity.type;
|
||||
package net.minestom.server.entity.type.monster;
|
||||
|
||||
import net.minestom.server.entity.EntityCreature;
|
||||
import net.minestom.server.entity.EntityType;
|
||||
import net.minestom.server.entity.type.Monster;
|
||||
import net.minestom.server.utils.Position;
|
||||
|
||||
public class EntityCaveSpider extends EntityCreature {
|
||||
public class EntityCaveSpider extends EntityCreature implements Monster {
|
||||
public EntityCaveSpider(Position spawnPosition) {
|
||||
super(EntityType.CAVE_SPIDER, spawnPosition);
|
||||
setBoundingBox(0.7f, 0.5f, 0.7f);
|
||||
setEyeHeight(0.45f);
|
||||
}
|
||||
}
|
@ -1,13 +1,14 @@
|
||||
package net.minestom.server.entity.type;
|
||||
package net.minestom.server.entity.type.monster;
|
||||
|
||||
import net.minestom.server.entity.EntityCreature;
|
||||
import net.minestom.server.entity.EntityType;
|
||||
import net.minestom.server.entity.type.Monster;
|
||||
import net.minestom.server.network.packet.PacketWriter;
|
||||
import net.minestom.server.utils.Position;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
public class EntityCreeper extends EntityCreature {
|
||||
public class EntityCreeper extends EntityCreature implements Monster {
|
||||
|
||||
private CreeperState creeperState;
|
||||
private boolean charged;
|
@ -1,12 +1,14 @@
|
||||
package net.minestom.server.entity.type;
|
||||
package net.minestom.server.entity.type.monster;
|
||||
|
||||
import net.minestom.server.entity.EntityCreature;
|
||||
import net.minestom.server.entity.EntityType;
|
||||
import net.minestom.server.entity.type.Monster;
|
||||
import net.minestom.server.utils.Position;
|
||||
|
||||
public class EntityEndermite extends EntityCreature {
|
||||
public class EntityEndermite extends EntityCreature implements Monster {
|
||||
public EntityEndermite(Position spawnPosition) {
|
||||
super(EntityType.ENDERMITE, spawnPosition);
|
||||
setBoundingBox(0.4f, 0.3f, 0.4f);
|
||||
setEyeHeight(0.13f);
|
||||
}
|
||||
}
|
@ -1,19 +1,21 @@
|
||||
package net.minestom.server.entity.type;
|
||||
package net.minestom.server.entity.type.monster;
|
||||
|
||||
import net.minestom.server.entity.EntityCreature;
|
||||
import net.minestom.server.entity.EntityType;
|
||||
import net.minestom.server.entity.type.Monster;
|
||||
import net.minestom.server.network.packet.PacketWriter;
|
||||
import net.minestom.server.utils.Position;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
public class EntityGhast extends EntityCreature {
|
||||
public class EntityGhast extends EntityCreature implements Monster {
|
||||
|
||||
private boolean attacking;
|
||||
|
||||
public EntityGhast(Position spawnPosition) {
|
||||
super(EntityType.GHAST, spawnPosition);
|
||||
setBoundingBox(4, 4, 4);
|
||||
setEyeHeight(2.6f);
|
||||
}
|
||||
|
||||
@Override
|
@ -1,10 +1,11 @@
|
||||
package net.minestom.server.entity.type;
|
||||
package net.minestom.server.entity.type.monster;
|
||||
|
||||
import net.minestom.server.entity.EntityCreature;
|
||||
import net.minestom.server.entity.EntityType;
|
||||
import net.minestom.server.entity.type.Monster;
|
||||
import net.minestom.server.utils.Position;
|
||||
|
||||
public class EntityGiant extends EntityCreature {
|
||||
public class EntityGiant extends EntityCreature implements Monster {
|
||||
public EntityGiant(Position spawnPosition) {
|
||||
super(EntityType.GIANT, spawnPosition);
|
||||
setBoundingBox(3.6f, 10.8f, 3.6f);
|
@ -1,14 +1,15 @@
|
||||
package net.minestom.server.entity.type;
|
||||
package net.minestom.server.entity.type.monster;
|
||||
|
||||
import net.minestom.server.entity.Entity;
|
||||
import net.minestom.server.entity.EntityCreature;
|
||||
import net.minestom.server.entity.EntityType;
|
||||
import net.minestom.server.entity.type.Monster;
|
||||
import net.minestom.server.network.packet.PacketWriter;
|
||||
import net.minestom.server.utils.Position;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
public class EntityGuardian extends EntityCreature {
|
||||
public class EntityGuardian extends EntityCreature implements Monster {
|
||||
|
||||
private boolean retractingSpikes;
|
||||
private Entity target;
|
@ -1,13 +1,14 @@
|
||||
package net.minestom.server.entity.type;
|
||||
package net.minestom.server.entity.type.monster;
|
||||
|
||||
import net.minestom.server.entity.EntityCreature;
|
||||
import net.minestom.server.entity.EntityType;
|
||||
import net.minestom.server.entity.type.Monster;
|
||||
import net.minestom.server.network.packet.PacketWriter;
|
||||
import net.minestom.server.utils.Position;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
public class EntityPhantom extends EntityCreature {
|
||||
public class EntityPhantom extends EntityCreature implements Monster {
|
||||
|
||||
private int size;
|
||||
|
@ -1,12 +1,14 @@
|
||||
package net.minestom.server.entity.type;
|
||||
package net.minestom.server.entity.type.monster;
|
||||
|
||||
import net.minestom.server.entity.EntityCreature;
|
||||
import net.minestom.server.entity.EntityType;
|
||||
import net.minestom.server.entity.type.Monster;
|
||||
import net.minestom.server.utils.Position;
|
||||
|
||||
public class EntitySilverfish extends EntityCreature {
|
||||
public class EntitySilverfish extends EntityCreature implements Monster {
|
||||
public EntitySilverfish(Position spawnPosition) {
|
||||
super(EntityType.SILVERFISH, spawnPosition);
|
||||
setBoundingBox(0.4f, 0.3f, 0.4f);
|
||||
setEyeHeight(0.13f);
|
||||
}
|
||||
}
|
@ -1,13 +1,14 @@
|
||||
package net.minestom.server.entity.type;
|
||||
package net.minestom.server.entity.type.monster;
|
||||
|
||||
import net.minestom.server.entity.EntityCreature;
|
||||
import net.minestom.server.entity.EntityType;
|
||||
import net.minestom.server.entity.type.Monster;
|
||||
import net.minestom.server.network.packet.PacketWriter;
|
||||
import net.minestom.server.utils.Position;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
public class EntitySlime extends EntityCreature {
|
||||
public class EntitySlime extends EntityCreature implements Monster {
|
||||
|
||||
private int size;
|
||||
|
@ -1,19 +1,21 @@
|
||||
package net.minestom.server.entity.type;
|
||||
package net.minestom.server.entity.type.monster;
|
||||
|
||||
import net.minestom.server.entity.EntityCreature;
|
||||
import net.minestom.server.entity.EntityType;
|
||||
import net.minestom.server.entity.type.Monster;
|
||||
import net.minestom.server.network.packet.PacketWriter;
|
||||
import net.minestom.server.utils.Position;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
public class EntitySpider extends EntityCreature {
|
||||
public class EntitySpider extends EntityCreature implements Monster {
|
||||
|
||||
private boolean climbing;
|
||||
|
||||
public EntitySpider(Position spawnPosition) {
|
||||
super(EntityType.SPIDER, spawnPosition);
|
||||
setBoundingBox(1.4f, 0.9f, 1.4f);
|
||||
setEyeHeight(0.65f);
|
||||
}
|
||||
|
||||
@Override
|
@ -1,19 +1,21 @@
|
||||
package net.minestom.server.entity.type;
|
||||
package net.minestom.server.entity.type.monster;
|
||||
|
||||
import net.minestom.server.entity.EntityCreature;
|
||||
import net.minestom.server.entity.EntityType;
|
||||
import net.minestom.server.entity.type.Monster;
|
||||
import net.minestom.server.network.packet.PacketWriter;
|
||||
import net.minestom.server.utils.Position;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
public class EntityWitch extends EntityCreature {
|
||||
public class EntityWitch extends EntityCreature implements Monster {
|
||||
|
||||
private boolean drinkingPotion;
|
||||
|
||||
public EntityWitch(Position spawnPosition) {
|
||||
super(EntityType.WITCH, spawnPosition);
|
||||
setBoundingBox(0.6f, 1.95f, 0.6f);
|
||||
setEyeHeight(1.62f);
|
||||
}
|
||||
|
||||
@Override
|
@ -1,13 +1,14 @@
|
||||
package net.minestom.server.entity.type;
|
||||
package net.minestom.server.entity.type.monster;
|
||||
|
||||
import net.minestom.server.entity.EntityCreature;
|
||||
import net.minestom.server.entity.EntityType;
|
||||
import net.minestom.server.entity.type.Monster;
|
||||
import net.minestom.server.network.packet.PacketWriter;
|
||||
import net.minestom.server.utils.Position;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
public class EntityZombie extends EntityCreature {
|
||||
public class EntityZombie extends EntityCreature implements Monster {
|
||||
|
||||
private boolean baby;
|
||||
private boolean becomingDrowned;
|
||||
@ -15,7 +16,6 @@ public class EntityZombie extends EntityCreature {
|
||||
public EntityZombie(Position spawnPosition) {
|
||||
super(EntityType.ZOMBIE, spawnPosition);
|
||||
setBoundingBox(0.6f, 1.95f, 0.6f);
|
||||
setEyeHeight(1.74f);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -58,4 +58,9 @@ public class EntityZombie extends EntityCreature {
|
||||
this.becomingDrowned = becomingDrowned;
|
||||
sendMetadataIndex(17);
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getEyeHeight() {
|
||||
return isBaby() ? 0.93f : 1.74f;
|
||||
}
|
||||
}
|
@ -1,18 +1,19 @@
|
||||
package net.minestom.server.entity.type;
|
||||
package net.minestom.server.entity.type.monster;
|
||||
|
||||
import net.minestom.server.entity.EntityCreature;
|
||||
import net.minestom.server.entity.EntityType;
|
||||
import net.minestom.server.entity.type.Monster;
|
||||
import net.minestom.server.network.packet.PacketWriter;
|
||||
import net.minestom.server.utils.Position;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
public class EntityPigZombie extends EntityCreature {
|
||||
public class EntityZombifiedPiglin extends EntityCreature implements Monster {
|
||||
|
||||
private boolean baby;
|
||||
private boolean becomingDrowned;
|
||||
|
||||
public EntityPigZombie(Position spawnPosition) {
|
||||
public EntityZombifiedPiglin(Position spawnPosition) {
|
||||
super(EntityType.ZOMBIFIED_PIGLIN, spawnPosition);
|
||||
setBoundingBox(0.6f, 1.95f, 0.6f);
|
||||
}
|
||||
@ -68,4 +69,8 @@ public class EntityPigZombie extends EntityCreature {
|
||||
sendMetadataIndex(17);
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getEyeHeight() {
|
||||
return isBaby() ? 0.93f : 1.74f;
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package net.minestom.server.entity.type;
|
||||
package net.minestom.server.entity.type.other;
|
||||
|
||||
import net.minestom.server.entity.EntityType;
|
||||
import net.minestom.server.entity.ObjectEntity;
|
@ -1,13 +1,14 @@
|
||||
package net.minestom.server.entity.type;
|
||||
package net.minestom.server.entity.type.other;
|
||||
|
||||
import net.minestom.server.entity.EntityCreature;
|
||||
import net.minestom.server.entity.EntityType;
|
||||
import net.minestom.server.entity.type.Constructable;
|
||||
import net.minestom.server.network.packet.PacketWriter;
|
||||
import net.minestom.server.utils.Position;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
public class EntityIronGolem extends EntityCreature {
|
||||
public class EntityIronGolem extends EntityCreature implements Constructable {
|
||||
|
||||
private boolean playerCreated;
|
||||
|
@ -1,13 +1,14 @@
|
||||
package net.minestom.server.entity.type;
|
||||
package net.minestom.server.entity.type.other;
|
||||
|
||||
import net.minestom.server.entity.EntityCreature;
|
||||
import net.minestom.server.entity.EntityType;
|
||||
import net.minestom.server.entity.type.Constructable;
|
||||
import net.minestom.server.network.packet.PacketWriter;
|
||||
import net.minestom.server.utils.Position;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
public class EntitySnowman extends EntityCreature {
|
||||
public class EntitySnowman extends EntityCreature implements Constructable {
|
||||
|
||||
private boolean pumpkinHat;
|
||||
|
@ -1,7 +1,8 @@
|
||||
package net.minestom.server.entity.type;
|
||||
package net.minestom.server.entity.type.projectile;
|
||||
|
||||
import net.minestom.server.entity.EntityType;
|
||||
import net.minestom.server.entity.ObjectEntity;
|
||||
import net.minestom.server.entity.type.Projectile;
|
||||
import net.minestom.server.item.ItemStack;
|
||||
import net.minestom.server.item.Material;
|
||||
import net.minestom.server.network.packet.PacketWriter;
|
||||
@ -9,7 +10,7 @@ import net.minestom.server.utils.Position;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
public class EntityEyeOfEnder extends ObjectEntity {
|
||||
public class EntityEyeOfEnder extends ObjectEntity implements Projectile {
|
||||
|
||||
private ItemStack itemStack;
|
||||
|
@ -1,14 +1,15 @@
|
||||
package net.minestom.server.entity.type;
|
||||
package net.minestom.server.entity.type.projectile;
|
||||
|
||||
import net.minestom.server.entity.EntityType;
|
||||
import net.minestom.server.entity.ObjectEntity;
|
||||
import net.minestom.server.entity.type.Projectile;
|
||||
import net.minestom.server.item.ItemStack;
|
||||
import net.minestom.server.network.packet.PacketWriter;
|
||||
import net.minestom.server.utils.Position;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
public class EntityPotion extends ObjectEntity {
|
||||
public class EntityPotion extends ObjectEntity implements Projectile {
|
||||
|
||||
private ItemStack potion;
|
||||
|
@ -1,14 +1,15 @@
|
||||
package net.minestom.server.entity.type;
|
||||
package net.minestom.server.entity.type.vehicle;
|
||||
|
||||
import net.minestom.server.entity.EntityType;
|
||||
import net.minestom.server.entity.ObjectEntity;
|
||||
import net.minestom.server.entity.type.Vehicle;
|
||||
import net.minestom.server.network.packet.PacketWriter;
|
||||
import net.minestom.server.utils.Position;
|
||||
import net.minestom.server.utils.validate.Check;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
public class EntityBoat extends ObjectEntity {
|
||||
public class EntityBoat extends ObjectEntity implements Vehicle {
|
||||
|
||||
private BoatType boatType;
|
||||
private boolean leftPaddleTurning;
|
@ -2,7 +2,7 @@ package net.minestom.server.listener;
|
||||
|
||||
import net.minestom.server.entity.Entity;
|
||||
import net.minestom.server.entity.Player;
|
||||
import net.minestom.server.entity.type.EntityBoat;
|
||||
import net.minestom.server.entity.type.vehicle.EntityBoat;
|
||||
import net.minestom.server.network.packet.client.play.ClientSteerBoatPacket;
|
||||
import net.minestom.server.network.packet.client.play.ClientSteerVehiclePacket;
|
||||
import net.minestom.server.network.packet.client.play.ClientVehicleMovePacket;
|
||||
|
Loading…
Reference in New Issue
Block a user