Jump to content

AreUThreateningMe

Members
  • Posts

    17
  • Joined

  • Last visited

Posts posted by AreUThreateningMe

  1. You might have a better shot looking at 1.15.2 vanilla sources since many of the 1.16 variables aren't named yet. 

    This is what the render method for Screen looks like in 1.15.2:

    public void render(int p_render_1_, int p_render_2_, float p_render_3_) {
          for(int i = 0; i < this.buttons.size(); ++i) {
             this.buttons.get(i).render(p_render_1_, p_render_2_, p_render_3_);
          }
    
       }

    I also find it useful to check out the github of a mod that has already implemented something similar to what you want and base your code on theirs. 

    Good Luck!

    • Like 1
  2. I am trying to check whether or not a block can be mined by the tool the player is currently holding. This is working fine with certain blocks like stone, sand and planks, but the method I'm using below returns false for concrete and terracotta

    if (slot.getToolTypes().contains(state.getHarvestTool))) {
    	
    }

    Unless I understand this wrong, the various concrete and terracotta blocks should also return true when the player is holding a pickaxe... right?

    is this a bug or am I just doing this wrong? 

  3. Hello, I am working on the configuration file for my mod and am curious if it would be possible to use the forge config builder to take in a list from my mods config.toml. If someone could point me in the right direction, that'd be great. I looked into making a subclass of the ConfigValue type forge uses, but the constructor is package-private and I don't know of a way around this.

  4. Hello all, I've been working on trying to add a guide book to my mod, but have run into a few problems. I am using patchouli and followed the getting started process for modders but still do not get the item in-game when i test it. When I load the game there is only the other item added by my mod and the default guide book from patchouli. Im lost and not sure what to do next. I have already tried following the example books but was not able to get that to show up in-game either.

    Any help is appreciated. 

  5. I am creating a server for myself and a bunch of friends to play on, but i cannot get it to work. I have tried fresh installs of forge and different versions of 1.10.2 and nothing has worked . It gives me this when I try to start it. 

     

    A problem occurred running the Server launcher.java.lang.reflect.InvocationTarge
    tException
            at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Nativ
    e Method)
            at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknow
    n Source)
            at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Un
    known Source)
            at java.base/java.lang.reflect.Method.invoke(Unknown Source)
            at net.minecraftforge.fml.relauncher.ServerLaunchWrapper.run(ServerLaunc
    hWrapper.java:62)
            at net.minecraftforge.fml.relauncher.ServerLaunchWrapper.main(ServerLaun
    chWrapper.java:31)
    Caused by: java.lang.ClassCastException: java.base/jdk.internal.loader.ClassLoad
    ers$AppClassLoader cannot be cast to java.base/java.net.URLClassLoader
            at net.minecraft.launchwrapper.Launch.<init>(Launch.java:34)
            at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
            ... 6 more
    Press any key to continue . . .

     

     

    Thanks for any help. 

     

    Edit: I tried different versions of forge entirely(1.12 and 1.11) and those also game me the same startup error. 

×
×
  • Create New...

Important Information

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