CoreNetwork / Mantle

The main plugin powering majority of features on Flatcore
1 stars 1 forks source link

Change the way players use netherwarts #29

Closed riddle closed 11 years ago

riddle commented 11 years ago

Implementing #22

  1. Prevent multiple drops from Netherwart, it should always drop 1
  2. Drop netherwart from every killed Zombie Pigman when in Nether Fortress

Extra Hard Mode code:

//FEATURE: pig zombies drop nether wart when slain in nether fortresses
if(ExtraHardMode.instance.config_fortressPigsDropWart && world.getEnvironment() == Environment.NETHER && entity instanceof PigZombie)
{
    Block underBlock = entity.getLocation().getBlock().getRelative(BlockFace.DOWN);
    if(underBlock.getType() == Material.NETHER_BRICK)
    {
        event.getDrops().add(new ItemStack(Material.NETHER_STALK));
    }
}

If it’s possible, we should be checking Nether Fortress boundaries. This is in vanilla Minecraft, allows for Wither Skeletons and Blazes to spawn only there, but I’m not sure if there is an API for that in Bukkit. Checking only for Nether Brick will be bypassed easily by trapping Pigmen in cages out of bricks (which can be either mined or smelted in 1.5) and farming warts from them.

If it’s not possible to accurately check for a real fortress, I think we should drop warts from Wither Skeletons.

matejdro commented 11 years ago

So option 1 effectively removes netherwart farming from the game?

riddle commented 11 years ago

Yes. To get potions, players have to engage Pigmen and possibly face death by the swarm. >:D

matejdro commented 11 years ago

That could be quite troublesome due to Pigmen being hostile to everyone. Imagine new player building his first nether portal and then instantly die by swarm of pigmen near portal.

riddle commented 11 years ago

That already happens. But because we will be linking portals directly, there is a high chance they will end up in netherrack at y=14 or above lava oceans at y=33. Which means they will have to make an effort to get anywhere near where pigmen are aggravated.

Is there a way to de-aggravate pigmen quicker and/or not make them get angry at any player using Bukkit’s APIs?

riddle commented 11 years ago

But after all, I intend to make the game harder, yes. Not brick-to-the-face harder, but rather increase difficulty steadily and make Nether a real pain in the ass to be in. Here’s why: currently players just go down to y=5 and dig a series of tunnels, linking each base and making it super easy to travel back to their base after getting killed.

1.5 made it a bit harder by adding random lava pockets and making lava flow even faster. ExtraHardMode’s addition to the way fire works (and netherrack being able to spark another flame) will make it a bit more balanced and maybe kill a few people when they decide to dig a series of tunnels.

Because currently once the Nether Highway is done, there is never any real reason to walk thousands of blocks in the overworld. They just pick the safe Nether highway, without mobs, many times with rails, minecarts and portals everywhere. I don’t intend to disallow them to make such highway, but I want this to be a team effort, where a lot of players will have to work towards that goal. I don’t want one player with 20 stone picks to do it himself, not facing any real danger.

matejdro commented 11 years ago

How about requiring player to have to have certain item to go to the nether? So its still useful for trading, but you can't use it after death.

matejdro commented 11 years ago

Something easy obtainable in late game, but not obtainable in the beginning. Rings any bells?

riddle commented 11 years ago

I don’t know about that. Can we first try to follow this up:

Is there a way to de-aggravate pigmen quicker and/or not make them get angry at any player using Bukkit’s APIs?

matejdro commented 11 years ago

De-aggrevating yes. Not making them angry at anyone, I think same problem than zombies. But I'm not completely sure.

riddle commented 11 years ago

Yeah, so I’d rather experiment with their insanity factor. So quicker de-aggro, maybe slow them down a bit and make them deal less damage. We would have to test this, but overall I want players to engage pigs for their warts so only immediate surroundings of fortresses will be dangerous. Which is awesome – currently players can:

  1. Drink unlimited amount of Fire Resist potions to never fear blazes…
  2. …build 2-block-high overhangs to block Wither Skeletons…
  3. …to just run amok in fortresses and kill skeletons over and over, getting skulls and then killing a Wither on Regen II potion, decked out in diamond armor. I have specific nerfs in mind for village trade as well.

One way or another, I want to increase difficulty for those who dare to get potions. Because potions will make our dungeons a lot easier. In the end, I believe players will be thankful for the changes we make. Even if it means they will be dying more in the first weeks of new classic map.

And I think Zombie Pigmen still use old AI.

matejdro commented 11 years ago

Do wither skeletons respawn?

riddle commented 11 years ago

Wither Skeletons, Blazes and Magma Cubes only spawn in Nether Fortress’s boundaries – they will be picked to spawn there by a vanilla mob engine. So I’m not sure what you mean by respawning. :)

riddle commented 11 years ago

Scratch the thing about Magma Cubes, they can spawn outside of fortresses too.

matejdro commented 11 years ago

Oh, so they are spawned more than once?

riddle commented 11 years ago

Yes, they are like normal monster, just tied to a specific region in Nether. :)

matejdro commented 11 years ago

So I got good news and bad news.

Good news is that after hours of analyzing Minecraft code I finally figured out how to detect if location is inside nether fortress.

Bad news is that I cannot access it. Already sent ticket to bukkit.

riddle commented 11 years ago

If it’s not trivial to do using Bukkit and we would have to wait for that feature to be enabled, let’s just check for 2 blocks under the pig as it is slain:

Any combination of these should do. It’s just not worth the time to do a convoluted hack if it’s not directly supported. Pareto’s Law! :D

matejdro commented 11 years ago

It's not directly supported but it's not really complicated either.

I will check for nether bricks for now, but If bukkit guys fixes that I will probably switch. Only problem might be if fix comes later where people already made their own pigmen farms. It would disable them.

riddle commented 11 years ago

I will not tell anyone how the check is done and I’m not opposed to breaking farms in the future if someone happens to figure out the properties.

matejdro commented 11 years ago

Bukkit rejected it, but I managed to find a solution. It's a bit hackish but it works properly!

riddle commented 11 years ago

Alrighty. Can you add a simple config node to enable/disable this hack, so if Bukkit version changes and you’re not around to recompile, we can still use the old version? Or does it not matter at all, as most of the plugin changes NMS?

matejdro commented 11 years ago

Drop how much netherwart?

It does not matter, chest part also needs NMS.

riddle commented 11 years ago

1 netherwart, and possibly more with Looting enchantment if it’s trivial to add (+1 to max loot drop per level of Looting). If not, then no worries, it can wait.

matejdro commented 11 years ago

It's not really trivial, but it can be done.

riddle commented 11 years ago

Alright, so let’s leave it for now. When we secure the most crucial functionality (portals for example), I think we can try to do this then.

matejdro commented 11 years ago

OK Lets call this one done then.