-
Posts
884 -
Joined
-
Last visited
-
Days Won
9
Everything posted by Jay Avery
-
Bump! Can anyone help me with those questions, or direct me to resources/tutorials/examples to learn from?
-
There should be no need for packets. Where do you change the item name (where do you send the packet)?
-
[1.7.10] Crashes whenever I try to add an event
Jay Avery replied to brianDev's topic in Modder Support
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. -
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.
-
You can use Item#getItemStackDisplayName, to read information from the stack and return the String to display.
-
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?
-
Post the console log, it will almost always contain information about rendering errors.
-
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)
-
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?
-
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"?
-
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.
-
Post your code, blockstates and model files.
-
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.
-
How do I make forge mods that work on a public server?
Jay Avery replied to thesimplemodder's topic in Modder Support
1.7.10 is no longer supported on this forum, your thread will be closed by a mod. -
That's not null, that's a NumberFormatException - you're trying to parse a String that can't be read as an int.
-
[1.11.2] Error occurring when trying to create tool
Jay Avery replied to 1BowTiesAreCool1's topic in Modder Support
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. -
[1.11.2] Error occurring when trying to create tool
Jay Avery replied to 1BowTiesAreCool1's topic in Modder Support
Post your ModItems class. -
Why don't you just extend BlockLeaves if you want so much of the same functionality?
-
Getting EntityPlayer in a TickEvent to call another method.
Jay Avery replied to Geometrically's topic in Modder Support
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. -
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.
- 1 reply
-
- 1
-
What is the context for this? What are you actually trying to achieve (in gameplay terms, not code terms)?
-
[1.11.2]How to change block slipperiness and bounciness.
Jay Avery replied to 1BowTiesAreCool1's topic in Modder Support
Oh good point. I guess mobs always bounce to their start height then? I just assumed it was less. -
[1.11.2]How to change block slipperiness and bounciness.
Jay Avery replied to 1BowTiesAreCool1's topic in Modder Support
Is the method actually being called? Use the debugger or a print statement to check. -
[1.11.2]How to change block slipperiness and bounciness.
Jay Avery replied to 1BowTiesAreCool1's topic in Modder Support
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?