mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-21 14:39:01 +01:00
added yield to explosions
By: Tahg <tahgtahv@gmail.com>
This commit is contained in:
parent
1257e0d24f
commit
2c05cb355f
1 changed files with 15 additions and 0 deletions
|
@ -15,6 +15,7 @@ public class EntityExplodeEvent extends EntityEvent implements Cancellable {
|
||||||
private boolean cancel;
|
private boolean cancel;
|
||||||
private Location location;
|
private Location location;
|
||||||
private List blocks;
|
private List blocks;
|
||||||
|
private float yield = 0.3F;
|
||||||
|
|
||||||
public EntityExplodeEvent (Type type, Entity what, Location location, List<Block> blocks) {
|
public EntityExplodeEvent (Type type, Entity what, Location location, List<Block> blocks) {
|
||||||
super(type.ENTITY_EXPLODE, what);
|
super(type.ENTITY_EXPLODE, what);
|
||||||
|
@ -48,4 +49,18 @@ public class EntityExplodeEvent extends EntityEvent implements Cancellable {
|
||||||
return location;
|
return location;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the percentage of blocks to drop from this explosion
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public float getYield() {
|
||||||
|
return yield;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the percentage of blocks to drop from this explosion
|
||||||
|
*/
|
||||||
|
public void setYield(float yield) {
|
||||||
|
this.yield = yield;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue