Posted October 16, 201213 yr I'm trying to get my block to emit a strong redstone signal, controlled from the TileEntity, so that attached redstone wire, repeaters, etc, will light up and carry that signal. To troubleshoot my issues, I've looked at the base code for the lever, redstone torch, repeater, redstone wire block and even other mods online. I cannot figure out what I'm doing wrong. My block code is on github https://github.com/pantheis/StorageMonitor/tree/Working. It's a mess at the moment because of everything I've been trying to get this to work. From the debug statements it looks like only isIndirectlyPoweringTo is ever firing and only when another block is placed adjacent to my block. If I place one of my blocks down, place another block next to it (such as some cobble), then wire redstone to the cobble, the redstone is powered. Redstone wired directly to my own block is not. It's like my block is strongly powering blocks around it, but not itself and will not power redstone wire or repeaters hooked directly to my block. Any advice would be most welcome. I know I must be missing something really simple here, but it's completely eluding me. I have isIndirectlyPoweringTo, canProvidePower, and isPoweringTo simply returning true to try to troubleshoot the problem. [edit] I fixed it. It requires overriding these two things in order to act like a lever or redstone torch but still be a full cube, and to return true on isPoweringTo but false to isIndirectlyPoweringTo. @Override public boolean isBlockNormalCube(World world, int x, int y, int z) { return false; } @Override public boolean isBlockSolidOnSide(World world, int x, int y, int z, ForgeDirection side) { return true; }
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.