OldCombatMechanics

OldCombatMechanics

46.1k Downloads

1.7. TnT mechanism

kamber5 opened this issue · 12 comments

commented

Hi!

We have a Factions server on 1.12. version of minecraft, and the players are complaining that they cant make cannons such as sand cannons etc.
It would be really cool if this gets implemented in this plugin, it would help alot :)

Best regards!

commented

Heya! That is in the To Do List, You can see on the Wiki page here: https://github.com/gvlfm78/BukkitOldCombatMechanics/wiki/To-Do-List
Well, Thats unfinished. :(

commented

Oh i didnt see.

This update would be really really helpfull :)

commented

Is there an exact description of how the TNT mechanics changed between 1.7 and 1.8+? Because I’ve heard they changed, but I’m not exactly sure how.

commented

In 1.9. and up versions cannons got totally destroyed.

commented

“cannons got totally destroyed” is highly vague. How exactly did the mechanics change? In what way does the TNT behave differently?

commented

Here is a plugin with some of the old features that are not working. You can see what the features do in the gifs

https://www.spigotmc.org/resources/oldmechanisms.36659/

commented

I heard sponges work differently too in the newer versions. If they do, could you also add 1.7 sponges

commented

Possibly, but that seems like a rather non-critical feature to change right now. If you can confirm that they have changed and find out exactly how they have changed, then please create a separate feature request describing the changes.

As for the TNT mechanics, I've started a bit of work on them (35a5ab0), but there are certain Bukkit limitations that make this exceptionally difficult to deal with, such as no events that are called when a TNT is summoned.

commented

Will you try to recreate how the sand works in that module.

And i found a clip explaining the problems for cannons
https://www.youtube.com/watch?v=wzx9d3jujVQ

commented

For 1.7 tnt mechanics, isn’t that the reason paperspigot is there? Tell me if I’m wrong.

commented

This is nearly impossible to implement, because of the lack of events that trigger when TNT is spawned. It would require some incredible hackery, and perhaps listening to packets. You could perhaps check for TNT triggered by redstone by listening to events that trigger when redstone levels change, but that still doesn't fix dispensers and a bunch of other methods of TNT ignition.

commented

The only way to do this is with some seriously hacky stuff called ASM; essentially, modifying the bytecode of classes at runtime. Not only is this not always safe, but it is also highly difficult in newer version of Java (9+). I think that for now, unless an alternative method of detecting TNT spawning can be found, this issue will simply have to go unresolved. I will close this now.

Feel free to reopen the issue if you find any new information about this :)