Jump to content

Difficulties with liquid source block udates and redstone outputting


QuantumLeaf7895

Recommended Posts

Hi all,

 

I've been working on two unrelated things:

The first is a type of item that functions a kind of bucket -- on right-clicking, it can place a liquid source block inside the world.  The problem is that after placing the source block, minecraft stubbornly refuses to check if the block (lava or water) can propagate 'flowing' water blocks (IE, such as when a liquid source block is placed above an air or snow block).

 

I'm using the following code inside an onItemRickClickMethod to place the block:

 

world.setBlockWithNotify(x, y, z, liquidToPlaceID);
//Where x, y, and z are variables derived from a getMovingObjectPositionFromPlayer's blockX,blockY, and blockZ fields
world.scheduleBlockUpdate(x, y, z, liquidToPlaceID, Block.blocksList[liquidToPlaceID].tickRate());

 

What am I doing wrong?

 

In addition, I'm trying to make a block that outputs redstone.  The problem is, while it *will* indirectly power adjacent blocks (shutting off redstone torches, powering two-block-away redstone wires, etc), it won't ever directly power an adjacent redstone block.  I'm using the following code to output redstone power (in an block that extends BlockContainer, if that's relevant):

@Override
public boolean canProvidePower()
{
	return true;//Note redstone will still *render* a connection to this block, it just won't ever be powered by it
}

@Override
public boolean isProvidingStrongPower(IBlockAccess access, int x, int y, int z, int side)
{
	return true;
}

 

What am I doing wrong?

 

Link to comment
Share on other sites

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.