Strontium
-
Posts
3 -
Joined
-
Last visited
Posts posted by Strontium
-
-
Thank you! I didn't realize the event fired before the tree was actually placed... so thats why the sapling is there, I guess.
If anyone in the future ends up here looking for a solution:
I just added
if (!(event.getWorld().getBlockState(event.getPos()).getBlock() instanceof BlockSapling)) return;
to the beginning of my function so that the rest of the code only runs if there is a sapling.
-
Hi. I am trying to use an event to run some code whenever a Sapling grows into a Tree (using SaplingGrowTreeEvent). The event DOES work, however, I noticed it fires every time a tree generates in the world, not just growing from a sapling. Is there any way to check if the tree is from a sapling, and not worldgen?
[1.10] Is there a way to get all loaded resources?
in Modder Support
Posted
Is there a way to get an array of all loaded resources (not resourcepacks)? I want to be able to get an array of all shaders avalible under minecraft:shaders/post. I've looked at getAllResources(), but it doesn't look like it does this specific thing. Thanks.