Topic category: Help with modding (Java Edition)
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.
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.
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
I've been trying to figure out how to strip logs as well for custom blocks. Would you mind sharing the procedure you used?
Sure, Here you go:
https://drive.google.com/drive/folders/1FKnOV4cZfsW5HjFkI81cUscNtxfVmeS7?usp=drive_link
You are awesome
Been a few months, I know, but if you haven't already - I've just put together a procedure that achieves all these things:
![](https://prnt.sc/p5NRcNU78FrK)
![](https://prnt.sc/p5NRcNU78FrK)
(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.
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:
![](https://i.imgur.com/HlaOevq_d.webp?maxwidth=760&fidelity=grand)
![](https://i.imgur.com/Wvq7lN4.png)
This is your procedure, but with the global trigger changed.