PaperMC/Spigot-Server-Patches/FIX-DIS-SHIT.patch
2020-06-26 18:20:03 +02:00

64 lines
4.7 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: MiniDigger | Martin <admin@minidigger.dev>
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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/SensorHoglinSpecific.java
+++ b/src/main/java/net/minecraft/server/SensorHoglinSpecific.java
@@ -0,0 +0,0 @@ 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();
@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/SensorPiglinSpecific.java
+++ b/src/main/java/net/minecraft/server/SensorPiglinSpecific.java
@@ -0,0 +0,0 @@ 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();
@@ -0,0 +0,0 @@ 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) {