Jump to content

Recommended Posts

Posted

Hello. I am working on a mod which called Tiny Chest.

So i did work on it but now i have problems

i want to make the block to provide a redstone Signal.

But i tried and fail every time.

i have no clue how this works!

 

Here is the Sourcecode of my mod (last update failed and the redstonecode is not online.):

 

https://github.com/Speiger/DynamicTools/tree/master/spmod_common/speiger/src

 

So my problem is how can i make a redstone Signal on a Specail Side?

 

Posted

  //Does your the block emit power? 
  public boolean canProvidePower()
    {
        return true;
    }

//Does this block provide strong(Direct power)
    public int isProvidingStrongPower(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
    {
        //Some check to determine if the block should emit any power and returns a boolean value. Example name = isPowering
        return isPowering;
    }

Weak power will be handled according with normal propagation rules AFAIK

I haven't tested this so I'm not sure it works but I just had a read of restone torch class to see what that does.

This is very basic, if you don't understand this please go learn Java and read and understand as much of the MC source code as you can. It really helps. For example go and look at how other similar functioning blocks work.

 

I'm Sparkst3r, that kid who makes Sphax textures.

Well hi there. :D

Posted

  //Does your the block emit power? 
  public boolean canProvidePower()
    {
        return true;
    }

//Does this block provide strong(Direct power)
    public int isProvidingStrongPower(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
    {
        //Some check to determine if the block should emit any power and returns a boolean value. Example name = isPowering
        return isPowering;
    }

Weak power will be handled according with normal propagation rules AFAIK

I haven't tested this so I'm not sure it works but I just had a read of restone torch class to see what that does.

This is very basic, if you don't understand this please go learn Java and read and understand as much of the MC source code as you can. It really helps. For example go and look at how other similar functioning blocks work.

 

ok. This is an answer that kinda help me. Thanks. I am still learning java.

 

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.