Jump to content

Choonster

Moderators
  • Posts

    5160
  • Joined

  • Last visited

  • Days Won

    76

Everything posted by Choonster

  1. Block#onEntityCollidedWithBlock(World,BlockPos,IBlockState,Entity) is called every tick while the player is inside the block, not just when they first collide with it. I just added functionality to rotate the player while they're standing on a Block of Iron using Entity#setAngles from TickEvent.ClientTickEvent and it worked without issue. You can see my implementation here. I've tested this on an integrated and dedicated server in the development environment. Edit: I've recorded a video demonstrating the rotation functionality. You can view it .
  2. Calling Entity#setAngles on the client player should add the specified amount of yaw and pitch rotation, which will automatically be synced with the server. I have an example of a block that uses this to rotate the player from the client side here.
  3. You've installed a 1.8.9 version of OpenComputers.
  4. You're trying to use a coremod built for 1.8+ on 1.7.10, this won't work. If you post the actual FML log (logs/fml-client-latest.log), I can probably tell you which mod this is. Upload the log to Gist and link it here.
  5. Look at the vanilla grass model, it overlays a texture on each side that's coloured from BlockGrass#colorMultiplier . The important part is the tintindex value for each quad, which tells Minecraft to colour it (this is passed as the renderPass argument).
  6. I explain how to run mods in the development environment here.
  7. Vanilla stores its KeyBinding s in GameSettings , you can get the instance from the Minecraft#gameSettings field.
  8. 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.
  9. 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.
  10. 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.
  11. 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.
  12. Geforce has a tutorial on the system here.
  13. 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).
  14. 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.
  15. 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.
  16. 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.
  17. 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.
  18. I suspect OptiFine is screwing things up. Try removing it.
  19. It's an issue with your ServerTools configuration.
  20. 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.
  21. It sounds like you need IExtendedEntityProperties . coolAlias has a tutorial on the system here. Jabelar has one here.
  22. 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.
  23. 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.
  24. 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.
  25. Post the full output from Gradle.
×
×
  • Create New...

Important Information

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