@@ -14,16 +14,16 @@
|
||||
super(EntityTypes.SMALL_FIREBALL, entityliving, d0, d1, d2, world);
|
||||
+ // CraftBukkit start
|
||||
+ if (this.shooter != null && this.shooter instanceof EntityInsentient) {
|
||||
+ isIncendiary = this.world.getGameRules().getBoolean("mobGriefing");
|
||||
+ isIncendiary = this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING);
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
|
||||
public EntitySmallFireball(World world, double d0, double d1, double d2, double d3, double d4, double d5) {
|
||||
@@ -21,18 +28,27 @@
|
||||
Entity entity = ((MovingObjectPositionEntity) movingobjectposition).getEntity();
|
||||
|
||||
@@ -23,7 +30,16 @@
|
||||
if (!entity.isFireProof()) {
|
||||
int i = entity.ad();
|
||||
|
||||
- entity.setOnFire(5);
|
||||
+ // CraftBukkit start - Entity damage by entity event + combust event
|
||||
+ if (isIncendiary) {
|
||||
@@ -38,10 +38,11 @@
|
||||
boolean flag = entity.damageEntity(DamageSource.fireball(this, this.shooter), 5.0F);
|
||||
|
||||
if (flag) {
|
||||
this.a(this.shooter, entity);
|
||||
@@ -32,11 +48,11 @@
|
||||
entity.g(i);
|
||||
}
|
||||
}
|
||||
- } else if (this.shooter == null || !(this.shooter instanceof EntityInsentient) || this.world.getGameRules().getBoolean("mobGriefing")) {
|
||||
- } else if (this.shooter == null || !(this.shooter instanceof EntityInsentient) || this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) {
|
||||
+ } else if (isIncendiary) { // CraftBukkit
|
||||
MovingObjectPositionBlock movingobjectpositionblock = (MovingObjectPositionBlock) movingobjectposition;
|
||||
BlockPosition blockposition = movingobjectpositionblock.getBlockPosition().shift(movingobjectpositionblock.getDirection());
|
||||
|
||||
Reference in New Issue
Block a user