Skip to content

Commit

Permalink
250 patches done
Browse files Browse the repository at this point in the history
  • Loading branch information
granny committed Dec 4, 2024
1 parent 3933295 commit 3744c42
Show file tree
Hide file tree
Showing 50 changed files with 119 additions and 119 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -243,10 +243,10 @@ index 94ca0407303c4493ab4928b12ec6ecc75aaca549..a138e1b6b66d99f2035de054137a607a
+ // Purpur end - OfflinePlayer API
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 6abf043faf27d1385ad45c264822a9f49974863d..7be5b26b3d9e4d38838ecca8f65f8671c3c17ed2 100644
index 75986a13b87c2024c96742fbbab960026b256837..3c76dd383ec0ba19eea19d12902833dc410f96c0 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2775,6 +2775,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2760,6 +2760,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return this.getHandle().getAbilities().walkingSpeed * 2f;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ Subject: [PATCH] Option for if rain and thunder should stop on sleep


diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 139bc93411fb8bafedf283c92161bc5905e7e982..4c076428c85e66fae9bf658cc816c2f9ef6b47c4 100644
index 04b2d2d917465898f919650d2346608390664bd2..9ceaf051ebc9d58b584b93832cc21ad43ac1a558 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1295,6 +1295,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -1296,6 +1296,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@VisibleForTesting
public void resetWeatherCycle() {
// CraftBukkit start
+ if (this.purpurConfig.rainStopsAfterSleep) // Purpur
this.serverLevelData.setRaining(false, org.bukkit.event.weather.WeatherChangeEvent.Cause.SLEEP); // Paper - Add cause to Weather/ThunderChangeEvents
// If we stop due to everyone sleeping we should reset the weather duration to some other random value.
// Not that everyone ever manages to get the whole server to sleep at the same time....
@@ -1302,6 +1303,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -1303,6 +1304,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
this.serverLevelData.setRainTime(0);
}
// CraftBukkit end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,18 @@ index affbbf6abc6bc09ecb652c1dee92aa297458bc39..febc05dc39741807127cba4a2a55aaad
}

diff --git a/src/main/java/net/minecraft/world/level/block/Blocks.java b/src/main/java/net/minecraft/world/level/block/Blocks.java
index 66a07f7cbf1c1d6ecbe055cbf4f63eb07d93e90c..63d67d46d30ed8ed57cdc0e59b6cb6b75ab22c1f 100644
index 9bafac9b2c7b487f745fb64354f4bbc6a7ded468..1c34691da51d7f7ba3d54e095a3b58b74a5f2263 100644
--- a/src/main/java/net/minecraft/world/level/block/Blocks.java
+++ b/src/main/java/net/minecraft/world/level/block/Blocks.java
@@ -6465,6 +6465,7 @@ public class Blocks {
@@ -6454,6 +6454,7 @@ public class Blocks {
BlockBehaviour.Properties.of()
.mapColor(MapColor.PLANT)
.forceSolidOff()
+ .randomTicks() // Purpur
.instabreak()
.sound(SoundType.AZALEA)
.noOcclusion()
@@ -6476,6 +6477,7 @@ public class Blocks {
@@ -6465,6 +6466,7 @@ public class Blocks {
BlockBehaviour.Properties.of()
.mapColor(MapColor.PLANT)
.forceSolidOff()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,17 @@ index 7315e604a2f9cb068eb5bbca744e44eeabac09c9..88eb3774f688bcff383efa7f113bd0b1
+ // Purpur end
}
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index abec164f413342bf1d2d25479ea8a42fce6a66c7..1e1b42f60679c8b8b27b3255feda4c6cf77d5536 100644
index f993d33caa44a2d782780c8829a7785ed74b3dcc..3c98be45587f3f6ca6cdc53834ef7dae4962f58d 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2094,6 +2094,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -2152,6 +2152,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

boolean cancelled;
if (movingobjectposition == null || movingobjectposition.getType() != HitResult.Type.BLOCK) {
boolean cancelled;
if (movingobjectposition == null || movingobjectposition.getType() != HitResult.Type.BLOCK) {
+ if (this.player.gameMode.shiftClickMended(itemstack)) return; // Purpur
org.bukkit.event.player.PlayerInteractEvent event = CraftEventFactory.callPlayerInteractEvent(this.player, Action.RIGHT_CLICK_AIR, itemstack, enumhand);
cancelled = event.useItemInHand() == Event.Result.DENY;
} else {
org.bukkit.event.player.PlayerInteractEvent event = CraftEventFactory.callPlayerInteractEvent(this.player, Action.RIGHT_CLICK_AIR, itemstack, enumhand);
cancelled = event.useItemInHand() == Event.Result.DENY;
} else {
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index ea1314eb2ac0f8c1dd681b85951bcdd2cead1bf6..e351feee5916492edebb92f9af47c87e582b239d 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Option for beds to explode on villager sleep


diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java
index fd319cf5ac1a3aa8f3562bbab4bf2a8e15b10ae2..b2ea56e3e2a0b7534bd9e16106402c6581057e43 100644
index 5a522d73d41f9aa3977807173d7e34c057a37c7a..373d00fce9e8bcb8d9a8d3e8a05987cf243d175a 100644
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
@@ -1080,6 +1080,12 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ index 29445156f8660d84bb9840c6ac85e0e2188f443d..7b773edc6fa661e75964a80dcb6820d1
if (net.minecraft.server.MinecraftServer.currentTick - lastSpookyCheck > ONE_HOUR) {
LocalDate localdate = LocalDate.now();
diff --git a/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java b/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java
index bbe4c1cb4244ab813ef7d56c46c3ae62701c4824..2cadbc0d56908ca978e1735eff07f5e634548606 100644
index d41ed97feabd5b37f1ffae2a7b12c10895404591..f90f3e3ad7c941e3222a8119d9b01d571eef4c1b 100644
--- a/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java
+++ b/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java
@@ -138,11 +138,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo
@@ -140,11 +140,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo
this.reassessWeaponGoal();
this.setCanPickUpLoot(this.level().paperConfig().entities.behavior.mobsCanAlwaysPickUpLoot.skeletons || randomsource.nextFloat() < 0.55F * difficulty.getSpecialMultiplier()); // Paper - Add world settings for mobs picking up loot
if (this.getItemBySlot(EquipmentSlot.HEAD).isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] UPnP Port Forwarding


diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index f03d6ddaeda45fee69f19d765fbf1e23333b8de3..6111c300ea25e73cc8f840dfff94998d3b87dcf3 100644
index 36fb238819e529fdecd8dd904c074d7a3a937db2..757cedd57b89a452832f2c9d9e5ed9fb495ca933 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -330,6 +330,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
Expand All @@ -16,7 +16,7 @@ index f03d6ddaeda45fee69f19d765fbf1e23333b8de3..6111c300ea25e73cc8f840dfff94998d

public volatile Thread shutdownThread; // Paper
public volatile boolean abnormalExit = false; // Paper
@@ -1057,6 +1058,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1058,6 +1059,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa

MinecraftServer.LOGGER.info("Stopping server");
Commands.COMMAND_SENDING_POOL.shutdownNow(); // Paper - Perf: Async command map building; Shutdown and don't bother finishing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Campfire option for lit when placed


diff --git a/src/main/java/net/minecraft/world/level/block/CampfireBlock.java b/src/main/java/net/minecraft/world/level/block/CampfireBlock.java
index 18d4020017d76303d3179fad8974574777ea6305..2ee2b1485f848ac5270bc3f7e1e5b1bc3029b0bb 100644
index 1b94f26e78db062f80d806b82f714a815b4710ff..299d782c4e84d8548f2faddfb03712bab388de09 100644
--- a/src/main/java/net/minecraft/world/level/block/CampfireBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/CampfireBlock.java
@@ -140,7 +140,7 @@ public class CampfireBlock extends BaseEntityBlock implements SimpleWaterloggedB
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] options to extinguish fire blocks with snowballs


diff --git a/src/main/java/net/minecraft/world/entity/projectile/Snowball.java b/src/main/java/net/minecraft/world/entity/projectile/Snowball.java
index 8c853b6fbbc966ee6ba9ad3770d4e2e2a50ef388..0db58e7d63a5c1b43a2224c247979f23a1d3f899 100644
index f712963fcd80535eee2bd04ec55ae1abdadef2bd..6fdacf2f6934521a0dd4b25aea35a6a14123da0a 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/Snowball.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/Snowball.java
@@ -63,6 +63,36 @@ public class Snowball extends ThrowableItemProjectile {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Add option to disable zombie villagers cure


diff --git a/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java b/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java
index 623e8ef53d6336b3e3c83fd37eda13244a3b4ab6..3759f28c7f516a94ca8fe1b8f82230b9e8cfb9cb 100644
index 811c5c4bc98401bc9314894eb5cb64bf31b03f63..624b19d415dab0c864b96edf4a7063470739a221 100644
--- a/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java
+++ b/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java
@@ -224,7 +224,7 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Makes it so that when a BlockEntity is placed in the world and then broken,
the dropped ItemStack retains any original custom display name/lore.

diff --git a/src/main/java/net/minecraft/world/item/BlockItem.java b/src/main/java/net/minecraft/world/item/BlockItem.java
index 33d9b5fb6897fefb0f7b9009df7339341cb42317..d58619d1d63a03598b8740dd789d4b6f2c93f8d0 100644
index f8928d5ac2f107a904ecc636e6bdeee7edd8da45..3d7a09c81b10f7a34d55670b7f2cc50b80550380 100644
--- a/src/main/java/net/minecraft/world/item/BlockItem.java
+++ b/src/main/java/net/minecraft/world/item/BlockItem.java
@@ -151,7 +151,16 @@ public class BlockItem extends Item {
Expand All @@ -29,7 +29,7 @@ index 33d9b5fb6897fefb0f7b9009df7339341cb42317..d58619d1d63a03598b8740dd789d4b6f

@Nullable
diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
index c35513d05bd70e296a0e5ffe92c36016a13173b4..d324eefa500c528776df698e7f9dcdeab76da167 100644
index 17a157e2dcd977c9f7d886f8867056e88962c32e..b0fbadd0d6ec3e34e36c9f33ed89a3c315dc4289 100644
--- a/src/main/java/net/minecraft/world/level/block/Block.java
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
@@ -303,7 +303,7 @@ public class Block extends BlockBehaviour implements ItemLike {
Expand Down Expand Up @@ -85,10 +85,10 @@ index c35513d05bd70e296a0e5ffe92c36016a13173b4..d324eefa500c528776df698e7f9dcdea
double d0 = (double) EntityType.ITEM.getHeight() / 2.0D;
double d1 = (double) pos.getX() + 0.5D + Mth.nextDouble(world.random, -0.25D, 0.25D);
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
index 1f929b467a0ece3143af58a657cf5983c07a8d51..eaa6ece956f90632831f0558924eaf18680a252b 100644
index 1f664c10138a6e19bdc0051fa80575516d5602e7..5c5cc77ff2e050e80dc9f6f62ede68d177a0015f 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
@@ -95,6 +95,12 @@ public abstract class BlockEntity {
@@ -94,6 +94,12 @@ public abstract class BlockEntity {
if (persistentDataTag instanceof CompoundTag) {
this.persistentDataContainer.putAll((CompoundTag) persistentDataTag);
}
Expand All @@ -101,7 +101,7 @@ index 1f929b467a0ece3143af58a657cf5983c07a8d51..eaa6ece956f90632831f0558924eaf18
}
// CraftBukkit end

@@ -111,6 +117,15 @@ public abstract class BlockEntity {
@@ -110,6 +116,15 @@ public abstract class BlockEntity {
this.loadAdditional(nbt, registries);
}

Expand All @@ -117,7 +117,7 @@ index 1f929b467a0ece3143af58a657cf5983c07a8d51..eaa6ece956f90632831f0558924eaf18
protected void saveAdditional(CompoundTag nbt, HolderLookup.Provider registries) {}

public final CompoundTag saveWithFullMetadata(HolderLookup.Provider registries) {
@@ -419,4 +434,16 @@ public abstract class BlockEntity {
@@ -406,4 +421,16 @@ public abstract class BlockEntity {

<T> T getOrDefault(DataComponentType<? extends T> type, T fallback);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Signs allow color codes


diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 883317c9957c13049ff2c01ceb154fba1afe278b..323d474582cf796ae9d40f9d00f277496d3f2c0a 100644
index ed1d75fdee29ac92d71f219af79eb7fc5ae99099..7e785394de3db56e5d0fd8bea5edf5df9fa129fa 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1976,6 +1976,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
@@ -1959,6 +1959,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple

@Override
public void openTextEdit(SignBlockEntity sign, boolean front) {
Expand All @@ -17,7 +17,7 @@ index 883317c9957c13049ff2c01ceb154fba1afe278b..323d474582cf796ae9d40f9d00f27749
this.connection.send(new ClientboundOpenSignEditorPacket(sign.getBlockPos(), front));
}
diff --git a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
index 8ac19e1e052e73ff3fd09089bb8e3fd687390ee4..6da1eec98c08e4909ecbd48fe90b3fd62011e284 100644
index 7a1d9a718dc57b5f630ca8e5358120cebaeefb9c..b51b0b0f48b1da6187387d6ec025681e10ed584d 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
@@ -201,16 +201,31 @@ public class SignBlockEntity extends BlockEntity {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Subject: [PATCH] Kelp, cave, weeping, and twisting vines configurable max


diff --git a/src/main/java/net/minecraft/world/level/block/CaveVinesBlock.java b/src/main/java/net/minecraft/world/level/block/CaveVinesBlock.java
index c4473c2a778116d48bc3e4796afd901f455070e6..e62217c0bfa6cc426c7d41154f3ccc34d8f242ca 100644
index 81e572783157926383dd9baa58d30f5419c1616f..84d6ae4acf80f6ff4f418739a0228e740993f950 100644
--- a/src/main/java/net/minecraft/world/level/block/CaveVinesBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/CaveVinesBlock.java
@@ -94,4 +94,11 @@ public class CaveVinesBlock extends GrowingPlantHeadBlock implements CaveVines {
Expand Down
Loading

0 comments on commit 3744c42

Please sign in to comment.