modder819 Posted July 15, 2018 Posted July 15, 2018 I defined a custom item, ItemGrapevine. When I use an equipped grapevine item, I'd like it to have the same behavior as the vanilla "vine" item: When the item is equipped and used when the player is standing in front of a block, the block changes appearance so that it is covered in vines. What code do I need in the ItemGrapevine class to implement this behavior? Quote
Draco18s Posted July 15, 2018 Posted July 15, 2018 Oh god, you're in for a world of trouble. Getting the visuals is one thing, allowing to climb it is another. Ladders (and vines) are climbable due to the collision box and other properties that the block has. If the block isn't real, you can't mimic that behavior. Quote Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
modder819 Posted July 15, 2018 Author Posted July 15, 2018 I'm just looking to implement the visual effect. Quote
Draco18s Posted July 15, 2018 Posted July 15, 2018 Still troublesome, but possible. I know I've seen people do similar things before. Trying to think of how to search for it... Try these: Quote Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
jabelar Posted July 15, 2018 Posted July 15, 2018 Actually, I think it is the opposite. It isn't THAT hard to make a block that copies vanilla vine behavior, including making it climbable (you just need to override the isLadder() method to return true and make sure the collision box is amenable. It would be harder, almost impossible, to create a visual vine effect without making a block. In any case, what have you tried so far? Why not start by copying the vanilla block code, or maybe even just extending it? The fields in BlockVine are either public or protected, so extending it would work well. Quote Check out my tutorials here: http://jabelarminecraft.blogspot.com/
Draco18s Posted July 15, 2018 Posted July 15, 2018 (edited) 17 minutes ago, jabelar said: Actually, I think it is the opposite. It isn't THAT hard to make a block that copies vanilla vine behavior, including making it climbable (you just need to override the isLadder() method to return true and make sure the collision box is amenable. oh, absolutely you can do this. But the block needs to exist in the world. It can't be phantom. 3 hours ago, modder819 said: when the player is standing in front of a block, the block changes appearance so that it is covered in vines. Edited July 15, 2018 by Draco18s Quote Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
jabelar Posted July 15, 2018 Posted July 15, 2018 I agree he mentioned that he wanted the appearance. But he also said: Quote I'd like it to have the same behavior as the vanilla "vine" item: I think maybe he doesn't understand that vanilla vines are more than just appearance, and that having something that could change the appearance of any block would (as you're already explaining to him) be quite difficult to achieve. Quote Check out my tutorials here: http://jabelarminecraft.blogspot.com/
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.