Started by
supermj767
on
Topic category: Help with modding (Java Edition)
Hello, supermj767 here, I'm going to show you how to make the ability to strip custom log blocks whilst having the ability to place on them without the need of code at all!
I have seen many tutorials on "how to make make a block strippable" but none of them work very well.
Simply create a procedure mod element
Use the "player right clicks block" global procedure :
Then make a procedure that looks like this :
And your done!
If you want to make this work for the off hand (left hand) aswell just change every "Item in main-hand" to "Item in off-hand" and it should work.
This procedure acts exactly as it does in regular Minecraft!
Important: Make sure NOT to apply it to your custom log!
If you have a problem please explain in the comments below and I will help you.
Post any questions or feedback in the comments, Thank you!
Edited by supermj767 on Tue, 10/18/2022 - 20:16
All of these procedure blocks are in the latest versions, you just got to find them, there is a search bar at the top of the procedure editor.
Where are they in the latest version? I've watched multiple videos on how procedures work in general and still can't find half of these things.
You can search for them in the search bar at the top of the screen.
Yo I come for two things your procedure doesn't do
1: the creative mode check is missing.
2: when i put a block (which is in my off hand) against a log while i have the ax it skins the wood and puts the block down (which minecraft doesn't do because it just skins the wood)
and what does the "swing hand" do?
1. I don't know if a creative check is necessary, it should work just the same as vanilla.
2. Try using the "cancel event" procedure block followed by the rest of the code.
The "swing hand" block does exactly what it says in it that it swings the hand, for example, if you hit a mob in game your hand will swing up towards it, if you place a block it will swing the hand aswell. But since the procedure we're making is not a built in thing we have to add it manually.
it sort of works for me, the stripping goes as usual, but as soon as i want to place an item on top of my (unstripped) custom log nothing happens. i can only place a block on top if a sneak, does anyone know how to fix this?
Your problem is happening because you applied the procedure to your custom log, do not apply it to the custom log and it should be fixed.
It indeed now works, thank you very much!
No problem!
I fixed the code a little, so you can't strip logs in adventure mode, and you dont lose durability in creative. Small touches but it improves the mod experience
Nice job! I hadn't thought of that when i originally made this.
This is great. But when I try to place the block it wont let me
Unless I shift
This is because you applied the procedure to your custom block, un-apply that and it will work.