Everything posted by Draco18s
-
[1.12.2] Item Damage Values in JSON Recipies
Or you can write your own Ingredient or IRecipe class.
-
[1.12.2] Item Damage Values in JSON Recipies
You would need to use the oredict wildcard value, but I think it is broken at the moment. Ok, not broken, short of intentional. See this issue: https://github.com/MinecraftForge/MinecraftForge/issues/4516
-
[1.12.2] Item Damage Values in JSON Recipies
Container items are not handled by the json recipe files. Its handled by the item class as it always has been.
-
SOLVED A simple question about method names in derived classes; why are they called "getBlahBlah()"
That would never make sense.
-
SOLVED A simple question about method names in derived classes; why are they called "getBlahBlah()"
Sounds like you searched for references writing the hierarchy, rather than everywhere.
-
[1.12][SOLVED] Recipes with conditions?
We used to, but we got new software, so, no, its gone now. We do have a "like this" button.
-
[1.12.2] Replace horse textures without resource pack
You can create resource packs via code and apply it as needed.
-
Set a new Universal Tool Material
I'm not sure what your problem is. https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/ores/OresBase.java#L281
-
[1.8] Custom Armour Model Rendering
you are correct, I'm on a tablet right now, so things are tricky.
-
[1.8] Custom Armour Model Rendering
Why are you casting that way? (ModelBase)foo is sufficient.
-
Ooky spooky ghost itemstacks
if(!world.isRemote) { Also, world not World. World is a class name and isRemote is not static.
-
How to perform an operation on the server side through the Event Handler?
- How to perform an operation on the server side through the Event Handler?
I am not touching this thread with a ten foot pole.- advice
Good luck with the divining rod. No really. I've gone to a lot of effort to create ore-finder mechanics and I'm only happy with one of them (the other *works* but has display problems) and it is not a divining rod.- [1.12.2]Harvester crashes world when setting a crops age to 0
Beetroots don't use the same AGE property as other crops: public static final PropertyInteger BEETROOT_AGE = PropertyInteger.create("age", 0, 3);- Does make sense going over 20 armor points?
Probably alterations in the formula. I don't know when things were changed (and I don't go looking into them often myself), but I do know that at one point armor was a flat 4% reduction per point (which lines up with your 1.10 result). It's also possible that Forge mucked with things (I've heard comments about it, but again, never tried to verify them).- Ooky spooky ghost itemstacks
- [1.12] Dynamic Crafting Recipe
JSON recipes are so easy to set up. Pretty much anything you'd want to deserialize out of them as ingredients has already been done in either the vanilla or Forge recipes. The ones I've done have been smashed together from what I can find in existing code. You're welcome.- [1.10.2] NBT on item disappears when getting out of slot
You're clicking a button on the client, writing the NBT to the item on the client, then picking up the item, the server then overwrites the client's data because it is the authority.- [1.12] Dynamic Crafting Recipe
Skip all that nonsense (your class doesn't change, but you register it differently) and make the recipe follow the JSON format. You still need an IRecipe class, but you just add a Factory class to it that can deserialize the json. Which...takes almost nothing at all: public IRecipe parse(JsonContext context, JsonObject json) { return new RecipeGift(); } After that, you just need a file that looks like this in your assets (named _factories.json): https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/resources/assets/hardlib/recipes/_factories.json And this: https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/industry/ExpandedIndustryBase.java#L171 And oh yeah, you'll need a single json for the recipe of course.- [1.12] [Solved] No texture on json model block
It's a Java convention thing, that. Static values are in all upper case, class names are UpperCamelCast, variables and function names are lowerCamelCase. The BlockFoo and BlockBar and ItemBaz are an MCP naming convention, but one that I happen to like. After that, making method calls that invoke more method calls is just ridiculous. The only reason to do that is if the method actually adds something from its scope context (that isn't accessible outside it). For example, if I want to have items that define their model via NBT data I still want to register it as normal, but I need additional information from the class / class instance, so I have this method: https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/industry/item/ItemCastingMold.java#L89 Or this method, for custom IStateMapper implementations: https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/flowers/block/BlockOreFlower1.java#L160 And when I need those functions I can just cast to the interface. Or use generic covariance magic: https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/hardlib/client/ClientEasyRegistry.java#L75 The cast here is actually unnecessary due to said magic (block is of Type T which is defined as block a Block and an IBlockWithMapper): https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/hardlib/client/ClientEasyRegistry.java#L79- [1.12] [Solved] No texture on json model block
This is very confusing: https://github.com/THEJean-Kevin/goblin/blob/master/src/main/java/com/mineaurion/tjk/goblin/block/ModBlock.java#L17 1) Class names should start with an upper case letter 2) You really should use the most general-case Type possible (e.g. Block mine0 = new Mine_Lv_0();) so that people reading your code can understand it better. 3) Then if you need to, you can cast (I don't like seeing createItemBlock() in a base block class that all your blocks extend, but it's not that terrible). 4) Even better, make your class names include the base class, e.g. BlockMine_Lv_0 Oh god this is disgusting: https://github.com/THEJean-Kevin/goblin/blob/master/src/main/java/com/mineaurion/tjk/goblin/block/ModBlock.java#L31 You take a client-side-only event, call a piece of code that is not marked Side Only, then just forward the method call to your Proxy. Just do Main.proxy.registerItemRenderer(Item.getItemFromBlock(mine0), 0, name); https://github.com/THEJean-Kevin/goblin/blob/master/src/main/java/com/mineaurion/tjk/goblin/proxy/clientProxy.java#L23 Use item.getRegistryName() instead of References.modid+":"+name- [1.12] Spawning Items
Don't spawn items on the client. Only spawn them on the server.- [1.12.1] Custom ItemStackhandler.insertItem being called twice per item inserted
Is one of the calls with simulate=true?- [1.10.2] NBT on item disappears when getting out of slot
I don't understand your problem. What disappears? - How to perform an operation on the server side through the Event Handler?
IPS spam blocked by CleanTalk.
Important Information
By using this site, you agree to our Terms of Use.