No Gravity #223
@ -52,7 +52,7 @@ public class RArmorStand extends REntity {
|
||||
private final Size size;
|
||||
|
||||
public RArmorStand(REntityServer server, Location location, Size size) {
|
||||
super(server, EntityType.ARMOR_STAND, location,0);
|
||||
super(server, EntityType.ARMOR_STAND, location);
|
||||
this.size = size;
|
||||
}
|
||||
|
||||
|
@ -70,7 +70,11 @@ public class REntity {
|
||||
private String displayName;
|
||||
protected final Map<Object, ItemStack> itemSlots;
|
||||
|
||||
public REntity(REntityServer server, EntityType entityType, Location location,int objectData) {
|
||||
public REntity(REntityServer server, EntityType entityType, Location location) {
|
||||
zOnlyKroks markierte diese Unterhaltung als gelöst
Veraltet
|
||||
this(server, entityType, new UUID(random.nextLong() & -61441L | 16384L, random.nextLong() & 4611686018427387903L | -9223372036854775808L), location,0);
|
||||
}
|
||||
|
||||
protected REntity(REntityServer server, EntityType entityType, Location location,int objectData) {
|
||||
this(server, entityType, new UUID(random.nextLong() & -61441L | 16384L, random.nextLong() & 4611686018427387903L | -9223372036854775808L), location,objectData);
|
||||
}
|
||||
|
||||
@ -373,7 +377,20 @@ public class REntity {
|
||||
|
||||
protected static Function<REntity, Object> spawnPacketGenerator(Class<?> spawnPacket, int posOffset) {
|
||||
Reflection.FieldAccessor<Integer> entityId = Reflection.getField(spawnPacket, int.class, 0);
|
||||
Reflection.FieldAccessor<Integer> additionalData = Reflection.getField(spawnPacket, int.class, 9);
|
||||
|
||||
//Core version 8, index = 10
|
||||
//Core version 9 to 18, index = 6
|
||||
//Core version 19, index = 7
|
||||
|
||||
int index;
|
||||
switch (Core.getVersion()) {
|
||||
case 8: index = 10;
|
||||
case 19: index = 7;
|
||||
default: index = 6;
|
||||
}
|
||||
|
||||
|
||||
Reflection.FieldAccessor<Integer> additionalData = Reflection.getField(spawnPacket, int.class, index);
|
||||
BountifulWrapper.PositionSetter position = BountifulWrapper.impl.getPositionSetter(spawnPacket, posOffset);
|
||||
|
||||
return entity -> {
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren
Äh nein, in diesem Konstruktor wird definitiv auf 0 gedefaultet. Weil dieser Konstruktor wird bereits in anderen Projekten verwendet (bei Merge gäbe es jede Menge Fehler) und die REntities sollen nicht direkt mit einem random int initialisiert werden. (Evtl. diesen Konstruktor in einen Protected Konstruktor umwandeln und den alten beibehalten)