mirror of
https://github.com/Flowsqy/ShopChest.git
synced 2024-11-13 23:05:21 +01:00
Update 1.20 reflection fields
This commit is contained in:
parent
926062b2dc
commit
70aa818d9a
@ -33,10 +33,10 @@ public class FakeArmorStandImpl extends FakeEntityImpl<String> implements FakeAr
|
||||
final Field dataSharedFlagsId = Entity.class.getDeclaredField("an"); // DATA_SHARED_FLAGS_ID
|
||||
dataSharedFlagsId.setAccessible(true);
|
||||
DATA_SHARED_FLAGS_ID = forceCast(dataSharedFlagsId.get(null));
|
||||
final Field dataCustomNameField = Entity.class.getDeclaredField("aR"); // DATA_CUSTOM_NAME
|
||||
final Field dataCustomNameField = Entity.class.getDeclaredField("aU"); // DATA_CUSTOM_NAME
|
||||
dataCustomNameField.setAccessible(true);
|
||||
DATA_CUSTOM_NAME = forceCast(dataCustomNameField.get(null));
|
||||
final Field dataCustomNameVisibleField = Entity.class.getDeclaredField("aS"); // DATA_CUSTOM_NAME_VISIBLE
|
||||
final Field dataCustomNameVisibleField = Entity.class.getDeclaredField("aV"); // DATA_CUSTOM_NAME_VISIBLE
|
||||
dataCustomNameVisibleField.setAccessible(true);
|
||||
DATA_CUSTOM_NAME_VISIBLE = forceCast(dataCustomNameVisibleField.get(null));
|
||||
} catch (ReflectiveOperationException e) {
|
||||
|
@ -31,10 +31,10 @@ public abstract class FakeEntityImpl<T> implements FakeEntity {
|
||||
final Field entityCounterField = Entity.class.getDeclaredField("d"); // ENTITY_COUNTER
|
||||
entityCounterField.setAccessible(true);
|
||||
ENTITY_COUNTER = (AtomicInteger) entityCounterField.get(null);
|
||||
final Field dataNoGravityField = Entity.class.getDeclaredField("aU"); // DATA_NO_GRAVITY
|
||||
final Field dataNoGravityField = Entity.class.getDeclaredField("aX"); // DATA_NO_GRAVITY
|
||||
dataNoGravityField.setAccessible(true);
|
||||
DATA_NO_GRAVITY = forceCast(dataNoGravityField.get(null));
|
||||
final Field dataSilentField = Entity.class.getDeclaredField("aT"); // DATA_SILENT
|
||||
final Field dataSilentField = Entity.class.getDeclaredField("aW"); // DATA_SILENT
|
||||
dataSilentField.setAccessible(true);
|
||||
DATA_SILENT = forceCast(dataSilentField.get(null));
|
||||
} catch (ReflectiveOperationException e) {
|
||||
|
Loading…
Reference in New Issue
Block a user