Jump to content

nbdyhr

Members
  • Posts

    8
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

nbdyhr's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Haha my mistake, I thought Blocks.log was referring to some log file lol. I was looking to to do the same thing and was confused there was no Blocks.wood what does Blocks.log2 do?
  2. Block.getBlockById(17) that will get an oak wood block.
  3. you could use EntityJoinWorldEvent check for your skeleton then replace its ai with yours.
  4. because i have other events handled there, but i tried commenting it out anyway and posting the event to postInit, preInit and load, none of which were being called. looks like i'll just have to use the EntityJoinWorldEvent and cancel it when necessary.
  5. ok so now i have this in the main class file @EventHandler public void init(FMLInitializationEvent event) { MinecraftForge.EVENT_BUS.register(new NGUEventHandler()); FMLCommonHandler.instance().bus().register(new NGUFMLHandler()); } and this in a new class file. public class NGUFMLHandler { @SubscribeEvent public void onLivingSpawnCheckSpawn(LivingSpawnEvent.CheckSpawn event) { System.out.println("denied"); event.setResult(Result.DENY); } problem is it never gets called!
  6. just like this, not sure if that's the correct event bus? @EventHandler public void init(FMLInitializationEvent event) { MinecraftForge.EVENT_BUS.register(new NGUEventHandler()); }
  7. Does any know how the LivingSpawnEvent.CheckEvent actually works, in the code it has this /** * Fires before mob spawn events. * * Result is significant: * DEFAULT: use vanilla spawn rules * ALLOW: allow the spawn * DENY: deny the spawn * */ sounds like what I'm after but it doesn't work, as in mobs continue to spawn like normal, is this a bug, or am i using it wrong? println confirms that it is being called, but it doesn't deny any spawns.
  8. So I want to deny all mob spawns, so that i can add in specific mobs to each biome. I've already tried handling this event. @SubscribeEvent public void onCheckSpawn(LivingSpawnEvent.CheckSpawn event) { event.setResult(Result.DENY); } but it doesn't work, am i missing something? i want to avoid despawning if possible and just deny the spawn from occurring in the first place.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.