Jump to content

Choonster

Moderators
  • Posts

    5153
  • Joined

  • Last visited

  • Days Won

    76

Everything posted by Choonster

  1. An IRenderFactory is just a class that creates a new instance of the appropriate Render class. Instead of creating the Render instance as you register it, you create an IRenderFactory that creates the Render instance later in the load process.
  2. Override Item#getIconIndex to load the InventoryStaff from the ItemStack 's NBT, check for the appropriate item and then return an IIcon based on it.
  3. If you look at the implementation of RenderingRegistry.loadEntityRenderers , you'll see that it copies the renderers from RenderingRegistry#entityRenderers into the entityRenderMap argument. It's called in FMLClientHandler#finishMinecraftLoading to load mod entity renderers into the vanilla map. Use RenderingRegistry#registerEntityRenderingHandler to register an entity renderer.
  4. Surely you know how to access your custom inventory for a particular EntityPlayer ? Once you have a reference to the inventory, you just need to check each slot to see if it contains the item. If the item can only be placed in a particular slot, you only need to check that slot.
  5. IUpdatePlayerListBox was renamed to ITickable in 1.8.8. You don't implement either of these interfaces, so your TileEntity doesn't tick. You should add @Override to override methods (including interface method implementations) so you get a compiler error if it doesn't override a method of the superclass (or implement an interface method).
  6. You'll need to use an NBT editor like NBTExplorer to remove the item from your inventory in the level.dat file. In the Data -> Player -> Inventory list, the first 0-9 entries will be your hotbar items (empty slots aren't written to NBT). You can find the mapping from item names to IDs in the Data -> FML -> ItemData list.
  7. Item.registerItems instantiates and registers all vanilla items. The static initialiser of Items gets the Item instances from the item registry and assigns them to the static fields. Item creation and registration hasn't really changed in 1.8, only the model system has. BedrockMiner has a tutorial on creating a basic item in 1.8 here. I register my mod's items using this class. I register my models using this class. This code is for 1.8. Switch to the 1.8.8 branch to see the 1.8.9 code.
  8. Yes, I'd recommend using a for-each loop when just iterating (which uses the Iterator under the hood) or explicitly using the Iterator when you need to remove elements while iterating.
  9. When you add a layer to a renderer, you should pass that renderer to the layer's constructor (so both the renderer and layer have references to each other). The values of RenderManager#skinMap are the instances of RenderPlayer used to render each skin type, so pass these to the layers as you create them.
  10. I suspect OptiFine is screwing things up. Try removing it.
  11. It's an issue with your ServerTools configuration.
  12. Just send a packet to the server saying "the player pressed the fire key", you don't actually need to send any data in it. On the server side, you'll have access to the player that sent the packet so you can check if they're holding a rod and then spawn the fireball and damage the rod (I'd recommend creating a method to do this in your Rod class). Forge's Read the Docs site has a section on networking here. This includes the Simple Network Implementation, which is what you should use to send the packet.
  13. It sounds like you need IExtendedEntityProperties . coolAlias has a tutorial on the system here. Jabelar has one here.
  14. sa is the Notch (obfuscated) name of the Entity class. I have no idea why it can't find the class. Try running gradlew clean before building again. If you're still getting the same error, try running gradlew cleanCache and setting up your workspace again. Be warned that will delete everything in your Gradle cache, so you'll need to set up every workspace again.
  15. I can't seem to find a reference to this event? That's because it doesn't exist. shadowfacts was suggesting it be added to Forge.
  16. You have a trailing comma after the east variant, which is a syntax error. Did you not get a message in the log telling you this? I suggest running your JSON files through JSONLint when you're having model issues. If it still doesn't work after fixing that, follow The Grey Ghost's guide to troubleshooting block and item rendering. If you follow the guide and still can't find the error, upload your FML log to Gist and link it here.
  17. The latest log is the one we want. Always post it when you have an issue. I recommend uploading the log to Gist and linking it here rather than including it in your post. You're running Minecraft 1.8, but Better Sprinting requires 1.8.8.
  18. That message just means that Microsoft Edge won't run websites that use the Java plugin. You can still download and install Java to run Java applications like Minecraft.
  19. Microsoft Edge is a web browser and has nothing to do with Forge. This wiki page explains how to install Forge.
  20. You can register models in init using the overloads of ItemModelMesher#register , yes.
  21. The RenderItem instance is created between preInit and init, so you can't use it in preInit. To register models in preInit, use ModelLoader.setCustomModelResourceLocation and ModelLoader.setCustomMeshDefinition .
  22. You installed FML by itself. FML has been merged into Forge itself, so remove FML and just install Forge from files.minecraftforge.net.
  23. All recent versions of Forge support Java 8 without issue, only 1.7.2 versions and old 1.6.4 versions don't (1.6.4-9.11.1.1345 fixed the Java 8 incompatibility). If it's not working for you, upload your FML log to Gist or Pastebin and link it here.
×
×
  • Create New...

Important Information

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