Jump to content

BenGBoo

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by BenGBoo

  1. Awesome, thanks a bunch for the thorough answer, I really appreciate it!
  2. Oh, perfect! And is there any way to disable certain mobs / hostile mobs from spawning in this specific chunk?
  3. Hey all, I'm looking to make a simple mod that disables mobs from spawning in a square around a chunk. I'm new to Java (and therefore Minecraft Modding), so I poked around last night to come up with a simple Event Listener that intercepts new spawns and entity.remove()s the new entity before it can spawn. This seems inefficient because of game mechanics and ongoing spawns, so I was hoping that there was a way to simply disable spawns in a given Chunk. Is this possible? I suppose I'm a bit overwhelmed with the vast amount of classes and methods of Forge's documentation. Anyone have a good recommendation as to where I should start? Or is my code (below) a sufficient place to start? @SubscribeEvent public static void spawnEntity(LivingSpawnEvent event) { LivingEntity entity = event.getEntityLiving(); double deltaX = entity.getPosX() - 50; double deltaY = entity.getPosY() - 4; double deltaZ = entity.getPosZ() - 50; double distance = (Math.sqrt((deltaX * deltaX) + (deltaY * deltaY) + (deltaZ * deltaZ))); if (distance < 100) { entity.remove(); NoSpawn.LOGGER.info("DELETED"); } else { NoSpawn.LOGGER.info(distance); } }
  4. Thank you very much! I don't know exactly what capabilities are but that's a great starting point, I'll do some research. Thanks again!
  5. Hello everyone, this is my first modding attempt and I've gotten down making items, tools, blocks, and crafting recipes. I have a decent grasp on Java as a programming language but I'm still very new and unsure of Minecraft's modding. The mod I want to make relies heavily on a skill sort of system, where repeating an action like chopping down a tree gives you experience towards that skill, and leveling up increases your efficiency at that skill, so chopping just a tiny bit faster or maybe a chance at getting an extra log. I want this to be a feature of every part of the game, like a skill for farming, tree chopping, mining, etc., but I don't know exactly how to accomplish this. I was thinking that advancements would be a great way to track and see progress on these levels, but how would I go about tracking "blocks mined/xp gained", and how would I reward the player with a constant and permanent stat buff? Thank you all very much for your help.
×
×
  • Create New...

Important Information

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