Jump to content

DrD

Members
  • Posts

    30
  • Joined

  • Last visited

Everything posted by DrD

  1. It's me again. I have the following line in my code. Blocks.log.setHarvestLevel("axe", 1); The idea is that oak and birch trees are harder to mine than other wood logs because in real life they are harder as for example spruce or akacia trees. Therefor I want to add a function that only changes oak and birch logs to a higher harvest level. If you don't have the needed harvest level it drops nothing. That's what happens if you mine stone per hand. The code has two problems: 1.) Here I change all wood logs. How do I add the metadata 0 to change only the oak wood? Is that possible without adding a new block to the game? 2.) The block is still mineable by hand and a pickaxe seems to be recognized as a valid tool as it breaks the wood faster. How do I change that?
  2. DrD

    Spawner control

    That would be awesome. And it would be useful for other nice features like stop spawning where there is no solid block to prevent water traps or fall traps. I already know a ton of uses for this. :-) Can I monitor the progress somewhere like a feature request page or something? (Sorry, I'm new to this.) So it should be something like the CheckSpawn function but for special mobs to change to conditions of spawning from mob spawner.
  3. DrD

    Spawner control

    This is an idea for hardcore player for making the game a lot harder. Building a mob farm is not that easy with a bunch of zombies around trying to eat your brain. I could use a custon block, but I would have to reimplent the complete dungeon spawn process including all needed world generation and spawning process. That seems a bit excessive when I only need to change a line in the original code.
  4. DrD

    Spawner control

    I want a mob spawner to spawn mobs even if it the room is lit up. After posting this I looked into the docs again. There is a new (to me) event net.minecraftforge.event.entity.living.LivingSpawnEvent.SpecialSpawn. Can I use that to override the light check? // Edit: It seems the special spawn event is called after the light check so it might not be helpful in my case. :-(
  5. First of all I'm a bloody noob. My java experience is about 8 hours so speak slowly please. :-) I was able to install eclipse and the forge environment and even make some really basic mods like changing terrain generation or modify the options menu. All of these changes were event based. So when ever the terrain generator checks if it can spawn a village at a certain location, I hooked in, replaced the original function and told him "Sorry dude, wrong dimension" or "Sure, let super handle it". I can work with that. Now I want to have more control over the spawn algorithm especially the spawn algorithm from spawner. I know spawner call the function updateSpawner() regularly. The functions are in net.minecraft.tileentity.MobSpawnerBaseLogic but I cannot find an event to replace the original function with my function. I know some of the variables are public so I might be able to modify them like the spawning delay/range and so on. But what I want to do is to make mobs ignore the light level. The light level is checked in net.minecraft.entity.EntityLiving and I might be able to hook into into this class but this will never tell me if the mob was spawned from a spawner or regular. How do I do that instead? I know there is a possibility to change the core classes. So when I add a flag to the entity spawned by a spawner I would be able check if it cares about light or not. But most of the information on access transformers are rather outdated or incomplete. I have a basic understanding how this works but I don't know if it is really necessary as it might cause problems with other mods. Any hint is greatly appreciated.
×
×
  • Create New...

Important Information

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