Logs/Wood with stripped variant / stripping procedure prevent block placement

Started by MarkiZeven on

Topic category: Help with modding (Java Edition)

Last seen on 17:57, 30. Apr 2024
Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Logs/Wood with stripped variant / stripping procedure prevent block placement

My Situation

I am trying to add a new Azalea wood type to Minecraft and as part of that I want to be able to strip the log and wood blocks just like the vanilla wood types. I was able to add a simple stripping procedure to my logs/wood but in doing so I have apparently removed the ability to place blocks on the logs/wood.

No Solutions Found

I have looked around on the forum (And YouTube) for a solution, but no working solution was found. Frustratingly there were multiple instances of people supposedly solving the issue but not sharing the solution or solutions that were shared not working for me (and others). It also seems that the procedures from the time of the other forum posts are unable to be imported for whatever reason. Since those Forum posts were totally unhelpful and apparently abandoned I decided to make this one in hopes that someone has figured this out by now and is willing to share.

Analysis

I don't understand what is going wrong, or why. But it seems that just having a procedure linked to the right click will cause the player to try and interact with the block like a crafting table (or similar block) instead of placing blocks despite having conditions in the procedure that specifically require that a specific item type (axe) be held. I have to crouch in order to place blocks on them, because that apparently bypasses the procedure. Is it possible to manually bypass the procedure if the check is failed?

Success Requirements:

The logs/wood blocks should operate like the vanilla wood types. This includes the following properties:

  • Logs & Wood blocks can be stripped with any vanilla axe
  • Blocks can be placed on the Logs & Wood blocks without needing to crouch
  • The axe can be in the Main or Off-hand slot (optional but would be greatly appreciated)

If your solution meets these Criteria please share it here. If you are aware of someone else's solution that meets these criteria please share it, but if possible verify that it still works first. Thanks in advance for any help you can provide.

Last seen on 17:57, 30. Apr 2024
Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I have found my issue. Turns…
Sun, 11/05/2023 - 17:07

I have found my issue. Turns out I had not saved the change to remove the procedure from the block itself to just a global procedure. I already added the global trigger to the procedure (Player right clicks block). Now the conditions are operating as intended and I am able to place blocks on the Logs/Wood without needing to crouch. 

I just need to figure out how to fix stripping with the off-hand slot / with an item in the off-hand slot. My initial plan is to figure out how to disable stripping if the axe is in the off-hand while the main slot has a usable tool or placeable block. And how to disable the off-hand if the axe is in the main hand and able to strip.

Last seen on 17:57, 30. Apr 2024
Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm just gonna disable…
Sun, 11/05/2023 - 17:45

I'm just gonna disable stripping with the offhand if an item is in the main hand and leave it at that. The rest is either very complicated or straight up impossible as far as I can tell.

I did this by having the same check as usual but with the off-hand slot instead of the main slot AND another check to see if the main hand is an empty itemstack

Last seen on 17:06, 24. Nov 2023
Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I've been trying to figure…
Sat, 11/18/2023 - 05:23

I've been trying to figure out how to strip logs as well for custom blocks. Would you mind sharing the procedure you used?

Last seen on 21:37, 21. Jul 2024
Joined Aug 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You are awesome  
Mon, 02/19/2024 - 00:25

You are awesome

 

Last seen on 02:20, 14. Mar 2024
Joined Feb 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
The logs/wood blocks should…
Sun, 02/25/2024 - 14:08

The logs/wood blocks should operate like the vanilla wood types. This includes the following properties:

  • Logs & Wood blocks can be stripped with any vanilla axe
  • Blocks can be placed on the Logs & Wood blocks without needing to crouch
  • The axe can be in the Main or Off-hand slot (optional but would be greatly appreciated)

Been a few months, I know, but if you haven't already - I've just put together a procedure that achieves all these things:

(link in case the pic doesn't post properly)

Though I have run into my own issue:
In the vanilla game, when you right-click a log with an axe in one hand while also holding an item you can place (like a block) in the other; you will strip the log without placing the item. 
For some reason I am getting different results when holding an axe in my main-hand/block in off-hand vs axe in the off-hand/block in main hand. I can only get the expected behaviour with an axe in the off-hand and blocks in the main - if the axe is in the main-hand instead, you will strip the log but also place a block at the exact same time, which is not what I want as it's not consistent with the vanilla mechanics. 

I don't know what would be causing this, or how to fix it within MCreator alone, but I'm hoping some fresh eyes can help as I'm sure there's a solution.

Last seen on 15:52, 21. Jul 2024
Joined Oct 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hello, this might be too…
Sat, 05/25/2024 - 13:09

Hello, this might be too late but its a really simple and dumb solution, do NOT use the right click procedure in the block itself, use a global procedure WHEN right click, im using your procedure as example:

This is your procedure, but with the global trigger changed.