Everything posted by yuckyh
-
LazyOptional
Thank you guys, turns out I found a better solution, you guys can check it out the code on my Github https://github.com/yuckyh/Equinox P.S. I hope I'm not necroposting, just want to make sure that this can work and everyone can find out how.
-
LazyOptional
So I have some problems, which is 1. I don't understand what this thing does 2. I want to return LazyOptional in my capability provider, but it gives me the cast error because idk how 3. I want to get the type of the LazyOptional(get T from LazyOptional<T>) Please help me out, if there's a necessity to post my code then I will edit this post
-
Need help on Explosion Class
Can someone give me an explained version of this code as comments because I want to create a custom explosion thing
-
[SOLVED][1.13.2]I wanted to create a GUI Button but it gave me the null pointer error
Thank you very much! @diesieben07
-
[1.13.2] can recipes be disabled?
Well, I thought you're just going to disable recipe without the user doing it. The conditional recipe should work for you. Good luck!
-
[SOLVED][1.13.2]I wanted to create a GUI Button but it gave me the null pointer error
The GuiButton didn't appear as well
-
[1.13.2] can recipes be disabled?
By default your items don't have any recipes until you define the recipe using the json file What did you do that results in enabled item recipes
-
[Solved][Outdated] Conflicting “best” practices
You should handle this problem in that thread
-
modid not working (I'm sorry)
In Java anything that is wrapped in text must be quoted to be use In this case u should do modid = "pplanet" or modid = "prehistoricplante" When using IntelliJ, press Alt + Enter to find out errors happening on red colored underlines, usually those error occurs when the syntax of the code is wrong
-
Get Item from id ("minecraft:stone" for example)
If its a block do Blocks.BLOCK_NAME for example Blocks.STONE If its ONLY an item do Item.ITEM_NAME for example Items.STONE_HOE By the way why did u want to access an item by id
-
How can I create new materials (armor, items, blocks)?
Create an Enum Class that implements IItemTier and copy everything from ItemTier and define your custom material type It can be done like this
-
[SOLVED][1.13.2]I wanted to create a GUI Button but it gave me the null pointer error
package com.yuckyh.equisora.client.gui; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiScreen; public class GuiClassSelect extends GuiScreen { private int guiWidth = 800; private int guiHeight = 450; private int guiCenterX = (this.width/2) - guiWidth/2; private int guiCenterY = (this.height/2) - guiHeight/2; @Override public void render(int mouseX, int mouseY, float partialTicks) { super.render(mouseX, mouseY, partialTicks); } @Override protected void initGui() { super.initGui(); GuiButton buttonOk = new GuiButton(0, this.width / 2 - width, this.height * 5 / 6, "Ok") { @Override public void onClick(double p_194829_1_, double p_194829_3_) { super.onClick(p_194829_1_, p_194829_3_); } }; this.buttons.add(buttonOk); } @Override public boolean doesGuiPauseGame() { return true; } } Is it like that? if it is, it didn't work
-
[SOLVED][1.13.2]I wanted to create a GUI Button but it gave me the null pointer error
The null pointer exception is gone, but my button never appeared in the gui screen
-
[SOLVED][1.13.2]I wanted to create a GUI Button but it gave me the null pointer error
@Override protected void initGui() { this.buttons.clear(); this.buttons.add(this.buttonOk = new GuiButton(0, this.width / 2, this.height - buttonOk.height / 2,"Ok") { @Override public void onClick(double p_194829_1_, double p_194829_3_) { super.onClick(p_194829_1_, p_194829_3_); } }); super.initGui(); } This code is in my custom Gui which is a subclass of GuiScreen This error happens when I entered my world I was wondering why declaring a new GuiButton instance give me a null pointer error
IPS spam blocked by CleanTalk.