Forester's Hut selection tool when selecting position A or position B, both set start_pos nbt data
AlessandroVivoli opened this issue · 4 comments
Is there an existing issue for this?
- I have searched the existing issues.
Are you using the latest MineColonies Version?
- I am running the latest beta/release version of MineColonies for my Minecraft version.
I am also running the latest versions of other mods that are part of my problem.
Did you check on the Wiki? or ask on Discord?
- I checked the MineColonies Wiki and made sure my issue is not covered there. Or I was sent from discord to open an issue here.
What were you playing at the time? Were you able to reproduce it in both settings?
- Single Player
- Multi Player
Minecraft Version
1.21
MineColonies Version
1.21.1-1.1.719
Structurize Version
1.0.752-1.21.1
Related Mods and their Versions
No response
Current Behavior
When trying to set the position for zoning the lumberjack work area. Both right and left click set the start_pos of the scepter's nbt data resulting in the zone not being set and zoning being constantly turned off.
MomentsDesktopclipfromOct042024.mp4
Expected Behavior
Right clicking with the scepter should set the start position and left clicking the scepter should set the end position.
Reproduction Steps
- Build Town Hall and Forester's Hut
- Obtain selection tool
- Set position B
- Set position A
- Zone is not set
Logs
https://pastebin.com/sdup8Pgy | https://pastebin.com/6HsVCYag | https://pastebin.com/maBthJvm
Anything else?
The proposed solution is, in the file com.minecolonies.core.items.ItemScepterLumberJack.java, at line 70, the logic is set to set the start position when it has to set the end position of the scepter:
@Override
public boolean canAttackBlock(@NotNull final BlockState state, @NotNull final Level world, @NotNull final BlockPos pos, @NotNull final Player player)
{
if (!world.isClientSide)
{
final ItemStack scepter = player.getMainHandItem();
MessageUtils.format(TOOL_LUMBERJACK_SCEPTER_POSITION_A_SET).sendTo(player);
/**//////////////////////////////////////////////////////////////////////////////////////**/
/**/// INSTEAD OF THIS ///**/
/**/ PosSelection.updateItemStack(scepter, selection -> selection.setStartPos(pos)); /**/
/**///================================================================================///**/
/**/// IT SHOULD BE THIS ///**/
/**/ PosSelection.updateItemStack(scepter, selection -> selection.setEndpos(pos)); /**/
/**//////////////////////////////////////////////////////////////////////////////////////**/
storeRestrictedArea(player, scepter, world);
}
return false;
}
Link to the related issue: #10255
Footer
Viewers
- Add a thumbs-up to the bug report if you are also affected. This helps the bug report become more visible to the team and doesn't clutter the comments.
- Add a comment if you have any insights or background information that isn't already part of the conversation.
duplicate: #10255 (comment)
@Raycoms try the proposed fix please
@Raycoms #10255 (comment) only relates to the comment above not the actual persisting and reproducible issue originally described in #10313 post and #10255 post