Jump to content

Choonster

Moderators
  • Posts

    5119
  • Joined

  • Last visited

  • Days Won

    75

Everything posted by Choonster

  1. Lily Pad placement is handled in ItemLilyPad#onItemRightClick .
  2. If you don't call BiomeManager.addBiome for your biome, it shouldn't be used anywhere except your dimension.
  3. getArmorModel is a method of Item in 1.7.10 (though for some reason it's only called if the Item is an instance of ItemArmor ). It expects a ModelBiped , though; so you'd either have to convert your models to Java models or create an adapter class that extends ModelBiped but renders an OBJ model. I don't know much about the rendering system, so I can't help much more than that.
  4. The exception tells you exactly what went wrong: your TileEntityPin class doesn't have a mapping. You need to register it with GameRegistry.registerTileEntity . Side note: Package names should be all lowercase.
  5. Your code looks correct. I'm not too sure what would cause missing textures/models without an error in the log. Could you post one of your models?
  6. Main already calls the proxy method for each phase (preInit, init and postInit). OP: Could you post your RenderRegister class? Please use [ code ] tags (without spaces) or post your code on Gist/Pastebin.
  7. Potion s in 1.8 are almost exactly the same as in 1.7.10, except that they now have a ResourceLocation identifier used by the /effect command.
  8. There's an FAQ here and some other links here.
  9. Cast the entity instance to EntityGuardian and call the isElder method on it.
  10. You can also host your mod on CurseForge. You slowly earn points based on the number of people who download the mod, these points can be spent on Amazon/Steam gift cards or money via PayPal. A couple of years of WoW AddOns hosted on Curse earned me enough points for US$100, so it's not a huge amount of money; but it's better than nothing. You can also upload to CurseForge through their Gradle plugin, though I haven't done this myself.
  11. It's entirely possible to declare a variable in any part of a method, including loops. I think you should review the basics of Java.
  12. It shouldn't be necessary to check if it's in lava, the method should only be called if it's already known that it is in lava.
  13. I don't think this should be in your event handler, since the item usually won't be in lava at the moment it's dropped. Entity#setOnFireFromLava will be called when the item is in lava, you should be able to override this to check for the portal activation criteria.
  14. You should compare Item instances directly (e.g. someItemStack.getItem() == Items.nether_star ), don't compare their unlocalised names.
  15. Call WorldProvider#setSkyRenderer with an implementation of IRenderHandler that renders the sky (including celestial bodies) for your dimension. Look at RenderGlobal#renderSky to see how vanilla renders each dimension's sky.
  16. Break the class down into its primitive components (strings, booleans and numbers) and write those to the buffer.
  17. Implement it in your Entity class and do what the doc comment for each method says: write your data to the buffer on the server and then read it back on the client. FML will call the methods for you, you just need to implement them.
  18. If you need any information on the client side, you'll need to send it from the server in some way. Depending on the nature of the information, you may want to use the DataWatcher or implement IEntityAdditionalSpawnData .
  19. Your entity class must have a constructor that takes a single World argument.
  20. There's no such event. LivingDeathEvent is only for living entities (i.e. entities that extend EntityLivingBase ).
  21. I think this is caused by your strange implementation of the state <-> meta conversion methods. You're treating the LIT_UP and FACING properties as mutually exclusive instead of combining them. You should store the facing index in the lowest three bits of the metadata (i.e. use the return of EnumFacing#getIndex directly) and the lit state in the highest bit (i.e. convert the boolean to 1 or 0 [true or false] and then shift it left 3 bits using the << operator). Combine the two values with bitwise OR ( | ). To extract the facing index from the metadata, AND ( & ) the metadata with 7 (0111 in binary) and convert it back to an EnumFacing with EnumFacing.getFront (the name is misleading, it just gets the facing with the specified index). To extract the lit state, AND the metadata with 8 (1000 in binary); if the result is non-zero, LIT_UP is true. I've written an example of this here. The models aren't working properly yet, but the state changes correctly when right clicked. Edit: I fixed the models.
  22. It's controlled by the log4j2.xml file inside the Forge JAR. You can probably change it by removing level="INFO" from line 54.
  23. This is correct. I've just been updating to the latest Forge version occasionally, since it's just a test mod I don't worry about compatibility with older versions of Java or Forge.
  24. I'm not too sure, sorry. I just found a lot of people with the same exception message having that solution recommended to them.
  25. This definitely sounds like a use case for a TileEntity . You should look for tutorials or look at examples in vanilla code. Players can change their name now, so you should store their UUID instead ( Entity#getUniqueID ). You can use UsernameCache#getLastKnownUsername to get the last known username of a player's UUID for display purposes.
×
×
  • Create New...

Important Information

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