Fixed shaking property not disabling
This commit is contained in:
parent
9c96be96db
commit
0b4e3cd364
4 changed files with 5 additions and 5 deletions
|
@ -26,5 +26,5 @@ public interface MetadataFactory {
|
|||
Collection<EntityData> name(Component name);
|
||||
EntityData noGravity();
|
||||
EntityData pose(EntityPose pose);
|
||||
EntityData shaking();
|
||||
EntityData shaking(boolean enabled);
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ public class V1_17MetadataFactory extends V1_16MetadataFactory {
|
|||
}
|
||||
|
||||
@Override
|
||||
public EntityData shaking() {
|
||||
return newEntityData(7, EntityDataTypes.INT, 140);
|
||||
public EntityData shaking(boolean enabled) {
|
||||
return newEntityData(7, EntityDataTypes.INT, enabled ? 140 : 0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ public class V1_8MetadataFactory implements MetadataFactory {
|
|||
}
|
||||
|
||||
@Override
|
||||
public EntityData shaking() {
|
||||
public EntityData shaking(boolean enabled) {
|
||||
throw new UnsupportedOperationException("The shaking entity data isn't supported on this version");
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ public class V1_17PacketFactory extends V1_16PacketFactory {
|
|||
properties.hasProperty(propertyRegistry.getByName("glow", Boolean.class)),
|
||||
properties.getProperty(propertyRegistry.getByName("invisible", Boolean.class)),
|
||||
false));
|
||||
if (properties.getProperty(propertyRegistry.getByName("shaking", Boolean.class))) add(data, metadataFactory.shaking());
|
||||
add(data, metadataFactory.shaking(properties.getProperty(propertyRegistry.getByName("shaking", Boolean.class))));
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue