Dieser Commit ist enthalten in:
Ursprung
c23a6a4afc
Commit
b250482574
@ -40,6 +40,8 @@ public class REntity {
|
||||
private static final Object nameWatcher = BountifulWrapper.impl.getDataWatcherObject(2, Core.getVersion() > 12 ? Optional.class : String.class); // Optional<IChatBaseComponent>
|
||||
private static final Object nameVisibleWatcher = BountifulWrapper.impl.getDataWatcherObject(3, Boolean.class);
|
||||
|
||||
private static final Object noGravityDataWatcher = BountifulWrapper.impl.getDataWatcherObject(5,Boolean.class);
|
||||
|
||||
private static int entityIdCounter = -1;
|
||||
private static final Random random = new Random();
|
||||
|
||||
@ -59,6 +61,7 @@ public class REntity {
|
||||
private boolean invisible;
|
||||
private FlatteningWrapper.EntityPose pose = FlatteningWrapper.EntityPose.NORMAL;
|
||||
private boolean bowDrawn;
|
||||
private boolean noGravity;
|
||||
private int fireTick;
|
||||
@Getter
|
||||
private String displayName;
|
||||
@ -185,6 +188,11 @@ public class REntity {
|
||||
server.removeEntity(this);
|
||||
}
|
||||
|
||||
public void setNoGravity(boolean noGravity) {
|
||||
this.noGravity = noGravity;
|
||||
server.updateEntity(this,getDataWatcherPacket(noGravityDataWatcher,getEntityStatus()));
|
||||
}
|
||||
|
||||
private static int spawnPacketOffset() {
|
||||
switch (Core.getVersion()) {
|
||||
case 8:
|
||||
@ -230,6 +238,9 @@ public class REntity {
|
||||
if(displayName != null) {
|
||||
packetSink.accept(getDataWatcherPacket(nameWatcher, FlatteningWrapper.impl.formatDisplayName(displayName), nameVisibleWatcher, true));
|
||||
}
|
||||
|
||||
if(noGravity)
|
||||
packetSink.accept(getDataWatcherPacket(noGravityDataWatcher,getEntityStatus()));
|
||||
}
|
||||
|
||||
void tick() {
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren