mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-03 13:36:44 +01:00
SPIGOT-5061: Add explode and ignite methods to Creeper
This commit is contained in:
parent
f2757f95b3
commit
8003ced585
2 changed files with 17 additions and 1 deletions
|
@ -32,7 +32,13 @@
|
|||
@Override
|
||||
protected boolean a(EntityHuman entityhuman, EnumHand enumhand) {
|
||||
ItemStack itemstack = entityhuman.b(enumhand);
|
||||
@@ -192,10 +206,18 @@
|
||||
@@ -187,15 +201,23 @@
|
||||
return super.a(entityhuman, enumhand);
|
||||
}
|
||||
|
||||
- private void eb() {
|
||||
+ public void eb() { // PAIL rename explode, private -> public
|
||||
if (!this.world.isClientSide) {
|
||||
Explosion.Effect explosion_effect = this.world.getGameRules().getBoolean("mobGriefing") ? Explosion.Effect.DESTROY : Explosion.Effect.NONE;
|
||||
float f = this.isPowered() ? 2.0F : 1.0F;
|
||||
|
||||
|
|
|
@ -64,6 +64,16 @@ public class CraftCreeper extends CraftMonster implements Creeper {
|
|||
return getHandle().explosionRadius;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void explode() {
|
||||
getHandle().eb();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ignite() {
|
||||
getHandle().dY(); // PAIL rename ignite
|
||||
}
|
||||
|
||||
@Override
|
||||
public EntityCreeper getHandle() {
|
||||
return (EntityCreeper) entity;
|
||||
|
|
Loading…
Reference in a new issue