Jump to content

Jay Avery

Members
  • Posts

    884
  • Joined

  • Last visited

  • Days Won

    9

Everything posted by Jay Avery

  1. Bump! Can anyone help me with those questions, or direct me to resources/tutorials/examples to learn from?
  2. There should be no need for packets. Where do you change the item name (where do you send the packet)?
  3. 1.7.10 is no longer supported on this forum, your thread will get closed by a mod. That said, your event class is not public - I assume that's what's causing the IllegalAccessError.
  4. I'm not sure what else to tell you. You override the method in your class, it takes an ItemStack parameter, and returns a String. The String will be used as the ItemStack's display name. Take a look at the vanilla Item class to see the default implementation.
  5. You can use Item#getItemStackDisplayName, to read information from the stack and return the String to display.
  6. I've been doing some research from those links and other sources. I think I have a rough idea of how to override the default models with a custom IBakedModel. But I'm still really confused about exactly what to do in my special model. For a new (not cached) state, how do I turn the IBlockState into a List<BakedQuad> that's made from multiple json-defined parts like a vanilla multipart? I've been digging through the vanilla code but it goes through so many stages and I don't know if following vanilla is the best approach anyway. And the other mod examples I've seen use more complicated models rather than simple json ModelResourceLocations. What is the process for caching a model? How do I store them and how do I check whether it's already stored? Can I just use a Map<IBlockState, IBakedModel> and add to it as models get baked? Or do I need some more sophisticated approach?
  7. Post the console log, it will almost always contain information about rendering errors.
  8. That is another extremely broad question. This forum isn't for getting people to write your code for you. What have you got so far, and what problems are you having?
  9. That makes sense, thanks. In that case, can you (or anyone else) recommend any resources for learning how to use a custom IBakedModel for this? (I've never done anything of the sort before)
  10. They don't necessarily all need to be baked at once, that's a good point. But if I use a cache system, won't that have negative performance implications during the running of the game as they get baked on the fly? Might it just postpone the out of memory error to some unpredictable time during gameplay, instead of getting it out of the way during start-up?
  11. Bump. Not sure whether I should take the lack of response to mean "don't worry about it" or "give up on the mod completely"?
  12. It's very likely to be a json problem. Please post your blockstates, block and model files, and the full console log - and use the code tags (<> button) - it makes it much easier to read.
  13. Post your code, blockstates and model files.
  14. My mod has a bunch of custom building blocks (walls etc) with lots of adaptivity, which means loads of multipart models. The Forge loading screen now shows ~110,000 models in the ModelLoader baking stage, and it runs out of memory if it has less than about 4G of RAM allocated. I'm just wondering, how worried should I be about this? It obviously puts a bit of a limit on who will be able to run the mod, because low-spec computers won't have enough RAM to spare. Is there anything (other than hugely reducing the number of models I use obviously) that I can do to make this process easier or less memory intensive? Or should I just accept that my mod is a bit intensive to start up and stop worrying about it? I'm pretty sure that my multipart models are put together such that there are none (or at least very few) which are never used, so i don't think a custom state mapper (?) would make much difference.
  15. 1.7.10 is no longer supported on this forum, your thread will be closed by a mod.
  16. That's not null, that's a NumberFormatException - you're trying to parse a String that can't be read as an int.
  17. You can learn plenty without formal classes. The important point is to learn about Java generally, before you'll be able to really get far with modding.
  18. Why don't you just extend BlockLeaves if you want so much of the same functionality?
  19. No, you just need to check the event's phase before doing your own code - pick either Phase.START or Phase.END (often it doesn't matter which), and compare it to event#phase.
  20. Blocks are now stored as IBlockStates. You can get the state at a position using World#getBlockState, and get the block from the state using IBlockState#getBlock.
  21. What is the context for this? What are you actually trying to achieve (in gameplay terms, not code terms)?
  22. Oh good point. I guess mobs always bounce to their start height then? I just assumed it was less.
  23. Is the method actually being called? Use the debugger or a print statement to check.
  24. That value is a multiplier for the speed the entity was falling when they hit the block. At 0, the entity would stop (land like normal). At 1.0, it would bounce at the same speed it was falling (reaching its original height). At greater than 1, it would bounce higher than its original height. How do you want your bouncing to work?
×
×
  • Create New...

Important Information

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