mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-21 12:42:26 +00:00
[1.19.x] Added event for growing fungus (#8981)
This commit is contained in:
1 parent
0978a94358
commit
1c31f42dae
9 files changed
+106
-22
No files matched your search
@@ -0,0 +1,25 @@
|
||||
package net.minecraftforge.debug.world;
|
||||
|
||||
import net.minecraft.data.worldgen.features.TreeFeatures;
|
||||
import net.minecraftforge.event.level.SaplingGrowTreeEvent;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
|
||||
@Mod("block_grow_feature_test")
|
||||
@Mod.EventBusSubscriber
|
||||
public class BlockGrowFeatureTest
|
||||
{
|
||||
public static final boolean ENABLE = true;
|
||||
|
||||
@SubscribeEvent
|
||||
public static void onGrowReplaceFeature(SaplingGrowTreeEvent event)
|
||||
{
|
||||
if (ENABLE) {
|
||||
event.setFeature(TreeFeatures.BIRCH_BEES_005);
|
||||
if (event.getFeature().equals(TreeFeatures.BIRCH_BEES_005)) {
|
||||
LogManager.getLogger().info("BlockGrowFeatureTest replaced feature");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user