mirror of
https://github.com/BX-Team/DivineMC.git
synced 2025-12-23 00:39:16 +00:00
[ci-skip] finish patches
This commit is contained in:
25
patches/server/0032-lithium-ai.sensor.secondary_poi.patch
Normal file
25
patches/server/0032-lithium-ai.sensor.secondary_poi.patch
Normal file
@@ -0,0 +1,25 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: 2No2Name <2No2Name@web.de>
|
||||
Date: Tue, 15 Mar 2022 07:14:26 +0100
|
||||
Subject: [PATCH] lithium: ai.sensor.secondary_poi
|
||||
|
||||
Original code by CaffeineMC, licensed under GNU Lesser General Public License v3.0
|
||||
You can find the original code on https://github.com/CaffeineMC/lithium-fabric (Yarn mappings)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/sensing/SecondaryPoiSensor.java b/src/main/java/net/minecraft/world/entity/ai/sensing/SecondaryPoiSensor.java
|
||||
index cb1d91f9fe98f21c2afbe3894dfd9bca3bdd3ba6..1bb33123d26b0a261f30bad2a972f42d504b5e69 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/sensing/SecondaryPoiSensor.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/sensing/SecondaryPoiSensor.java
|
||||
@@ -22,6 +22,12 @@ public class SecondaryPoiSensor extends Sensor<Villager> {
|
||||
|
||||
@Override
|
||||
protected void doTick(ServerLevel world, Villager entity) {
|
||||
+ // DivineMC start - lithium: ai.sensor.secondary_poi
|
||||
+ if (entity.getVillagerData().getProfession().secondaryPoi().isEmpty()) {
|
||||
+ entity.getBrain().eraseMemory(MemoryModuleType.SECONDARY_JOB_SITE);
|
||||
+ return;
|
||||
+ }
|
||||
+ // DivineMC end
|
||||
ResourceKey<Level> resourceKey = world.dimension();
|
||||
BlockPos blockPos = entity.blockPosition();
|
||||
List<GlobalPos> list = Lists.newArrayList();
|
||||
Reference in New Issue
Block a user