@@ -44,15 +44,15 @@
|
||||
}
|
||||
|
||||
this.checkInsideBlocks();
|
||||
@@ -159,6 +175,11 @@
|
||||
Entity entity = damagesource.getEntity();
|
||||
@@ -160,6 +176,11 @@
|
||||
|
||||
if (entity != null) {
|
||||
+ // CraftBukkit start
|
||||
+ if (CraftEventFactory.handleNonLivingEntityDamageEvent(this, damagesource, f, false)) {
|
||||
+ return false;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
Vec3D vec3d = entity.getLookAngle();
|
||||
if (!this.level.isClientSide) {
|
||||
+ // CraftBukkit start
|
||||
+ if (CraftEventFactory.handleNonLivingEntityDamageEvent(this, damagesource, f, false)) {
|
||||
+ return false;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
Vec3D vec3d = entity.getLookAngle();
|
||||
|
||||
this.setDeltaMovement(vec3d);
|
||||
this.setDeltaMovement(vec3d);
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
public class EntityFireworks extends IProjectile implements ItemSupplier {
|
||||
|
||||
public static final DataWatcherObject<ItemStack> DATA_ID_FIREWORKS_ITEM = DataWatcher.defineId(EntityFireworks.class, DataWatcherRegistry.ITEM_STACK);
|
||||
@@ -141,7 +143,7 @@
|
||||
@@ -144,7 +146,7 @@
|
||||
MovingObjectPosition movingobjectposition = ProjectileHelper.getHitResult(this, this::canHitEntity);
|
||||
|
||||
if (!this.noPhysics) {
|
||||
@@ -18,7 +18,7 @@
|
||||
this.hasImpulse = true;
|
||||
}
|
||||
|
||||
@@ -156,7 +158,11 @@
|
||||
@@ -159,7 +161,11 @@
|
||||
}
|
||||
|
||||
if (!this.level.isClientSide && this.life > this.lifetime) {
|
||||
@@ -31,7 +31,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -172,7 +178,11 @@
|
||||
@@ -175,7 +181,11 @@
|
||||
protected void onHitEntity(MovingObjectPositionEntity movingobjectpositionentity) {
|
||||
super.onHitEntity(movingobjectpositionentity);
|
||||
if (!this.level.isClientSide) {
|
||||
@@ -44,7 +44,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -182,7 +192,11 @@
|
||||
@@ -185,7 +195,11 @@
|
||||
|
||||
this.level.getBlockState(blockposition).entityInside(this.level, blockposition, this);
|
||||
if (!this.level.isClientSide() && this.hasExplosion()) {
|
||||
@@ -57,7 +57,7 @@
|
||||
}
|
||||
|
||||
super.onHitBlock(movingobjectpositionblock);
|
||||
@@ -208,7 +222,9 @@
|
||||
@@ -211,7 +225,9 @@
|
||||
|
||||
if (f > 0.0F) {
|
||||
if (this.attachedToEntity != null) {
|
||||
@@ -67,7 +67,7 @@
|
||||
}
|
||||
|
||||
double d0 = 5.0D;
|
||||
@@ -235,7 +251,9 @@
|
||||
@@ -238,7 +254,9 @@
|
||||
if (flag) {
|
||||
float f1 = f * (float) Math.sqrt((5.0D - (double) this.distanceTo(entityliving)) / 5.0D);
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/world/entity/projectile/EntityFishingHook.java
|
||||
+++ b/net/minecraft/world/entity/projectile/EntityFishingHook.java
|
||||
@@ -44,6 +44,12 @@
|
||||
import net.minecraft.world.phys.MovingObjectPositionEntity;
|
||||
@@ -45,6 +45,12 @@
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import org.bukkit.entity.Player;
|
||||
@@ -12,8 +12,8 @@
|
||||
+
|
||||
public class EntityFishingHook extends IProjectile {
|
||||
|
||||
private final Random syncronizedRandom;
|
||||
@@ -64,6 +70,12 @@
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
@@ -66,6 +72,12 @@
|
||||
private final int luck;
|
||||
private final int lureSpeed;
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
private EntityFishingHook(EntityTypes<? extends EntityFishingHook> entitytypes, World world, int i, int j) {
|
||||
super(entitytypes, world);
|
||||
this.syncronizedRandom = new Random();
|
||||
@@ -258,7 +270,7 @@
|
||||
@@ -260,7 +272,7 @@
|
||||
private void checkCollision() {
|
||||
MovingObjectPosition movingobjectposition = ProjectileHelper.getHitResult(this, this::canHitEntity);
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -305,6 +317,10 @@
|
||||
@@ -307,6 +319,10 @@
|
||||
this.timeUntilLured = 0;
|
||||
this.timeUntilHooked = 0;
|
||||
this.getEntityData().set(EntityFishingHook.DATA_BITING, false);
|
||||
@@ -46,7 +46,7 @@
|
||||
}
|
||||
} else {
|
||||
float f;
|
||||
@@ -338,6 +354,13 @@
|
||||
@@ -340,6 +356,13 @@
|
||||
worldserver.sendParticles(Particles.FISHING, d0, d1, d2, 0, (double) (-f4), 0.01D, (double) f3, 1.0D);
|
||||
}
|
||||
} else {
|
||||
@@ -60,7 +60,7 @@
|
||||
this.playSound(SoundEffects.FISHING_BOBBER_SPLASH, 0.25F, 1.0F + (this.random.nextFloat() - this.random.nextFloat()) * 0.4F);
|
||||
double d3 = this.getY() + 0.5D;
|
||||
|
||||
@@ -374,8 +397,10 @@
|
||||
@@ -376,8 +399,10 @@
|
||||
this.timeUntilHooked = MathHelper.nextInt(this.random, 20, 80);
|
||||
}
|
||||
} else {
|
||||
@@ -73,7 +73,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -442,6 +467,14 @@
|
||||
@@ -444,6 +469,14 @@
|
||||
int i = 0;
|
||||
|
||||
if (this.hookedIn != null) {
|
||||
@@ -88,7 +88,7 @@
|
||||
this.pullEntity(this.hookedIn);
|
||||
CriterionTriggers.FISHING_ROD_HOOKED.trigger((EntityPlayer) entityhuman, itemstack, this, Collections.emptyList());
|
||||
this.level.broadcastEntityEvent(this, (byte) 31);
|
||||
@@ -457,6 +490,15 @@
|
||||
@@ -459,6 +492,15 @@
|
||||
while (iterator.hasNext()) {
|
||||
ItemStack itemstack1 = (ItemStack) iterator.next();
|
||||
EntityItem entityitem = new EntityItem(this.level, this.getX(), this.getY(), this.getZ(), itemstack1);
|
||||
@@ -104,7 +104,7 @@
|
||||
double d0 = entityhuman.getX() - this.getX();
|
||||
double d1 = entityhuman.getY() - this.getY();
|
||||
double d2 = entityhuman.getZ() - this.getZ();
|
||||
@@ -464,7 +506,11 @@
|
||||
@@ -466,7 +508,11 @@
|
||||
|
||||
entityitem.setDeltaMovement(d0 * 0.1D, d1 * 0.1D + Math.sqrt(Math.sqrt(d0 * d0 + d1 * d1 + d2 * d2)) * 0.08D, d2 * 0.1D);
|
||||
this.level.addFreshEntity(entityitem);
|
||||
@@ -114,10 +114,10 @@
|
||||
+ entityhuman.level.addFreshEntity(new EntityExperienceOrb(entityhuman.level, entityhuman.getX(), entityhuman.getY() + 0.5D, entityhuman.getZ() + 0.5D, playerFishEvent.getExpToDrop()));
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
if (itemstack1.is((Tag) TagsItem.FISHES)) {
|
||||
if (itemstack1.is(TagsItem.FISHES)) {
|
||||
entityhuman.awardStat(StatisticList.FISH_CAUGHT, 1);
|
||||
}
|
||||
@@ -474,8 +520,25 @@
|
||||
@@ -476,8 +522,25 @@
|
||||
}
|
||||
|
||||
if (this.onGround) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/projectile/EntityPotion.java
|
||||
+++ b/net/minecraft/world/entity/projectile/EntityPotion.java
|
||||
@@ -33,6 +33,16 @@
|
||||
@@ -32,6 +32,16 @@
|
||||
import net.minecraft.world.phys.MovingObjectPositionBlock;
|
||||
import net.minecraft.world.phys.MovingObjectPositionEntity;
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
public class EntityPotion extends EntityProjectileThrowable implements ItemSupplier {
|
||||
|
||||
public static final double SPLASH_RANGE = 4.0D;
|
||||
@@ -99,7 +109,7 @@
|
||||
@@ -98,7 +108,7 @@
|
||||
|
||||
if (flag) {
|
||||
this.applyWater();
|
||||
@@ -26,7 +26,7 @@
|
||||
if (this.isLingering()) {
|
||||
this.makeAreaOfEffectCloud(itemstack, potionregistry);
|
||||
} else {
|
||||
@@ -145,6 +155,7 @@
|
||||
@@ -144,6 +154,7 @@
|
||||
private void applySplash(List<MobEffect> list, @Nullable Entity entity) {
|
||||
AxisAlignedBB axisalignedbb = this.getBoundingBox().inflate(4.0D, 2.0D, 4.0D);
|
||||
List<EntityLiving> list1 = this.level.getEntitiesOfClass(EntityLiving.class, axisalignedbb);
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
if (!list1.isEmpty()) {
|
||||
Entity entity1 = this.getEffectSource();
|
||||
@@ -163,21 +174,47 @@
|
||||
@@ -162,21 +173,47 @@
|
||||
d1 = 1.0D;
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -213,7 +250,14 @@
|
||||
@@ -212,7 +249,14 @@
|
||||
entityareaeffectcloud.setFixedColor(nbttagcompound.getInt("CustomPotionColor"));
|
||||
}
|
||||
|
||||
@@ -112,10 +112,10 @@
|
||||
}
|
||||
|
||||
public boolean isLingering() {
|
||||
@@ -224,13 +268,25 @@
|
||||
@@ -223,13 +267,25 @@
|
||||
IBlockData iblockdata = this.level.getBlockState(blockposition);
|
||||
|
||||
if (iblockdata.is((Tag) TagsBlock.FIRE)) {
|
||||
if (iblockdata.is(TagsBlock.FIRE)) {
|
||||
- this.level.removeBlock(blockposition, false);
|
||||
+ // CraftBukkit start
|
||||
+ if (!CraftEventFactory.callEntityChangeBlockEvent(this, blockposition, Blocks.AIR.defaultBlockState()).isCancelled()) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/projectile/EntityShulkerBullet.java
|
||||
+++ b/net/minecraft/world/entity/projectile/EntityShulkerBullet.java
|
||||
@@ -60,8 +60,21 @@
|
||||
@@ -59,8 +59,21 @@
|
||||
this.finalTarget = entity;
|
||||
this.currentMoveDirection = EnumDirection.UP;
|
||||
this.selectNextMoveDirection(enumdirection_enumaxis);
|
||||
@@ -22,7 +22,7 @@
|
||||
@Override
|
||||
public SoundCategory getSoundSource() {
|
||||
return SoundCategory.HOSTILE;
|
||||
@@ -225,7 +238,7 @@
|
||||
@@ -224,7 +237,7 @@
|
||||
MovingObjectPosition movingobjectposition = ProjectileHelper.getHitResult(this, this::canHitEntity);
|
||||
|
||||
if (movingobjectposition.getType() != MovingObjectPosition.EnumMovingObjectType.MISS) {
|
||||
@@ -31,7 +31,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -292,7 +305,7 @@
|
||||
@@ -291,7 +304,7 @@
|
||||
if (flag) {
|
||||
this.doEnchantDamageEffects(entityliving, entity);
|
||||
if (entity instanceof EntityLiving) {
|
||||
@@ -40,7 +40,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -318,6 +331,11 @@
|
||||
@@ -317,6 +330,11 @@
|
||||
|
||||
@Override
|
||||
public boolean hurt(DamageSource damagesource, float f) {
|
||||
|
||||
Reference in New Issue
Block a user