Jump to content

Jay Avery

Members
  • Posts

    884
  • Joined

  • Last visited

  • Days Won

    9

Jay Avery last won the day on July 1 2017

Jay Avery had the most liked content!

1 Follower

Converted

  • Gender
    Undisclosed

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Jay Avery's Achievements

Dragon Slayer

Dragon Slayer (6/8)

112

Reputation

  1. It looks like you might need to study some Java fundamentals, because this is fairly basic syntax that you seem to be having trouble with. The correct line is: ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory"));
  2. Post the whole log.
  3. net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model bte:block/limonaric_mud with loader VanillaLoader.INSTANCE, skipping ... Caused by: com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Unterminated object at line 3 column 6 path There is a syntax error in your bte:block/limonaric_mud file. In future run your json files through a validator like jsonlint or an IDE plugin to catch mistakes like this.
  4. Oh, I just realised the problem, your model files are missing important things. "faces": { "down": { "cullface": "down" }, "up": { "cullface": "up" }, "north": { "cullface": "north" }, "south": { "cullface": "south" }, "west": { "cullface": "west" }, "east": { "cullface": "east" } } Each of the faces ("down" etc) needs to contain a "texture" element - a string referring to the texture label (as defined in the "textures" section at the start of your file) and starting with #. You likely also want a "uv" element - an array of four numbers - to define which area of the texture to apply to the face. Here is a random example from a model in my mod: "faces": { "down": { "uv": [ 15, 14, 0, 2 ], "texture": "#cotton1" }, "up": { "uv": [ 1, 4, 16, 16 ], "texture": "#cotton1" }, "north": { "uv": [ 0, 15, 15, 16 ], "texture": "#cotton1" }, "south": { "uv": [ 1, 15, 16, 16 ], "texture": "#cotton1" }, "west": { "uv": [ 2, 15, 14, 16 ], "texture": "#cotton1" }, "east": { "uv": [ 2, 15, 14, 16 ], "texture": "#cotton1" } }
  5. Post the log again, the errors are probably not identical.
  6. This block should be "textures" not "texture" - same mistake in cable_base and cable_side.
  7. Post the full latest log, and your latest blockstates and model files.
  8. You can use the forge multi-layer model with the forge blockstates format, to render parts of the model in different layers. In your block, override Block#canRenderInLayer to return true for every layer which your block has. Then in the blockstates file, define the model as "forge:multi-layer". Add a "custom" tag, and inside that define each of the layers with the model to be rendered. I have an example which uses both translucent and cutout layers for different parts of the model: blockstates, block code.
  9. To make an ItemStack with metadata, use the constructor new ItemStack(item, stackSize, metadata). To get a random number for the metadata you can use the method Random#nextInt(max), which returns an integer between 0 and max-1. World has a rand field which you can use for this.
  10. You need to override createBlockState in your block class, and return a new BlockStateContainer constructed with all the properties you want your block to have.
  11. Where/when do you send the message?
  12. The variant it's looking for: [facing=west,is_on=true] The variant in your blockstates file: "is_on=true,facing=west": { Can you spot the difference? Fully-defined variants are simply strings, they must be an exact match - forge doesn't know that you mean the same thing when you have the variants written in a different order. The correct order to write the variants is with the variant names in alphabetical order, so "facing" comes before "is_on".
  13. Any time you find yourself asking this question, the answer is in the vanilla code!
  14. If you use an up-to-date version of Forge, there will be an EnumHand parameter passed to the method.
×
×
  • Create New...

Important Information

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