mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-23 09:27:45 +01:00
SPIGOT-5061: Add explode and ignite methods to Creeper
This commit is contained in:
parent
f2757f95b3
commit
8003ced585
@ -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 New Issue
Block a user