Jump to content

Recommended Posts

Posted

I'm trying to make a block that has interactions triggered by being moved by a piston. I don't suppose anyone would know offhand from previous experience the series of functions called when a piston moves blocks? I'm trying to figure it out myself, but it's taking time and I thought if someone already knows, why not ask?

Posted

I'm trying to make a block that has interactions triggered by being moved by a piston. I don't suppose anyone would know offhand from previous experience the series of functions called when a piston moves blocks? I'm trying to figure it out myself, but it's taking time and I thought if someone already knows, why not ask?

Posted

I don't have any actual experience with this, but I do have a few ideas. First, when dealing with something from Minecraft itself like this, look at the source code. The second thing is that I know the way pistons work is they basically "deconstruct" the block, turn it into an entity so that it can move, and then "reconstructs" it where it ends up. I have a suspicion that either the block's rendering is turned off or it is actually destroyed before the movement is done. Try adding println() statements to figure out what events are being triggered or if the block may be getting recreated (which feels excessive and isn't that likely.)

width=336 height=83http://img836.imageshack.us/img836/1237/cooltext624963071.png[/img]

I make games, minecraft mods/plugins, and some graphic art.

 

Current Project: LoECraft - An industrial minecraft server with its own modpack and custom launcher.

Posted

I don't have any actual experience with this, but I do have a few ideas. First, when dealing with something from Minecraft itself like this, look at the source code. The second thing is that I know the way pistons work is they basically "deconstruct" the block, turn it into an entity so that it can move, and then "reconstructs" it where it ends up. I have a suspicion that either the block's rendering is turned off or it is actually destroyed before the movement is done. Try adding println() statements to figure out what events are being triggered or if the block may be getting recreated (which feels excessive and isn't that likely.)

width=336 height=83http://img836.imageshack.us/img836/1237/cooltext624963071.png[/img]

I make games, minecraft mods/plugins, and some graphic art.

 

Current Project: LoECraft - An industrial minecraft server with its own modpack and custom launcher.

Posted

Thanks! I'm really just looking for a Block-side function that I can modify to act as a trigger for actions, preferably with an indication of which direction the block is traveling in. I've tried looking at the code, but I'm afraid some of it is rather hard to follow.

Posted

Thanks! I'm really just looking for a Block-side function that I can modify to act as a trigger for actions, preferably with an indication of which direction the block is traveling in. I've tried looking at the code, but I'm afraid some of it is rather hard to follow.

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.