mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 18:23:06 +00:00
Fixes
This commit is contained in:
parent
4d150e71a3
commit
287e3a0090
@ -64,12 +64,10 @@ public class TreeManager implements Listener {
|
|||||||
* @param event Checks the given event for sapling overrides
|
* @param event Checks the given event for sapling overrides
|
||||||
*/
|
*/
|
||||||
@EventHandler(priority = EventPriority.HIGHEST)
|
@EventHandler(priority = EventPriority.HIGHEST)
|
||||||
public void onStructureGrowEvent(StructureGrowEvent event) {
|
public void on(StructureGrowEvent event) {
|
||||||
if (block || event.isCancelled()) {
|
if (block || event.isCancelled()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Cuboid saplingPlane = getSaplings(event.getLocation(), blockData -> blockData instanceof Sapling, event.getWorld());
|
|
||||||
|
|
||||||
Iris.debug(this.getClass().getName() + " received a structure grow event");
|
Iris.debug(this.getClass().getName() + " received a structure grow event");
|
||||||
|
|
||||||
if (!IrisToolbelt.isIrisWorld(event.getWorld())) {
|
if (!IrisToolbelt.isIrisWorld(event.getWorld())) {
|
||||||
@ -89,8 +87,10 @@ public class TreeManager implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BlockData first = event.getLocation().getBlock().getBlockData().clone();
|
||||||
|
Cuboid saplingPlane = getSaplings(event.getLocation(), blockData -> blockData instanceof Sapling && blockData.getMaterial().equals(first.getMaterial()), event.getWorld());
|
||||||
|
|
||||||
Iris.debug("Sapling grew @ " + event.getLocation() + " for " + event.getSpecies().name() + " usedBoneMeal is " + event.isFromBonemeal());
|
Iris.debug("Sapling grew @ " + event.getLocation() + " for " + event.getSpecies().name() + " usedBoneMeal is " + event.isFromBonemeal());
|
||||||
Cuboid saplingPlane = getSaplings(event.getLocation(), blockData -> event.getLocation().getBlock().getBlockData().equals(blockData), event.getWorld());
|
|
||||||
Iris.debug("Sapling plane is: " + saplingPlane.getSizeX() + " by " + saplingPlane.getSizeZ());
|
Iris.debug("Sapling plane is: " + saplingPlane.getSizeX() + " by " + saplingPlane.getSizeZ());
|
||||||
IrisObjectPlacement placement = getObjectPlacement(worldAccess, event.getLocation(), event.getSpecies(), new IrisTreeSize(1, 1));
|
IrisObjectPlacement placement = getObjectPlacement(worldAccess, event.getLocation(), event.getSpecies(), new IrisTreeSize(1, 1));
|
||||||
|
|
||||||
@ -265,6 +265,9 @@ public class TreeManager implements Listener {
|
|||||||
b.min(blockPosition);
|
b.min(blockPosition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Iris.debug("Blocks: " + blockPositions.size());
|
||||||
|
Iris.debug("Min: " + a.toString() + " Max: " + b.toString());
|
||||||
|
|
||||||
// Create a cuboid with the size calculated before
|
// Create a cuboid with the size calculated before
|
||||||
Cuboid cuboid = new Cuboid(a.toBlock(world).getLocation(), b.toBlock(world).getLocation());
|
Cuboid cuboid = new Cuboid(a.toBlock(world).getLocation(), b.toBlock(world).getLocation());
|
||||||
boolean cuboidIsValid = true;
|
boolean cuboidIsValid = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user