From 8f1dcdd0b72f941644d5d7943028f1f3fa54fa7b Mon Sep 17 00:00:00 2001 From: MiniDigger | Martin Date: Sun, 15 Dec 2024 22:39:52 +0100 Subject: [PATCH] update restamp, add back entity ATs, rebuild patches --- build-data/paper.at | 17 +++++++++++++++++ build.gradle.kts | 2 +- .../minecraft/world/entity/Entity.java.patch | 12 ++++++------ .../world/entity/npc/Villager.java.patch | 9 --------- .../world/entity/npc/WanderingTrader.java.patch | 9 --------- .../world/level/block/ChestBlock.java.patch | 2 +- 6 files changed, 25 insertions(+), 26 deletions(-) diff --git a/build-data/paper.at b/build-data/paper.at index 8cb2a85b2a..320cbacc90 100644 --- a/build-data/paper.at +++ b/build-data/paper.at @@ -176,6 +176,23 @@ public net.minecraft.world.entity.Display$TextDisplay getTextOpacity()B public net.minecraft.world.entity.Display$TextDisplay setFlags(B)V public net.minecraft.world.entity.Display$TextDisplay setText(Lnet/minecraft/network/chat/Component;)V public net.minecraft.world.entity.Display$TextDisplay setTextOpacity(B)V +public net.minecraft.world.entity.Entity FLAG_INVISIBLE +public net.minecraft.world.entity.Entity getEncodeId()Ljava/lang/String; +public net.minecraft.world.entity.Entity getFireImmuneTicks()I +public net.minecraft.world.entity.Entity getSharedFlag(I)Z +public net.minecraft.world.entity.Entity hasVisualFire +public net.minecraft.world.entity.Entity isInBubbleColumn()Z +public net.minecraft.world.entity.Entity isInRain()Z +public net.minecraft.world.entity.Entity isInvulnerableToBase(Lnet/minecraft/world/damagesource/DamageSource;)Z +public net.minecraft.world.entity.Entity onGround +public net.minecraft.world.entity.Entity passengers +public net.minecraft.world.entity.Entity portalCooldown +public net.minecraft.world.entity.Entity random +public net.minecraft.world.entity.Entity setLevel(Lnet/minecraft/world/level/Level;)V +public net.minecraft.world.entity.Entity setRot(FF)V +public net.minecraft.world.entity.Entity setSharedFlag(IZ)V +public net.minecraft.world.entity.Entity unsetRemoved()V +public net.minecraft.world.entity.Entity wasTouchingWater public net.minecraft.world.entity.ExperienceOrb count public net.minecraft.world.entity.ExperienceOrb value public net.minecraft.world.entity.GlowSquid setDarkTicks(I)V diff --git a/build.gradle.kts b/build.gradle.kts index 2360d32e7a..33a763a905 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -11,7 +11,7 @@ import java.nio.file.Path import kotlin.random.Random plugins { - id("io.papermc.paperweight.core") version "2.0.0-beta.1" apply false + id("io.papermc.paperweight.core") version "2.0.0-beta.2" apply false } subprojects { diff --git a/paper-server/patches/sources/net/minecraft/world/entity/Entity.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/Entity.java.patch index 4dfa987afe..7bd2ceef50 100644 --- a/paper-server/patches/sources/net/minecraft/world/entity/Entity.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/entity/Entity.java.patch @@ -119,11 +119,11 @@ public double zOld; public boolean noPhysics; private boolean wasOnFire; -- protected final RandomSource random = RandomSource.create(); -+ protected final RandomSource random = SHARED_RANDOM; // Paper - Share random for entities to make them more random +- public final RandomSource random = RandomSource.create(); ++ public final RandomSource random = SHARED_RANDOM; // Paper - Share random for entities to make them more random public int tickCount; private int remainingFireTicks = -this.getFireImmuneTicks(); - protected boolean wasTouchingWater; + public boolean wasTouchingWater; @@ -233,7 +_,7 @@ protected UUID uuid = Mth.createInsecureUUID(this.random); protected String stringUUID = this.uuid.toString(); @@ -341,7 +341,7 @@ @@ -390,6 +_,32 @@ } - protected void setRot(float yRot, float xRot) { + public void setRot(float yRot, float xRot) { + // CraftBukkit start - yaw was sometimes set to NaN, so we need to set it back to 0 + if (Float.isNaN(yRot)) { + yRot = 0; @@ -1193,7 +1193,7 @@ + // CraftBukkit - end } - protected boolean getSharedFlag(int flag) { + public boolean getSharedFlag(int flag) { @@ -2472,7 +_,7 @@ } @@ -1695,7 +1695,7 @@ + // Paper end - Folia schedulers } - protected void unsetRemoved() { + public void unsetRemoved() { this.removalReason = null; } diff --git a/paper-server/patches/sources/net/minecraft/world/entity/npc/Villager.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/npc/Villager.java.patch index 61d20a9b99..a650c82715 100644 --- a/paper-server/patches/sources/net/minecraft/world/entity/npc/Villager.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/entity/npc/Villager.java.patch @@ -88,15 +88,6 @@ double d = 0.3 + 0.0625 * amplifier; int i = (int)Math.floor(d * merchantOffer1.getBaseCostA().getCount()); merchantOffer1.addToSpecialPriceDiff(-Math.max(i, 1)); -@@ -559,7 +_,7 @@ - } - - @Override -- protected SoundEvent getDeathSound() { -+ public SoundEvent getDeathSound() { - return SoundEvents.VILLAGER_DEATH; - } - @@ -594,7 +_,7 @@ } diff --git a/paper-server/patches/sources/net/minecraft/world/entity/npc/WanderingTrader.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/npc/WanderingTrader.java.patch index d5e6a224ee..9e1d1a6ace 100644 --- a/paper-server/patches/sources/net/minecraft/world/entity/npc/WanderingTrader.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/entity/npc/WanderingTrader.java.patch @@ -70,15 +70,6 @@ } } -@@ -204,7 +_,7 @@ - } - - @Override -- protected SoundEvent getDeathSound() { -+ public SoundEvent getDeathSound() { - return SoundEvents.WANDERING_TRADER_DEATH; - } - @@ -241,7 +_,7 @@ private void maybeDespawn() { diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/ChestBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/ChestBlock.java.patch index 5200deab3e..55671a0957 100644 --- a/paper-server/patches/sources/net/minecraft/world/level/block/ChestBlock.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/level/block/ChestBlock.java.patch @@ -52,7 +52,7 @@ @@ -285,7 +_,14 @@ @Nullable @Override - protected MenuProvider getMenuProvider(BlockState state, Level level, BlockPos pos) { + public MenuProvider getMenuProvider(BlockState state, Level level, BlockPos pos) { - return this.combine(state, level, pos, false).apply(MENU_PROVIDER_COMBINER).orElse(null); + // CraftBukkit start + return this.getMenuProvider(state, level, pos, false);