removed crouched property as pose can be used instead
This commit is contained in:
parent
b7df0e3a33
commit
2c708e2754
9 changed files with 7 additions and 12 deletions
|
@ -44,7 +44,6 @@ public class EntityPropertyRegistryImpl implements EntityPropertyRegistry {
|
|||
registerType("hand", ItemStack.class);
|
||||
registerType("offhand", ItemStack.class);
|
||||
|
||||
registerType("crouched", false); // TODO
|
||||
registerType("using_item", false); // TODO: Eating/Drinking/Blocking with sword/etc
|
||||
registerType("potion_color", 0xFFFFFF); // TODO
|
||||
registerType("potion_ambient", false); // TODO
|
||||
|
|
|
@ -21,7 +21,7 @@ import java.util.Collection;
|
|||
*/
|
||||
public interface MetadataFactory {
|
||||
EntityData skinLayers(boolean cape, boolean jacket, boolean leftSleeve, boolean rightSleeve, boolean leftLeg, boolean rightLeg, boolean hat);
|
||||
Collection<EntityData> effects(boolean onFire, boolean crouched, boolean glowing, boolean invisible, boolean usingElytra, boolean shaking);
|
||||
Collection<EntityData> effects(boolean onFire, boolean glowing, boolean invisible, boolean usingElytra, boolean shaking);
|
||||
EntityData silent(boolean enabled);
|
||||
Collection<EntityData> name(Component name);
|
||||
EntityData noGravity();
|
||||
|
|
|
@ -12,9 +12,9 @@ public class V1_17MetadataFactory extends V1_16MetadataFactory {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Collection<EntityData> effects(boolean onFire, boolean crouching, boolean glowing, boolean invisible, boolean usingElytra, boolean shaking) {
|
||||
public Collection<EntityData> effects(boolean onFire, boolean glowing, boolean invisible, boolean usingElytra, boolean shaking) {
|
||||
return list(
|
||||
newEntityData(0, EntityDataTypes.BYTE, (byte) ((onFire ? 0x01 : 0) | (crouching ? 0x02 : 0) | (invisible ? 0x20 : 0) | (glowing ? 0x40 : 0) | (usingElytra ? 0x80 : 0))),
|
||||
newEntityData(0, EntityDataTypes.BYTE, (byte) ((onFire ? 0x01 : 0) | (invisible ? 0x20 : 0) | (glowing ? 0x40 : 0) | (usingElytra ? 0x80 : 0))),
|
||||
newEntityData(7, EntityDataTypes.INT, shaking ? 140 : 0)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -18,8 +18,8 @@ public class V1_8MetadataFactory implements MetadataFactory {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Collection<EntityData> effects(boolean onFire, boolean crouched, boolean glowing, boolean invisible, boolean usingElytra, boolean shaking) {
|
||||
return list(newEntityData(0, EntityDataTypes.BYTE, (byte) ((onFire ? 0x01 : 0) | (crouched ? 0x02 : 0) | (invisible ? 0x20 : 0))));
|
||||
public Collection<EntityData> effects(boolean onFire, boolean glowing, boolean invisible, boolean usingElytra, boolean shaking) {
|
||||
return list(newEntityData(0, EntityDataTypes.BYTE, (byte) ((onFire ? 0x01 : 0) | (invisible ? 0x20 : 0))));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -14,8 +14,8 @@ public class V1_9MetadataFactory extends V1_8MetadataFactory {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Collection<EntityData> effects(boolean onFire, boolean crouched, boolean glowing, boolean invisible, boolean usingElytra, boolean shaking) {
|
||||
return list(newEntityData(0, EntityDataTypes.BYTE, (byte) ((onFire ? 0x01 : 0) | (crouched ? 0x02 : 0) | (invisible ? 0x20 : 0) | (glowing ? 0x40 : 0) | (usingElytra ? 0x80 : 0))));
|
||||
public Collection<EntityData> effects(boolean onFire, boolean glowing, boolean invisible, boolean usingElytra, boolean shaking) {
|
||||
return list(newEntityData(0, EntityDataTypes.BYTE, (byte) ((onFire ? 0x01 : 0) | (invisible ? 0x20 : 0) | (glowing ? 0x40 : 0) | (usingElytra ? 0x80 : 0))));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -72,7 +72,6 @@ public class NpcTypeImpl implements NpcType {
|
|||
}
|
||||
|
||||
public NpcTypeImpl build() {
|
||||
allowedProperties.add(propertyRegistry.getByName("crouched"));
|
||||
allowedProperties.add(propertyRegistry.getByName("fire"));
|
||||
allowedProperties.add(propertyRegistry.getByName("invisible"));
|
||||
allowedProperties.add(propertyRegistry.getByName("silent"));
|
||||
|
|
|
@ -21,7 +21,6 @@ public class V1_17PacketFactory extends V1_16PacketFactory {
|
|||
public Map<Integer, EntityData> generateMetadata(Player player, PacketEntity entity, PropertyHolder properties) {
|
||||
Map<Integer, EntityData> data = super.generateMetadata(player, entity, properties);
|
||||
addAll(data, metadataFactory.effects(properties.getProperty(propertyRegistry.getByName("fire", Boolean.class)),
|
||||
properties.getProperty(propertyRegistry.getByName("crouched", Boolean.class)),
|
||||
properties.hasProperty(propertyRegistry.getByName("glow", Boolean.class)),
|
||||
properties.getProperty(propertyRegistry.getByName("invisible", Boolean.class)),
|
||||
false,
|
||||
|
|
|
@ -137,7 +137,6 @@ public class V1_8PacketFactory implements PacketFactory {
|
|||
));
|
||||
addAll(data, metadataFactory.effects(
|
||||
properties.getProperty(propertyRegistry.getByName("fire", Boolean.class)),
|
||||
properties.getProperty(propertyRegistry.getByName("crouched", Boolean.class)),
|
||||
false,
|
||||
properties.getProperty(propertyRegistry.getByName("invisible", Boolean.class)),
|
||||
false,
|
||||
|
|
|
@ -21,7 +21,6 @@ public class V1_9PacketFactory extends V1_8PacketFactory {
|
|||
public Map<Integer, EntityData> generateMetadata(Player player, PacketEntity entity, PropertyHolder properties) {
|
||||
Map<Integer, EntityData> data = super.generateMetadata(player, entity, properties);
|
||||
addAll(data, metadataFactory.effects(properties.getProperty(propertyRegistry.getByName("fire", Boolean.class)),
|
||||
properties.getProperty(propertyRegistry.getByName("crouched", Boolean.class)),
|
||||
properties.hasProperty(propertyRegistry.getByName("glow", Boolean.class)),
|
||||
properties.getProperty(propertyRegistry.getByName("invisible", Boolean.class)),
|
||||
false,
|
||||
|
|
Loading…
Reference in a new issue