fix: disabling entity_sitting property
This commit is contained in:
parent
f5d1a1914a
commit
41244fb86b
1 changed files with 6 additions and 4 deletions
|
@ -24,10 +24,12 @@ public class EntitySittingProperty extends EntityPropertyImpl<Boolean> {
|
||||||
@Override
|
@Override
|
||||||
public void apply(Player player, PacketEntity entity, boolean isSpawned, Map<Integer, EntityData> properties) {
|
public void apply(Player player, PacketEntity entity, boolean isSpawned, Map<Integer, EntityData> properties) {
|
||||||
boolean sitting = entity.getProperty(this);
|
boolean sitting = entity.getProperty(this);
|
||||||
if (sitting) if (entity.getVehicle() == null) {
|
if (sitting) {
|
||||||
PacketEntity vehiclePacketEntity = new PacketEntity(packetFactory, new ArmorStandVehicleProperties(propertyRegistry),
|
if (entity.getVehicle() == null) {
|
||||||
entity.getViewable(), EntityTypes.ARMOR_STAND, entity.getLocation().withY(entity.getLocation().getY() - 0.9));
|
PacketEntity vehiclePacketEntity = new PacketEntity(packetFactory, new ArmorStandVehicleProperties(propertyRegistry),
|
||||||
entity.setVehicle(vehiclePacketEntity);
|
entity.getViewable(), EntityTypes.ARMOR_STAND, entity.getLocation().withY(entity.getLocation().getY() - 0.9));
|
||||||
|
entity.setVehicle(vehiclePacketEntity);
|
||||||
|
}
|
||||||
} else if (entity.getVehicle() != null) {
|
} else if (entity.getVehicle() != null) {
|
||||||
entity.setVehicle(null);
|
entity.setVehicle(null);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue