@@ -14,7 +14,7 @@
|
||||
public abstract class EntityArrow extends IProjectile {
|
||||
|
||||
private static final double ARROW_BASE_DAMAGE = 2.0D;
|
||||
@@ -86,7 +93,14 @@
|
||||
@@ -88,7 +95,14 @@
|
||||
}
|
||||
|
||||
protected EntityArrow(EntityTypes<? extends EntityArrow> entitytypes, double d0, double d1, double d2, World world, ItemStack itemstack, @Nullable ItemStack itemstack1) {
|
||||
@@ -29,7 +29,7 @@
|
||||
this.pickupItemStack = itemstack.copy();
|
||||
this.setCustomName((IChatBaseComponent) itemstack.get(DataComponents.CUSTOM_NAME));
|
||||
Unit unit = (Unit) itemstack.remove(DataComponents.INTANGIBLE_PROJECTILE);
|
||||
@@ -112,8 +126,8 @@
|
||||
@@ -114,8 +128,8 @@
|
||||
}
|
||||
|
||||
protected EntityArrow(EntityTypes<? extends EntityArrow> entitytypes, EntityLiving entityliving, World world, ItemStack itemstack, @Nullable ItemStack itemstack1) {
|
||||
@@ -40,7 +40,7 @@
|
||||
}
|
||||
|
||||
public void setSoundEvent(SoundEffect soundeffect) {
|
||||
@@ -276,7 +290,7 @@
|
||||
@@ -282,7 +296,7 @@
|
||||
|
||||
if (movingobjectpositionentity == null) {
|
||||
if (this.isAlive() && movingobjectpositionblock.getType() != MovingObjectPosition.EnumMovingObjectType.MISS) {
|
||||
@@ -49,7 +49,7 @@
|
||||
this.hasImpulse = true;
|
||||
}
|
||||
} else {
|
||||
@@ -284,7 +298,7 @@
|
||||
@@ -290,7 +304,7 @@
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
|
||||
this.hasImpulse = true;
|
||||
if (this.getPierceLevel() > 0 && projectiledeflection == ProjectileDeflection.NONE) {
|
||||
@@ -356,7 +370,7 @@
|
||||
@@ -357,7 +371,7 @@
|
||||
protected void tickDespawn() {
|
||||
++this.life;
|
||||
if (this.life >= 1200) {
|
||||
@@ -67,7 +67,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -408,7 +422,7 @@
|
||||
@@ -423,7 +437,7 @@
|
||||
}
|
||||
|
||||
if (this.piercingIgnoreEntityIds.size() >= this.getPierceLevel() + 1) {
|
||||
@@ -76,7 +76,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -429,7 +443,13 @@
|
||||
@@ -444,7 +458,13 @@
|
||||
int k = entity.getRemainingFireTicks();
|
||||
|
||||
if (this.isOnFire() && !flag) {
|
||||
@@ -91,7 +91,7 @@
|
||||
}
|
||||
|
||||
if (entity.hurtOrSimulate(damagesource, (float) i)) {
|
||||
@@ -475,7 +495,7 @@
|
||||
@@ -490,7 +510,7 @@
|
||||
|
||||
this.playSound(this.soundEvent, 1.0F, 1.2F / (this.random.nextFloat() * 0.2F + 0.9F));
|
||||
if (this.getPierceLevel() <= 0) {
|
||||
@@ -100,7 +100,7 @@
|
||||
}
|
||||
} else {
|
||||
entity.setRemainingFireTicks(k);
|
||||
@@ -491,7 +511,7 @@
|
||||
@@ -506,7 +526,7 @@
|
||||
this.spawnAtLocation(worldserver2, this.getPickupItem(), 0.1F);
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -660,7 +680,7 @@
|
||||
@@ -675,7 +695,7 @@
|
||||
}
|
||||
|
||||
if (nbttagcompound.contains("weapon", 10)) {
|
||||
@@ -118,7 +118,7 @@
|
||||
} else {
|
||||
this.firedFromWeapon = null;
|
||||
}
|
||||
@@ -673,34 +693,31 @@
|
||||
@@ -688,34 +708,31 @@
|
||||
Entity entity1 = entity;
|
||||
byte b0 = 0;
|
||||
|
||||
@@ -165,7 +165,7 @@
|
||||
}
|
||||
|
||||
this.pickup = entityarrow_pickupstatus;
|
||||
@@ -709,9 +726,24 @@
|
||||
@@ -724,9 +741,24 @@
|
||||
@Override
|
||||
public void playerTouch(EntityHuman entityhuman) {
|
||||
if (!this.level().isClientSide && (this.isInGround() || this.isNoPhysics()) && this.shakeTime <= 0) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/projectile/EntityFireball.java
|
||||
+++ b/net/minecraft/world/entity/projectile/EntityFireball.java
|
||||
@@ -19,11 +19,17 @@
|
||||
@@ -15,11 +15,17 @@
|
||||
import net.minecraft.world.phys.MovingObjectPosition;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
protected EntityFireball(EntityTypes<? extends EntityFireball> entitytypes, World world) {
|
||||
super(entitytypes, world);
|
||||
@@ -73,7 +79,7 @@
|
||||
@@ -69,7 +75,7 @@
|
||||
|
||||
this.applyInertia();
|
||||
if (!this.level().isClientSide && (entity != null && entity.isRemoved() || !this.level().hasChunkAt(this.blockPosition()))) {
|
||||
@@ -27,7 +27,7 @@
|
||||
} else {
|
||||
MovingObjectPosition movingobjectposition = ProjectileHelper.getHitResultOnMoveVector(this, this::canHitEntity, this.getClipType());
|
||||
Vec3D vec3d;
|
||||
@@ -93,7 +99,7 @@
|
||||
@@ -89,7 +95,7 @@
|
||||
}
|
||||
|
||||
if (movingobjectposition.getType() != MovingObjectPosition.EnumMovingObjectType.MISS && this.isAlive()) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/projectile/EntityThrownExpBottle.java
|
||||
+++ b/net/minecraft/world/entity/projectile/EntityThrownExpBottle.java
|
||||
@@ -12,6 +12,10 @@
|
||||
@@ -10,6 +10,10 @@
|
||||
import net.minecraft.world.level.World;
|
||||
import net.minecraft.world.phys.MovingObjectPosition;
|
||||
|
||||
@@ -11,20 +11,20 @@
|
||||
public class EntityThrownExpBottle extends EntityProjectileThrowable {
|
||||
|
||||
public EntityThrownExpBottle(EntityTypes<? extends EntityThrownExpBottle> entitytypes, World world) {
|
||||
@@ -40,11 +44,20 @@
|
||||
@@ -38,11 +42,20 @@
|
||||
protected void onHit(MovingObjectPosition movingobjectposition) {
|
||||
super.onHit(movingobjectposition);
|
||||
if (this.level() instanceof WorldServer) {
|
||||
- this.level().levelEvent(2002, this.blockPosition(), PotionContents.getColor(Potions.WATER));
|
||||
- this.level().levelEvent(2002, this.blockPosition(), -13083194);
|
||||
+ // CraftBukkit - moved to after event
|
||||
+ // this.level().levelEvent(2002, this.blockPosition(), PotionContents.getColor(Potions.WATER));
|
||||
+ // this.level().levelEvent(2002, this.blockPosition(), -13083194);
|
||||
int i = 3 + this.level().random.nextInt(5) + this.level().random.nextInt(5);
|
||||
|
||||
+ // CraftBukkit start
|
||||
+ org.bukkit.event.entity.ExpBottleEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callExpBottleEvent(this, movingobjectposition, i);
|
||||
+ i = event.getExperience();
|
||||
+ if (event.getShowEffect()) {
|
||||
+ this.level().levelEvent(2002, this.blockPosition(), PotionContents.getColor(Potions.WATER));
|
||||
+ this.level().levelEvent(2002, this.blockPosition(), -13083194);
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
public class EntityThrownTrident extends EntityArrow {
|
||||
|
||||
private static final DataWatcherObject<Byte> ID_LOYALTY = DataWatcher.defineId(EntityThrownTrident.class, DataWatcherRegistry.BYTE);
|
||||
@@ -75,10 +79,10 @@
|
||||
@@ -76,10 +80,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -136,7 +140,7 @@
|
||||
@@ -137,7 +141,7 @@
|
||||
|
||||
world = this.level();
|
||||
if (world instanceof WorldServer) {
|
||||
|
||||
Reference in New Issue
Block a user