Started by braelin777 on Thu, 04/14/2022 - 15:09 Topic category: Help with Minecraft modding (Java Edition) Pretty self explanatory... lol. Anyone got any tips? Jump to top what lighter are you using? If you want any fire to do the trick then just follow this code package net.mcreator.workshop.procedures; /* imports omitted */ @Mod.EventBusSubscriber public class TestProcedure { @SubscribeEvent public static void onBlockPlace(BlockEvent.EntityPlaceEvent event) { Entity entity = event.getEntity(); execute(event, event.getWorld(), event.getPos().getX(), event.getPos().getY(), event.getPos().getZ()); } public static void execute(LevelAccessor world, double x, double y, double z) { execute(null, world, x, y, z); } private static void execute(@Nullable Event event, LevelAccessor world, double x, double y, double z) { if (BlockTags.getAllTags().getTagOrEmpty(new ResourceLocation("minecraft:fire")) .contains((world.getBlockState(new BlockPos((int) x, (int) y, (int) z))).getBlock())) { if (world instanceof Level _level) PlaceholderPortalBlock.portalSpawn(_level, new BlockPos((int) x, (int) y, (int) z)); WorkshopMod.LOGGER.info("just add portal maker over and over again"); } } }by the way my mod is named workshop and so just replace Workshop with your mod namespace Jump to top Permalink Log in or register to post comments
what lighter are you using? If you want any fire to do the trick then just follow this code package net.mcreator.workshop.procedures; /* imports omitted */ @Mod.EventBusSubscriber public class TestProcedure { @SubscribeEvent public static void onBlockPlace(BlockEvent.EntityPlaceEvent event) { Entity entity = event.getEntity(); execute(event, event.getWorld(), event.getPos().getX(), event.getPos().getY(), event.getPos().getZ()); } public static void execute(LevelAccessor world, double x, double y, double z) { execute(null, world, x, y, z); } private static void execute(@Nullable Event event, LevelAccessor world, double x, double y, double z) { if (BlockTags.getAllTags().getTagOrEmpty(new ResourceLocation("minecraft:fire")) .contains((world.getBlockState(new BlockPos((int) x, (int) y, (int) z))).getBlock())) { if (world instanceof Level _level) PlaceholderPortalBlock.portalSpawn(_level, new BlockPos((int) x, (int) y, (int) z)); WorkshopMod.LOGGER.info("just add portal maker over and over again"); } } }by the way my mod is named workshop and so just replace Workshop with your mod namespace Jump to top Permalink Log in or register to post comments
what lighter are you using? If you want any fire to do the trick then just follow this code
by the way my mod is named workshop and so just replace Workshop with your mod namespace