Jump to content

Adityagupta

Members
  • Posts

    54
  • Joined

  • Last visited

Posts posted by Adityagupta

  1. 14 minutes ago, DavidM said:

    Even if the mod is for single player only, the position of an entity shouldn't be abused for cosmetic (rendering) purposes; the position of an entity does a lot more than "keeping the entity visible", and messing with it can break other things.

    Good point, I think I'll just stick with multiple parts. Are IEntityMultiPart and MultiPartEntityPart (the ones used in EntityDragon) the best for this or is there a better method?

  2. 1 minute ago, DavidM said:

    AFAIK this s due to the chunk(s) the entity is in is being culled; there is not much you can do about it.

    I know this is the problem, but wouldn't fixing the hitbox size put the entity in more chunks so it wouldn't be culled? Or can entities only be tied to a single chunk?

    If there isn't a fix for the hitbox/culling, I'll just go with multiple parts. 

     

    Also, I saw an issue on Advanced Rocketry for the same problem, and it said there was a pull request that fixed it, but the same issue seems to be happening here.

  3. I have created an entity that is ~70 blocks tall and ~6 blocks wide, and I have set its hitbox so that when I press F3 + B, it fills up the entire entity. However, I can only interact (hit) the bottom ~4 blocks, and when I look too far up, the entity disappears entirely (I think this is because the subchunk in which those ~4 blocks are in is not loaded). I have noticed the same issue with the vanilla giant mob, which also disappears at certain angles and also has a bugged hitbox. I have seen a few threads about this same problem, but none of them had a solution for this problem.

     

    Entity hitbox:

     

    2019-04-01_22_48_52.thumb.png.1e1310783d3309941744a47f3a0b57af.png

     

    Same view but a bit higher up:

     

    2019-04-01_22_48_56.thumb.png.f806697be1cfbc292c0d5b0b69706c04.png

     

    I tried setting ignoreFrustumCheck to true, as well as forcing some render methods to always return true for "should render", but none of that worked. The source code can be found here. The entity in question is here.

     

    Any ideas?

  4. On 3/18/2019 at 10:19 AM, LexManos said:

    Entities are tied to the chunk. So if the chunk it's in is culled there is nothing you can do to make the entity render.

    You need to split your entity into multiple parts.

    I have a similar problem, but my entity is really tall rather than (I'm assuming) really wide. Whenever I look too high, it completely disappears. I tried setting ignoreFrustumCheck to true, and I also tried overriding methods like shouldRender to always return true. I'm pretty sure it's not a problem with chunks. However, nothing has worked. Is there any way to fix this that doesn't involve creating multiple entities?

     

    Also, this might be related - the hitbox from F3 + B goes all the way to the top of the rocket, but only the bottom 4-ish blocks can actually be hit.

  5. Thanks for the reply, moved forward but getting a different error now.

     

    I ended up using the Shadow plugin to package and relocate the dependency and just told ForgeGradle to reobfuscate the resulting JAR.

     

    Now getting:

     

    java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
    at com.github.dockerjava.jaxrs.DockerCmdExecFactoryImpl.<clinit>(DockerCmdExecFactoryImpl.java:82) ~[DockerCmdExecFactoryImpl.class:?]
    at com.github.dockerjava.core.DockerClientBuilder.getDefaultDockerCmdExecFactory(DockerClientBuilder.java:35) ~[DockerClientBuilder.class:?]
    at com.github.dockerjava.core.DockerClientBuilder.build(DockerClientBuilder.java:47) ~[DockerClientBuilder.class:?]
    at org.redfrog404.mobycraft.DockerCommands.getDockerClient(DockerCommands.java:233) ~[DockerCommands.class:?]
    at org.redfrog404.mobycraft.DockerCommands.ps(DockerCommands.java:193) ~[DockerCommands.class:?]
    at org.redfrog404.mobycraft.DockerCommands.func_71515_b(DockerCommands.java:110) ~[DockerCommands.class:?]
    at net.minecraft.command.CommandHandler.func_175786_a(CommandHandler.java:100) [j.class:?]
    at net.minecraft.command.CommandHandler.func_71556_a(CommandHandler.java:79) [j.class:?]
    at net.minecraft.network.NetHandlerPlayServer.func_147361_d(NetHandlerPlayServer.java:815) [lm.class:?]
    at net.minecraft.network.NetHandlerPlayServer.func_147354_a(NetHandlerPlayServer.java:794) [lm.class:?]
    

     

    The updated build.gradle shows how I used your code.

     

    Further thoughts?

  6. @Choonster

     

    I tried shading again and I am now getting:

     

    > Could not find method srgExtra() for arguments [PK: org/apache/commons/logging org/mobycraft/org/apache/commons/logging] on root project 'mobycraft.forge'.

     

    I have already looked at http://www.minecraftforge.net/forum/index.php?topic=37004.0 and the syntax seems to be fine in my case.

     

    Here is how the minecraft section of my build.gradle file looks like:

     

    minecraft {
        version = "1.8.9-11.15.1.1762"
        runDir = "run"
        
        // the mappings can be changed at any time, and must be in the following format.
        // snapshot_YYYYMMDD   snapshot are built nightly.
        // stable_#            stables are built at the discretion of the MCP team.
        // Use non-default mappings at your own risk. they may not allways work.
        // simply re-run your setup task after changing the mappings to update your workspace.
        mappings = "stable_20"
        // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
    
        srgExtra "PK: org/apache/commons/logging org/mobycraft/org/apache/commons/logging"
    }

     

    Any idea what could be wrong?

  7. Thanks for all the quick resposnses again!

     

    @Shadowfacts: I tried out the two lines you posted in my build.gradle file, and I got the same error as before (NoSuchMethodError). I didn't try out the second code sample because I am not using CurseGradle.

     

    I have a project that uses the shadow plugin, and I had to do it a bit of messing around but I got it to work. My build.gradle file is here but the key point is these two lines:

     

    reobf { shadowJar { mappingType = "SEARGE" } }
    tasks.reobfShadowJar.mustRunAfter shadowJar
    

     

    This tells ForgeGradle to add a reobfShadowJar task that reobfuscates the shadowJar and has it automatically run after the shadowJar task. Depending on your configuration, you may need to run reobfShadowJar manually (e.g. run

    gradlew shadowJar reobfShadowJar

    ). If you use CurseGradle you'll need to add something like this (but with 000000 replaced with your project id):

     

    afterEvaluate {
    tasks.curseforge240995.dependsOn reobfShadowJar
    }
    

     

    @Choonster: After trying out shadowfacts' code, I switched to the "shade" plugin and used that instead. This time I got a different error:

     

    * What went wrong:
    Execution failed for task ':reobfJar'.
    > java.util.zip.ZipException: duplicate entry: org/apache/commons/logging/Log.class
    

     

    Here is my new build.gradle file:

     

     

     

    // For those who want the bleeding edge
    buildscript {
        repositories {
            jcenter()
            maven {
                name = "forge"
                url = "http://files.minecraftforge.net/maven"
            }
        }
        dependencies {
            classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT'
        }
    }
    apply plugin: 'net.minecraftforge.gradle.forge'
    
    /*
    // for people who want stable - not yet functional for MC 1.8.8 - we require the forgegradle 2.1 snapshot
    plugins {
        id "net.minecraftforge.gradle.forge" version "2.0.2"
    }
    */
    version = "1.0"
    group= "org.redfrog404.mobycraft" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
    archivesBaseName = "mobycraft"
    
    minecraft {
        version = "1.8.9-11.15.1.1762"
        runDir = "run"
        
        // the mappings can be changed at any time, and must be in the following format.
        // snapshot_YYYYMMDD   snapshot are built nightly.
        // stable_#            stables are built at the discretion of the MCP team.
        // Use non-default mappings at your own risk. they may not allways work.
        // simply re-run your setup task after changing the mappings to update your workspace.
        mappings = "stable_20"
        // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
    }
    
    configurations {
        shade
        compile.extendsFrom shade
    }
    
    dependencies {
        shade 'com.github.docker-java:docker-java:2.2.1'
        shade 'com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:2.1.2'
        shade 'com.fasterxml.jackson.core:jackson-core:2.1.2'
        shade 'com.fasterxml.jackson.core:jackson-databind:2.1.2'
        shade 'com.fasterxml.jackson.core:jackson-annotations:2.1.1'
        shade 'com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.1.2'
        shade 'org.glassfish.jersey.connectors:jersey-apache-connector:2.11'
        shade 'org.glassfish.jersey.core:jersey-common:2.11'
        shade 'javax.annotation:javax.annotation-api:1.2'
        shade 'org.glassfish.jersey.bundles.repackaged:jersey-guava:2.11'
        shade 'org.glassfish.hk2:osgi-resource-locator:1.0.1'
        shade 'javax.ws.rs:javax.ws.rs-api:2.0'
        shade 'org.apache.httpcomponents:httpclient:4.3.1'
        shade 'org.apache.httpcomponents:httpcore:4.3'
        shade 'commons-logging:commons-logging:1.1.3'
        shade 'org.glassfish.jersey.core:jersey-client:2.11'
        shade 'org.glassfish.hk2:hk2-api:2.3.0-b05'
        shade 'org.glassfish.hk2:hk2-utils:2.3.0-b05'
        shade 'org.glassfish.hk2.external:aopalliance-repackaged:2.3.0-b05'
        shade 'org.glassfish.hk2.external:javax.inject:2.3.0-b05'
        shade 'org.glassfish.hk2:hk2-locator:2.3.0-b05'
        shade 'org.javassist:javassist:3.18.1-GA'
        shade 'de.gesellix:unix-socket-factory:2015-01-27T15-02-14'
        shade 'org.apache.commons:commons-compress:1.5'
        shade 'org.tukaani:xz:1.2'
        shade 'commons-codec:commons-codec:1.8'
        shade 'commons-lang:commons-lang:2.6'
        shade 'commons-io:commons-io:2.3'
        shade 'org.slf4j:slf4j-api:1.7.5'
        shade 'org.slf4j:jcl-over-slf4j:1.7.12'
        shade 'com.google.guava:guava:18.0'
        shade 'org.bouncycastle:bcpkix-jdk15on:1.51'
        shade 'org.bouncycastle:bcprov-jdk15on:1.51'
    }
    
    jar {
        configurations.shade.each { dep ->
            from(project.zipTree(dep)){
                exclude 'META-INF', 'META-INF/**'
            }
        }
    }
    
    //minecraft {
    //    srgExtra "PK: com/fasterxml org/redfrog404/mobycraft/dependencies/com/fasterxml"
    //}
    
    processResources
    {
        // this will ensure that this task is redone when the versions change.
        inputs.property "version", project.version
        inputs.property "mcversion", project.minecraft.version
    
        // replace stuff in mcmod.info, nothing else
        from(sourceSets.main.resources.srcDirs) {
            include 'mcmod.info'
                    
            // replace version and mcversion
            expand 'version':project.version, 'mcversion':project.minecraft.version
        }
            
        // copy everything else, thats not the mcmod.info
        from(sourceSets.main.resources.srcDirs) {
            exclude 'mcmod.info'
        }
    }
    

     

     

     

    Thanks for the quick replies!

     

    When I am building my mod, I first do "./gradlew build", then "./gradlew shadowJar" to bundle the mod with the other JARs. Correct me if I'm wrong, but that should reobfuscate the mod.

     

    It looks like the

    shadowJar

    task uses the compiled output from the

    main

    SourceSet

    , but ForgeGradle handles reobfuscation separately (it assembles the JAR and then reobfuscates that).

     

    It may be easier to use the shading method described here than trying to integrate the shadow plugin with ForgeGradle.

     

    @UberAffe: The proxy example is helpful but isn't what I am looking for. Draco18s said that I was running client-only code on a server, which implies that I should use a server-only proxy, but your example is for client-side proxies.

     

    Proxy is used do separate registration code that is meant for the Physical client(logical client and logical server) and Physical server(logical server only)

     

    In your main mod file you use

    @SidedProxy(clientSide = Refs.CLIENTPROXY, serverSide = Refs.SERVERPROXY)
        public static CommonProxy proxy;
    

     

    CLIENTPROXY and SERVERPROXY are strings that would be equal to an import line.

    if an import would look like
    import modid.ClientProxy;
    
    @SidedProxy(clientSide = "modid.ClientProxy"
    

     

    your clientproxy class should extend common proxy.

    Your mod file will now have this:

           @SidedProxy(clientSide = Refs.CLIENTPROXY, serverSide = Refs.SERVERPROXY)
           public static CommonProxy proxy;
    
           @EventHandler
           public void preInit (FMLPreInitializationEvent event){
    	proxy.preInit();
    }
    
    @EventHandler
            public void init (FMLInitializationEvent event){
    	proxy.init();
    }
    
    @EventHandler
            public void postInit (FMLPostInitializationEvent event){
                    proxy.postInit();
    }
    

     

    the majority of your registration will go in CommonProxy, and any client specific stuff (KeyBindings, GUI's, etc) will go in ClientProxy.

  8. Thanks for the quick replies!

     

    When I am building my mod, I first do "./gradlew build", then "./gradlew shadowJar" to bundle the mod with the other JARs. Correct me if I'm wrong, but that should reobfuscate the mod.

     

    Here is my build.gradle file:

     

     

     

    // For those who want the bleeding edge
    buildscript {
        repositories {
            jcenter()
            maven {
                name = "forge"
                url = "http://files.minecraftforge.net/maven"
            }
        }
        dependencies {
            classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT'
            classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.3'
        }
    }
    apply plugin: 'net.minecraftforge.gradle.forge'
    apply plugin: 'com.github.johnrengelman.shadow'
    
    /*
    // for people who want stable - not yet functional for MC 1.8.8 - we require the forgegradle 2.1 snapshot
    plugins {
        id "net.minecraftforge.gradle.forge" version "2.0.2"
    }
    */
    version = "1.0"
    group= "org.redfrog404.mobycraft" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
    archivesBaseName = "mobycraft"
    
    minecraft {
        version = "1.8.9-11.15.1.1762"
        runDir = "run"
        
        // the mappings can be changed at any time, and must be in the following format.
        // snapshot_YYYYMMDD   snapshot are built nightly.
        // stable_#            stables are built at the discretion of the MCP team.
        // Use non-default mappings at your own risk. they may not allways work.
        // simply re-run your setup task after changing the mappings to update your workspace.
        mappings = "stable_20"
        // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
    }
    
    dependencies {
        // you may put jars on which you depend on in ./libs
        // or you may define them like so..
        //compile "some.group:artifact:version:classifier"
        //compile "some.group:artifact:version"
        compile group: 'com.github.docker-java', name: 'docker-java', version: '2.2.1'
          
        // real examples
        //compile 'com.mod-buildcraft:buildcraft:6.0.8:dev'  // adds buildcraft to the dev env
        //compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env
    
        // the 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime.
        //provided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
    
        // the deobf configurations:  'deobfCompile' and 'deobfProvided' are the same as the normal compile and provided,
        // except that these dependencies get remapped to your current MCP mappings
        //deobfCompile 'com.mod-buildcraft:buildcraft:6.0.8:dev'
        //deobfProvided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
    
        // for more info...
        // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
        // http://www.gradle.org/docs/current/userguide/dependency_management.html
    
    }
    
    shadowJar {
      dependencies {
        include(dependency('com.github.docker-java:docker-java:2.2.1'))
        include(dependency('com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:2.1.2'))
        include(dependency('com.fasterxml.jackson.core:jackson-core:2.1.2'))
        include(dependency('com.fasterxml.jackson.core:jackson-databind:2.1.2'))
        include(dependency('com.fasterxml.jackson.core:jackson-annotations:2.1.1'))
        include(dependency('com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.1.2'))
        include(dependency('org.glassfish.jersey.connectors:jersey-apache-connector:2.11'))
        include(dependency('org.glassfish.jersey.core:jersey-common:2.11'))
        include(dependency('javax.annotation:javax.annotation-api:1.2'))
        include(dependency('org.glassfish.jersey.bundles.repackaged:jersey-guava:2.11'))
        include(dependency('org.glassfish.hk2:osgi-resource-locator:1.0.1'))
        include(dependency('javax.ws.rs:javax.ws.rs-api:2.0'))
        include(dependency('org.apache.httpcomponents:httpclient:4.3.1'))
        include(dependency('org.apache.httpcomponents:httpcore:4.3'))
        include(dependency('commons-logging:commons-logging:1.1.3'))
        include(dependency('org.glassfish.jersey.core:jersey-client:2.11'))
        include(dependency('org.glassfish.hk2:hk2-api:2.3.0-b05'))
        include(dependency('org.glassfish.hk2:hk2-utils:2.3.0-b05'))
        include(dependency('org.glassfish.hk2.external:aopalliance-repackaged:2.3.0-b05'))
        include(dependency('org.glassfish.hk2.external:javax.inject:2.3.0-b05'))
        include(dependency('org.glassfish.hk2:hk2-locator:2.3.0-b05'))
        include(dependency('org.javassist:javassist:3.18.1-GA'))
        include(dependency('de.gesellix:unix-socket-factory:2015-01-27T15-02-14'))
        include(dependency('org.apache.commons:commons-compress:1.5'))
        include(dependency('org.tukaani:xz:1.2'))
        include(dependency('commons-codec:commons-codec:1.8'))
        include(dependency('commons-lang:commons-lang:2.6'))
        include(dependency('commons-io:commons-io:2.3'))
        include(dependency('org.slf4j:slf4j-api:1.7.5'))
        include(dependency('org.slf4j:jcl-over-slf4j:1.7.12'))
        include(dependency('com.google.guava:guava:18.0'))
        include(dependency('org.bouncycastle:bcpkix-jdk15on:1.51'))
        include(dependency('org.bouncycastle:bcprov-jdk15on:1.51'))
      }
    }
    
    processResources
    {
        // this will ensure that this task is redone when the versions change.
        inputs.property "version", project.version
        inputs.property "mcversion", project.minecraft.version
    
        // replace stuff in mcmod.info, nothing else
        from(sourceSets.main.resources.srcDirs) {
            include 'mcmod.info'
                    
            // replace version and mcversion
            expand 'version':project.version, 'mcversion':project.minecraft.version
        }
            
        // copy everything else, thats not the mcmod.info
        from(sourceSets.main.resources.srcDirs) {
            exclude 'mcmod.info'
        }
    }
    

     

     

     

    Also, I've seen proxies in use by other mods but I never understood how they work. Is there some place I can see how to use those?

     

    Thanks!

  9. Hi everyone,

     

    When I launched Minecraft with a mod I've been developing, I got a java.lang.NoSuchMethodError before the mod loading even completed. Here is the crash report:

     

     

     

    ---- Minecraft Crash Report ----
    // Daisy, daisy...
    
    Time: 3/9/16 8:36 PM
    Description: There was a severe problem during mod loading that has caused the game to fail
    
    net.minecraftforge.fml.common.LoaderException: java.lang.NoSuchMethodError: net.minecraft.client.Minecraft.getMinecraft()Lnet/minecraft/client/Minecraft;
    at net.minecraftforge.fml.common.LoadController.transition(LoadController.java:162)
    at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:739)
    at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:310)
    at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:495)
    at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:329)
    at net.minecraft.client.main.Main.main(SourceFile:124)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    Caused by: java.lang.NoSuchMethodError: net.minecraft.client.Minecraft.getMinecraft()Lnet/minecraft/client/Minecraft;
    at org.redfrog404.mobycraft.Moby.init(Moby.java:46)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:560)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
    at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
    at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
    at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
    at com.google.common.eventbus.EventBus.post(EventBus.java:275)
    at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:211)
    at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:189)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
    at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
    at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
    at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
    at com.google.common.eventbus.EventBus.post(EventBus.java:275)
    at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:118)
    at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:737)
    ... 10 more
    
    
    A detailed walkthrough of the error, its code path and all known details is as follows:
    ---------------------------------------------------------------------------------------
    
    -- System Details --
    Details:
    Minecraft Version: 1.8.9
    Operating System: Mac OS X (x86_64) version 10.10.5
    Java Version: 1.8.0_74, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 111562552 bytes (106 MB) / 358658048 bytes (342 MB) up to 1060372480 bytes (1011 MB)
    JVM Flags: 5 total; -Xmx1G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M
    IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
    FML: MCP 9.19 Powered by Forge 11.15.1.1764 4 mods loaded, 4 mods active
    States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
    UCHI	mcp{9.19} [Minecraft Coder Pack] (minecraft.jar) 
    UCHI	FML{8.0.99.99} [Forge Mod Loader] (forge-1.8.9-11.15.1.1764.jar) 
    UCHI	Forge{11.15.1.1764} [Minecraft Forge] (forge-1.8.9-11.15.1.1764.jar) 
    UCHE	moby{1.0} [moby] (mobycraft-1.0-all.jar) 
    Loaded coremods (and transformers): 
    GL info: ' Vendor: 'ATI Technologies Inc.' Version: '2.1 ATI-1.32.25' Renderer: 'AMD Radeon R9 M290X OpenGL Engine'
    

     

     

     

    The file which this error is pointing to is located at https://github.com/AdityaGupta1/mobycraft/blob/master/src/src/main/java/org/redfrog404/mobycraft/Moby.java.

     

    The mod has a bunch of other JARs bundled with it into a shadow JAR. I use the shadowJar plugin in the build.gradle file to make it. I put the shadow JAR into the mods folder and got the above error.

     

    The next thing I tried was to convert the shadow JAR to a ZIP file and remove the mod files. I placed the mod files into a separate JAR, which I will call the mod JAR. I called the JAR with everything but the mod files as the dependency JAR. I tried putting both the mod JAR and the dependency JAR into the mods folder, but that gave me a different error - the mod JAR was not able to find the classes from the dependency JAR.

     

    Any suggestions on how to debug this further?

  10. Hi everyone,

     

    I am currently developing a mod that requires a lot of external libraries in the form of JAR files (around 15 or so libraries). I can run the project fine from Eclipse, but when I try to do "./gradlew build", it gives me a BUILD FAILED because it is unable to compile the references to the outside libraries. I tried searching up the problem and putting dependencies in the build.gradle file, but even the help links inside the file were not helpful. Can anyone please help me out?

  11. The 72000 seems irrelevant in the way I do it, but I don't really know what it does.

     

    @SubscribeEvent
    public void decreaseBowUseDuration(PlayerUseItemEvent.Start event) {
    if (event.item.getItem() == null) {
    	return;
    }
    
    if (!(event.item.getItem() instanceof ItemBow)) {
    	return;
    }
    
    event.duration -= 10
    }
    

     

    The 10 can be any number from 0 to 18, I think. The higher the number is, the more the duration will be decreased.

  12. My code:

     

    //package org.devoxx4kids.forge.mods;
    //
    //import net.minecraft.entity.player.EntityPlayer;
    //import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent;
    //import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
    //
    //public class Parachute {
    //	@SubscribeEvent
    //	public void deployParachute(LivingUpdateEvent event) {
    //		if (!(event.entity instanceof EntityPlayer)) {
    //			return;
    //		}
    //		if (!((EntityPlayer) event.entity).isAirBorne
    //				|| !((EntityPlayer) event.entity).isSneaking()) {
    //			return;
    //		}
    //		event.entity.motionY = -0.05;
    //		event.entity.fallDistance = -10;
    //	}
    //}
    package org.devoxx4kids.forge.aods;
    
    import net.minecraft.entity.player.EntityPlayer;
    import net.minecraft.util.DamageSource;
    import net.minecraftforge.event.entity.living.LivingFallEvent;
    import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
    import net.minecraftforge.fml.common.gameevent.TickEvent.PlayerTickEvent;
    
    public class Parachute {
    @SubscribeEvent
    public void deployParachute(PlayerTickEvent event) {
    	EntityPlayer player = event.player;
    	if (!player.isAirBorne || !player.isSneaking()) {
    		return;
    	}
    	player.motionY = -0.05;
    	player.fallDistance = 0;
    }
    
    @SubscribeEvent
    public void negateFallDamage(LivingFallEvent event) {
    	if (!(event.entity instanceof EntityPlayer)) {
    		return;
    	}
    
    	EntityPlayer player = (EntityPlayer) event.entity;
    
    	 if (!player.isSneaking()) {
    	 return;
    	 }
    
    	event.setCanceled(true);
    }
    }
    

  13. My code is as follows:

     

            @SubscribeEvent
    public void deployParachute(PlayerTickEvent event) {
    	EntityPlayer player = event.player;
    	if (!player.isAirBorne || !player.isSneaking()) {
    		return;
    	}
    	player.motionY = -0.05;
    	player.fallDistance = 0;
    }
    

     

    With this code, the parachute doesn't even deploy when I press shift in the air. What am I doing wrong?

×
×
  • Create New...

Important Information

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