WolfNetDevelopment / Wormhole-X-Treme

WormholeXTreme is a Stargate plugin for CraftBukkit
http://jira.luricos.de/browse/Wormhole
Other
25 stars 17 forks source link

Build issues in 1.4.6 #33

Open Acolypse opened 11 years ago

Acolypse commented 11 years ago

Building new gates seems to create an odd effect, and when placed properly, /wxbuild Standard no longer works, seems the lever's somehow broken.

nogasgofast commented 11 years ago

I found the same issue, I believe that the issue of the gates not being able to build correctly is because of a change in the way the code here picks up what direction(vector) the gate is facing when you hit the button.

I am going to try to fork the project but i think a few of the dependencies required no longer exist.

lycano commented 11 years ago

@nogasgofast: You were right. The plugin heavily depends on BlockFaces to determine in what direction the gate, sign, button and lever is placed.

Most of the code is from the old ages so the structure is not that "clean" as some would expect. I debugged line per line for about 3 hours. Tried to fix it (3 h) then screwed up in the middle of fixing had to start over from my last commit.

Finally got it to work after ~ 12 h. Should work right now with 1.031.

Funny thing though i found numerous ways to do something easier / faster and fixed a long included bug, where you could only build up to 10 base layers (stargate material) cause the rest would have the wrong facing when teleported on.

\ New commands **

Also i had to implement a command that would fix all gate faces that still exist. With the new code all old gate signs would be incorrectly faced because the gateface is not updated nor was ever saved to database. A quick solution for me was to implement

/wxt fixgates - fixes all gates in database /wxt fixgate - fixes the named gate.

The last command does rotate the GateFace left by one. You can cycle through it by repeating the command. To see the change you would have to either reload the server or use the command "/wxreload now"

(Note: You need to be OP to use fixgates and fixgate. You may only need the command once anyway and maybe fixgate if you already build one gate with the new version.)

How to determine the correct GateFace Stand in front of the dial button. Press F3 to get the debug overlay and look out for face. It should display either one of the directions NORTH, EAST, WEST, SOUTH

The opposite direction when looking a the button is the correct GateFace.

E.g. You look at the button or sign and get NORTH. Then the opposite would be SOUTH.

Repeat the fixgate command with the gates name as its argument til you get the correct facing and you are done (I didnt implemented optional facing as argument cause you hopefully wont use the command after fixing the gate).

As this commit is kinda huge please send in any bugs you find.

Regards, lycano

nogasgofast commented 11 years ago

I checked gate creation on the gates i had already. The building seem to be working ok. I didn't have any problems with signs that i could fix with the extra fixing features you put in there. So was not able to test that much.

The only issue left with the gates on my world is the woosh meterial causing floods in the areas around my gates. I am going to test a few more things regarding that. But thanks for all the hard work! Your changes seem to have made a huge difference in the speed of a few things as well. I noticed messages popping up faster.

lycano commented 11 years ago

Thanks! Im trying to make it more stable, thats why i dont add tons of features at the moment. Currently im thinking about using a command to enter and leave build mode. All functions are disabled until you actually enter this mode. This would make a huge difference because everytime you hit a button it would check if the block is a gateblock.

If you have tons of gates like 100s or 1000s this would make a big difference as i would return instantly if the buildmode is not activated. Sadly the poll on dev.bukkit is unused. Wanted to ask if i should search for another way but i dont see any except initiating the build mode with a command.

About the fixgate thingy .. well if you did not created any new gate after updateing the plugin and just executed fixgates once there should be no problem with the old gates.

If you like you can test it with just one gate to see what i mean. Just repeat the command /wxt fixgate YourTestGate until the sign is correctly placed again (or read how to determine the correct gateFace.)

About woosh effect having physics applied thats usually caused by another plugin thats not respecting the cancelEvent. I know for sure (tested it many times) that the physics of water block is correctly canceled. The only way a physics event would not be canceled is when you destroy an active gate (during the animation) by instadestroy the gate block. But that i can't fix with the current design. Have to rewrite the logic in v2.x

nogasgofast commented 11 years ago

From a design standpoint i see what you mean about having a build mode in the plugin. I realized what was going on when the buttons allowed me to create a gate if connected to a valid shape. I figured if the block it was attached to was not obsidian or gate material then it would fail immediately Or not try to look up what gate it was connected to. But by the sounds of it, it's much more involved. i have not actually looked into it much myself.

On a side note i was able to solve my water problem. Turns out you were right and aqualock plugin http://dev.bukkit.org/server-mods/aqualock/ seemed to be causing it. it looks like it was a problem repaired in a recent update. I am happy to have my woosh back.

lycano commented 11 years ago

Nice to hear that you fixed it for yourself!

About your comment, well build a wall out of obsidian the heigh and with does not matter. It should only have one layer.

Place a button on any block that is at heigh 2.

Build a wall out of obsidian at layer 4 (or 3, depends if you count the wall as 1 or if you start later xD)

Anyways looking from the side its [O][A][A][O].

Now press the button. A valid shape would be found cause the blocks around are ignored in the shape design.

As this is programatically perfectly OK its not out of the player perspective. Cause that person may have used the button to open a nearby iron door.

I guess i will just implement it as it will give much more performance and usability.