mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-27 15:00:13 +01:00
more compile fixes
This commit is contained in:
parent
ec57b99bf5
commit
cb51a4fbcd
10 changed files with 42 additions and 9 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
|
@ -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()
|
||||
|
|
|
@ -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;
|
||||
+ }
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue