-
Posts
6157 -
Joined
-
Last visited
-
Days Won
59
Everything posted by Animefan8888
-
[1.12] [Solved] Inventory textures not loading
Animefan8888 replied to WARDOGSK93's topic in Modder Support
You also need to add a @SideOnly(Side.CLIENT) to the top of your ModelRegistryEvent class and register it in your Client proxy. Otherwise it will crash the dedicated server. -
You did not really do anything i said... And
-
[1.12] [Solved] Inventory textures not loading
Animefan8888 replied to WARDOGSK93's topic in Modder Support
Put inventory. -
Show me a screenshot of your package explorer and your code for the button. And where you add the button to the Gui.
-
[1.12] [Solved] Inventory textures not loading
Animefan8888 replied to WARDOGSK93's topic in Modder Support
From what I saw of your project you don't register the Item models. You need to subscribe to the ModelRegistryEvent and register your models using ModelLoader.setCustomModelResourceLocation. -
There is no domain there. It needs to be assets/modid(your mods id)/textures/gui. And your ResourceLocation needs to be initialized like so new ResourceLocation(modid, "textures/gui...")
-
Where is your image?
-
Your ResourceLocation is pointing to the minecraft domain and not your mods domain aka the modid.
-
No, I will not write your code for you. Take a look at GuiButton
-
If I got this right you are asking how you can change what the button looks like. Make a class that extends GuiButton and override GuiButton#drawButton to instead use your image.
-
KeyboardInputEvent is only called Client side so that won't work. How are you registering your event and how are you changing the booleans in your array?
-
Try limiting it to one tree per chunk.
-
So basically as the Title says I am trying to get an Items IBakedModel and add it's quads to my custom IBakedModel. Though I have been successful in getting the Items IBakedModel, items seem to have a weird Black Plane that runs through it when rendered in the World. As shown below. Images This is my IBakedModel (most of which is probably temporary). Edit: I have also used the ModelLoaderRegistry.getModel() to get the model, but to no avail.
-
Not the height, but the width and depth.
-
How big are your trees? If they are near vanilla size you shouldn't be generating much more than 3-4 per chunk, also there is Runaway Chunk Generation. Which is a huge problem in world gen. If your generation passes over into another chunk then that chunk will be forced to generate and so on and so forth if it is your Biome it will call your decorate method and lead to more chunks being loaded. Edit: You will want to apply an offset to your generation so it doesn't load other chunks.
-
Post your Biome code again.
-
What do you mean? If you do System.out.println(pos) it will print out the BlockPos and you will have coordinates for where your Biome is being decorated.
-
In your decorate method print out the BlockPos argument to find the position.
-
Good news your Biome is generating. Bad news you are generating to many trees. 30 possible trees per chunk is a little to much.
-
Ahhh, thanks. I knew there was a reason behind me believing that.
-
It when you are using the @Mod.EventBusSubscriber which I believe is required for the RegistryEvents.
-
I don't believe the crash will happen in a development environment possibly because the classes marked with @SIdeOnly(Side.CLIENT) still get compiled though that may just be me thinking wildly.
-
You are not registering your Items correctly and you are also not registering your models correctly either. You need to use the Registry events for them. Here is the forge documentation on the registry events. Here is the documentation on Events. And you must also use the ModelRegistryEvent which is not on the forge documentation specifically. Inside the event you need to call ModelLoader.setCustomeModelResourceLocation.
-
Yes, and I misspoke ModelRegistryEvent is not the Client Side only class (at least it is not marked with @SideOnly(Side.CLIENT)), but ModelLoader is. And if you compile a Common or Server class with ModelLoader referenced in it it will crash with a "Class Not Found Exception". Seeing as how the class doesn't exist in the servers files.
-
@ObjectHolder as far as I know don't really have advantages or disadvantages in this case. Instead of an array I suggest a ArrayList. That way you have access to List#add. Also you will need to move your ModelRegistryEvent to another class or it will crash the dedicated server as it is a Client side only class. You also will need to put @SideOnly(SIde.CLIENT) at the top of your class.