Posted April 17, 201312 yr 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?
April 17, 201312 yr Author 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?
April 18, 201312 yr 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.) http://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.
April 18, 201312 yr 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.) http://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.
April 18, 201312 yr Author 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.
April 18, 201312 yr Author 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.