From 97cf432687916fa80bd0f29ebbc195758bf312c0 Mon Sep 17 00:00:00 2001 From: Owen1212055 <23108066+Owen1212055@users.noreply.github.com> Date: Tue, 23 Apr 2024 19:30:03 -0400 Subject: [PATCH] update --- .../server/Add-BeaconEffectEvent.patch | 28 +++++++++++-------- ...ties-to-activation-range-ignore-list.patch | 0 ...e-before-converting-and-renaming-pla.patch | 16 +++++------ .../server/Configurable-end-credits.patch | 0 .../Configurable-mob-spawner-tick-rate.patch | 0 ...nfigurable-top-of-nether-void-damage.patch | 2 +- .../server/Disable-explosion-knockback.patch | 0 .../server/Disable-ice-and-snow.patch | 0 .../server/Disable-thunder.patch | 0 .../server/Entity-Origin-API.patch | 6 ++-- ...-explosions-processing-dead-entities.patch | 0 .../Implement-PlayerLocaleChangeEvent.patch | 0 .../server/Optimize-explosions.patch | 4 +-- ...vent-block-entity-and-entity-crashes.patch | 2 +- ...ix-ItemMeta-removing-CustomModelData.patch | 0 15 files changed, 31 insertions(+), 27 deletions(-) rename patches/{unapplied => }/server/Add-BeaconEffectEvent.patch (77%) rename patches/{unapplied => }/server/Add-more-entities-to-activation-range-ignore-list.patch (100%) rename patches/{unapplied => }/server/Check-online-mode-before-converting-and-renaming-pla.patch (56%) rename patches/{unapplied => }/server/Configurable-end-credits.patch (100%) rename patches/{unapplied => }/server/Configurable-mob-spawner-tick-rate.patch (100%) rename patches/{unapplied => }/server/Configurable-top-of-nether-void-damage.patch (97%) rename patches/{unapplied => }/server/Disable-explosion-knockback.patch (100%) rename patches/{unapplied => }/server/Disable-ice-and-snow.patch (100%) rename patches/{unapplied => }/server/Disable-thunder.patch (100%) rename patches/{unapplied => }/server/Entity-Origin-API.patch (94%) rename patches/{unapplied => }/server/Fix-lag-from-explosions-processing-dead-entities.patch (100%) rename patches/{unapplied => }/server/Implement-PlayerLocaleChangeEvent.patch (100%) rename patches/{unapplied => }/server/Optimize-explosions.patch (96%) rename patches/{unapplied => }/server/Prevent-block-entity-and-entity-crashes.patch (98%) rename patches/unapplied/server/fix-ItemMeta-removing-CustomModelData.patch => removed-patches-1-20-5/0042-fix-ItemMeta-removing-CustomModelData.patch (100%) diff --git a/patches/unapplied/server/Add-BeaconEffectEvent.patch b/patches/server/Add-BeaconEffectEvent.patch similarity index 77% rename from patches/unapplied/server/Add-BeaconEffectEvent.patch rename to patches/server/Add-BeaconEffectEvent.patch index c5a61301c9..822ec5d128 100644 --- a/patches/unapplied/server/Add-BeaconEffectEvent.patch +++ b/patches/server/Add-BeaconEffectEvent.patch @@ -8,36 +8,40 @@ diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEnt index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java -@@ -0,0 +0,0 @@ import net.minecraft.world.phys.AABB; +@@ -0,0 +0,0 @@ + package net.minecraft.world.level.block.entity; + ++import com.destroystokyo.paper.event.block.BeaconEffectEvent; + import com.google.common.collect.ImmutableList; + import com.google.common.collect.Lists; + import java.util.Arrays; +@@ -0,0 +0,0 @@ import net.minecraft.world.level.block.state.BlockState; + import net.minecraft.world.level.levelgen.Heightmap; + import net.minecraft.world.phys.AABB; + // CraftBukkit start ++import org.bukkit.craftbukkit.event.CraftEventFactory; import org.bukkit.craftbukkit.potion.CraftPotionUtil; import org.bukkit.potion.PotionEffect; // CraftBukkit end -+// Paper start -+import org.bukkit.craftbukkit.event.CraftEventFactory; -+import com.destroystokyo.paper.event.block.BeaconEffectEvent; -+// Paper end - - public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Nameable { - @@ -0,0 +0,0 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name } } -- private static void applyEffect(List list, MobEffect mobeffectlist, int j, int b0) { +- private static void applyEffect(List list, @Nullable Holder holder, int j, int b0) { - { -+ private static void applyEffect(List list, MobEffect effects, int i, int b0, boolean isPrimary, BlockPos worldPosition) { // Paper - BeaconEffectEvent ++ private static void applyEffect(List list, @Nullable Holder holder, int j, int b0, boolean isPrimary, BlockPos worldPosition) { // Paper - BeaconEffectEvent + if (!list.isEmpty()) { // Paper - BeaconEffectEvent Iterator iterator = list.iterator(); Player entityhuman; + // Paper start - BeaconEffectEvent + org.bukkit.block.Block block = org.bukkit.craftbukkit.block.CraftBlock.at(((Player) list.get(0)).level(), worldPosition); -+ PotionEffect effect = CraftPotionUtil.toBukkit(new MobEffectInstance(effects, i, b0, true, true)); ++ PotionEffect effect = CraftPotionUtil.toBukkit(new MobEffectInstance(holder, j, b0, true, true)); + // Paper end - BeaconEffectEvent while (iterator.hasNext()) { - entityhuman = (Player) iterator.next(); -- entityhuman.addEffect(new MobEffectInstance(mobeffectlist, j, b0, true, true), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.BEACON); +- entityhuman.addEffect(new MobEffectInstance(holder, j, b0, true, true), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.BEACON); + // Paper start - BeaconEffectEvent + entityhuman = (ServerPlayer) iterator.next(); + BeaconEffectEvent event = new BeaconEffectEvent(block, effect, (org.bukkit.entity.Player) entityhuman.getBukkitEntity(), isPrimary); diff --git a/patches/unapplied/server/Add-more-entities-to-activation-range-ignore-list.patch b/patches/server/Add-more-entities-to-activation-range-ignore-list.patch similarity index 100% rename from patches/unapplied/server/Add-more-entities-to-activation-range-ignore-list.patch rename to patches/server/Add-more-entities-to-activation-range-ignore-list.patch diff --git a/patches/unapplied/server/Check-online-mode-before-converting-and-renaming-pla.patch b/patches/server/Check-online-mode-before-converting-and-renaming-pla.patch similarity index 56% rename from patches/unapplied/server/Check-online-mode-before-converting-and-renaming-pla.patch rename to patches/server/Check-online-mode-before-converting-and-renaming-pla.patch index 1e04614ee5..6c4dc7fdb5 100644 --- a/patches/unapplied/server/Check-online-mode-before-converting-and-renaming-pla.patch +++ b/patches/server/Check-online-mode-before-converting-and-renaming-pla.patch @@ -9,11 +9,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java +++ b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java @@ -0,0 +0,0 @@ public class PlayerDataStorage { - File file = new File(this.playerDir, player.getStringUUID() + ".dat"); - // Spigot Start - boolean usingWrongFile = false; -- if ( !file.exists() ) -+ if ( org.bukkit.Bukkit.getOnlineMode() && !file.exists() ) // Paper - Check online mode first - { - file = new File( this.playerDir, java.util.UUID.nameUUIDFromBytes( ( "OfflinePlayer:" + player.getScoreboardName() ).getBytes( "UTF-8" ) ).toString() + ".dat"); - if ( file.exists() ) + File file1 = new File(file, s1 + s); + // Spigot Start + boolean usingWrongFile = false; +- if ( !file1.exists() ) ++ if ( org.bukkit.Bukkit.getOnlineMode() && !file.exists() ) // Paper - Check online mode first + { + file1 = new File( file, java.util.UUID.nameUUIDFromBytes( ( "OfflinePlayer:" + name ).getBytes( java.nio.charset.StandardCharsets.UTF_8 ) ).toString() + s ); + if ( file1.exists() ) diff --git a/patches/unapplied/server/Configurable-end-credits.patch b/patches/server/Configurable-end-credits.patch similarity index 100% rename from patches/unapplied/server/Configurable-end-credits.patch rename to patches/server/Configurable-end-credits.patch diff --git a/patches/unapplied/server/Configurable-mob-spawner-tick-rate.patch b/patches/server/Configurable-mob-spawner-tick-rate.patch similarity index 100% rename from patches/unapplied/server/Configurable-mob-spawner-tick-rate.patch rename to patches/server/Configurable-mob-spawner-tick-rate.patch diff --git a/patches/unapplied/server/Configurable-top-of-nether-void-damage.patch b/patches/server/Configurable-top-of-nether-void-damage.patch similarity index 97% rename from patches/unapplied/server/Configurable-top-of-nether-void-damage.patch rename to patches/server/Configurable-top-of-nether-void-damage.patch index 9c69aeb87e..045574b847 100644 --- a/patches/unapplied/server/Configurable-top-of-nether-void-damage.patch +++ b/patches/server/Configurable-top-of-nether-void-damage.patch @@ -9,7 +9,7 @@ diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/jav index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S +@@ -0,0 +0,0 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } public void checkBelowWorld() { diff --git a/patches/unapplied/server/Disable-explosion-knockback.patch b/patches/server/Disable-explosion-knockback.patch similarity index 100% rename from patches/unapplied/server/Disable-explosion-knockback.patch rename to patches/server/Disable-explosion-knockback.patch diff --git a/patches/unapplied/server/Disable-ice-and-snow.patch b/patches/server/Disable-ice-and-snow.patch similarity index 100% rename from patches/unapplied/server/Disable-ice-and-snow.patch rename to patches/server/Disable-ice-and-snow.patch diff --git a/patches/unapplied/server/Disable-thunder.patch b/patches/server/Disable-thunder.patch similarity index 100% rename from patches/unapplied/server/Disable-thunder.patch rename to patches/server/Disable-thunder.patch diff --git a/patches/unapplied/server/Entity-Origin-API.patch b/patches/server/Entity-Origin-API.patch similarity index 94% rename from patches/unapplied/server/Entity-Origin-API.patch rename to patches/server/Entity-Origin-API.patch index 2e1f5b6ad0..80f5060ffe 100644 --- a/patches/unapplied/server/Entity-Origin-API.patch +++ b/patches/server/Entity-Origin-API.patch @@ -28,7 +28,7 @@ diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/jav index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S +@@ -0,0 +0,0 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess public long activatedTick = Integer.MIN_VALUE; public void inactiveTick() { } // Spigot end @@ -56,7 +56,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public float getBukkitYaw() { return this.yRot; } -@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S +@@ -0,0 +0,0 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess this.bukkitEntity.storeBukkitValues(nbttagcompound); } // CraftBukkit end @@ -72,7 +72,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 return nbttagcompound; } catch (Throwable throwable) { CrashReport crashreport = CrashReport.forThrowable(throwable, "Saving entity NBT"); -@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S +@@ -0,0 +0,0 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } // CraftBukkit end diff --git a/patches/unapplied/server/Fix-lag-from-explosions-processing-dead-entities.patch b/patches/server/Fix-lag-from-explosions-processing-dead-entities.patch similarity index 100% rename from patches/unapplied/server/Fix-lag-from-explosions-processing-dead-entities.patch rename to patches/server/Fix-lag-from-explosions-processing-dead-entities.patch diff --git a/patches/unapplied/server/Implement-PlayerLocaleChangeEvent.patch b/patches/server/Implement-PlayerLocaleChangeEvent.patch similarity index 100% rename from patches/unapplied/server/Implement-PlayerLocaleChangeEvent.patch rename to patches/server/Implement-PlayerLocaleChangeEvent.patch diff --git a/patches/unapplied/server/Optimize-explosions.patch b/patches/server/Optimize-explosions.patch similarity index 96% rename from patches/unapplied/server/Optimize-explosions.patch rename to patches/server/Optimize-explosions.patch index 80c610e1c2..f0551fd4e4 100644 --- a/patches/unapplied/server/Optimize-explosions.patch +++ b/patches/server/Optimize-explosions.patch @@ -29,8 +29,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 // CraftBukkit end } -- double d12 = (1.0D - d7) * (double) Explosion.getSeenPercent(vec3d, entity); -+ double d12 = (1.0D - d7) * this.getBlockDensity(vec3d, entity); // Paper - Optimize explosions +- double d12 = (1.0D - d7) * (double) Explosion.getSeenPercent(vec3d, entity) * (double) this.damageCalculator.getKnockbackMultiplier(entity); ++ double d12 = (1.0D - d7) * this.getBlockDensity(vec3d, entity) * (double) this.damageCalculator.getKnockbackMultiplier(entity); // Paper - Optimize explosions double d13; if (entity instanceof LivingEntity) { diff --git a/patches/unapplied/server/Prevent-block-entity-and-entity-crashes.patch b/patches/server/Prevent-block-entity-and-entity-crashes.patch similarity index 98% rename from patches/unapplied/server/Prevent-block-entity-and-entity-crashes.patch rename to patches/server/Prevent-block-entity-and-entity-crashes.patch index ca9144fe45..d7cb9358b7 100644 --- a/patches/unapplied/server/Prevent-block-entity-and-entity-crashes.patch +++ b/patches/server/Prevent-block-entity-and-entity-crashes.patch @@ -30,7 +30,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java @@ -0,0 +0,0 @@ public abstract class BlockEntity { - return minecraftkey + " // " + this.getClass().getCanonicalName(); + return s + " // " + this.getClass().getCanonicalName(); }); if (this.level != null) { - CrashReportCategory.populateBlockDetails(crashReportSection, this.level, this.worldPosition, this.getBlockState()); diff --git a/patches/unapplied/server/fix-ItemMeta-removing-CustomModelData.patch b/removed-patches-1-20-5/0042-fix-ItemMeta-removing-CustomModelData.patch similarity index 100% rename from patches/unapplied/server/fix-ItemMeta-removing-CustomModelData.patch rename to removed-patches-1-20-5/0042-fix-ItemMeta-removing-CustomModelData.patch