Breaking blocks on servers
Doragoon01 opened this issue ยท 11 comments
I am on mod version 2.0.31. Forge 14.23.5.2768.
This problem only happens when running on a dedicated server.
Blocks take the amount of time to mine as the block which would be seen if no game stages were unlocked. This causes something that looks like block lag when mining unmasked blocks that would take longer to mine than the block that they appear as when masked. Sometimes you can break a block multiple times before enough time passes and it finally breaks.
But that's not the worst problem.
I'm using this mod to hide nether quartz ore as netherrack until a game stage is unlocked. However, after that game stage is unlocked and the quartz ore is visible, it still takes as long to mine as netherrack. This means with an efficiency 5 diamond pick, i'm instant mining the quartz, but it's not actually breaking, which creates a ghost block (invisible block that you right click on to reveal). This makes quartz impossible to mine with an efficiency 5 diamond pick.
The same is true for any unmasked ore having been masked as stone, when being mined with an efficiency 5 diamond pick and the haste 2 effect.
I think this might be the same thing as issue #24, but that issue report was not very clear.
That issue seems to have been that diamond ore is breaking as quickly as if it was stone, and with lower level picks than would have been possible, making it easy to accidentally break diamond ore with a stone pick, resulting in loss of the diamonds.
To replicate this issue:
Mask any block as netherrack. Unmask the block by gaining the game stage. Pick the block with an efficiency 5 diamond pick (and right click to reveal the ghost block).
I'm sorry for bothering you, but this might not be your mod.
It looks like they did something to fix client behavior in GameStages 2.0.104 (the issue doesn't happen with that version).
But then they broke it again in version 2.0.105, and all versions after.
GameStages is also my mod. I am currently looking into the issue and trying to reproduce it using the latest versions of both mods. Currently not having any success but I will let you know what I find.
After testing a few different things, I am unable to reproduce your issue at all. Maybe I am doing something wrong? Here are my test conditions.
GameStages: 2.0.109
OreStages: 2.0.35
Script: mods.orestages.OreStages.addReplacement("six", <minecraft:quartz_ore>, <minecraft:netherrack>);
Item: /give @p diamond_pickaxe 1 0 {ench:[{id:32,lvl:256}]}
- Create a dedicated server, make sure the script on the server is the same as client.
- Give myself a diamond pick with efficiency LV 256.
- Place down a straight line of quartz ore.
- Give myself stage six using
/gamestage give @p six
- Enter survival mode
- Break quartz ore with the pick axe from step 2.
Oh that is even weirder.
I switched to the versions of both mods which you listed.
A lvl 256 pick is breaking it correctly, but the lvl 5 pick does not.
oh! actually, that makes perfect sense.
the lvl 256 pick would insta-mine the ore AND the netherrack, while the lvl 5 will instamine only the netherrack.
This issue was extremely annoying to sort out, but I finally fixed it. Minecraft has a method that can use used to see if an entity exists on the server or the client, however the client side version of the player will lie and always say it's on the server. I've corrected this by doing the check myself instead, and now the client is shown to have the correct data on servers. Please check out version 2.0.110 of GameStages which has this fix. https://minecraft.curseforge.com/projects/game-stages/files/2632025 (curse may still be reviewing if file is not found.)