Skip to content

Commit

Permalink
100 patches done
Browse files Browse the repository at this point in the history
  • Loading branch information
granny committed Dec 4, 2024
1 parent ceacfdd commit 087bfb6
Show file tree
Hide file tree
Showing 50 changed files with 117 additions and 117 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Add player death exp control options


diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
index d1b6e7cf8d110d9106ea99431cf9719ea3b102d5..f4823112f2daf2aa75e1f4520fb91077c9c94e09 100644
index 47d2f1af81d64054e30b353b66c0a6ad68583298..108eb7557877093e866b5996abdb3fbf4542e62b 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -1921,7 +1921,23 @@ public abstract class Player extends LivingEntity {
@@ -1924,7 +1924,23 @@ public abstract class Player extends LivingEntity {

@Override
protected int getBaseExperienceReward(ServerLevel world) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ index b1c917d65076a3805e5b78cb946753f0c101e214..82210667376fd466d5d4cdcb56b62f61

public class FrostedIce extends ConfigurationPart {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index f6ad220e3e228e978c8b635064e8d5bf65ac5a89..67db7d9f57fd4407412b9cfbc8b0ab06f15fff12 100644
index d94f92730063454a1acaa037d5c5eed7a7a73490..f8fb46648b9b4ec11632ff5b8de5902c259ccaf2 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1270,7 +1270,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1271,7 +1271,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
LOGGER.info("*************************************************************************************");
}
// Paper end - Add onboarding message for initial server start
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Add canSaveToDisk to Entity


diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 35c6cc4d0d76becba693d056534a9437bd3364e4..56225797f1cf0294c1e6aa824d8c146dca530e9f 100644
index f7b6044d99dd01ce1491631ec75920e79d42ce29..c8fde4b0b89f8d401149d0029caa13dc0d608d35 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -572,6 +572,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ index bf8c511739265c6a9cd277752e844481598f8966..ffe2399ab6b1f311536475d8216238b5

// CraftBukkit start
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index af017da528924bae0542dd0e59d23c3bf59aa7b3..d8e37b250be00445fa6a97c99789198a74795e7d 100644
index 9c31efc4d8c16c8f3c3e384ad247db28e82628d2..b73315809aaf2306c09ec41e8fe74c2c9ec071a7 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -4719,7 +4719,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -4726,7 +4726,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
if (equippable != null && equippable.dispensable()) {
EquipmentSlot enumitemslot = equippable.slot();

Expand All @@ -30,7 +30,7 @@ index af017da528924bae0542dd0e59d23c3bf59aa7b3..d8e37b250be00445fa6a97c99789198a
} else {
return false;
}
@@ -4744,6 +4744,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -4751,6 +4751,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
return equippable == null ? slot == EquipmentSlot.MAINHAND && this.canUseSlot(EquipmentSlot.MAINHAND) : slot == equippable.slot() && this.canUseSlot(equippable.slot()) && equippable.canBeEquippedBy(this.getType());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Add option for boats to eject players on land


diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractBoat.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractBoat.java
index 1fdbef16cd29c8fc74578ac3328f985eca61088d..e523f651e8776a89ffba015921d708f569fad8f3 100644
index b87fd952020d88a6612429df73121422bf9ae422..a301f32a292afb010f3888732e339897b176243d 100644
--- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractBoat.java
+++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractBoat.java
@@ -499,6 +499,7 @@ public abstract class AbstractBoat extends VehicleEntity implements Leashable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Mending mends most damages equipment first


diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
index bf0838f574fa3fb9654e087d602b8d380bd7fb28..6db9a3ea4c0dc1f0629bc8bf6466aeab00c498f6 100644
index 23b47d90fd35659d9eaa661e808a7f89b29614cf..f1eb74a43881400f23f3750c909f999b35c2f5ce 100644
--- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
+++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
@@ -351,7 +351,7 @@ public class ExperienceOrb extends Entity {
@@ -353,7 +353,7 @@ public class ExperienceOrb extends Entity {
}

private int repairPlayerItems(ServerPlayer player, int amount) {
Expand All @@ -18,10 +18,10 @@ index bf0838f574fa3fb9654e087d602b8d380bd7fb28..6db9a3ea4c0dc1f0629bc8bf6466aeab
if (optional.isPresent()) {
ItemStack itemstack = ((EnchantedItemInUse) optional.get()).itemStack();
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
index 33e7d2884195677c4d6340d8b84c1dd85c636ec1..239bd6e3d756dc4ecab6ca639fa84ccbf89418a7 100644
index f29415b8dff7d17328e159b56ae4ad46452f018e..c4cc36efeba5aac16b3276f229d59473a7198cc3 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -681,6 +681,26 @@ public final class ItemStack implements DataComponentHolder {
@@ -686,6 +686,26 @@ public final class ItemStack implements DataComponentHolder {
return this.isDamageableItem() && this.getDamageValue() > 0;
}

Expand Down Expand Up @@ -49,7 +49,7 @@ index 33e7d2884195677c4d6340d8b84c1dd85c636ec1..239bd6e3d756dc4ecab6ca639fa84ccb
return Mth.clamp((Integer) this.getOrDefault(DataComponents.DAMAGE, 0), 0, this.getMaxDamage());
}
diff --git a/src/main/java/net/minecraft/world/item/enchantment/EnchantmentHelper.java b/src/main/java/net/minecraft/world/item/enchantment/EnchantmentHelper.java
index d8fc10f9cd0ab2c26e64613006569a86ce201550..73241113e50dc8be89ef8850d49d95ec31fb194f 100644
index 64c315372277300e58ce413210f47eed5b6e1d6c..2c1799e8c9009a6ab24c24e7363d5a87e41f0c35 100644
--- a/src/main/java/net/minecraft/world/item/enchantment/EnchantmentHelper.java
+++ b/src/main/java/net/minecraft/world/item/enchantment/EnchantmentHelper.java
@@ -6,6 +6,7 @@ import it.unimi.dsi.fastutil.objects.Object2IntMap.Entry;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ index 12b327eea95e0de9e9c39b7d039badee8ec46508..849ecc5af70901f1e40cb6c419f33f1c
}

diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 67db7d9f57fd4407412b9cfbc8b0ab06f15fff12..e1858bc2b043f0edf5d3f1393340f40aa7bcb36a 100644
index f8fb46648b9b4ec11632ff5b8de5902c259ccaf2..0cce9061c49a3556d886381fac3bfc78390b7ec4 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -324,7 +324,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
Expand All @@ -38,15 +38,15 @@ index 67db7d9f57fd4407412b9cfbc8b0ab06f15fff12..e1858bc2b043f0edf5d3f1393340f40a
// Spigot end
public final io.papermc.paper.configuration.PaperConfigurations paperConfigurations; // Paper - add paper configuration files
public boolean isIteratingOverLevels = false; // Paper - Throw exception on world create while being ticked
@@ -1184,6 +1184,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1185,6 +1185,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
private static final long MAX_CATCHUP_BUFFER = TICK_TIME * TPS * 60L;
private long lastTick = 0;
private long catchupTime = 0;
+ public final RollingAverage tps5s = new RollingAverage(5); // Purpur
public final RollingAverage tps1 = new RollingAverage(60);
public final RollingAverage tps5 = new RollingAverage(60 * 5);
public final RollingAverage tps15 = new RollingAverage(60 * 15);
@@ -1305,14 +1306,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1306,14 +1307,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
if (++MinecraftServer.currentTick % MinecraftServer.SAMPLE_INTERVAL == 0) {
final long diff = currentTime - tickSection;
final java.math.BigDecimal currentTps = TPS_BASE.divide(new java.math.BigDecimal(diff), 30, java.math.RoundingMode.HALF_UP);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Implement elytra settings


diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index d8e37b250be00445fa6a97c99789198a74795e7d..c1a3103aa692bb5dfb4e162159c77a03d9c9a0e8 100644
index b73315809aaf2306c09ec41e8fe74c2c9ec071a7..28c8ff8ffe5f4dd7a4f3f6f2397dd33b29309c9f 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3788,7 +3788,17 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -3799,7 +3799,17 @@ public abstract class LivingEntity extends Entity implements Attackable {
}).toList();
EquipmentSlot enumitemslot = (EquipmentSlot) Util.getRandom(list, this.random);

Expand All @@ -27,7 +27,7 @@ index d8e37b250be00445fa6a97c99789198a74795e7d..c1a3103aa692bb5dfb4e162159c77a03
}

this.gameEvent(GameEvent.ELYTRA_GLIDE);
@@ -3797,7 +3807,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -3808,7 +3818,7 @@ public abstract class LivingEntity extends Entity implements Attackable {

}

Expand All @@ -37,10 +37,10 @@ index d8e37b250be00445fa6a97c99789198a74795e7d..c1a3103aa692bb5dfb4e162159c77a03
Iterator iterator = EquipmentSlot.VALUES.iterator();

diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
index f4823112f2daf2aa75e1f4520fb91077c9c94e09..773be9c116a664e4d0349c58c00df34f203f8ebf 100644
index 108eb7557877093e866b5996abdb3fbf4542e62b..bf6c8abe3c0ba4144c37f2ee53bfb96563340e87 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -1661,7 +1661,7 @@ public abstract class Player extends LivingEntity {
@@ -1664,7 +1664,7 @@ public abstract class Player extends LivingEntity {
}

@Override
Expand Down Expand Up @@ -73,10 +73,10 @@ index 29a048a9b09166838616ac7ba1d31625d56b0bca..184e6d9bf393188fc1f1c7acd545b4ac
itemStack.shrink(1); // Moved up from below
} else ((net.minecraft.server.level.ServerPlayer) user).getBukkitEntity().updateInventory();
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
index 239bd6e3d756dc4ecab6ca639fa84ccbf89418a7..dcb656be3d37f29bdbe7d25ace05c6dd1889e252 100644
index c4cc36efeba5aac16b3276f229d59473a7198cc3..7c5770a6a576e47c8ad90c5be80df423607e06f5 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -781,6 +781,12 @@ public final class ItemStack implements DataComponentHolder {
@@ -786,6 +786,12 @@ public final class ItemStack implements DataComponentHolder {
org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerItemBreakEvent(serverPlayer, this); // Paper - Add EntityDamageItemEvent
}
// CraftBukkit end
Expand All @@ -90,7 +90,7 @@ index 239bd6e3d756dc4ecab6ca639fa84ccbf89418a7..dcb656be3d37f29bdbe7d25ace05c6dd
this.shrink(1);
breakCallback.accept(item);
diff --git a/src/main/java/net/minecraft/world/item/TridentItem.java b/src/main/java/net/minecraft/world/item/TridentItem.java
index 8b9a93ef71164cce8a616735b71d96d37e83b1a8..5133443911f932e8f6b5d3ca8baccecfd6f81c00 100644
index 2b2af4b7cc2c8be8c3aed30885be26816c021bdc..aff4f33be216f62d6c6e139dcd7fd82efdbd267c 100644
--- a/src/main/java/net/minecraft/world/item/TridentItem.java
+++ b/src/main/java/net/minecraft/world/item/TridentItem.java
@@ -132,6 +132,18 @@ public class TridentItem extends Item implements ProjectileItem {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Item entity immunities


diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java
index 3ea4920323606150548d6e9fc1ce67724f19dc60..c14ce846afb7364e541bfe01b73a06a94e48f55b 100644
index c563326d3131bc726c7f43311c3eaa82131c6745..b0675953a75ff01f714cf5f35ad3907281648724 100644
--- a/src/main/java/net/minecraft/server/level/ServerEntity.java
+++ b/src/main/java/net/minecraft/server/level/ServerEntity.java
@@ -81,7 +81,7 @@ public class ServerEntity {
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Configurable jockey options


diff --git a/src/main/java/net/minecraft/world/entity/monster/Drowned.java b/src/main/java/net/minecraft/world/entity/monster/Drowned.java
index 0b572267d929ef362b6e65c55846ef12412951ba..7dc7f8734ffb3c5e50c763cb4e750d20c6e22281 100644
index 560743f2e49f71393b107b83881fcfd241fd122a..58908fa7f13eda35104065e6477ee1a1cb42cf00 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Drowned.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Drowned.java
@@ -100,6 +100,21 @@ public class Drowned extends Zombie implements RangedAttackMob {
@@ -103,6 +103,21 @@ public class Drowned extends Zombie implements RangedAttackMob {
this.getAttribute(Attributes.SPAWN_REINFORCEMENTS_CHANCE).setBaseValue(this.random.nextDouble() * this.level().purpurConfig.drownedSpawnReinforcements);
}

Expand Down Expand Up @@ -115,7 +115,7 @@ index 978f610d31312f36093c0111ce623d1157fa943d..cb5cf34781de4e87074a70a447fd4632
}
}
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 a2447844a6a6e08d41bb5152d01da91c852665cf..eb6daba7d44542739f1c537cbeef8f87c6db61bf 100644
index 09d44e4965e820b3cfae909040697d717e3c6643..2ee91a1822584fe11b139a747d60b6fa832fa177 100644
--- a/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java
+++ b/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java
@@ -112,6 +112,21 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ index 7cb3d69a69e0e3ef4b7f9f9c8b1eb67edb5d116d..4c9709e680b585316978b6a410600a8a

@Override
diff --git a/src/main/java/net/minecraft/world/entity/monster/Phantom.java b/src/main/java/net/minecraft/world/entity/monster/Phantom.java
index e44d6d02ceaf1f133705efcd58b94e36014389ec..bd1c23d849269df504c94da9d0ca0a6846b22c41 100644
index ea699a0788d660524ea9ea1f547de3697c00f0a8..fbac9260a510ad899aebd5a0196d122505dcc5da 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Phantom.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Phantom.java
@@ -49,6 +49,7 @@ public class Phantom extends FlyingMob implements Enemy {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Implement bed explosion options


diff --git a/src/main/java/net/minecraft/world/level/block/BedBlock.java b/src/main/java/net/minecraft/world/level/block/BedBlock.java
index c02c4834ace843633b77fb43eeadd3ddc7b1f743..3b19395f2ddee654a77df5738a1942a08c20c179 100644
index be700995c3e7f63e0471712c3cd6fd83db583491..db79ef24ea01db5f619ab29700d3d391438fb742 100644
--- a/src/main/java/net/minecraft/world/level/block/BedBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/BedBlock.java
@@ -106,7 +106,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ index 3bddfb6f7412ab86e0c090d0cbc6cf254b3f891c..6aa8ee091d3a7d2826d08ab9a03f970e

return true;
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index e7b9c8a473403002a75b6840250439c91ed12c1c..77093e49fd60993e7cb6bf5712ec53e0fe221776 100644
index 31ec722cfb102eaea5511aca07a48e4ad36d73af..7ff29256c1f898be90f85ab14abf48799a563c75 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -2044,4 +2044,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
@@ -2047,4 +2047,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
return this.id;
}
}
Expand Down
Loading

0 comments on commit 087bfb6

Please sign in to comment.