I am trying to stop trees from generating, and found the DecorateBiomeEvent.Decorate event, however I cant seem to check if the event is equal to TREE, which is what is called when trees are generated. I've tried:
if(event.getPhase().equals(event.type.TREE)) {
System.out.println("TREE TREE TREE TREE TREE TREE TREE TREE - gone soon");
}
and checking if event.type.TREE != null (which I didn't think would work but tried it anyways) but neither of them seem to work. Anyone know the correct way to check for an event? I also want to deny it so that it doesn't spawn trees, how would I do that aswell? Thanks