Updated Upstream (Paper)

Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@9f1fa0b Fix item gravity on inactive items, remove dumb active skipping
PaperMC/Paper@1a1d0cf Use target pitch in teleport (generally the same thing)
PaperMC/Paper@8ba3073 fix "is_freezing" damage type tag
PaperMC/Paper@1523212 don't resend effects when PlayerItemConsumeEvent is cancelled
PaperMC/Paper@1330880 Add Friction API to minecarts
PaperMC/Paper@580a610 Allow using old ender pearl behavior & apply ender pearl exploit patch (#11524)
PaperMC/Paper@40a960d Rebuild patches
PaperMC/Paper@dfedf79 Correctly cancel consumption of consumable
PaperMC/Paper@147b796 get previous redstone level from the right state for experimental wires
PaperMC/Paper@ad9c58e Only expose velocity relative tp flags to API (#11532)
PaperMC/Paper@f273e6e Set updatingMinecraft to false
PaperMC/Paper@c5c1250 [ci skip] Remove leftover todo file (#11540)
PaperMC/Paper@7ee4835 Correctly clear  explosion density cache(#11541)
PaperMC/Paper@52a0590 Updated Upstream (Bukkit/CraftBukkit) (#11543)
PaperMC/Paper@5c0930d Fix fix recipe iterator patch
PaperMC/Paper@1de0130 re-add a dispense fix patch
PaperMC/Paper@16d7d73 bunch more general fixes
PaperMC/Paper@a5d7426 Correctly support RecipeChoice.empty (#11550)
PaperMC/Paper@85c870e Correct update cursor (#11554)
PaperMC/Paper@d19be64 Fix NPE with spark when CraftServer is not init yet (#11558)
PaperMC/Paper@92131ad Decrease dead entity teleport warning (#11559)
This commit is contained in:
granny
2024-11-01 18:25:48 -07:00
parent af96590f86
commit c6802b0a27
263 changed files with 1118 additions and 3219 deletions

View File

@@ -0,0 +1,43 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: MelnCat <melncatuwu@gmail.com>
Date: Sat, 1 Oct 2022 13:29:17 -0700
Subject: [PATCH] Configurable block blast resistance
diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
index 6b987ee220d94b482d2aeb4ff6bf271853605dc1..852bfe68ab722a5cbdd90dbd70501b751fe81a78 100644
--- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
+++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
@@ -91,7 +91,7 @@ public abstract class BlockBehaviour implements FeatureElement {
protected static final Direction[] UPDATE_SHAPE_ORDER = new Direction[]{Direction.WEST, Direction.EAST, Direction.NORTH, Direction.SOUTH, Direction.DOWN, Direction.UP};
public final boolean hasCollision;
- protected final float explosionResistance;
+ public float explosionResistance; // Purpur - protected final -> public
protected final boolean isRandomlyTicking;
protected final SoundType soundType;
protected final float friction;
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
index 7164788c20483a78a92ccdcf480bd95651d84825..a282e1a0c832174a70c7b317f547c5d250fe37ad 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
@@ -498,4 +498,19 @@ public class PurpurConfig {
String setPattern = getString("settings.username-valid-characters", defaultPattern);
usernameValidCharactersPattern = java.util.regex.Pattern.compile(setPattern == null || setPattern.isBlank() ? defaultPattern : setPattern);
}
+
+ private static void blastResistanceSettings() {
+ getMap("settings.blast-resistance-overrides", Collections.emptyMap()).forEach((blockId, value) -> {
+ Block block = BuiltInRegistries.BLOCK.getValue(ResourceLocation.parse(blockId));
+ if (block == Blocks.AIR) {
+ log(Level.SEVERE, "Invalid block for `settings.blast-resistance-overrides`: " + blockId);
+ return;
+ }
+ if (!(value instanceof Number blastResistance)) {
+ log(Level.SEVERE, "Invalid blast resistance for `settings.blast-resistance-overrides." + blockId + "`: " + value);
+ return;
+ }
+ block.explosionResistance = blastResistance.floatValue();
+ });
+ }
}