Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Ele20002

Members
  • Posts

    22
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • Location
    United Kingdom
  • Personal Text
    I am new!

Ele20002's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. I was looking at some old 1.8 code to try and fix some 1.11 problems, and found isOpaqueCube. The point is to remove the ability to see though blocks in a model with gaps (not solid block) I was wondering what alternatives for 1.11 there are, or if there is another way to implement it. Trying to override in my block class gives an error as they removed it from the superclass
  2. I changed the MyItems and MyBlocks to have: setRegistryName("examplemod:banana"); instead of setRegistryName("banana"); but it doesn't seem to have done much - nothing changed
  3. I tried with items with the same result (Following steps from Matryoshika): ItemRegister BlockRegister: MyItem: MyBlock: resources/assets/examplemod/ blockstates/ block_banana.json: models/block/ block_banana.json: models/item/ banana.json: block_banana.json textures/blocks/block_banana.png textures/items/banana.png Console output: Hopefully that's everything
  4. For some reason, it only worked for me when I tried in a new folder, but you have a different error, so it may not work for you What IDE are you using - there's an alternative method if you're using IntelliJ
  5. Ok, not sure what happened, but I ended up with this (For blocks (I'm moving onto items after now)):
  6. Thanks - I'll try it out. It can be hard sometimes to find which tutorial to use, as most become outdated within a few months
  7. ClientProxy: ItemRenderer: ItemRegister: The error is: Method declared in a class annotated with a SideOnly.CLIENT cannot be referenced in an annotated method When hovering over: ModelLoader.setCustomModelResourceLocation(item,0,new ModelResourceLocation(item.getRegistryName(),"inventory")); In IntelliJ I just tried loading it up and it actually worked fine this time. No idea why the error kept appearing, but the minecraft just suddenly started working - Thanks a lot I stopped IntelliJ complaining with a //noinspection MethodCallSideOnly and it seems to work fine Also, I didn't use @SideOnly(Side.CLIENT) as THAT caused minecraft to crash, and I saw somewhere that it was made for minecraft, not forge, and using it is a bad idea On another problem, it doesn't actually render anyway ingame - a massive block of purple and black. I imagine it can't find the model: item.getRegistryName() At resources/assets/examplemod/models/item/testitem.json, but nothing seems to fix it
  8. Even having it in it's own class, being NOT REFERENCED AT ALL seems to give an error Having the classes extend ClientProxy however does seems to prevent the error. I'm only not sure if it's good practice or will cause problems later down the line
  9. The error disappears when I put it into the ClientProxy, but is there any way to avoid filling up the ClientProxy with item rendering and have it in its own class?
  10. Bump (Sorry if I'm not meant to put this, I'm just stumped, don't want to move back to eclipse and can't find the site rules anywhere)
  11. The part I don't understand is why the exact same problem doesn't happen when I do it in eclipse
  12. From before I isolated the ModelLoader call: ExampleMod: Ref: IProxy: CommonProxy: ClientProxy: ServerProxy: ItemHandler: These are all the classes I have
  13. Even having the ModelLoader call in it's own class gives an error. The class looks a bit like this: package com.example.examplemod.handlers; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.Item; import net.minecraftforge.client.model.ModelLoader; public class ItemRenderer { //Tells forge to look for the items models and textures public static void registerRender(Item item) { ModelLoader.setCustomModelResourceLocation(item,0,new ModelResourceLocation(item.getRegistryName(),"inventory")); } } The error is currently under the section ModelLoader.setCustomModelResourceLocation
  14. I'm fairly new to forge, and have been following this tutorial http://couchdoescode.blogspot.co.uk/2017/02/items.html?view=sidebar In my ItemHandler class, registerRender method, I have to call Minecraft.getMinecraft() to register model location with item. However, it gives the error: Method declared in a class annotated with a SideOnly.CLIENT cannot be referenced in an annotated method This error seems to happen with all forge versions - I'm using 1.11 most recent, but an old project I did in 1.8 also has the same error, while it previously worked I tried putting a @SideOnly(Side.CLIENT) before the class, which removed the error, but still crashed minecraft with a NullPointerException All other attempted uses of @SideOnly have failed (It was worth a try) I recently switched from eclipse to IntelliJ, and the same error does not seem to exist in the eclipse version - It may be a problem with the IDE. The exact line is: Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item,0,new ModelResourceLocation(item.getRegistryName(),"inventory")); Any help would be greatly appreciated
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.