Jump to content

tunasushi

Members
  • Posts

    12
  • Joined

  • Last visited

Everything posted by tunasushi

  1. Pretty much. On a side note, I feel like the BIGGEST idiot right now... I was accidentally referring to the item id in registerItemRenderer as its original item id, not example.itemID(). Well, it works now (need to get textures and scaling fixed), but thanks all for the help!
  2. I should have explained this earlier, I am VERY new to Java, telling me to use a certain class means almost nothing to me... What I really need is an in-depth explanation on how to tell Minecraft to render an Item as a 3D model. But thanks for trying to help!
  3. I have an item that I want to have a 3D model like the portal gun or gravity gun mod. I have already made the model in techie and the texture. I have also tried to follow iChun's video tutorial on how to do it, but the video is not made very well and I wasn't able to follow what he was doing. Could someone explain to me step-by-step how to do it, or at least give me some example code? Thanks!
  4. Thanks for the help, it's working now! I actually did give it the item id (though just as a number, not using .blockId. Sue me.), but I was missing the typecast. I actually have no idea what a typecast is (as I mentioned in the original post, I am soooo new to this), so could someone explain it to me? Thanks!
  5. I tried your suggestions and I realized that onBlockActivated won't change an iron door, even if the player is null (the method only uses the player for playing a sound effect). Does anyone know how to call onPoweredBlockChange? It isn't a method defined in Blocks.java so Block.blocksList[].onBlockActivated doesn't work (at least I think that's how it works, gave me an error when I tried it). Thanks for the help!
  6. I have an item that I want to open doors when used (iron ones too, obviously), but I can't figure out how to do it. I'm not sure how the metadata works with doors (orientation, open/close state, and whether the top or bottom half matters), but I did find the method onPoweredBlockChange in BlockDoor.java. *Puts on Java newbie hat* The method is public, but how do I call it? I have tried just onPoweredBlockChange(some args); This tells me to change the method to static though, and so I tried: new BlockDoor(71, Material.iron).onPoweredBlockChange(w, x, y, z, true); The problem with this is that BlockDoor is protected. I am sure there is some super easy way to do this, but because I am self-taught and still very new to Java, could someone please enlighten me? Thanks
  7. Ok after pretty much changing everything around in the class to see what would happen, I made isProvidingWeakPower always return 15 and I didn't get any weird problems. Thanks everyone for the help!
  8. Ok it works sort of well now. When you right click a piece of redstone it will turn on for 1 second then turn off (like a button). The problem is that it only works on some pieces of redstone, specifically with ones that have redstone wire on two opposite sides. If it does't have redstone wire on two opposite sides, the redstone will still light up and power anything directly adjacent, but will not propagate to any other redstone wire. I am almost sure this is a problem with the getMaxCurrentStrength method. I set it to always return 15 (max power) for my new redstone wire. Does anyone who knows how redstone calculations work know of a way to keep it powered without the glitchiness that I am running into? Thanks.
  9. That's exactly what I did the first time and it didn't work so well.
  10. Ok, I sorta got that working, but it's buggy as balls. I'm not entirely sure how to register when the user stops hold right clicking, so the block will stay my new redstone wire block until broken. I tried onPlayerStoppedUsing, but that doesn't work. How do I make it so that when I right click, it holds sort of like a bow does (and doesn't look like I'm spamming right click)? If the wire block I click has wires attached to sides opposite each other, it powers the circuit, otherwise, it will just glow red but not power anything else. Very weird. For the new redstone wire block, I pretty much copied the normal redstone wire block, but changed the getMaxCurrentStrength method to always return 15. Thanks for the help.
  11. Thanks for the suggestion, I'll try that and get back to you!
  12. Does anyone know how to turn redstone wire on by right clicking with an item, and returning it to normal when releasing right click? I am using this code, but it is not working properly: public boolean onItemUse(ItemStack is, EntityPlayer player, World w, int x, int y, int z, int l, float f, float f1, float f3){ if(w.getBlockId(x, y, z) == Block.redstoneWire.blockID){ w.setBlockMetadataWithNotify(x, y, z, 15, 3); } return false; } What happens is if I hold right click on a redstone wire, it will pulse on and off rapidly, and not effect any other wire in the circuit (visibly). If I place a door in the circuit, I can hear a door opening and closing, but nothing visual happens. Obviously, the problem is that the redstone is returning to its normal state as soon as I set it to powered, but is there any way to keep it powered throughout? Thanks
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.