mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-31 04:46:38 +00:00
* Added Leaf Commands base * Added WIP /leaf reload * Added /leaf version * Change /gale permission to OP as default
88 lines
4.9 KiB
Diff
88 lines
4.9 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: AlphaKR93 <dev@alpha93.kr>
|
|
Date: Wed, 27 Sep 2023 18:29:51 +0900
|
|
Subject: [PATCH] Plazma: Add some missing Pufferfish configurations
|
|
|
|
Original license: MIT
|
|
Original project: https://github.com/PlazmaMC/PlazmaBukkit
|
|
|
|
Add Pufferfish DAB support for Camel, Sniffer
|
|
https://github.com/pufferfish-gg/Pufferfish/issues/83
|
|
|
|
diff --git a/net/minecraft/world/entity/animal/armadillo/Armadillo.java b/net/minecraft/world/entity/animal/armadillo/Armadillo.java
|
|
index d840577023d42dc986e2b811382dfc433083ffb3..6aa8c94f6ce00cd948cd5edef80906f74c19ae25 100644
|
|
--- a/net/minecraft/world/entity/animal/armadillo/Armadillo.java
|
|
+++ b/net/minecraft/world/entity/animal/armadillo/Armadillo.java
|
|
@@ -161,8 +161,10 @@ public class Armadillo extends Animal {
|
|
return ArmadilloAi.makeBrain(this.brainProvider().makeBrain(dynamic));
|
|
}
|
|
|
|
+ private int behaviorTick; // Leaf - Plazma - Add missing Pufferfish configurations
|
|
@Override
|
|
protected void customServerAiStep(ServerLevel level) {
|
|
+ if (this.behaviorTick++ % this.activatedPriority == 0) // Leaf - Plazma - Add missing Pufferfish configurations
|
|
((Brain<Armadillo>)this.brain).tick(level, this);
|
|
ArmadilloAi.updateActivity(this);
|
|
if (this.isAlive() && !this.isBaby() && --this.scuteTime <= 0) {
|
|
diff --git a/net/minecraft/world/entity/animal/camel/Camel.java b/net/minecraft/world/entity/animal/camel/Camel.java
|
|
index 64ff0d2923f16a567aa753cad028a1b21c20101b..a7168edb338c5a77c884e9eef1e48bcdc3623fa4 100644
|
|
--- a/net/minecraft/world/entity/animal/camel/Camel.java
|
|
+++ b/net/minecraft/world/entity/animal/camel/Camel.java
|
|
@@ -155,9 +155,11 @@ public class Camel extends AbstractHorse {
|
|
return pose == Pose.SITTING ? SITTING_DIMENSIONS.scale(this.getAgeScale()) : super.getDefaultDimensions(pose);
|
|
}
|
|
|
|
+ private int behaviorTick = 0; // Leaf - Plazma - Add missing Pufferfish configurations
|
|
@Override
|
|
protected void customServerAiStep(ServerLevel level) {
|
|
Brain<?> brain = this.getBrain();
|
|
+ if (this.behaviorTick++ % this.activatedPriority == 0) // Leaf - Plazma - Add missing Pufferfish configurations
|
|
((Brain<Camel>)brain).tick(level, this);
|
|
CamelAi.updateActivity(this);
|
|
super.customServerAiStep(level);
|
|
diff --git a/net/minecraft/world/entity/animal/sniffer/Sniffer.java b/net/minecraft/world/entity/animal/sniffer/Sniffer.java
|
|
index 68751f7ed123c3e99f56259ccc23121661f89bc1..fec7ecfe6e692ee74762a6a53e51f92cf66a9177 100644
|
|
--- a/net/minecraft/world/entity/animal/sniffer/Sniffer.java
|
|
+++ b/net/minecraft/world/entity/animal/sniffer/Sniffer.java
|
|
@@ -482,8 +482,10 @@ public class Sniffer extends Animal {
|
|
return Brain.provider(SnifferAi.MEMORY_TYPES, SnifferAi.SENSOR_TYPES);
|
|
}
|
|
|
|
+ private int behaviorTick; // Leaf - Plazma - Add missing Pufferfish configurations
|
|
@Override
|
|
protected void customServerAiStep(ServerLevel level) {
|
|
+ if (this.behaviorTick++ % this.activatedPriority == 0) // Leaf - Plazma - Add missing Pufferfish configurations
|
|
this.getBrain().tick(level, this);
|
|
SnifferAi.updateActivity(this);
|
|
super.customServerAiStep(level);
|
|
diff --git a/net/minecraft/world/entity/monster/breeze/Breeze.java b/net/minecraft/world/entity/monster/breeze/Breeze.java
|
|
index fb643596bd5fb12e4cd323706f51a479d78a5455..542baa54c8b5fbe2d9d71e3ee5d2bd62b69baccc 100644
|
|
--- a/net/minecraft/world/entity/monster/breeze/Breeze.java
|
|
+++ b/net/minecraft/world/entity/monster/breeze/Breeze.java
|
|
@@ -228,8 +228,10 @@ public class Breeze extends Monster {
|
|
return pos.closerThan(center, 4.0, 10.0);
|
|
}
|
|
|
|
+ private int behaviorTick; // Leaf - Plazma - Add missing Pufferfish configurations
|
|
@Override
|
|
protected void customServerAiStep(ServerLevel level) {
|
|
+ if (this.behaviorTick++ % this.activatedPriority == 0) // Leaf - Plazma - Add missing Pufferfish configurations
|
|
this.getBrain().tick(level, this);
|
|
BreezeAi.updateActivity(this);
|
|
super.customServerAiStep(level);
|
|
diff --git a/net/minecraft/world/entity/monster/creaking/Creaking.java b/net/minecraft/world/entity/monster/creaking/Creaking.java
|
|
index 2c6833753950f1bb0941b0cbe54bebddb84b137d..07b60f61b4b676cab2072ad0cf1cf94fed9b44d6 100644
|
|
--- a/net/minecraft/world/entity/monster/creaking/Creaking.java
|
|
+++ b/net/minecraft/world/entity/monster/creaking/Creaking.java
|
|
@@ -230,8 +230,10 @@ public class Creaking extends Monster {
|
|
return (Brain<Creaking>)super.getBrain();
|
|
}
|
|
|
|
+ private int behaviorTick; // Leaf - Plazma - Add missing Pufferfish configurations
|
|
@Override
|
|
protected void customServerAiStep(ServerLevel level) {
|
|
+ if (this.behaviorTick++ % this.activatedPriority == 0) // Leaf - Plazma - Add missing Pufferfish configurations
|
|
this.getBrain().tick((ServerLevel)this.level(), this);
|
|
CreakingAi.updateActivity(this);
|
|
}
|