more compile fixes

This commit is contained in:
Jake Potrebic 2024-12-15 14:12:31 -08:00
parent ec57b99bf5
commit cb51a4fbcd
No known key found for this signature in database
GPG key ID: ECE0B3C133C016C5
10 changed files with 42 additions and 9 deletions

View file

@ -357,6 +357,7 @@ public net.minecraft.world.entity.monster.Shulker setRawPeekAmount(I)V
public net.minecraft.world.entity.monster.Skeleton DATA_STRAY_CONVERSION_ID
public net.minecraft.world.entity.monster.Skeleton conversionTime
public net.minecraft.world.entity.monster.Skeleton inPowderSnowTime
public net.minecraft.world.entity.monster.SpellcasterIllager getCurrentSpell()Lnet/minecraft/world/entity/monster/SpellcasterIllager$IllagerSpell;
public net.minecraft.world.entity.monster.SpellcasterIllager$IllagerSpell
public net.minecraft.world.entity.monster.Strider steering
public net.minecraft.world.entity.monster.Vex hasLimitedLife
@ -431,7 +432,6 @@ public net.minecraft.world.entity.projectile.FishingHook timeUntilLured
public net.minecraft.world.entity.projectile.FishingHook$FishHookState
public net.minecraft.world.entity.projectile.LargeFireball explosionPower
public net.minecraft.world.entity.projectile.Projectile cachedOwner
public net.minecraft.world.entity.projectile.Projectile canHitEntity(Lnet/minecraft/world/entity/Entity;)Z
public net.minecraft.world.entity.projectile.Projectile hasBeenShot
public net.minecraft.world.entity.projectile.Projectile leftOwner
public net.minecraft.world.entity.projectile.Projectile ownerUUID

View file

@ -5,7 +5,7 @@
private final Map<String, LiteralCommandNode<S>> literals = new LinkedHashMap<>();
private final Map<String, ArgumentCommandNode<S, ?>> arguments = new LinkedHashMap<>();
- private final Predicate<S> requirement;
+ public final Predicate<S> requirement; // Paper
+ public Predicate<S> requirement; // Paper - public-f
private final CommandNode<S> redirect;
private final RedirectModifier<S> modifier;
private final boolean forks;

View file

@ -0,0 +1,16 @@
--- a/net/minecraft/gametest/framework/GameTestServer.java
+++ b/net/minecraft/gametest/framework/GameTestServer.java
@@ -304,6 +_,13 @@
return false;
}
+ // Paper start
+ @Override
+ public org.bukkit.command.CommandSender getBukkitSender(final net.minecraft.commands.CommandSourceStack wrapper) {
+ throw new UnsupportedOperationException("Not supported.");
+ }
+ // Paper end
+
@Override
public boolean isSingleplayerOwner(GameProfile profile) {
return false;

View file

@ -834,7 +834,7 @@
+ protected void postDeathDropItems(org.bukkit.event.entity.EntityDeathEvent event) {} // Paper - method for post death logic that cannot be ran before the event is potentially cancelled
- protected void dropExperience(ServerLevel level, @Nullable Entity entity) {
+ protected int getExpReward(ServerLevel level, @Nullable Entity entity) { // CraftBukkit
+ public int getExpReward(ServerLevel level, @Nullable Entity entity) { // CraftBukkit
if (!this.wasExperienceConsumed()
&& (
this.isAlwaysExperienceDropper()

View file

@ -75,7 +75,7 @@
DyeColor dyeColor = dyeItem.getDyeColor();
if (dyeColor != this.getCollarColor()) {
+ // Paper start - Add EntityDyeEvent and CollarColorable interface
+ final io.papermc.paper.event.entity.EntityDyeEvent event = new io.papermc.paper.event.entity.EntityDyeEvent(this.getBukkitEntity(), org.bukkit.DyeColor.getByWoolData((byte) dyeColor.getId()), player.getBukkitEntity());
+ final io.papermc.paper.event.entity.EntityDyeEvent event = new io.papermc.paper.event.entity.EntityDyeEvent(this.getBukkitEntity(), org.bukkit.DyeColor.getByWoolData((byte) dyeColor.getId()), (org.bukkit.entity.Player) player.getBukkitEntity());
+ if (!event.callEvent()) {
+ return InteractionResult.FAIL;
+ }

View file

@ -93,6 +93,15 @@
@Override
protected double getDefaultGravity() {
return 0.05;
@@ -329,7 +_,7 @@
this.life = 0;
}
- protected boolean isInGround() {
+ public boolean isInGround() { // Paper - protected -> public
return this.entityData.get(IN_GROUND);
}
@@ -347,8 +_,8 @@
protected void tickDespawn() {

View file

@ -175,7 +175,7 @@
this.onDeflection(entity, deflectedByPlayer);
}
@@ -297,6 +_,11 @@
@@ -297,15 +_,35 @@
}
protected void onHitBlock(BlockHitResult result) {
@ -187,7 +187,15 @@
BlockState blockState = this.level().getBlockState(result.getBlockPos());
blockState.onProjectileHit(this.level(), blockState, result, this);
}
@@ -306,6 +_,15 @@
+ // Paper start
+ public boolean canHitEntityPublic(final Entity target) {
+ return this.canHitEntity(target);
+ }
+ // Paper end
+
protected boolean canHitEntity(Entity target) {
if (!target.canBeHitByProjectile()) {
return false;
} else {
Entity owner = this.getOwner();

View file

@ -34,7 +34,7 @@
+ // Paper end - PlayerBedFailEnterEvent
+ // CraftBukkit start - handling bed explosion from below here
+ if (event.getWillExplode()) { // Paper - PlayerBedFailEnterEvent
+ this.explodeBed(finaliblockdata, world, finalblockposition);
+ this.explodeBed(finaliblockdata, level, finalblockposition);
+ } else
+ // CraftBukkit end
if (bedSleepingProblem.getMessage() != null) {

View file

@ -191,7 +191,7 @@
}
- public static int getTotalCookTime(ServerLevel level, AbstractFurnaceBlockEntity furnace) {
+ private static int getTotalCookTime(@Nullable ServerLevel level, AbstractFurnaceBlockEntity furnace, RecipeType<? extends AbstractCookingRecipe> recipeType, double cookSpeedMultiplier) { // Paper - cook speed multiplier API
+ public static int getTotalCookTime(@Nullable ServerLevel level, AbstractFurnaceBlockEntity furnace, RecipeType<? extends AbstractCookingRecipe> recipeType, double cookSpeedMultiplier) { // Paper - cook speed multiplier API
SingleRecipeInput singleRecipeInput = new SingleRecipeInput(furnace.getItem(0));
- return furnace.quickCheck.getRecipeFor(singleRecipeInput, level).map(recipe -> recipe.value().cookingTime()).orElse(200);
+ // Paper start - cook speed multiplier API

View file

@ -40,7 +40,7 @@ public abstract class AbstractProjectile extends CraftEntity implements Projecti
@Override
public boolean canHitEntity(org.bukkit.entity.Entity entity) {
return this.getHandle().canHitEntity(((CraftEntity) entity).getHandle());
return this.getHandle().canHitEntityPublic(((CraftEntity) entity).getHandle());
}
@Override