Jump to content

Cadiboo

Members
  • Posts

    3624
  • Joined

  • Last visited

  • Days Won

    58

Everything posted by Cadiboo

  1. You way want to read my Tutorials, look at my Example Mod or just browse my list of Useful Modding Links.
  2. You need to download Java to run the Forge Installer which will install Forge for you.
  3. What IDE are you using and did you re-run the setup (including refreshing your gradle project & re generating your run configs) every time you changed forge version? Here's a list of modding pre-requisites that also contains some good tutorials that I recommend.
  4. Make a class in your test source set that deletes them before they are loaded?
  5. Try deleting your config folder from .minecraft This may also be related:
  6. What mods do you have installed? Either there's an issue with a mod's config file or an issue with a mod's mods.toml file or an issue in the toml parsing library that forge uses.
  7. IBlockReader#getBlockState(new BlockPos(entity.getPosX(), (Math.ceil(entity.getPosY()) - 1), entity.getPosZ()).getBlock().getClass(); With the current mappings this is IBlockReader#getBlockState(new BlockPos(entity.func_226277_ct_(), (Math.ceil(entity.func_226278_cu_()) - 1), entity.func_226281_cx_())).getBlock().getClass(); The Math.ceil(y) - 1 is to ensure that you get the block that you're standing on, not the block below (So if you're standing on a carpet/trapdoor you'll get that block rather than the block under it)
  8. What: Not using static initialisers. Why: Using static initialisers does not allow you to control when your objects are created or the order in which your objects are created. Consequences: Using static initialisers prevents other mods from overriding your objects, prevents forge from being able to dynamically load/unload mods and can cause weird, unreproducible crashes. How: Use the @ObjectHolder annotation if you need static references to your objects and create & register your objects in the appropriate registry event. (Note: before registry events Modders created and registered their items in preInit. This practice became out of date in 1.7 with the introduction of registry events, and is no longer possible in 1.13). If you have a creative tab that uses an item for its icon & that item references that creative tab in its constructor, and both use static initialisers, they both depend on the other being loaded first to function properly. So whichever one actually gets loaded first will cause the other one to get loaded & the other one will use a null reference to the initial one. Since you don’t control the order in which classes are initialised this means that either the item or the creative tab will have a null creative tab/icon and you don’t know which it will be. This causes hard to track down bugs (if you don’t know about this behaviour as it will compile fine). Related: (trying to find SO article about how 3 classes that depend on eachother for a value will have the runtime value depend on the order in which they are loaded, will edit this to add the article if I find it)
  9. Or render the fluid state you already have with BlockRendererDispatcher#renderFluid (func_228794_a_)
  10. If you don't have a workspace, set one up. (Docs currently out of date, updated ones here (Includes much needed info about Launch/Run Configs)) (More comprehensive tutorial here, read all chapters up to and including 1.3) If you don't have a basic mod, make one. (Docs currently out of date, updated ones here (Info about @Mod and mods.toml)) Subscribe to the LivingHurtEvent and check if the entity from the event (LivingEvent#getEntityLiving()) is an instanceof PlayerEntity. If it is, are call Entity#sendMessage with a StringTextComponent with "You have been hurted" (or TranslationTextComponent with a translation key) as the parameter.
  11. Someone told me that a fix for this was > update to latest forge mdk > replace the gradle.jar with the 1.8 gradle.jar > http turns into https No
  12. All rendering is now deferred (theoretically) so MatrixStack is the replacement for GL calls that modify the matrix like push, pop, rotate, translate and scale. See https://github.com/MinecraftForge/MinecraftForge/pull/6444
  13. Update to a modern version of Minecraft. Anything under 1.14.4 isn't supported anymore because its too old.
  14. I would try to use the client tick event to check if the current screen is a container screen and if so get its inventory, loop through all the slots to try to find a pumpkin and attempt to transfer the pumpkin to the player's inventory.
  15. Uh, show your code please. Heres a request packet (client -> server). I register it here. Remember to mark it as handled. Heres is the response packet (server -> client). I register it here. Also take a look at this post
  16. Yes Learn about Functional Interfaces in Java. () -> playerEntity.
  17. My entity had 3 json models. But json, obj & b3d models all get turned into the same BakedModels for rendering so it doesn't matter. I did it by loading the models, loading & stitching their textures, baking the models and then rendering them in my renderer.
  18. Don't use this, use the EntityEntry.Builder.
  19. None at all. Check that you've got everything right in the model. If you do, maybe poke into the Forge code to see if its a problem there, the obj model loader just got rewritten for 1.15.1 so it's possible.
  20. I did this by splitting my entity into separate models and rendering them with separate rotations etc. You can make your own animation system if you want though (Pixelmon Generations has something you can use IIRC).
  21. By this I meant something like "Make a campfire that has animated flames"
×
×
  • Create New...

Important Information

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