Jump to content

yuckyh

Members
  • Posts

    14
  • Joined

  • Last visited

Recent Profile Visitors

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

yuckyh's Achievements

Tree Puncher

Tree Puncher (2/8)

2

Reputation

  1. 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.
  2. 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
  3. Can someone give me an explained version of this code as comments because I want to create a custom explosion thing
  4. Well, I thought you're just going to disable recipe without the user doing it. The conditional recipe should work for you. Good luck!
  5. 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
  6. 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
  7. 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
  8. Create an Enum Class that implements IItemTier and copy everything from ItemTier and define your custom material type It can be done like this
  9. 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
  10. The null pointer exception is gone, but my button never appeared in the gui screen
  11. @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
×
×
  • Create New...

Important Information

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