Implement max fuse tick & explosion radius methods to Creeper
Dieser Commit ist enthalten in:
Ursprung
3e3bbd4272
Commit
305df9035f
@ -11,6 +11,17 @@
|
|||||||
|
|
||||||
public class EntityCreeper extends EntityMonster {
|
public class EntityCreeper extends EntityMonster {
|
||||||
|
|
||||||
|
@@ -11,8 +15,8 @@
|
||||||
|
private static final DataWatcherObject<Boolean> c = DataWatcher.a(EntityCreeper.class, DataWatcherRegistry.h);
|
||||||
|
private int bx;
|
||||||
|
private int fuseTicks;
|
||||||
|
- private int maxFuseTicks = 30;
|
||||||
|
- private int explosionRadius = 3;
|
||||||
|
+ public int maxFuseTicks = 30; // PAIL private -> public
|
||||||
|
+ public int explosionRadius = 3; // PAIL private -> public
|
||||||
|
private int bB;
|
||||||
|
|
||||||
|
public EntityCreeper(World world) {
|
||||||
@@ -125,7 +129,7 @@
|
@@ -125,7 +129,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package org.bukkit.craftbukkit.entity;
|
package org.bukkit.craftbukkit.entity;
|
||||||
|
|
||||||
|
import com.google.common.base.Preconditions;
|
||||||
import net.minecraft.server.EntityCreeper;
|
import net.minecraft.server.EntityCreeper;
|
||||||
|
|
||||||
import org.bukkit.craftbukkit.CraftServer;
|
import org.bukkit.craftbukkit.CraftServer;
|
||||||
@ -38,6 +39,30 @@ public class CraftCreeper extends CraftMonster implements Creeper {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setMaxFuseTicks(int ticks) {
|
||||||
|
Preconditions.checkArgument(ticks >= 0, "ticks < 0");
|
||||||
|
|
||||||
|
getHandle().maxFuseTicks = ticks;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getMaxFuseTicks() {
|
||||||
|
return getHandle().maxFuseTicks;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setExplosionRadius(int radius) {
|
||||||
|
Preconditions.checkArgument(radius >= 0, "radius < 0");
|
||||||
|
|
||||||
|
getHandle().explosionRadius = radius;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getExplosionRadius() {
|
||||||
|
return getHandle().explosionRadius;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public EntityCreeper getHandle() {
|
public EntityCreeper getHandle() {
|
||||||
return (EntityCreeper) entity;
|
return (EntityCreeper) entity;
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren