Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Buecher_wurm

Members
  • Posts

    4
  • Joined

  • Last visited

Buecher_wurm's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. I am trying to spawn my custom entity in a nether fortresses. What I tried so far is using the WorldEvent.PotentialSpawns event, but that did not really work out My code so far @SubscribeEvent public void onFeatureRegistry(final WorldEvent.PotentialSpawns event) { if (event.getType() == EntityClassification.MONSTER) { boolean isFortress = ((ServerWorld) event.getWorld()).structureFeatureManager() .getStructureAt(event.getPos(), true, Structure.NETHER_BRIDGE).isValid(); boolean isNetherBrick = event.getWorld().getBlockState(event.getPos().below()) .getBlock() == Blocks.NETHER_BRICKS; if (isFortress && isNetherBrick) { Main.LOGGER.info("ADDED " + event.getPos().toShortString()); event.getList().add(new Spawners(ModEntityTypes.NETHER_KNIGHT_ENTITY.get(), 50, 5, 5)); } } } the conditions are definitely met, because my log message is triggered when I am near a fortress, but my mob does not spawn. Even with a higher item weight for the Spawners it does not work.
  2. Is there a way to register a recipe only if specific mod is loaded? I created a json-recipe for the Patchouli book of my mod. As long as Patchouli is installed everything works fine. But if not the recipes produces (obviously) some errors, so I want to ask if there is something I could do to prevent these errors.
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.