Checks entity flags to unpick (#2406)

closes #2186

Signed-off-by: liach <liach@users.noreply.github.com>

Co-authored-by: liach <liach@users.noreply.github.com>
This commit is contained in:
liach 2021-05-19 19:46:21 +07:00 committed by GitHub
parent 8fba2a7da0
commit dba53e8e93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 59 additions and 4 deletions

View File

@ -16,6 +16,13 @@ CLASS net/minecraft/class_1297 net/minecraft/entity/Entity
FIELD field_27858 FROZEN_TICKS Lnet/minecraft/class_2940;
FIELD field_28628 wasInPowderSnow Z
FIELD field_28629 wasOnFire Z
FIELD field_29975 SNEAKING_FLAG_INDEX I
FIELD field_29976 SPRINTING_FLAG_INDEX I
FIELD field_29977 SWIMMING_FLAG_INDEX I
FIELD field_29978 INVISIBLE_FLAG_INDEX I
FIELD field_29979 ON_FIRE_FLAG_INDEX I
FIELD field_29980 GLOWING_FLAG_INDEX I
FIELD field_29981 FALL_FLYING_FLAG_INDEX I
FIELD field_29985 ID_KEY Ljava/lang/String;
FIELD field_29986 PASSENGERS_KEY Ljava/lang/String;
FIELD field_29994 UUID_KEY Ljava/lang/String;

View File

@ -369,7 +369,7 @@ CLASS net/minecraft/class_1309 net/minecraft/entity/LivingEntity
METHOD method_6050 tickStatusEffects ()V
METHOD method_6051 getRandom ()Ljava/util/Random;
METHOD method_6052 getAttacking ()Lnet/minecraft/class_1309;
METHOD method_6053 initAi ()V
METHOD method_6053 tickFallFlying ()V
METHOD method_6054 shouldDropXp ()Z
COMMENT Returns if this entity should drop experience on death when the {@linkplain
COMMENT net.minecraft.world.GameRules#DO_MOB_LOOT doMobLoot} game rule is

View File

@ -41,6 +41,8 @@ CLASS net/minecraft/class_1408 net/minecraft/entity/ai/pathing/EntityNavigation
METHOD method_23965 resetRangeMultiplier ()V
METHOD method_23966 isFollowingPath ()Z
METHOD method_26085 resetNode ()V
METHOD method_27799 shouldJumpToNextNode (Lnet/minecraft/class_243;)Z
ARG 1 currentPos
METHOD method_29934 findPathTo (Ljava/util/Set;I)Lnet/minecraft/class_11;
ARG 1 positions
ARG 2 distance

View File

@ -1,6 +1,10 @@
CLASS net/minecraft/class_1531 net/minecraft/entity/decoration/ArmorStandEntity
FIELD field_26745 MARKER_DIMENSIONS Lnet/minecraft/class_4048;
FIELD field_26746 SMALL_DIMENSIONS Lnet/minecraft/class_4048;
FIELD field_30442 HIDE_BASE_PLATE_FLAG I
FIELD field_30444 MARKER_FLAG I
FIELD field_30452 SMALL_FLAG I
FIELD field_30453 SHOW_ARMS_FLAG I
FIELD field_7102 RIDEABLE_MINECART_PREDICATE Ljava/util/function/Predicate;
FIELD field_7103 rightLegRotation Lnet/minecraft/class_2379;
FIELD field_7104 headRotation Lnet/minecraft/class_2379;
@ -60,7 +64,7 @@ CLASS net/minecraft/class_1531 net/minecraft/entity/decoration/ArmorStandEntity
ARG 1 angle
METHOD method_6910 setLeftArmRotation (Lnet/minecraft/class_2379;)V
ARG 1 angle
METHOD method_6911 serializePose ()Lnet/minecraft/class_2487;
METHOD method_6911 poseToNbt ()Lnet/minecraft/class_2487;
METHOD method_6912 isMarker ()Z
METHOD method_6913 setShowArms (Z)V
ARG 1 showArms
@ -68,6 +72,7 @@ CLASS net/minecraft/class_1531 net/minecraft/entity/decoration/ArmorStandEntity
METHOD method_6915 isSlotDisabled (Lnet/minecraft/class_1304;)Z
ARG 1 slot
METHOD method_6916 slotFromPosition (Lnet/minecraft/class_243;)Lnet/minecraft/class_1304;
ARG 1 hitPos
METHOD method_6917 getLeftLegRotation ()Lnet/minecraft/class_2379;
METHOD method_6918 (Lnet/minecraft/class_1297;)Z
ARG 0 entity

View File

@ -2,6 +2,8 @@ CLASS net/minecraft/class_1545 net/minecraft/entity/mob/BlazeEntity
FIELD field_7214 eyeOffset F
FIELD field_7215 eyeOffsetCooldown I
FIELD field_7216 BLAZE_FLAGS Lnet/minecraft/class_2940;
COMMENT The tracked flags of blazes. Only has the {@code 1} bit for {@linkplain
COMMENT #isFireActive() fire activation}.
METHOD method_26906 createBlazeAttributes ()Lnet/minecraft/class_5132$class_5133;
METHOD method_6993 setFireActive (Z)V
ARG 1 fireActive

View File

@ -86,6 +86,10 @@ CLASS net/minecraft/class_1308 net/minecraft/entity/mob/MobEntity
COMMENT the entity type to convert to
ARG 2 keepEquipment
COMMENT whether the equipment of this entity should be kept
METHOD method_29244 canJumpToNextPathNode (Lnet/minecraft/class_7;)Z
COMMENT {@return if this entity can jump to the next node in path given the type of
COMMENT the node}
ARG 1 type
METHOD method_29506 interactWithItem (Lnet/minecraft/class_1657;Lnet/minecraft/class_1268;)Lnet/minecraft/class_1269;
ARG 1 player
ARG 2 hand

View File

@ -1,5 +1,7 @@
CLASS net/minecraft/class_1628 net/minecraft/entity/mob/SpiderEntity
FIELD field_7403 SPIDER_FLAGS Lnet/minecraft/class_2940;
COMMENT The tracked flags of spiders. Only has the {@code 1} bit for {@linkplain
COMMENT #isClimbingWall() wall climbing}.
METHOD method_26923 createSpiderAttributes ()Lnet/minecraft/class_5132$class_5133;
METHOD method_7166 setClimbingWall (Z)V
ARG 1 climbing

View File

@ -2,7 +2,8 @@ CLASS net/minecraft/class_1420 net/minecraft/entity/passive/BatEntity
FIELD field_18100 CLOSE_PLAYER_PREDICATE Lnet/minecraft/class_4051;
FIELD field_30269 ROOSTING_FLAG I
FIELD field_6728 BAT_FLAGS Lnet/minecraft/class_2940;
COMMENT Equals 0 when the bat is flying, and 1 when it's roosting.
COMMENT The tracked flags of bats. Only has the {@code 1} bit for {@linkplain
COMMENT #isRoosting() roosting}.
FIELD field_6729 hangingPosition Lnet/minecraft/class_2338;
METHOD method_20661 canSpawn (Lnet/minecraft/class_1299;Lnet/minecraft/class_1936;Lnet/minecraft/class_3730;Lnet/minecraft/class_2338;Ljava/util/Random;)Z
ARG 0 type

View File

@ -6,6 +6,8 @@ CLASS net/minecraft/class_1439 net/minecraft/entity/passive/IronGolemEntity
FIELD field_6759 lookingAtVillagerTicksLeft I
FIELD field_6762 attackTicksLeft I
FIELD field_6763 IRON_GOLEM_FLAGS Lnet/minecraft/class_2940;
COMMENT The tracked flags of iron golems. Only has the {@code 1} bit for whether a
COMMENT golem is {@linkplain #isPlayerCreated() created by a player}.
METHOD method_22328 getAttackDamage ()F
METHOD method_23347 getCrack ()Lnet/minecraft/class_1439$class_4621;
METHOD method_26886 createIronGolemAttributes ()Lnet/minecraft/class_5132$class_5133;

View File

@ -2,6 +2,9 @@ CLASS net/minecraft/class_1321 net/minecraft/entity/passive/TameableEntity
FIELD field_21974 sitting Z
FIELD field_6320 OWNER_UUID Lnet/minecraft/class_2940;
FIELD field_6322 TAMEABLE_FLAGS Lnet/minecraft/class_2940;
COMMENT The tracked flags of tameable entities. Has the {@code 1} flag for {@linkplain
COMMENT #isInSittingPose() sitting pose} and the {@code 4} flag for {@linkplain
COMMENT #isTamed() tamed}.
METHOD method_24345 isSitting ()Z
METHOD method_24346 setSitting (Z)V
ARG 1 sitting

View File

@ -10,7 +10,7 @@ CLASS net/minecraft/class_2379 net/minecraft/util/math/EulerAngle
ARG 1 serialized
METHOD equals (Ljava/lang/Object;)Z
ARG 1 o
METHOD method_10255 serialize ()Lnet/minecraft/class_2499;
METHOD method_10255 toNbt ()Lnet/minecraft/class_2499;
METHOD method_10256 getPitch ()F
METHOD method_10257 getYaw ()F
METHOD method_10258 getRoll ()F

View File

@ -70,3 +70,30 @@ target_method net/minecraft/entity/mob/VexEntity areFlagsSet (I)Z
param 0 vex_flags
target_method net/minecraft/entity/mob/VexEntity setVexFlag (IZ)V
param 0 vex_flags
flag armor_stand_flags net/minecraft/entity/decoration/ArmorStandEntity SMALL_FLAG
flag armor_stand_flags net/minecraft/entity/decoration/ArmorStandEntity SHOW_ARMS_FLAG
flag armor_stand_flags net/minecraft/entity/decoration/ArmorStandEntity HIDE_BASE_PLATE_FLAG
flag armor_stand_flags net/minecraft/entity/decoration/ArmorStandEntity MARKER_FLAG
target_method net/minecraft/entity/decoration/ArmorStandEntity setBitField (BIZ)B
param 1 armor_stand_flags
# todo unpick cannot handle the read in method bodies yet
constant entity_flag_index net/minecraft/entity/Entity ON_FIRE_FLAG_INDEX
constant entity_flag_index net/minecraft/entity/Entity SNEAKING_FLAG_INDEX
constant entity_flag_index net/minecraft/entity/Entity SPRINTING_FLAG_INDEX
constant entity_flag_index net/minecraft/entity/Entity SWIMMING_FLAG_INDEX
constant entity_flag_index net/minecraft/entity/Entity INVISIBLE_FLAG_INDEX
constant entity_flag_index net/minecraft/entity/Entity GLOWING_FLAG_INDEX
constant entity_flag_index net/minecraft/entity/Entity FALL_FLYING_FLAG_INDEX
target_method net/minecraft/entity/Entity getFlag (I)Z
param 0 entity_flag_index
target_method net/minecraft/entity/Entity setFlag (IZ)V
param 0 entity_flag_index
# mob, bat, snow golem, flags are directly on DataTracker get/set