Skip to content

Commit

Permalink
200 patches...
Browse files Browse the repository at this point in the history
  • Loading branch information
granny committed Oct 26, 2024
1 parent a289942 commit bc370d5
Show file tree
Hide file tree
Showing 52 changed files with 443 additions and 469 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ Difficulties:
3 - hard

diff --git a/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java b/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java
index e8cccf3d89ecef13c0523c2357ef4b07e30a25b4..971dd866fe5d6fcef573cb52582ccb7faf01b2f1 100644
index c00b13482ce3f603f1d85b9a5ad36b768de5a9f8..10e747edebd6463cdfcea592cec1c232d837f21b 100644
--- a/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java
@@ -77,7 +77,7 @@ public class NetherPortalBlock extends Block implements Portal {
@@ -78,7 +78,7 @@ public class NetherPortalBlock extends Block implements Portal {

@Override
protected void randomTick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) {
Expand All @@ -31,18 +31,18 @@ index e8cccf3d89ecef13c0523c2357ef4b07e30a25b4..971dd866fe5d6fcef573cb52582ccb7f
pos = pos.below();
}
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 22de19aeb28795484525ddb22df96b89f915eceb..e3522c713a2ed08ee7ef35c048dd7913cb1b2567 100644
index 0f940d6b8d927355cf0ae120e857b62be8af7806..cd4a2b84ad0f2b3d48a7795118ff1a9e60bab9a5 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -1702,6 +1702,7 @@ public class PurpurWorldConfig {
@@ -1698,6 +1698,7 @@ public class PurpurWorldConfig {
public double piglinScale = 1.0D;
public boolean piglinBypassMobGriefing = false;
public boolean piglinTakeDamageFromWater = false;
+ public int piglinPortalSpawnModifier = 2000;
private void piglinSettings() {
piglinRidable = getBoolean("mobs.piglin.ridable", piglinRidable);
piglinRidableInWater = getBoolean("mobs.piglin.ridable-in-water", piglinRidableInWater);
@@ -1715,6 +1716,7 @@ public class PurpurWorldConfig {
@@ -1711,6 +1712,7 @@ public class PurpurWorldConfig {
piglinScale = Mth.clamp(getDouble("mobs.piglin.attributes.scale", piglinScale), 0.0625D, 16.0D);
piglinBypassMobGriefing = getBoolean("mobs.piglin.bypass-mob-griefing", piglinBypassMobGriefing);
piglinTakeDamageFromWater = getBoolean("mobs.piglin.takes-damage-from-water", piglinTakeDamageFromWater);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Config to change max number of bees


diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java
index f933fa419a4b55b0096ff42caf1b071d027b8e7e..fb84af3b1709101fa572d11a1c27970a316f2eab 100644
index 83ad45aed0894e90825d22e078632352c3a06816..b7ad467d7d7f50bcb90e50f00f905873e89c7956 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java
@@ -59,7 +59,7 @@ public class BeehiveBlockEntity extends BlockEntity {
@@ -60,7 +60,7 @@ public class BeehiveBlockEntity extends BlockEntity {
private List<BeehiveBlockEntity.BeeData> stored = Lists.newArrayList();
@Nullable
public BlockPos savedFlowerPos;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Config for wither explosion radius


diff --git a/src/main/java/net/minecraft/world/entity/projectile/WitherSkull.java b/src/main/java/net/minecraft/world/entity/projectile/WitherSkull.java
index e472df057d087fe46bd40b798c050ed6e38a283c..999453409c19abf7f5b5c2dc399699856e57329e 100644
index e0f25b057b7b908a10038d9e9695a500aa883c75..e63b408594b5d2673148e39c1deafc8510537bee 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/WitherSkull.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/WitherSkull.java
@@ -103,7 +103,7 @@ public class WitherSkull extends AbstractHurtingProjectile {
Expand All @@ -18,18 +18,18 @@ index e472df057d087fe46bd40b798c050ed6e38a283c..999453409c19abf7f5b5c2dc39969985

if (!event.isCancelled()) {
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index e3522c713a2ed08ee7ef35c048dd7913cb1b2567..b3cee9f29fc9ee891d4b18ebfec219e80126a390 100644
index cd4a2b84ad0f2b3d48a7795118ff1a9e60bab9a5..b44b3bb34c6ba32006cf2eab2d7001e766391c4f 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -2399,6 +2399,7 @@ public class PurpurWorldConfig {
@@ -2395,6 +2395,7 @@ public class PurpurWorldConfig {
public boolean witherBypassMobGriefing = false;
public boolean witherTakeDamageFromWater = false;
public boolean witherCanRideVehicles = false;
+ public float witherExplosionRadius = 1.0F;
private void witherSettings() {
witherRidable = getBoolean("mobs.wither.ridable", witherRidable);
witherRidableInWater = getBoolean("mobs.wither.ridable-in-water", witherRidableInWater);
@@ -2420,6 +2421,7 @@ public class PurpurWorldConfig {
@@ -2416,6 +2417,7 @@ public class PurpurWorldConfig {
witherBypassMobGriefing = getBoolean("mobs.wither.bypass-mob-griefing", witherBypassMobGriefing);
witherTakeDamageFromWater = getBoolean("mobs.wither.takes-damage-from-water", witherTakeDamageFromWater);
witherCanRideVehicles = getBoolean("mobs.wither.can-ride-vehicles", witherCanRideVehicles);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Gamemode extra permissions


diff --git a/src/main/java/net/minecraft/commands/CommandSourceStack.java b/src/main/java/net/minecraft/commands/CommandSourceStack.java
index 2f7ed5b38e8930b3a615f160cdf4c5b0ec932a8d..08e783882d0b2ef3ebf88e664f1a3d8bf65f49f2 100644
index ae2d9c91afe13d07fd0de6d455b90a2a704a2c91..0d133cd7993eb40b19e2aabe8e2bfcdcf5352398 100644
--- a/src/main/java/net/minecraft/commands/CommandSourceStack.java
+++ b/src/main/java/net/minecraft/commands/CommandSourceStack.java
@@ -209,6 +209,19 @@ public class CommandSourceStack implements ExecutionCommandSource<CommandSourceS
@@ -211,6 +211,19 @@ public class CommandSourceStack implements ExecutionCommandSource<CommandSourceS
}
// CraftBukkit end

Expand Down Expand Up @@ -73,7 +73,7 @@ index 52649f82351ab4f675c3cc3cd6640956b0f76b91..eb51c88c7a0658190d3a8bfd5d18dca7
DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "defaultgamemode", "Allows the user to change the default gamemode of the server", PermissionDefault.OP, commands);
DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "seed", "Allows the user to view the seed of the world", PermissionDefault.OP, commands);
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
index b0c3135d8af0fd73d6445bdbea91d51527f180b8..9d0fe642adec085ba308aa40a00f0ff99c18521e 100644
index 24e3148c51c3d558a3945827842c414d9cdc2e40..6f06956825003ff55604c2e4aea66099ece2470c 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
@@ -235,6 +235,7 @@ public class PurpurConfig {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ index 205e223c356634bd6bc6bd58c6f0b7fda61a6f5f..bea05cb928d540a2f19b51bb7352d032
}

diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index b3cee9f29fc9ee891d4b18ebfec219e80126a390..89932b59058db834174919eb57007638e0b92bbd 100644
index b44b3bb34c6ba32006cf2eab2d7001e766391c4f..b7ea3706aa0a339c4197cbf6f62f1b9b7499002f 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -570,6 +570,11 @@ public class PurpurWorldConfig {
@@ -568,6 +568,11 @@ public class PurpurWorldConfig {
lavaSpeedNotNether = getInt("blocks.lava.speed.not-nether", lavaSpeedNotNether);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@ Subject: [PATCH] Configurable broadcast settings


diff --git a/src/main/java/net/minecraft/server/PlayerAdvancements.java b/src/main/java/net/minecraft/server/PlayerAdvancements.java
index c3cc63c7bbfab346cfd25b69fbb4872bf66b142f..8cd8a173ac262ef974c32faf23bffa5072e99ab8 100644
index 0a16aa193ef24aa8f1716f9e089b8027fa3c0a3c..1e85c9318ede93b8e9fe548a8945324b5b00e818 100644
--- a/src/main/java/net/minecraft/server/PlayerAdvancements.java
+++ b/src/main/java/net/minecraft/server/PlayerAdvancements.java
@@ -250,6 +250,7 @@ public class PlayerAdvancements {
advancement.value().display().ifPresent((advancementdisplay) -> {
// Paper start - Add Adventure message to PlayerAdvancementDoneEvent
if (event.message() != null && this.player.level().getGameRules().getBoolean(GameRules.RULE_ANNOUNCE_ADVANCEMENTS)) {
if (event.message() != null && this.player.serverLevel().getGameRules().getBoolean(GameRules.RULE_ANNOUNCE_ADVANCEMENTS)) {
+ if (org.purpurmc.purpur.PurpurConfig.advancementOnlyBroadcastToAffectedPlayer) this.player.sendMessage(message); else // Purpur
this.playerList.broadcastSystemMessage(io.papermc.paper.adventure.PaperAdventure.asVanilla(event.message()), false);
// Paper end
}
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 513ab3d7d3ff4fe0a5c9c609ca752357b2d8055a..e081734828f7991ffc33233843779fd65f9ea9d7 100644
index 8d4e50aade704403cd713506268a1711080f72a3..5d611f5d8ccd635b376bded93bd0278323a585ba 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1082,6 +1082,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
@@ -1335,6 +1335,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
}));
PlayerTeam scoreboardteam = this.getTeam();

Expand All @@ -29,7 +29,7 @@ index 513ab3d7d3ff4fe0a5c9c609ca752357b2d8055a..e081734828f7991ffc33233843779fd6
if (scoreboardteam.getDeathMessageVisibility() == Team.Visibility.HIDE_FOR_OTHER_TEAMS) {
this.server.getPlayerList().broadcastSystemToTeam(this, ichatbasecomponent);
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
index 9d0fe642adec085ba308aa40a00f0ff99c18521e..40e06f4d0547b391497944475f3ea30c4d8ff76c 100644
index 6f06956825003ff55604c2e4aea66099ece2470c..feeaae5b0a8881ce5faf46940ad22b299a33d5eb 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
@@ -205,6 +205,18 @@ public class PurpurConfig {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Subject: [PATCH] Configurable mob blindness
Ported from https://github.com/raltsmc/mobblindness

diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index d4ba4752b04ad3d1a8133c56144800af756f4aa6..b0d9f432eb9ebaf88196de4f1329ef530b422ca0 100644
index 64e30f4b32484da95a5eb6d5556fdc8f66727410..e937eb4e89bf08e3fee8ea2ca0643b0206964de1 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -1042,6 +1042,17 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -1067,6 +1067,17 @@ public abstract class LivingEntity extends Entity implements Attackable {
if (entitytypes == EntityType.SKELETON && itemstack.is(Items.SKELETON_SKULL) || entitytypes == EntityType.ZOMBIE && itemstack.is(Items.ZOMBIE_HEAD) || entitytypes == EntityType.PIGLIN && itemstack.is(Items.PIGLIN_HEAD) || entitytypes == EntityType.PIGLIN_BRUTE && itemstack.is(Items.PIGLIN_HEAD) || entitytypes == EntityType.CREEPER && itemstack.is(Items.CREEPER_HEAD)) {
d0 *= 0.5D;
}
Expand All @@ -28,22 +28,22 @@ index d4ba4752b04ad3d1a8133c56144800af756f4aa6..b0d9f432eb9ebaf88196de4f1329ef53

return d0;
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 89932b59058db834174919eb57007638e0b92bbd..e9075362020d3dec49b3fbcbbe80a00264d3c6fd 100644
index b7ea3706aa0a339c4197cbf6f62f1b9b7499002f..9ba71358ef10fcaf5339b7341483b037537a0f01 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -135,6 +135,7 @@ public class PurpurWorldConfig {
public boolean persistentDroppableEntityDisplayNames = true;
public boolean projectilesBypassMobGriefing = false;
@@ -137,6 +137,7 @@ public class PurpurWorldConfig {
public boolean imposeTeleportRestrictionsOnNetherPortals = false;
public boolean imposeTeleportRestrictionsOnEndPortals = false;
public boolean tickFluids = true;
+ public double mobsBlindnessMultiplier = 1;
public double tridentLoyaltyVoidReturnHeight = 0.0D;
public int raidCooldownSeconds = 0;
public int animalBreedingCooldownSeconds = 0;
@@ -155,6 +156,7 @@ public class PurpurWorldConfig {
persistentDroppableEntityDisplayNames = getBoolean("gameplay-mechanics.persistent-droppable-entity-display-names", persistentDroppableEntityDisplayNames);
projectilesBypassMobGriefing = getBoolean("gameplay-mechanics.projectiles-bypass-mob-griefing", projectilesBypassMobGriefing);
private void miscGameplayMechanicsSettings() {
useBetterMending = getBoolean("gameplay-mechanics.use-better-mending", useBetterMending);
alwaysTameInCreative = getBoolean("gameplay-mechanics.always-tame-in-creative", alwaysTameInCreative);
@@ -156,6 +157,7 @@ public class PurpurWorldConfig {
imposeTeleportRestrictionsOnNetherPortals = getBoolean("gameplay-mechanics.impose-teleport-restrictions-on-nether-portals", imposeTeleportRestrictionsOnNetherPortals);
imposeTeleportRestrictionsOnEndPortals = getBoolean("gameplay-mechanics.impose-teleport-restrictions-on-end-portals", imposeTeleportRestrictionsOnEndPortals);
tickFluids = getBoolean("gameplay-mechanics.tick-fluids", tickFluids);
+ mobsBlindnessMultiplier = getDouble("gameplay-mechanics.entity-blindness-multiplier", mobsBlindnessMultiplier);
tridentLoyaltyVoidReturnHeight = getDouble("gameplay-mechanics.trident-loyalty-void-return-height", tridentLoyaltyVoidReturnHeight);
raidCooldownSeconds = getInt("gameplay-mechanics.raid-cooldown-seconds", raidCooldownSeconds);
animalBreedingCooldownSeconds = getInt("gameplay-mechanics.animal-breeding-cooldown-seconds", animalBreedingCooldownSeconds);
}

public int daytimeTicks = 12000;
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ index c8d39e6e1c570c9219f6066da273dc0130920519..b455c7e9d18bac3654daa8510f85cc21
+ // Purpur end
}
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
index 40e06f4d0547b391497944475f3ea30c4d8ff76c..82e79211ec48578dad18e590ab1f9b58ae024c7c 100644
index feeaae5b0a8881ce5faf46940ad22b299a33d5eb..881f3621233834aca8c8d5381e41d2a3fc9237da 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
@@ -248,6 +248,7 @@ public class PurpurConfig {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ Subject: [PATCH] Config for health to impact Creeper explosion radius


diff --git a/src/main/java/net/minecraft/world/entity/monster/Creeper.java b/src/main/java/net/minecraft/world/entity/monster/Creeper.java
index 902191001a7302872ff661564fb6389457abaa9c..1769c1d31bb68904be426e1069266cec809cf31a 100644
index ad3a3d8e7ab660be5afb8e00948b87387196ebb7..941eb2b4264f620500347b012c0d9f448133ed78 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Creeper.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Creeper.java
@@ -374,9 +374,10 @@ public class Creeper extends Monster implements PowerableMob {
@@ -373,9 +373,10 @@ public class Creeper extends Monster {

if (!this.level().isClientSide) {
if (world instanceof ServerLevel worldserver) {
float f = this.isPowered() ? 2.0F : 1.0F;
+ float multiplier = this.level().purpurConfig.creeperHealthRadius ? this.getHealth() / this.getMaxHealth() : 1; // Purpur

Expand All @@ -21,18 +21,18 @@ index 902191001a7302872ff661564fb6389457abaa9c..1769c1d31bb68904be426e1069266cec
// CraftBukkit end
this.dead = true;
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index e9075362020d3dec49b3fbcbbe80a00264d3c6fd..898e82aac8f2636a95e6987f967d6c57c0e412da 100644
index 9ba71358ef10fcaf5339b7341483b037537a0f01..9ab90bac6c13a063fa851be0e55a81fed8b71492 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -939,6 +939,7 @@ public class PurpurWorldConfig {
@@ -937,6 +937,7 @@ public class PurpurWorldConfig {
public boolean creeperBypassMobGriefing = false;
public boolean creeperTakeDamageFromWater = false;
public boolean creeperExplodeWhenKilled = false;
+ public boolean creeperHealthRadius = false;
private void creeperSettings() {
creeperRidable = getBoolean("mobs.creeper.ridable", creeperRidable);
creeperRidableInWater = getBoolean("mobs.creeper.ridable-in-water", creeperRidableInWater);
@@ -955,6 +956,7 @@ public class PurpurWorldConfig {
@@ -953,6 +954,7 @@ public class PurpurWorldConfig {
creeperBypassMobGriefing = getBoolean("mobs.creeper.bypass-mob-griefing", creeperBypassMobGriefing);
creeperTakeDamageFromWater = getBoolean("mobs.creeper.takes-damage-from-water", creeperTakeDamageFromWater);
creeperExplodeWhenKilled = getBoolean("mobs.creeper.explode-when-killed", creeperExplodeWhenKilled);
Expand Down
Loading

0 comments on commit bc370d5

Please sign in to comment.