Jump to content

Flawedspirit

Members
  • Posts

    13
  • Joined

  • Last visited

Everything posted by Flawedspirit

  1. That's not part of the JSON that is being asked for. That's the tag in my en_US.lang. So I'm working under incorrect assumptions about what the "ITextComponent.Serializer.jsonToComponent" does vis-a-vis the mod's lang files, so it looks like I'll go off and find out how to parse a particular entry in a lang file. Thanks.
  2. I copied and pasted each line into http://jsonlint.com, and they all came up as "valid json" is bright green letters. Is that site wrong, then? I see it linked to all over this site. Also, what do I need to do to achieve the same result then? Full disclosure: I looked to Actually Additions' 1.10.2 branch on Github to find out how that mod does the same thing (thank you/sorry Ellpeck!) and it's near identical to how I do it here.
  3. I'm trying to print strings derived from some JSON in my en_US.lang file to notify the player about updates to a mod. However, when the event triggers, the game CTDs and prints a rather non-helpful error: The JSON in question: It's all rather opaque-looking, but JSONLint confirms it's valid, so the code itself isn't the issue. The update checker that actually requests the aforementioned JSON: After setting a breakpoint where the train goes off the rails (JsonUtils:468) and stepping through the process, it looks like somewhere in or around the gsonDeserialize method, it's returning JsonScope.EMPTY_DOCUMENT, and almost immediately after that, it leaves mainline processing and enters exception handling until finally reaching all the way to the top and telling Minecraft to end itself. So my question is: is this implying that there's an issue reading the file itself, or is all this me misinterpreting it/a red herring? There is a LOT of stuff that goes on in the background to read this file, and it gets confusing. Another note: I edit the lang files in Sublime Text 3 (or right in Eclipse if I feel like it), in case that helps determine if it's an encoding issue or something.
  4. The issue is fixed! Choonster, to answer your question, the item models weren't being registered. The only objects in my mod that were having their models automatically registered as part of their creation were anything that extended my mod's BlockBase. However, the pressure plate does not extend BlockBase. It's a BlockPressurePlate. It was as easy as adding the below to my block registrar: if(block instanceof BlockObsidianPressurePlate) { ((BlockObsidianPressurePlate) block).registerItemModels(itemBlock); } So thank all of you for being patient! I hope this helps someone else who falls down the same rabbit hole I did.
  5. Alright. You tried, and I thank you for it. I guess I'll just have to dig deeper, or see if I can get another perspective from someone on this.
  6. Then how do I find out what is going wrong when nothing throws an error or exception? Again, the fml-client-latest.log: I need logs to tell me what's going wrong. I cannot read the computer's mind. If you're tired of banging your head against the wall with me here, believe me: I am ten times as tired. This is utter BS. There is zero effin' way it's this hard to render a freakin' pressure plate!
  7. The model is right here: { "parent": "block/pressure_plate_up", "textures": { "texture": "blocks/obsidian" } } The parent is the minecraft pressure plate parent model, located at assets.minecraft.models.block.pressure_plate_up.json. This thing: { "parent": "block/thin_block", "textures": { "particle": "#texture" }, "elements": [ { "from": [ 1, 0, 1 ], "to": [ 15, 1, 15 ], "faces": { "down": { "uv": [ 1, 1, 15, 15 ], "texture": "#texture", "cullface": "down" }, "up": { "uv": [ 1, 1, 15, 15 ], "texture": "#texture" }, "north": { "uv": [ 1, 15, 15, 16 ], "texture": "#texture" }, "south": { "uv": [ 1, 15, 15, 16 ], "texture": "#texture" }, "west": { "uv": [ 1, 15, 15, 16 ], "texture": "#texture" }, "east": { "uv": [ 1, 15, 15, 16 ], "texture": "#texture" } } } ] } By using this model as a parent, and giving it the "texture": "blocks/obsidian", I am telling it to use the existing Minecraft model, but texture it with obsidian, instead of wood or stone. There is less than zero reason for me to reinvent the wheel.
  8. Then I am at a loss. The item model is "extending" (for lack of a better word) the block model, which means I should be holding onto a little mini obsidian pressure plate. Instead, I've got this absurd thing!
  9. I'm afraid you lost me. The pressure plate doesn't have any metadata. As far as I know, the method to render its model was just passed 0, like all the other stuff in my mod that doesn't have metadata associated with it. Was there something special regarding metadata I was supposed to do to make it work? If so, can you link me to some documentation on pressure plates, please?
  10. I'm making progress. No more exceptions, except I'm still holding onto a magenta and black cube in my hand, and the inventory slot shows up as a majenta and black square! I can't see a bloody thing in the log that points to an error! Here's the log: The changes I made: Apparently due to the way my mod loads item model renderers, every single thing that could potentially be an item has to have an "inventory" element. I'm not sure if there's a way around that, or if it's even worth it to try. Anyway, I digress. This is the new item model: { "parent": "fsrandomstuff:block/obsidian_pressure_plate/obsidian_pressure_plate_up" } This thing 114% points to a file that exists, and should be inheriting the right data from the parent Minecraft blockstates. I don't know if I'm stupid or just getting too frustrated to think properly, but this is just getting obscene!
  11. Here ye go: Okay, the thing that is standing out to me here is a FileNotFoundException: fsrandomstuff:models/item/obsidian_pressure_plate.json, which causes me to wonder: what does the item model for a pressure plate look like, then? I've scoured the repos of any mod I could find that implemented custom pressure plates in 1.10.2 (which is not many) and also vanilla Minecraft's resource folder. I've not found anything that I can base my next steps off of; the other mods I've seen seem to implement the pressure plates the same way from what I've seen, and it presumably works for them. Then there's the ModelBlockDefinition$MissingVariantException which is probably related.
  12. Thanks for pointing that out; I fixed it and edited the post above to what the blockstate.json is supposed to be. However, the error is exactly the same. The malformed JSON was a different problem, but not the cause of my main one, it seems.
  13. I've been attempting to make an obsidian pressure plate (implementation #57,480, I know) and am having an issue getting the texture to render both in-game and in the GUI. I get a MissingVariantException and I cannot find anything online that spells out what's going wrong in plain English. The fml-client-latest: Block rendering method: BlockObsidianPressurePlate.class: Blockstate: The variant models: As you can see, this is a bog-standard vanilla implementation of a pressure plate. I haven't even added all the fun stuff to make it a tile entity yet! I just want it to render before I go off doing more. Am I missing something ridiculously simple? Because I've wasted days on single lines of code before. Thank you in advance.
×
×
  • Create New...

Important Information

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