Jump to content

Recommended Posts

Posted

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?

Posted

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.

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.

Posted

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:

 

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.

Posted

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.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Posted (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 by Draco18s

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.

Posted

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.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.