Skip to content

Commit

Permalink
update for 1.20.6 (backsupport 1.20.4)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed May 11, 2024
1 parent b0941a7 commit 05714b1
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,17 @@ public static void init() {
nmsDataWatcherObject = Class.forName("net.minecraft.network.syncher.DataWatcherObject"); // EntityDataAccessor
nmsEntityEnderman = Class.forName("net.minecraft.world.entity.monster.EntityEnderman");
if (SentinelVersionCompat.v1_20 && !SentinelVersionCompat.vFuture) { // 1.20 names
// https://minidigger.github.io/MiniMappingViewer/#/mojang/server/1.20.2
endermanAngryField = "bV"; // net.minecraft.world.entity.monster.EnderMan#DATA_CREEPY
try {
// https://minidigger.github.io/MiniMappingViewer/#/mojang/server/1.20.2
if (nmsEntityEnderman.getDeclaredField("bV") != null) {
endermanAngryField = "bV"; // net.minecraft.world.entity.monster.EnderMan#DATA_CREEPY
}
}
catch (Throwable ex) {
// https://minidigger.github.io/MiniMappingViewer/#/mojang/server/1.20.6
endermanAngryField = "ca"; // net.minecraft.world.entity.monster.EnderMan#DATA_CREEPY
}
// https://minidigger.github.io/MiniMappingViewer/#/mojang/server/1.20.6
broadcastEffectMethod = "a"; // net.minecraft.world.level.Level#broadcastEntityEvent(Entity,byte)
dataWatcherSet = "a"; // net.minecraft.network.syncher.SynchedEntityData#set
}
Expand Down

0 comments on commit 05714b1

Please sign in to comment.