-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
167 additions
and
196 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
patches/server/0013-Add-some-missing-Pufferfish-configurations.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: AlphaKR93 <[email protected]> | ||
Date: Wed, 27 Sep 2023 18:29:51 +0900 | ||
Subject: [PATCH] Add some missing Pufferfish configurations | ||
|
||
|
||
diff --git a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java | ||
index c97ef420581803b569d130b58a97f67d1fee54f2..e562dffdf84612b50c5d464f9913cfe8ec5c6279 100644 | ||
--- a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java | ||
+++ b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java | ||
@@ -168,10 +168,12 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Saddl | ||
return dimensions.height - 0.1F * this.getScale(); | ||
} | ||
|
||
+ private int behaviorTick = 0; // Plazma - Add missing pufferfish configurations | ||
@Override | ||
protected void customServerAiStep() { | ||
//this.level().getProfiler().push("camelBrain"); // Purpur | ||
Brain<Camel> brain = (Brain<Camel>) this.getBrain(); // Paper - decompile fix | ||
+ if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Plazma - Add missing pufferfish configurations | ||
brain.tick((ServerLevel)this.level(), this); | ||
//this.level().getProfiler().pop(); // Purpur | ||
//this.level().getProfiler().push("camelActivityUpdate"); // Purpur | ||
diff --git a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java | ||
index 795c93352dfa69fad0e034a8377eceb6dc1e81da..e743b4891c1e56f82d40f798e456a701b0efbc73 100644 | ||
--- a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java | ||
+++ b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java | ||
@@ -527,9 +527,11 @@ public class Sniffer extends Animal { | ||
return Brain.provider(SnifferAi.MEMORY_TYPES, SnifferAi.SENSOR_TYPES); | ||
} | ||
|
||
+ private int behaviorTick; // Plazma - Add missing pufferfish configurations | ||
@Override | ||
protected void customServerAiStep() { | ||
//this.level().getProfiler().push("snifferBrain"); // Purpur | ||
+ if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Plazma - Add missing pufferfish configurations | ||
this.getBrain().tick((ServerLevel) this.level(), this); | ||
//this.level().getProfiler().popPush("snifferActivityUpdate"); // Purpur | ||
SnifferAi.updateActivity(this); | ||
diff --git a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java | ||
index 66d47c1613532189e761c0f48d893652c17fe240..8a5d8f9ad1bd94ca53c1ffd1872275c07a52f0b7 100644 | ||
--- a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java | ||
+++ b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java | ||
@@ -319,7 +319,7 @@ public class Warden extends Monster implements VibrationSystem { | ||
ServerLevel worldserver = (ServerLevel) this.level(); | ||
|
||
//worldserver.getProfiler().push("wardenBrain"); // Purpur | ||
- if (this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish | ||
+ if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Plazma | ||
this.getBrain().tick(worldserver, this); | ||
//this.level().getProfiler().pop(); // Purpur | ||
super.customServerAiStep(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: AlphaKR93 <[email protected]> | ||
Date: Sat, 25 Mar 2023 00:10:52 +0900 | ||
Subject: [PATCH] Configurable nether portal size | ||
|
||
Configurable nether portal size | ||
|
||
diff --git a/src/main/java/net/minecraft/world/level/portal/PortalShape.java b/src/main/java/net/minecraft/world/level/portal/PortalShape.java | ||
index e7554ec800f321e4e34c926c53f2375a8c3aa979..c7f974e0b614afa1ced716ff7b6c67ee037a4071 100644 | ||
--- a/src/main/java/net/minecraft/world/level/portal/PortalShape.java | ||
+++ b/src/main/java/net/minecraft/world/level/portal/PortalShape.java | ||
@@ -100,7 +100,7 @@ public class PortalShape { | ||
private int calculateWidth() { | ||
int i = this.getDistanceUntilEdgeAboveFrame(this.bottomLeft, this.rightDir); | ||
|
||
- return i >= 2 && i <= 21 ? i : 0; | ||
+ return i >= this.level.getMinecraftWorld().plazmaLevelConfiguration().structure.netherPortal.size.width.min() && i <= this.level.getMinecraftWorld().plazmaLevelConfiguration().structure.netherPortal.size.width.max() ? i : 0; // Plazma | ||
} | ||
|
||
private int getDistanceUntilEdgeAboveFrame(BlockPos pos, Direction direction) { | ||
@@ -133,7 +133,7 @@ public class PortalShape { | ||
BlockPos.MutableBlockPos blockposition_mutableblockposition = new BlockPos.MutableBlockPos(); | ||
int i = this.getDistanceUntilTop(blockposition_mutableblockposition); | ||
|
||
- return i >= 3 && i <= 21 && this.hasTopFrame(blockposition_mutableblockposition, i) ? i : 0; | ||
+ return i >= this.level.getMinecraftWorld().plazmaLevelConfiguration().structure.netherPortal.size.height.min() && i <= this.level.getMinecraftWorld().plazmaLevelConfiguration().structure.netherPortal.size.height.max() && this.hasTopFrame(blockposition_mutableblockposition, i) ? i : 0; // Plazma | ||
} | ||
|
||
private boolean hasTopFrame(BlockPos.MutableBlockPos pos, int height) { | ||
@@ -187,7 +187,7 @@ public class PortalShape { | ||
} | ||
|
||
public boolean isValid() { | ||
- return this.bottomLeft != null && this.width >= 2 && this.width <= 21 && this.height >= 3 && this.height <= 21; | ||
+ return this.bottomLeft != null && this.width >= this.level.getMinecraftWorld().plazmaLevelConfiguration().structure.netherPortal.size.width.min() && this.width <= this.level.getMinecraftWorld().plazmaLevelConfiguration().structure.netherPortal.size.width.max() && this.height >= this.level.getMinecraftWorld().plazmaLevelConfiguration().structure.netherPortal.size.height.min() && this.height <= this.level.getMinecraftWorld().plazmaLevelConfiguration().structure.netherPortal.size.height.max(); // Plazma | ||
} | ||
|
||
// CraftBukkit start - return boolean | ||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java b/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java | ||
index 5e31a23ed4f31cc06562aa7814812242a04ee086..0d4139ec1a34510bc8f96f2cbcb913626fd26b65 100644 | ||
--- a/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java | ||
+++ b/src/main/java/org/plazmamc/plazma/configurations/LevelConfigurations.java | ||
@@ -34,6 +34,27 @@ public class LevelConfigurations extends ConfigurationPart { | ||
public NetherPortal netherPortal; | ||
public class NetherPortal extends ConfigurationPart { | ||
|
||
+ public Size size; | ||
+ public class Size extends ConfigurationPart { | ||
+ | ||
+ public Width width; | ||
+ public class Width extends ConfigurationPart { | ||
+ | ||
+ int min; public int min() { return Math.max(this.min, 1); } | ||
+ int max; public int max() { return Math.max(this.min, this.max); } | ||
+ | ||
+ } | ||
+ | ||
+ public Height height; | ||
+ public class Height extends ConfigurationPart { | ||
+ | ||
+ int min; public int min() { return Math.max(this.min, 2); } | ||
+ int max; public int max() { return Math.max(this.min, this.max); } | ||
+ | ||
+ } | ||
+ | ||
+ } | ||
+ | ||
} | ||
|
||
} |
32 changes: 0 additions & 32 deletions
32
patches/unapplied/server/0017-Structure-Configuration.patch
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.