From 333a6d75b50aeaa76fc0e14ff87ce066c3d33e82 Mon Sep 17 00:00:00 2001 From: Shnupbups Date: Sat, 3 Apr 2021 05:06:05 +1100 Subject: [PATCH] 21w13a entity ai stuff (#2255) * entity * Apply suggestions from code review Co-authored-by: liach <7806504+liach@users.noreply.github.com> * nbt_key -> key * Update mappings/net/minecraft/entity/EntityType.mapping Co-authored-by: liach <7806504+liach@users.noreply.github.com> * AI stuff * Update mappings/net/minecraft/entity/ai/brain/sensor/AxolotlAttackablesSensor.mapping Co-authored-by: liach <7806504+liach@users.noreply.github.com> Co-authored-by: liach <7806504+liach@users.noreply.github.com> --- .../ai/brain/sensor/AxolotlAttackablesSensor.mapping | 10 ++++++++++ .../sensor/NearestVisibleLivingEntitySensor.mapping | 9 +++++++++ .../ai/brain/sensor/VillagerHostilesSensor.mapping | 2 ++ .../net/minecraft/entity/ai/control/Control.mapping | 1 + .../minecraft/entity/ai/control/LookControl.mapping | 2 ++ 5 files changed, 24 insertions(+) create mode 100644 mappings/net/minecraft/entity/ai/brain/sensor/AxolotlAttackablesSensor.mapping create mode 100644 mappings/net/minecraft/entity/ai/brain/sensor/NearestVisibleLivingEntitySensor.mapping create mode 100644 mappings/net/minecraft/entity/ai/control/Control.mapping diff --git a/mappings/net/minecraft/entity/ai/brain/sensor/AxolotlAttackablesSensor.mapping b/mappings/net/minecraft/entity/ai/brain/sensor/AxolotlAttackablesSensor.mapping new file mode 100644 index 0000000000..9a2f515eae --- /dev/null +++ b/mappings/net/minecraft/entity/ai/brain/sensor/AxolotlAttackablesSensor.mapping @@ -0,0 +1,10 @@ +CLASS net/minecraft/class_6044 net/minecraft/entity/ai/brain/sensor/AxolotlAttackablesSensor + METHOD method_35144 canHunt (Lnet/minecraft/class_1309;Lnet/minecraft/class_1309;)Z + ARG 1 axolotl + ARG 2 target + METHOD method_35145 isAlwaysHostileTo (Lnet/minecraft/class_1309;Lnet/minecraft/class_1309;)Z + ARG 1 axolotl + ARG 2 target + METHOD method_35146 isInRange (Lnet/minecraft/class_1309;Lnet/minecraft/class_1309;)Z + ARG 1 axolotl + ARG 2 target diff --git a/mappings/net/minecraft/entity/ai/brain/sensor/NearestVisibleLivingEntitySensor.mapping b/mappings/net/minecraft/entity/ai/brain/sensor/NearestVisibleLivingEntitySensor.mapping new file mode 100644 index 0000000000..758a5cf6c4 --- /dev/null +++ b/mappings/net/minecraft/entity/ai/brain/sensor/NearestVisibleLivingEntitySensor.mapping @@ -0,0 +1,9 @@ +CLASS net/minecraft/class_6045 net/minecraft/entity/ai/brain/sensor/NearestVisibleLivingEntitySensor + METHOD method_35147 getVisibleLivingEntities (Lnet/minecraft/class_1309;)Ljava/util/Optional; + ARG 1 entity + METHOD method_35148 matches (Lnet/minecraft/class_1309;Lnet/minecraft/class_1309;)Z + ARG 1 entity + ARG 2 target + METHOD method_35150 getOutputMemoryModule ()Lnet/minecraft/class_4140; + METHOD method_35151 getNearestVisibleLivingEntity (Lnet/minecraft/class_1309;)Ljava/util/Optional; + ARG 1 entity diff --git a/mappings/net/minecraft/entity/ai/brain/sensor/VillagerHostilesSensor.mapping b/mappings/net/minecraft/entity/ai/brain/sensor/VillagerHostilesSensor.mapping index 37eef8392c..c1b518887b 100644 --- a/mappings/net/minecraft/entity/ai/brain/sensor/VillagerHostilesSensor.mapping +++ b/mappings/net/minecraft/entity/ai/brain/sensor/VillagerHostilesSensor.mapping @@ -3,3 +3,5 @@ CLASS net/minecraft/class_4150 net/minecraft/entity/ai/brain/sensor/VillagerHost METHOD method_19104 isHostile (Lnet/minecraft/class_1309;)Z ARG 1 entity METHOD method_19105 isCloseEnoughForDanger (Lnet/minecraft/class_1309;Lnet/minecraft/class_1309;)Z + ARG 1 villager + ARG 2 target diff --git a/mappings/net/minecraft/entity/ai/control/Control.mapping b/mappings/net/minecraft/entity/ai/control/Control.mapping new file mode 100644 index 0000000000..a5d873ac60 --- /dev/null +++ b/mappings/net/minecraft/entity/ai/control/Control.mapping @@ -0,0 +1 @@ +CLASS net/minecraft/class_6035 net/minecraft/entity/ai/control/Control diff --git a/mappings/net/minecraft/entity/ai/control/LookControl.mapping b/mappings/net/minecraft/entity/ai/control/LookControl.mapping index 828c76167e..12fe2621b8 100644 --- a/mappings/net/minecraft/entity/ai/control/LookControl.mapping +++ b/mappings/net/minecraft/entity/ai/control/LookControl.mapping @@ -19,6 +19,8 @@ CLASS net/minecraft/class_1333 net/minecraft/entity/ai/control/LookControl METHOD method_20250 getTargetPitch ()F METHOD method_20251 getTargetYaw ()F METHOD method_20433 shouldStayHorizontal ()Z + METHOD method_35111 lookAt (Lnet/minecraft/class_1297;)V + ARG 1 entity METHOD method_6225 getLookX ()D METHOD method_6226 lookAt (Lnet/minecraft/class_1297;FF)V ARG 1 entity