more compile fixes
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user