Jump to content

Eternaldoom

Forge Modder
  • Posts

    592
  • Joined

  • Last visited

Everything posted by Eternaldoom

  1. You shouldn't use ASM unless it's impossible accomplish what you want to do without it. You can modify the player's inventory using events and IExtendedEntityProperties. Look at Baubles' (an API that adds inventory slots) source code here.
  2. The method is fine. It's just to decide which of the 4 textures to use. However, you should use meta <= 7 instead of meta < 7
  3. With an IItemRenderer. Or, if you update to 1.8, with a JSON file.
  4. What's this mod called? Have you released it? It looks interesting.
  5. Why would it require a ton of math? Just bind a texture if there is a fluid in it (nbt tag?), and dont bind it otherwise.
  6. Are you sure you're using the right metadata?
  7. Post a screenshot. Are you using eclipse? If he means to browse the source code, look in the forge jar under referenced libraries.
  8. Post your code again
  9. There's some function you need to override instead of getItemDropped. It's called getDrops or something like that. It should be metadata sensitive.
  10. Realms of Chaos Alpha 1.1 for Minecraft 1.8 has been released! It has a couple new features (like a cool display case block). Note: until Forge updates, the dimensions and all of the armor will be missing. Sorry about this. Also, I have made the mod a coremod since some features in 1.8 (like bows' icons changing when they are pulled) are now hardcoded. Enjoy the mod!
  11. You could just make a coremod. ASM is actually pretty fun.
  12. Where do you register the entity?
  13. You might be able to use an EntityJoinWorldEvent and cancel it if the entity is above your block. You can't modify existing classes (other than using ASM), and you shouldn't need to.
  14. Replace it with an unlocalized name and a tool material. those are the args. look at vanilla code and other mods.
  15. Use a mod confirmed to work with 1.7.10.
  16. KmerrCode, Searge has tweeted a link, but MCP is now automatically downloaded with the forgegradle system.
  17. BrainSlugs83, they aren't fully obfuscated, but they use srg names instead of MCP names.
  18. The mods in the folder crash because they are obfuscated and you are in a deobfuscated environment. I think there is a tool called Bearded Octo Nemesis that can deobfuscate mods.
  19. I think The_SlayerMC has started to do videos. But Wuppy really isn't hard to understand.
  20. Replace the wood and leaves with your wood and leaves. They're right there in the class.
  21. How to update your mod to 1.8 Forge for Minecraft 1.8 has been released, and a few things have changed in vanilla. Updating your mod to 1.8 shouldn't be too hard though. I will go over a few major changes that affect modders and explain how to update your code. Before you update, I highly recommend going through your code and inserting @Override where you have forgotten it. Blocks and Items For simple blocks, not much has changed except that the setBlockTextureName() method is gone. You can delete this from your code, as well as registerBlockIcons . If you override methods such as onBlockActivated() or onEntityCollidedWithBlock() (anything that excepts coordinates as an argument), you need to replace the coordinates with a BlockPos . To change the position of the BlockPos, you can use the methods add (to add to or subtract from the coordinates), or the offset methods to offset the position. Also, the arguments that once were metadata are now IBlockState s. You can easily get an IBlockState from a metadata value with Block.getStateFromMeta() . Finally, the side argument (int) in many methods has been replaced with an EnumFacing value. In items, anything with coords also uses a BlockPos now, and the setTextureName method is gone. Why the texture methods are gone, and how to replace them: In 1.8, textures are set in the block/item's model file. This is a JSON file that defines the shape of the block/item, as well as its texture. For a block, you will need three files to make it load a texture: a blockstate file in assets/modid/blockstates, a block model (the name is defined in the blockstate file) in assets/modid/models/block, and an item model file in assets/models/item. The blockstate file and the item model file must be the name that the block is registered as. The block model can be called whatever you want, as long as you put the name in the blockstate file. For item models, you only need one file, an item model file. NOTE: if it seems tedious to manually create all these files (especially if your mod has a ton of blocks), you can get a tool that I wrote called ModelGenerator here. All you have to do is enter a name when prompted, and it will generate model files for you. Note that this tool may not work on windows. Another good tool (written in java), made by sheenrox82, can be found here. To get the blocks/items to render in your inventory, you need to register the models with: Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(YourItem, metadata, new ModelResourceLocation("modid:items_registered_name", "inventory")); If they are metadata items, you also need: ModelBakery.addVariantName(yourItem, new String[]{"different", "variant", "namesOfModelFiles"}); Entities Entities are mostly unchanged, but any logic that requires getting blocks will have to be updated to use BlockPos's instead of coordinates. Rendering TileEntitySpecialRenderers still exist and can be used like normal. If you have custom block models drawn with the Tessellator, it would be best to use the new JSON model files to draw your model. Have a look at the vanilla assets. Code that still uses the tesselator must be updated, as most of the Tessellator functions have been moved to WorldRenderer. Here's an example of how to update this: Tessellator tess = Tessellator.instance; tess.startDrawingQuads(); tess.addVertexWithUV ... ... tess.draw(); This should be updated to: Tessellator tess = Tessellator.getInstance(); WorldRenderer worldrenderer = tess.getWorldRenderer(); worldrenderer.addVertexWithUV ... ... tess.draw(); World Generation Because of the BlockPos changes, big worldgen classes will have tons of errors. However, these can be easily fixed by creating helper methods and using find and replace. Good luck updating to 1.8! Feel free to leave questions on this thread.
  22. Off topic: Can you post a screenshot of the curve? I'm just curious about how it looks.
×
×
  • Create New...

Important Information

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