Paper/Spigot-Server-Patches/0519-FIX-DIS-SHIT.patch
2020-06-26 21:57:36 -07:00

65 lines
4.8 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: MiniDigger <admin@minidigger.me>
Date: Fri, 26 Jun 2020 16:51:44 +0200
Subject: [PATCH] FIX DIS SHIT
diff --git a/src/main/java/net/minecraft/server/SensorHoglinSpecific.java b/src/main/java/net/minecraft/server/SensorHoglinSpecific.java
index 40900c51dfdc20b2ce1516f78efd14f61643291a..f5d12bf371bf196d69c8a6569c64015a1d75b042 100644
--- a/src/main/java/net/minecraft/server/SensorHoglinSpecific.java
+++ b/src/main/java/net/minecraft/server/SensorHoglinSpecific.java
@@ -19,7 +19,7 @@ public class SensorHoglinSpecific extends Sensor<EntityHoglin> {
protected void a(WorldServer worldserver, EntityHoglin entityhoglin) {
BehaviorController<?> behaviorcontroller = entityhoglin.getBehaviorController();
- behaviorcontroller.setMemory(MemoryModuleType.NEAREST_REPELLENT, this.b(worldserver, entityhoglin));
+ // behaviorcontroller.setMemory(MemoryModuleType.NEAREST_REPELLENT, this.bb(worldserver, entityhoglin)); // Paper - fix dis shit (for now) + rename
Optional<EntityPiglin> optional = Optional.empty();
int i = 0;
List<EntityHoglin> list = Lists.newArrayList();
@@ -42,12 +42,12 @@ public class SensorHoglinSpecific extends Sensor<EntityHoglin> {
}
behaviorcontroller.setMemory(MemoryModuleType.NEAREST_VISIBLE_ADULT_PIGLIN, optional);
- behaviorcontroller.setMemory(MemoryModuleType.NEAREST_VISIBLE_ADULT_HOGLINS, (Object) list);
- behaviorcontroller.setMemory(MemoryModuleType.VISIBLE_ADULT_PIGLIN_COUNT, (Object) i);
- behaviorcontroller.setMemory(MemoryModuleType.VISIBLE_ADULT_HOGLIN_COUNT, (Object) list.size());
+ behaviorcontroller.setMemory(MemoryModuleType.NEAREST_VISIBLE_ADULT_HOGLINS, list); // Paper - decomp fix
+ behaviorcontroller.setMemory(MemoryModuleType.VISIBLE_ADULT_PIGLIN_COUNT, i); // Paper - decomp fix
+ behaviorcontroller.setMemory(MemoryModuleType.VISIBLE_ADULT_HOGLIN_COUNT, list.size()); // Paper - decomp fix
}
- private Optional<BlockPosition> b(WorldServer worldserver, EntityHoglin entityhoglin) {
+ private Optional<BlockPosition> bb(WorldServer worldserver, EntityHoglin entityhoglin) { // Paper - rename
return BlockPosition.a(entityhoglin.getChunkCoordinates(), 8, 4, (blockposition) -> {
return worldserver.getType(blockposition).a((Tag) TagsBlock.HOGLIN_REPELLENTS);
});
diff --git a/src/main/java/net/minecraft/server/SensorPiglinSpecific.java b/src/main/java/net/minecraft/server/SensorPiglinSpecific.java
index 2b11bc960a004714a9d725575d2470588d5801fb..4cc50f38e901f5dde4576a91cf4d6797fb45631a 100644
--- a/src/main/java/net/minecraft/server/SensorPiglinSpecific.java
+++ b/src/main/java/net/minecraft/server/SensorPiglinSpecific.java
@@ -21,7 +21,7 @@ public class SensorPiglinSpecific extends Sensor<EntityLiving> {
protected void a(WorldServer worldserver, EntityLiving entityliving) {
BehaviorController<?> behaviorcontroller = entityliving.getBehaviorController();
- behaviorcontroller.setMemory(MemoryModuleType.NEAREST_REPELLENT, c(worldserver, entityliving));
+// behaviorcontroller.setMemory(MemoryModuleType.NEAREST_REPELLENT, c(worldserver, entityliving)); // Paper - fix dis shit (for now)
Optional<EntityInsentient> optional = Optional.empty();
Optional<EntityHoglin> optional1 = Optional.empty();
Optional<EntityHoglin> optional2 = Optional.empty();
@@ -92,10 +92,10 @@ public class SensorPiglinSpecific extends Sensor<EntityLiving> {
behaviorcontroller.setMemory(MemoryModuleType.NEAREST_VISIBLE_ZOMBIFIED, optional4);
behaviorcontroller.setMemory(MemoryModuleType.NEAREST_TARGETABLE_PLAYER_NOT_WEARING_GOLD, optional5);
behaviorcontroller.setMemory(MemoryModuleType.NEAREST_PLAYER_HOLDING_WANTED_ITEM, optional6);
- behaviorcontroller.setMemory(MemoryModuleType.NEAREST_ADULT_PIGLINS, (Object) list1);
- behaviorcontroller.setMemory(MemoryModuleType.NEAREST_VISIBLE_ADULT_PIGLINS, (Object) list);
- behaviorcontroller.setMemory(MemoryModuleType.VISIBLE_ADULT_PIGLIN_COUNT, (Object) list.size());
- behaviorcontroller.setMemory(MemoryModuleType.VISIBLE_ADULT_HOGLIN_COUNT, (Object) i);
+ behaviorcontroller.setMemory(MemoryModuleType.NEAREST_ADULT_PIGLINS, list1); // Paper - decomp fix
+ behaviorcontroller.setMemory(MemoryModuleType.NEAREST_VISIBLE_ADULT_PIGLINS, list); // Paper - decomp fix
+ behaviorcontroller.setMemory(MemoryModuleType.VISIBLE_ADULT_PIGLIN_COUNT, list.size()); // Paper - decomp fix
+ behaviorcontroller.setMemory(MemoryModuleType.VISIBLE_ADULT_HOGLIN_COUNT, i); // Paper - decomp fix
}
private static Optional<BlockPosition> c(WorldServer worldserver, EntityLiving entityliving) {