Jump to content

SanAndreaP

Forge Modder
  • Posts

    1689
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by SanAndreaP

  1. you mean like actually glow (like a placed torch) or just rendered brighter than other blocks at dark?
  2. Is it just a simple block texture or is it an "entity texture" for a custom tile entity renderer?
  3. implement IBossDisplayData (took me 1 minute looking at one of the boss-mob's class)
  4. Or, as I've told you already in your thread about that matter, check if the action of right-clicking is RIGHT_CLICK_AIR (event.action == RIGHT_CLICK_AIR) if you want "those with the 0's" or RIGHT_CLICK_BLOCK for the other call. There's another one called LEFT_CLICK_BLOCK, which is called when a block is left-clicked (obviously)
  5. Did you use gradlew setupDecompWorkspace or gradlew setupDevWorkspace? Latter will not give you the source code!
  6. getRenderBlockPass must be getRenderType. The getRenderBlockPass only determines if the block texture should render as solid (return 0) or with transparency (return 1)
  7. We need more info. Where do you register your ISBRH? Do you use the renderID also in your block class? For that we need your Mod class, Block class and ClientProxy class, too.
  8. What is the value of DimensionShift.MODID? Can we see your folder structure (Packet explorer) which shows the png file?
  9. Look at the GuiContainer class, it has code which does exactly what you want.
  10. Because you multiply your rotateAngle with 90 again in your glRotatef.
  11. Yet you still override hasContainerItem and return true without overriding getContainerItem and return a valid ItemStack. Either return false in hasContainerItem, or don't override it (remove the method) or override getContainerItem and return a valid ItemStack.
  12. The first one: This shouldn't be a problem. Missing components are handled exactly the same as a space -> Missing character = empty slot what I do see is you override hasContainerItem and don't override getContainerItem and return an ItemStack there -> resulting in a NullPointerException.
  13. You don't call the super constructor in your items constructor... maybe that's the problem.
  14. The "compare if a stack has item" is just an example, if you wanna compare if an itemstack contains a specific item. MyItems is the class where you save your item / block instances. I personally have them in a seperate class outside of the @Mod annotated class for cleaner coding, but you can do it your way. Yes, it would be itemDiamondChisel then. The code you posted seems good, are there any problems with it? However, you may consider removing the substring(5) from this line: GameRegistry.registerBlock(blockObsidianBrick, blockObsidianBrick.getUnlocalizedName().substring(5)); since it's unnecessary and can cause problems (you register your block with the name "block", due to the substring, and if an other mod does the same, or you add another block with the unlocalized name "blockAnotherOne" (which, again, results in "block"), it will cause problems)
  15. Well, I think it's your graphics card... seems like it's broken or something (if it also affects things outside of the game) Do those glitches also occur w/o Forge even installed? Try w/o Forge first and see what happens.
  16. You don't use IDs for neither block nor items at all! The way of doing things now is to use the instances directly, e.g. // new ItemStack new ItemStack(MyItems.anItemInstance, 1) //compare if a stack has item stack.getItem() == MyItems.anItemInstance If you need to compare a block with an ItemStack, use stack.getItem() == Item.getItemFromBlock(MyBlocks.aBlockInstance)
  17. You actually do both, if you use the IWorldGenerator and the PopulateChunkEvent. You could also try sequituri's suggestion. Seems easier (if it works) than fiddling with events.
  18. You should use Items.enchanted_book.addEnchantment(stack, enchantment) instead of stack.addEnchantment(enchantment)
  19. The only way of doing this is subscribing to the PopulateChunkEvent.Post event and do your dungeon generation there. Here's an example: https://github.com/SanAndreasP/EnderStuffPlus/blob/master/java/de/sanandrew/mods/enderstuffplus/world/EnderStuffWorldGenerator.java#L27-L38 Also please note that if you think it is registered with the TERRAIN_GEN_BUS, it isn't, it is with the EVENT_BUS!
  20. The call with the 0's in there is probably the action type RIGHT_CLICK_AIR, which is used when an item should be used. Just check for the event.action == PlayerInteractEvent.Action.RIGHT_CLICK_AIR
  21. look at the TileEntity superclass, the methods are called the same. Here is my tileentity for reference: https://github.com/SanAndreasP/EnderStuffPlus/blob/master/java/de/sanandrew/mods/enderstuffplus/tileentity/TileEntityBiomeChanger.java (line 187 and line 319)
  22. It may have to do with that you've named your client proxy "ClientPorxy" (just kidding) The RenderLivingEntity class only uses the vanilla EntityArrow as reference (look it up, the method where the arrow gets rendered is called renderArrowsStuckInEntity) The only way you could render your custom Arrow is either use ASM transformers or reset the arrow counter with entitylivingbase.setArrowCountInEntity (or never even call it if you use your own onUpdate() method w/o calling the super method), have your own arrow counter for that entity, use the RenderLivingEvent and mimic the renderArrowsStuckInEntity method with your own arrows.
  23. Use the PlayerInteractEvent and check if the item held by the player is a bucket. It's the closest you can get.
  24. huh, I really don't see the problem then... Have a look at my code, maybe it helps you (since it's working fine for me): https://github.com/SanAndreasP/SAPManagerPack/tree/master/java/de/sanandrew/core/manpack/mod/packet https://github.com/SanAndreasP/SAPManagerPack/blob/master/java/de/sanandrew/core/manpack/mod/ModCntManPack.java
×
×
  • Create New...

Important Information

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