Jump to content

ulfgur

Members
  • Posts

    25
  • Joined

  • Last visited

Everything posted by ulfgur

  1. I'm thinking about getting into forge modding again. How do you folks go about creating + editing entity models and animations? When I did some modding years ago, I was editing it in the code... but now that I'm a bit wiser, it occurs to me that there's probably a tool that'd make it a lot easier. Thanks!
  2. I tried shifting over to the shadow plugin, and while it does a very nice job of putting all the dependencies together, It produces a .zip file that is not recognized by minecraft as a mod. Do you know any tricks to either make it produce a compatible .jar, or get minecraft to recognize the zip? (the new build.gradle): // 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.2-SNAPSHOT' } dependencies { classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.3' } } apply plugin: 'net.minecraftforge.gradle.forge' apply plugin: 'com.github.johnrengelman.shadow' apply plugin: 'application' /* // 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.drools.minecraft" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "minecraft-drools-game" mainClassName='com.example.examplemod.ExampleMod' minecraft { version = "1.9.4-12.17.0.1976" 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 = "snapshot_20160518" // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable. } repositories { mavenLocal() maven{ name = "jboss" url = "https://repository.jboss.org/nexus/content/groups/public-jboss" } } dependencies { compile ('org.drools.game:drools-game-engine-core-impl:1.0-SNAPSHOT'){ exclude group: 'commons-io', module: 'commons-io' transitive = true } compile ('org.drools.game:drools-game-engine-horserace-kjar:1.0-SNAPSHOT'){ exclude group: 'commons-io', module: 'commons-io' transitive = true } runtime 'org.drools.game:drools-game-engine-horserace-kjar:1.0-SNAPSHOT' shadow ('org.drools.game:drools-game-engine-core-impl:1.0-SNAPSHOT'){ exclude group: 'commons-io', module: 'commons-io' exclude group: 'xmlpull', module: 'xmlpull' exclude group: 'org.slf4j', module: 'slf4j-api' transitive = true } shadow ('org.drools.game:drools-game-engine-horserace-kjar:1.0-SNAPSHOT'){ exclude group: 'xmlpull', module: 'xmlpull' exclude group: 'commons-io', module: 'commons-io' exclude group: 'org.slf4j', module: 'slf4j-api' transitive = true } } 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' } } shadowJar { baseName = 'horse-race-fatjar' classifier = null version = null mergeServiceFiles() }
  3. I have a couple gradle files. (was trying some things, and they got kind of stretched out.) /* root project build.gradle */ import org.gradle.api.artifacts.* apply plugin: 'base' // To add "clean" task to the root project. subprojects { apply from: rootProject.file('common.gradle') } task mergedJavadoc(type: Javadoc, description: 'Creates Javadoc from all the projects.') { title = 'All modules' destinationDir = new File(project.buildDir, 'merged-javadoc') // Note: The closures below are executed lazily. source { subprojects*.sourceSets*.main*.allSource } classpath.from { subprojects*.configurations*.compile*.copyRecursive({ !(it instanceof ProjectDependency); })*.resolve() } } /* root project common.gradle */ // // This file is to be applied to every subproject. // apply plugin: 'java' apply plugin: 'maven' String mavenGroupId = 'org.drools.minecraft' String mavenVersion = '1.0-SNAPSHOT' sourceCompatibility = '1.8' [compileJava, compileTestJava]*.options*.encoding = 'UTF-8' repositories { mavenCentral(); // You may define additional repositories, or even remove "mavenCentral()". // Read more about repositories here: // http://www.gradle.org/docs/current/userguide/dependency_management.html#sec:repositories } dependencies { // Adding dependencies here will add the dependencies to each subproject. testCompile group: 'junit', name: 'junit', version: '4.10' } String mavenArtifactId = name group = mavenGroupId version = mavenVersion task sourcesJar(type: Jar, dependsOn: classes, description: 'Creates a jar from the source files.') { classifier = 'sources' from sourceSets.main.allSource } artifacts { archives jar archives sourcesJar } configure(install.repositories.mavenInstaller) { pom.project { groupId = mavenGroupId artifactId = mavenArtifactId version = mavenVersion } } task createFolders(description: 'Creates the source folders if they do not exist.') doLast { sourceSets*.allSource*.srcDirs*.each { File srcDir -> if (!srcDir.isDirectory()) { println "Creating source folder: ${srcDir}" srcDir.mkdirs() } } } /* Root project settings.gradle */ rootProject.name = 'minecraft-drools-game' // Find the directories containing a "build.gradle" file in the root directory // of the project. That is, every directory containing a "build.gradle" will // be automatically the subproject of this project. def subDirs = rootDir.listFiles(new FileFilter() { public boolean accept(File file) { if (!file.isDirectory()) { return false } if (file.name == 'buildSrc') { return false } return new File(file, 'build.gradle').isFile() } }); subDirs.each { File dir -> include dir.name } /* mod build.gradle */ // 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.2-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.drools.minecraft" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "minecraft-drools-game" configurations { embed compile.extendsFrom(embed) } minecraft { version = "1.9.4-12.17.0.1976" 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 = "snapshot_20160518" // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable. } repositories { mavenLocal() maven{ name = "jboss" url = "https://repository.jboss.org/nexus/content/groups/public-jboss" } } dependencies { embed ('org.slf4j:slf4j-api:1.7.5') embed ('org.slf4j:jcl-over-slf4j:1.7.12') embed ('org.drools.game:drools-game-engine-core-impl:1.0-SNAPSHOT'){ exclude group: 'commons-io', module: 'commons-io' transitive = true } embed ('org.drools.game:drools-game-engine-horserace-kjar:1.0-SNAPSHOT'){ exclude group: 'commons-io', module: 'commons-io' transitive = true } runtime 'org.drools.game:drools-game-engine-horserace-kjar:1.0-SNAPSHOT' } 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' } } jar { duplicatesStrategy = DuplicatesStrategy.EXCLUDE from configurations.embed.collect { it.isDirectory() ? it : zipTree(it) } }
  4. Thanks, this is something I very much needed to know. Do you have any idea what could cause the problem in my first post, where built-in dependencies were not being found? At this point, even a general "well, you might look *here*, but I really don't know" would be massively useful.
  5. Is there any alternative for shaded (/fat) jars? In our case, the main problem of shaded jars is that we have serveral META-INF/ files in different jars that overlaps each other, and we will need to create a way to merge these files for the shaded approach. It will be interesting to know if there is a way to define the classpath of the mod in a different way, such a libs directory or a mod specific configuration file to define which dependencies needs to be picked up. Also for the org.slf4j.LoggerFactory issue, we can see the class being bundled inside the shaded jar, but for some reason minecraft is not picking it up. Is there any Classloader magic happening for mods?
  6. Heya, I'm having dependency troubles during mod loading. I have a set of dependencies including slf4j, and the mod is not finding them during load. It functions correctly in the development environment, and builds correctly, but as soon as I try to run the mod from forge, the dependency is not found. Here is the relevant section of my build file: dependencies { //both added as an effort to overcome the problem. embed ('org.slf4j:slf4j-api:1.7.5') embed ('org.slf4j:jcl-over-slf4j:1.7.12') //other dependencies } Here is the error I'm getting: java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory at org.drools.compiler.kie.builder.impl.KieContainerImpl.<clinit>(KieContainerImpl.java:84) ~[KieContainerImpl.class:?] at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieClasspathContainer(KieServicesImpl.java:99) ~[KieServicesImpl.class:?] at org.drools.compiler.kie.builder.impl.KieServicesImpl.getKieClasspathContainer(KieServicesImpl.java:82) ~[KieServicesImpl.class:?] at org.drools.compiler.kie.builder.impl.KieServicesImpl.getKieClasspathContainer(KieServicesImpl.java:73) ~[KieServicesImpl.class:?] at org.drools.game.core.GameSessionImpl.bootstrap(GameSessionImpl.java:92) ~[GameSessionImpl.class:?] at org.drools.minecraft.adapter.NewAdapter.bootstrapWorld(NewAdapter.java:83) ~[NewAdapter.class:?] at org.drools.minecraft.adapter.NewAdapter.<init>(NewAdapter.java:59) ~[NewAdapter.class:?] at org.drools.minecraft.adapter.NewAdapter.<clinit>(NewAdapter.java:43) ~[NewAdapter.class:?] at com.example.droolsinterface.InitCommon.preInit(InitCommon.java:29) ~[initCommon.class:?] at com.example.examplemod.ExampleMod.preInit(ExampleMod.java:23) ~[ExampleMod.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_25] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_25] at java.lang.reflect.Method.invoke(Method.java:483) ~[?:1.8.0_25] at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:566) ~[forge-1.9.4-12.17.0.1976.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_25] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_25] at java.lang.reflect.Method.invoke(Method.java:483) ~[?:1.8.0_25] at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?] at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?] at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:228) ~[forge-1.9.4-12.17.0.1976.jar:?] at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:206) ~[forge-1.9.4-12.17.0.1976.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_25] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_25] at java.lang.reflect.Method.invoke(Method.java:483) ~[?:1.8.0_25] at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?] at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?] at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:135) [LoadController.class:?] at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:586) [Loader.class:?] at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:249) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:437) [bcd.class:?] at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:349) [bcd.class:?] at net.minecraft.client.main.Main.main(SourceFile:124) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_25] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_25] at java.lang.reflect.Method.invoke(Method.java:483) ~[?:1.8.0_25] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:101) ~[launchwrapper-1.12.jar:?] at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_25] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_25] ... 47 more [10:18:07] [Client thread/INFO] [sTDOUT/]: [net.minecraft.init.Bootstrap:func_179870_a:560]: ---- Minecraft Crash Report ---- // Surprise! Haha. Well, this is awkward. Time: 8/3/16 10:18 AM Description: There was a severe problem during mod loading that has caused the game to fail net.minecraftforge.fml.common.LoaderException: java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory at net.minecraftforge.fml.common.LoadController.transition(LoadController.java:179) at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:589) at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:249) at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:437) at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:349) 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:483) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) Caused by: java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory at org.drools.compiler.kie.builder.impl.KieContainerImpl.<clinit>(KieContainerImpl.java:84) at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieClasspathContainer(KieServicesImpl.java:99) at org.drools.compiler.kie.builder.impl.KieServicesImpl.getKieClasspathContainer(KieServicesImpl.java:82) at org.drools.compiler.kie.builder.impl.KieServicesImpl.getKieClasspathContainer(KieServicesImpl.java:73) at org.drools.game.core.GameSessionImpl.bootstrap(GameSessionImpl.java:92) at org.drools.minecraft.adapter.NewAdapter.bootstrapWorld(NewAdapter.java:83) at org.drools.minecraft.adapter.NewAdapter.<init>(NewAdapter.java:59) at org.drools.minecraft.adapter.NewAdapter.<clinit>(NewAdapter.java:43) at com.example.droolsinterface.InitCommon.preInit(InitCommon.java:29) at com.example.examplemod.ExampleMod.preInit(ExampleMod.java:23) 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:483) at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:566) 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:483) 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:228) at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:206) 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:483) 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:135) at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:586) ... 10 more Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:101) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 47 more I also tried adding { "name": "org.slf4j:slf4j-api:1.7.2”, "url": "http://files.minecraftforge.net/maven/" } to the "libraries" section in minecraft's configuration files, for my version of Forge. This didn't work, either. Any ideas how to effectively add dependencies?
  7. Agh. Should have thought to try that. Thank you! It's up and working!
  8. I've got my mob working, analyzed much of the code, heaped wonderful loads of custom behaviors on it, and have it spawning in my custom biome. I'd like to add it to some of the mob spawners I sprinkle around the world. Unfortunately, when the mob spawner is generated, it's empty. (registration:) EntityRegistry.registerModEntity(EntityTutorialMob.class, "TutorialMob", EntityUniqueIDFinder.getID(), MinecraftByExample.instance, 230, 3, true); (The code that eventually creates the spawner:) WorldGenHelpers.genMobSpawner(world, pos.add(2, 1, 2), "TutorialMob"); //Then, in a different class: public static void genMobSpawner(World world, BlockPos pos, String mobName) { world.setBlockState(pos, Blocks.mob_spawner.getDefaultState(), 2); TileEntity tileentity = world.getTileEntity(pos); if (tileentity instanceof TileEntityMobSpawner) { ((TileEntityMobSpawner)tileentity).getSpawnerBaseLogic().setEntityName(mobName); } } Any ideas?
  9. It was the update frequency that worked from my other entities, all of which are projectiles (for those, the update frequency was used by some tutorial I saw somewhere). I take it the update frequency should be something different? I did try upping it to 200, which didn't help at all. What value would you suggest? (also, am I doing it wrong for the particles, too?)
  10. in commonproxy: EntityRegistry.registerModEntity(EntityTutorialMob.class, "TutorialMob", EntityUniqueIDFinder.getID(), MinecraftByExample.instance, 230, 78, true); in clientproxy: RenderManager reman = Minecraft.getMinecraft().getRenderManager(); RenderingRegistry.registerEntityRenderingHandler(EntityTutorialMob.class, new RenderTutorialMob(reman, new ModelChicken(), .5F)); ...the stuff about entityUniqueIDFinder references this class: public class EntityUniqueIDFinder { public static int currentID = -1; public static int getID() { currentID++; return currentID; } } ...after reading your advice (but before understanding what you meant), I thought I wasn't supposed to define my own global ID, and tried using EntityRegistry.findGlobalUniqueEntityId() where that code was. It didn't work, (I was obviously doing something the stupid way), so I just wrote my own so I didn't have to track the all my entity ID numbers. Why? I'm gonna take it apart and find out how everything works later... This mod will not be released to the public...
  11. Thank you! That partially worked! The mobs are visible... ..Now, I'm having a problem where the mobs kinda jerk around and teleport, while displaying chicken behaviors. (I'll hold seeds, they'll walk-teleport to me). They still animate. Any ideas? EDIT: My render & entity classes are literally copy-pasted (then refactored) from the chicken's. I'm getting something stupid-simple to work before I play with anything more complex.
  12. This is my first time through building a custom mob. I'm taking the chicken as my base, and ATM am just trying to get it to render & behave like a chicken. I can spawn the mob. I'm guessing it has chicken-like behaviors, but I can't see it. I can, however, hear it. Here is my registration code: //in client proxy, init RenderManager reman = Minecraft.getMinecraft().getRenderManager(); RenderItem reIt = Minecraft.getMinecraft().getRenderItem(); RenderingRegistry.registerEntityRenderingHandler(EntityTutorialMob.class, new RenderTutorialMob(reman, new ModelChicken(), 0.5F)); //////////////////////////////////////////////////////////////////////////////////////// //in common proxy, init EntityRegistry.registerGlobalEntityID(EntityTutorialMob.class, "TutorialMob", 900, 230, 78); Spawning the mob results in the following errors: java.util.concurrent.ExecutionException: java.lang.NullPointerException at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.7.0_79] at java.util.concurrent.FutureTask.get(FutureTask.java:188) ~[?:1.7.0_79] at net.minecraftforge.fml.common.FMLCommonHandler.callFuture(FMLCommonHandler.java:677) [FMLCommonHandler.class:?] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1011) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:345) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:117) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_79] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_79] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_79] at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_79] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78) [start/:?] at GradleStart.main(GradleStart.java:45) [start/:?] Caused by: java.lang.NullPointerException at net.minecraft.client.network.NetHandlerPlayClient.handleSpawnMob(NetHandlerPlayClient.java:818) ~[NetHandlerPlayClient.class:?] at net.minecraft.network.play.server.S0FPacketSpawnMob.func_180721_a(S0FPacketSpawnMob.java:120) ~[s0FPacketSpawnMob.class:?] at net.minecraft.network.play.server.S0FPacketSpawnMob.processPacket(S0FPacketSpawnMob.java:136) ~[s0FPacketSpawnMob.class:?] at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:18) ~[PacketThreadUtil$1.class:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) ~[?:1.7.0_79] at java.util.concurrent.FutureTask.run(FutureTask.java:262) ~[?:1.7.0_79] at net.minecraftforge.fml.common.FMLCommonHandler.callFuture(FMLCommonHandler.java:676) ~[FMLCommonHandler.class:?] ... 11 more [08:06:24] [Client thread/WARN]: Skipping Entity with id -24 [08:06:24] [Client thread/FATAL] [FML]: Exception caught executing FutureTask: java.util.concurrent.ExecutionException: java.lang.NullPointerException java.util.concurrent.ExecutionException: java.lang.NullPointerException at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.7.0_79] at java.util.concurrent.FutureTask.get(FutureTask.java:188) ~[?:1.7.0_79] at net.minecraftforge.fml.common.FMLCommonHandler.callFuture(FMLCommonHandler.java:677) [FMLCommonHandler.class:?] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1011) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:345) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:117) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_79] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_79] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_79] at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_79] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78) [start/:?] at GradleStart.main(GradleStart.java:45) [start/:?] Caused by: java.lang.NullPointerException at net.minecraft.client.network.NetHandlerPlayClient.handleSpawnMob(NetHandlerPlayClient.java:818) ~[NetHandlerPlayClient.class:?] at net.minecraft.network.play.server.S0FPacketSpawnMob.func_180721_a(S0FPacketSpawnMob.java:120) ~[s0FPacketSpawnMob.class:?] at net.minecraft.network.play.server.S0FPacketSpawnMob.processPacket(S0FPacketSpawnMob.java:136) ~[s0FPacketSpawnMob.class:?] at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:18) ~[PacketThreadUtil$1.class:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) ~[?:1.7.0_79] at java.util.concurrent.FutureTask.run(FutureTask.java:262) ~[?:1.7.0_79] at net.minecraftforge.fml.common.FMLCommonHandler.callFuture(FMLCommonHandler.java:676) ~[FMLCommonHandler.class:?] ... 11 more [08:06:24] [Client thread/WARN]: Skipping Entity with id -24 [08:06:24] [Client thread/FATAL] [FML]: Exception caught executing FutureTask: java.util.concurrent.ExecutionException: java.lang.NullPointerException java.util.concurrent.ExecutionException: java.lang.NullPointerException at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.7.0_79] at java.util.concurrent.FutureTask.get(FutureTask.java:188) ~[?:1.7.0_79] at net.minecraftforge.fml.common.FMLCommonHandler.callFuture(FMLCommonHandler.java:677) [FMLCommonHandler.class:?] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1011) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:345) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:117) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_79] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_79] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_79] at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_79] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78) [start/:?] at GradleStart.main(GradleStart.java:45) [start/:?] Caused by: java.lang.NullPointerException at net.minecraft.client.network.NetHandlerPlayClient.handleSpawnMob(NetHandlerPlayClient.java:818) ~[NetHandlerPlayClient.class:?] at net.minecraft.network.play.server.S0FPacketSpawnMob.func_180721_a(S0FPacketSpawnMob.java:120) ~[s0FPacketSpawnMob.class:?] at net.minecraft.network.play.server.S0FPacketSpawnMob.processPacket(S0FPacketSpawnMob.java:136) ~[s0FPacketSpawnMob.class:?] at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:18) ~[PacketThreadUtil$1.class:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) ~[?:1.7.0_79] at java.util.concurrent.FutureTask.run(FutureTask.java:262) ~[?:1.7.0_79] at net.minecraftforge.fml.common.FMLCommonHandler.callFuture(FMLCommonHandler.java:676) ~[FMLCommonHandler.class:?] ... 11 more [08:06:24] [Client thread/WARN]: Skipping Entity with id -24 [08:06:24] [Client thread/FATAL] [FML]: Exception caught executing FutureTask: java.util.concurrent.ExecutionException: java.lang.NullPointerException java.util.concurrent.ExecutionException: java.lang.NullPointerException at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.7.0_79] at java.util.concurrent.FutureTask.get(FutureTask.java:188) ~[?:1.7.0_79] at net.minecraftforge.fml.common.FMLCommonHandler.callFuture(FMLCommonHandler.java:677) [FMLCommonHandler.class:?] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1011) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:345) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:117) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_79] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_79] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_79] at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_79] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78) [start/:?] at GradleStart.main(GradleStart.java:45) [start/:?] Caused by: java.lang.NullPointerException at net.minecraft.client.network.NetHandlerPlayClient.handleSpawnMob(NetHandlerPlayClient.java:818) ~[NetHandlerPlayClient.class:?] at net.minecraft.network.play.server.S0FPacketSpawnMob.func_180721_a(S0FPacketSpawnMob.java:120) ~[s0FPacketSpawnMob.class:?] at net.minecraft.network.play.server.S0FPacketSpawnMob.processPacket(S0FPacketSpawnMob.java:136) ~[s0FPacketSpawnMob.class:?] at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:18) ~[PacketThreadUtil$1.class:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) ~[?:1.7.0_79] at java.util.concurrent.FutureTask.run(FutureTask.java:262) ~[?:1.7.0_79] at net.minecraftforge.fml.common.FMLCommonHandler.callFuture(FMLCommonHandler.java:676) ~[FMLCommonHandler.class:?] ... 11 more [08:06:24] [Client thread/WARN]: Skipping Entity with id -24 [08:06:24] [Client thread/FATAL] [FML]: Exception caught executing FutureTask: java.util.concurrent.ExecutionException: java.lang.NullPointerException java.util.concurrent.ExecutionException: java.lang.NullPointerException at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.7.0_79] at java.util.concurrent.FutureTask.get(FutureTask.java:188) ~[?:1.7.0_79] at net.minecraftforge.fml.common.FMLCommonHandler.callFuture(FMLCommonHandler.java:677) [FMLCommonHandler.class:?] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1011) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:345) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:117) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_79] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_79] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_79] at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_79] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78) [start/:?] at GradleStart.main(GradleStart.java:45) [start/:?] Caused by: java.lang.NullPointerException at net.minecraft.client.network.NetHandlerPlayClient.handleSpawnMob(NetHandlerPlayClient.java:818) ~[NetHandlerPlayClient.class:?] at net.minecraft.network.play.server.S0FPacketSpawnMob.func_180721_a(S0FPacketSpawnMob.java:120) ~[s0FPacketSpawnMob.class:?] at net.minecraft.network.play.server.S0FPacketSpawnMob.processPacket(S0FPacketSpawnMob.java:136) ~[s0FPacketSpawnMob.class:?] at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:18) ~[PacketThreadUtil$1.class:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) ~[?:1.7.0_79] at java.util.concurrent.FutureTask.run(FutureTask.java:262) ~[?:1.7.0_79] at net.minecraftforge.fml.common.FMLCommonHandler.callFuture(FMLCommonHandler.java:676) ~[FMLCommonHandler.class:?] ... 11 more [08:06:24] [Client thread/WARN]: Skipping Entity with id -24 [08:06:24] [Client thread/FATAL] [FML]: Exception caught executing FutureTask: java.util.concurrent.ExecutionException: java.lang.NullPointerException java.util.concurrent.ExecutionException: java.lang.NullPointerException at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.7.0_79] at java.util.concurrent.FutureTask.get(FutureTask.java:188) ~[?:1.7.0_79] at net.minecraftforge.fml.common.FMLCommonHandler.callFuture(FMLCommonHandler.java:677) [FMLCommonHandler.class:?] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1011) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:345) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:117) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_79] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_79] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_79] at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_79] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78) [start/:?] at GradleStart.main(GradleStart.java:45) [start/:?] Caused by: java.lang.NullPointerException at net.minecraft.client.network.NetHandlerPlayClient.handleSpawnMob(NetHandlerPlayClient.java:818) ~[NetHandlerPlayClient.class:?] at net.minecraft.network.play.server.S0FPacketSpawnMob.func_180721_a(S0FPacketSpawnMob.java:120) ~[s0FPacketSpawnMob.class:?] at net.minecraft.network.play.server.S0FPacketSpawnMob.processPacket(S0FPacketSpawnMob.java:136) ~[s0FPacketSpawnMob.class:?] at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:18) ~[PacketThreadUtil$1.class:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) ~[?:1.7.0_79] at java.util.concurrent.FutureTask.run(FutureTask.java:262) ~[?:1.7.0_79] at net.minecraftforge.fml.common.FMLCommonHandler.callFuture(FMLCommonHandler.java:676) ~[FMLCommonHandler.class:?] ... 11 more [08:06:24] [Client thread/WARN]: Skipping Entity with id -24 [08:06:24] [Client thread/FATAL] [FML]: Exception caught executing FutureTask: java.util.concurrent.ExecutionException: java.lang.NullPointerException java.util.concurrent.ExecutionException: java.lang.NullPointerException at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.7.0_79] at java.util.concurrent.FutureTask.get(FutureTask.java:188) ~[?:1.7.0_79] at net.minecraftforge.fml.common.FMLCommonHandler.callFuture(FMLCommonHandler.java:677) [FMLCommonHandler.class:?] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1011) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:345) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:117) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_79] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_79] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_79] at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_79] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78) [start/:?] at GradleStart.main(GradleStart.java:45) [start/:?] Caused by: java.lang.NullPointerException at net.minecraft.client.network.NetHandlerPlayClient.handleSpawnMob(NetHandlerPlayClient.java:818) ~[NetHandlerPlayClient.class:?] at net.minecraft.network.play.server.S0FPacketSpawnMob.func_180721_a(S0FPacketSpawnMob.java:120) ~[s0FPacketSpawnMob.class:?] at net.minecraft.network.play.server.S0FPacketSpawnMob.processPacket(S0FPacketSpawnMob.java:136) ~[s0FPacketSpawnMob.class:?] at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:18) ~[PacketThreadUtil$1.class:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) ~[?:1.7.0_79] at java.util.concurrent.FutureTask.run(FutureTask.java:262) ~[?:1.7.0_79] at net.minecraftforge.fml.common.FMLCommonHandler.callFuture(FMLCommonHandler.java:676) ~[FMLCommonHandler.class:?] ... 11 more [08:06:24] [Client thread/WARN]: Skipping Entity with id -24 [08:06:24] [Client thread/FATAL] [FML]: Exception caught executing FutureTask: java.util.concurrent.ExecutionException: java.lang.NullPointerException java.util.concurrent.ExecutionException: java.lang.NullPointerException at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.7.0_79] at java.util.concurrent.FutureTask.get(FutureTask.java:188) ~[?:1.7.0_79] at net.minecraftforge.fml.common.FMLCommonHandler.callFuture(FMLCommonHandler.java:677) [FMLCommonHandler.class:?] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1011) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:345) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:117) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_79] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_79] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_79] at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_79] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78) [start/:?] at GradleStart.main(GradleStart.java:45) [start/:?] Caused by: java.lang.NullPointerException at net.minecraft.client.network.NetHandlerPlayClient.handleSpawnMob(NetHandlerPlayClient.java:818) ~[NetHandlerPlayClient.class:?] at net.minecraft.network.play.server.S0FPacketSpawnMob.func_180721_a(S0FPacketSpawnMob.java:120) ~[s0FPacketSpawnMob.class:?] at net.minecraft.network.play.server.S0FPacketSpawnMob.processPacket(S0FPacketSpawnMob.java:136) ~[s0FPacketSpawnMob.class:?] at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:18) ~[PacketThreadUtil$1.class:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) ~[?:1.7.0_79] at java.util.concurrent.FutureTask.run(FutureTask.java:262) ~[?:1.7.0_79] at net.minecraftforge.fml.common.FMLCommonHandler.callFuture(FMLCommonHandler.java:676) ~[FMLCommonHandler.class:?] ... 11 more [08:06:24] [Client thread/WARN]: Skipping Entity with id -24 [08:06:24] [Client thread/FATAL] [FML]: Exception caught executing FutureTask: java.util.concurrent.ExecutionException: java.lang.NullPointerException java.util.concurrent.ExecutionException: java.lang.NullPointerException at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.7.0_79] at java.util.concurrent.FutureTask.get(FutureTask.java:188) ~[?:1.7.0_79] at net.minecraftforge.fml.common.FMLCommonHandler.callFuture(FMLCommonHandler.java:677) [FMLCommonHandler.class:?] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1011) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:345) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:117) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_79] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_79] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_79] at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_79] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78) [start/:?] at GradleStart.main(GradleStart.java:45) [start/:?] Caused by: java.lang.NullPointerException at net.minecraft.client.network.NetHandlerPlayClient.handleSpawnMob(NetHandlerPlayClient.java:818) ~[NetHandlerPlayClient.class:?] at net.minecraft.network.play.server.S0FPacketSpawnMob.func_180721_a(S0FPacketSpawnMob.java:120) ~[s0FPacketSpawnMob.class:?] at net.minecraft.network.play.server.S0FPacketSpawnMob.processPacket(S0FPacketSpawnMob.java:136) ~[s0FPacketSpawnMob.class:?] at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:18) ~[PacketThreadUtil$1.class:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) ~[?:1.7.0_79] at java.util.concurrent.FutureTask.run(FutureTask.java:262) ~[?:1.7.0_79] at net.minecraftforge.fml.common.FMLCommonHandler.callFuture(FMLCommonHandler.java:676) ~[FMLCommonHandler.class:?] ... 11 more [08:06:24] [Client thread/WARN]: Skipping Entity with id -24 [08:06:24] [Client thread/FATAL] [FML]: Exception caught executing FutureTask: java.util.concurrent.ExecutionException: java.lang.NullPointerException java.util.concurrent.ExecutionException: java.lang.NullPointerException at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.7.0_79] at java.util.concurrent.FutureTask.get(FutureTask.java:188) ~[?:1.7.0_79] at net.minecraftforge.fml.common.FMLCommonHandler.callFuture(FMLCommonHandler.java:677) [FMLCommonHandler.class:?] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1011) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:345) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:117) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_79] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_79] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_79] at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_79] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78) [start/:?] at GradleStart.main(GradleStart.java:45) [start/:?] Caused by: java.lang.NullPointerException at net.minecraft.client.network.NetHandlerPlayClient.handleSpawnMob(NetHandlerPlayClient.java:818) ~[NetHandlerPlayClient.class:?] at net.minecraft.network.play.server.S0FPacketSpawnMob.func_180721_a(S0FPacketSpawnMob.java:120) ~[s0FPacketSpawnMob.class:?] at net.minecraft.network.play.server.S0FPacketSpawnMob.processPacket(S0FPacketSpawnMob.java:136) ~[s0FPacketSpawnMob.class:?] at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:18) ~[PacketThreadUtil$1.class:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) ~[?:1.7.0_79] at java.util.concurrent.FutureTask.run(FutureTask.java:262) ~[?:1.7.0_79] at net.minecraftforge.fml.common.FMLCommonHandler.callFuture(FMLCommonHandler.java:676) ~[FMLCommonHandler.class:?] ... 11 more [08:06:24] [Client thread/WARN]: Skipping Entity with id -24 [08:06:24] [Client thread/FATAL] [FML]: Exception caught executing FutureTask: java.util.concurrent.ExecutionException: java.lang.NullPointerException java.util.concurrent.ExecutionException: java.lang.NullPointerException at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.7.0_79] at java.util.concurrent.FutureTask.get(FutureTask.java:188) ~[?:1.7.0_79] at net.minecraftforge.fml.common.FMLCommonHandler.callFuture(FMLCommonHandler.java:677) [FMLCommonHandler.class:?] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1011) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:345) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:117) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_79] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_79] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_79] at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_79] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78) [start/:?] at GradleStart.main(GradleStart.java:45) [start/:?] Caused by: java.lang.NullPointerException at net.minecraft.client.network.NetHandlerPlayClient.handleSpawnMob(NetHandlerPlayClient.java:818) ~[NetHandlerPlayClient.class:?] at net.minecraft.network.play.server.S0FPacketSpawnMob.func_180721_a(S0FPacketSpawnMob.java:120) ~[s0FPacketSpawnMob.class:?] at net.minecraft.network.play.server.S0FPacketSpawnMob.processPacket(S0FPacketSpawnMob.java:136) ~[s0FPacketSpawnMob.class:?] at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:18) ~[PacketThreadUtil$1.class:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) ~[?:1.7.0_79] at java.util.concurrent.FutureTask.run(FutureTask.java:262) ~[?:1.7.0_79] at net.minecraftforge.fml.common.FMLCommonHandler.callFuture(FMLCommonHandler.java:676) ~[FMLCommonHandler.class:?] ... 11 more [08:06:24] [Client thread/WARN]: Skipping Entity with id -24 [08:06:24] [Client thread/FATAL] [FML]: Exception caught executing FutureTask: java.util.concurrent.ExecutionException: java.lang.NullPointerException java.util.concurrent.ExecutionException: java.lang.NullPointerException at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.7.0_79] at java.util.concurrent.FutureTask.get(FutureTask.java:188) ~[?:1.7.0_79] at net.minecraftforge.fml.common.FMLCommonHandler.callFuture(FMLCommonHandler.java:677) [FMLCommonHandler.class:?] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1011) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:345) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:117) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_79] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_79] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_79] at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_79] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78) [start/:?] at GradleStart.main(GradleStart.java:45) [start/:?] Caused by: java.lang.NullPointerException at net.minecraft.client.network.NetHandlerPlayClient.handleSpawnMob(NetHandlerPlayClient.java:818) ~[NetHandlerPlayClient.class:?] at net.minecraft.network.play.server.S0FPacketSpawnMob.func_180721_a(S0FPacketSpawnMob.java:120) ~[s0FPacketSpawnMob.class:?] at net.minecraft.network.play.server.S0FPacketSpawnMob.processPacket(S0FPacketSpawnMob.java:136) ~[s0FPacketSpawnMob.class:?] at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:18) ~[PacketThreadUtil$1.class:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) ~[?:1.7.0_79] at java.util.concurrent.FutureTask.run(FutureTask.java:262) ~[?:1.7.0_79] at net.minecraftforge.fml.common.FMLCommonHandler.callFuture(FMLCommonHandler.java:676) ~[FMLCommonHandler.class:?] ... 11 more [08:06:24] [Client thread/WARN]: Skipping Entity with id -24 [08:06:24] [Client thread/FATAL] [FML]: Exception caught executing FutureTask: java.util.concurrent.ExecutionException: java.lang.NullPointerException java.util.concurrent.ExecutionException: java.lang.NullPointerException at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.7.0_79] at java.util.concurrent.FutureTask.get(FutureTask.java:188) ~[?:1.7.0_79] at net.minecraftforge.fml.common.FMLCommonHandler.callFuture(FMLCommonHandler.java:677) [FMLCommonHandler.class:?] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1011) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:345) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:117) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_79] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_79] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_79] at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_79] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78) [start/:?] at GradleStart.main(GradleStart.java:45) [start/:?] Caused by: java.lang.NullPointerException at net.minecraft.client.network.NetHandlerPlayClient.handleSpawnMob(NetHandlerPlayClient.java:818) ~[NetHandlerPlayClient.class:?] at net.minecraft.network.play.server.S0FPacketSpawnMob.func_180721_a(S0FPacketSpawnMob.java:120) ~[s0FPacketSpawnMob.class:?] at net.minecraft.network.play.server.S0FPacketSpawnMob.processPacket(S0FPacketSpawnMob.java:136) ~[s0FPacketSpawnMob.class:?] at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:18) ~[PacketThreadUtil$1.class:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) ~[?:1.7.0_79] at java.util.concurrent.FutureTask.run(FutureTask.java:262) ~[?:1.7.0_79] at net.minecraftforge.fml.common.FMLCommonHandler.callFuture(FMLCommonHandler.java:676) ~[FMLCommonHandler.class:?] ... 11 more Any idea what could be causing this? Thanks.
  13. The following code-dump comes with a warning: this works great in SP, but it may be causing crashes in MP. I haven't tested enough yet. public class PlantGenerator extends WorldGenerator { @Override public boolean generate(World worldIn, Random rand, BlockPos pos) { BlockPos tempPos; BlockPos topPos; /* * generate strawberries */ if(worldIn.getBiomeGenForCoords(pos) instanceof BiomeGenSwamp) { for(int i = 0; i < 1; i++) { if(rand.nextFloat() < .4f) { tempPos = pos; int x = rand.nextInt(16) - 8; int z = rand.nextInt(16) - 8; tempPos = tempPos.add(x, 0, z); int y = worldIn.getHorizon(tempPos).getY(); topPos = tempPos.add(0, y, 0); if(StartupCommon.blockStrawberry.canPlaceBlockAt(worldIn, topPos)); { worldIn.setBlockState(topPos, StartupCommon.blockStrawberry.getDefaultState()); for(int ix = -1; ix <= 1; ix++){ for(int iy = -1; iy <= 1; iy++){ for(int iz = -1; iz <= 1; iz++){ if(rand.nextFloat() < .4f) { tempPos = topPos.add(ix, iy, iz); if (Blocks.double_plant.canPlaceBlockAt(worldIn, tempPos)) { worldIn.setBlockState(tempPos, StartupCommon.blockStrawberry.getDefaultState()); } } } } } } } } } return false; } public class WldGen implements IWorldGenerator { @Override public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { if(!world.isRemote) { BlockPos pos = new BlockPos(chunkX * 16, 0, chunkZ * 16); //for my structures, not related to this mod //(new StructureGen()).generate(world, random, pos); (new PlantGenerator()).generate(world, random, pos); } } } ...and then in the mod's startup: GameRegistry.registerWorldGenerator(new WldGen(), 1);
  14. Thanks for the help! After some fiddling, working with the advice, and looking at those resources, I have the plant & it's seeds fully functional and spawning in swamps and snazzy. (for those of you searching who find this in three months, there were stupid problems with my JSONs that I fixed, some readability problems with my PNGs, and the problems alias and jabelar mentioned.)
  15. Lol... Didn't expect you to. I find that if I figure it out on my own, I remember how to do things for longer. Vanilla is so big that, while I took a look at things inside it, I was unable to extrapolate (all of) what to do. ...So, here's some of my code: (I don't know what's failing, so I'm putting all of it here. Sorry. ) I'm creating a strawberry. I'm not working from seeds atm, and don't have growth implemented yet. That comes after I have something both placeable and visible. public class BlockStrawberry extends BlockBush implements IGrowable { public static final PropertyInteger AGE = PropertyInteger.create("age", 0, 4); public BlockStrawberry() { super(Material.plants); //This line will cause another crash //this.setDefaultState(this.blockState.getBaseState().withProperty(AGE, Integer.valueOf(0))); this.setStepSound(soundTypeGrass); this.setCreativeTab(CreativeTabs.tabFood); float sizeConst = 0.5F; this.setBlockBounds(0.5F - sizeConst, 0.0F, 0.5F - sizeConst, 0.5F + sizeConst, 0.25F, 0.5F + sizeConst); this.setHardness(0.0F); } @Override public boolean isOpaqueCube() { return false; } @Override public int getRenderType() { return 6; } @Override public boolean canGrow(World worldIn, BlockPos pos, IBlockState state, boolean isClient) { // TODO Auto-generated method stub return false; } @Override public boolean canUseBonemeal(World worldIn, Random rand, BlockPos pos, IBlockState state) { // TODO Auto-generated method stub return false; } @Override public void grow(World worldIn, Random rand, BlockPos pos, IBlockState state) { // TODO Auto-generated method stub } protected BlockState createBlockState() { return new BlockState(this, new IProperty[] {AGE}); } } ATM, this code will crash the game: java.lang.IllegalArgumentException: Don't know how to convert minecraftbyexample:strawberries[age=0] back into data... at net.minecraft.block.Block.getMetaFromState(Block.java:225) ~[block.class:?] I "solved" (appeased) it by commenting out the stuff about propertyInteger temporarily to get a placeable, visible block. The code in StartupClientOnly: final int DEFAULT_ITEM_SUBTYPE = 0; Item itemStrawberries = GameRegistry.findItem("minecraftbyexample", "strawberries"); ModelResourceLocation strawberriesModelResourceLocation = new ModelResourceLocation("minecraftbyexample:strawberries", "inventory"); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(itemStrawberries, DEFAULT_ITEM_SUBTYPE, strawberriesModelResourceLocation); the code in StartupCommon blockStrawberry = (BlockStrawberry)(new BlockStrawberry()); GameRegistry.registerBlock(blockStrawberry, "strawberries"); ...and lastly, the JSONs (in models/item) { "parent": "minecraftbyexample:block/strawberries_0", "display": { "thirdperson": { "rotation": [ 10, -45, 170 ], "translation": [ 0, 1.5, -2.75 ], "scale": [ 0.375, 0.375, 0.375 ] } } } (in models/block) (name: strawberries) { "parent": "block/crop", "textures": { "crop": "minecraftbyexample:blocks/strawberries-0" } } (name strawberries_0, strawberries_1, etc, up to 4) { "parent": "block/crop", "textures": { "crop": "minecraftbyexample:blocks/strawberries-0" } } (in blockstates) { "variants": { "age=0": { "model": "strawberries_0" }, "age=1": { "model": "strawberries_1" }, "age=2": { "model": "strawberries_2" }, "age=3": { "model": "strawberries_3" }, "age=4": { "model": "strawberries_4" } } } The current behavior: my plant renders in my inventory, and can be placed. I can see the little highlight box around it. The problem: it doesn't render in the world. Additional questions: I really don't understand how the "switching models/textures by using metadata" thing works... So, once the rendering for the base plant is fixed, you can bet that'll be the next question... ...yes, I did start my mod by extending off of minecraftbyexample. It's wonderfully convenient, even if it does make me some sort of horrible parasite thing.
  16. I'm playing with plants, and can't seem to get the rendering working. Does someone have a working example I can look at? Thanks.
  17. That's very doable... Here's the chunk of "chest-writing" code I use: public static void genChest(World world, BlockPos pos, ArrayList<ItemStack> items) { world.setBlockState(pos, Blocks.chest.getDefaultState(), 2); TileEntity tileentity = world.getTileEntity(pos); int incrementer = 0; if (tileentity instanceof TileEntityChest) { for(int i = 0; i < items.size(); i++) { ((TileEntityChest)tileentity).setInventorySlotContents(incrementer, items.get(i)); incrementer++; } } }
  18. Hey, I am quite interested in using the source code as a base for personal-use mods. It's difficult to find any references or tutorials for world generation for 1.8, and I'd really like to play around in that particular sandbox. If you could post a download location for any of the versions, I'd be extremely grateful.
  19. I'm totally new as well, and was having similar problems... yesterday? Yesterday, I think. Anyways, I've been building my mod off of this, and it's worked out great! http://www.minecraftforge.net/forum/index.php/topic,27474.msg140662.html#msg140662
  20. Hi, I'm working in 1.8. I have successfully made several projectile weapons, all of which used bullets. Now I'm working on throwing knives, and want my projectile rotated like an arrow, so that it starts (and continues) facing away from the player, instead of being parallel to the camera angle. How do I accomplish this? I'm not sure what code is relevant yet, if any, so sorry if I'm spraying irrelevant code all over the place. Here's my renderer: public void doRender(Entity entity, double x, double y, double z, float p_76986_8_, float partialTicks) { GlStateManager.pushMatrix(); GlStateManager.translate((float)x, (float)y, (float)z); GlStateManager.enableRescaleNormal(); GlStateManager.scale(0.5F, 0.5F, 0.5F); //I tried changing this a couple different ways, but nothing happened. It's //possible that if this is the method I'm looking for, I just don't know how //use it. GlStateManager.rotate(-this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F); GlStateManager.rotate(this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F); this.bindTexture(modelResourceLocation); this.renderitem.renderItemModel(this.convertEntitytoStack(entity)); GlStateManager.disableRescaleNormal(); GlStateManager.popMatrix(); super.doRender(entity, x, y, z, p_76986_8_, partialTicks); } And here's the constructor for the entity. public class EntityThrowingKnife extends EntityThrowable { public static final float speed = 1; public static final float inacurracy = .35f; public EntityThrowingKnife(World world) { super(world); this.motionX += calcinaccuracy(); this.motionY += calcinaccuracy(); this.motionZ += calcinaccuracy(); this.motionX *= speed; this.motionY *= speed; this.motionZ *= speed; } public EntityThrowingKnife(World world, EntityLivingBase par2EntityLivingBase) { super(world, par2EntityLivingBase); this.motionX += calcinaccuracy(); this.motionY += calcinaccuracy(); this.motionZ += calcinaccuracy(); this.motionX *= speed; this.motionY *= speed; this.motionZ *= speed; } public float calcinaccuracy() { return (rand.nextFloat() * inacurracy) - (.5f * inacurracy); } //..... Thanks!
  21. I just found my stupid error! When I registered my entities, I gave them all the same ID, which was causing a big part of the problem. I really appreciate your help. Thank you!
  22. It's still doing exactly the same thing, but now I'm getting the following error the first time I fire one of the weapons. I also stuck a println in RenderGrapeshot, and it looks like RenderGrapeshot's doRender is never called. Weird. 0.o [09:34:59] [Client thread/WARN]: Failed to load texture: minecraftbyexample:musketball#normal java.io.FileNotFoundException: minecraftbyexample:musketball#normal at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:70) ~[FallbackResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:67) ~[simpleReloadableResourceManager.class:?] at net.minecraft.client.renderer.texture.SimpleTexture.loadTexture(SimpleTexture.java:34) ~[simpleTexture.class:?] at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:70) [TextureManager.class:?] at net.minecraft.client.renderer.texture.TextureManager.bindTexture(TextureManager.java:44) [TextureManager.class:?] at net.minecraft.client.renderer.entity.Render.bindTexture(Render.java:86) [Render.class:?] at minecraftbyexample.mbe10_item_simple.RenderMusketBall.doRender(RenderMusketBall.java:46) [RenderMusketBall.class:?] at net.minecraft.client.renderer.entity.RenderManager.doRenderEntity(RenderManager.java:370) [RenderManager.class:?] at net.minecraft.client.renderer.entity.RenderManager.renderEntityStatic(RenderManager.java:327) [RenderManager.class:?] at net.minecraft.client.renderer.entity.RenderManager.renderEntitySimple(RenderManager.java:294) [RenderManager.class:?] at net.minecraft.client.renderer.RenderGlobal.renderEntities(RenderGlobal.java:631) [RenderGlobal.class:?] at net.minecraft.client.renderer.EntityRenderer.renderWorldPass(EntityRenderer.java:1294) [EntityRenderer.class:?] at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1207) [EntityRenderer.class:?] at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1032) [EntityRenderer.class:?] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1048) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:345) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:117) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_65] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_65] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_65] at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_65] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78) [start/:?] at GradleStart.main(GradleStart.java:45) [start/:?]
  23. Hi! I've just started modding minecraft 1.8 very recently. I'm building my mod directly off of Minecraft By example. (The framework was very convenient, and I don't intend to distribute my mod.) I have two items, a blunderbuss and flintlock. Each fires different thrown entities, namely, grapeshot and musketball. My problem is that no matter what I do, the grapeshot renders using the musketball's image. I am absolutely sure that the blunderbuss fires grapeshot entities, but they render as musketballs anyway. Any idea what could cause this? I don't know what information is pertinent here, so I'm going to post StartupClient, RenderMusketBall, and RenderGrapeshot. If it's too much, I apologize. Same with too little. I don't know what's relevant at this stage of my modding. I'm working from a version of RenderSnowball for both grapeshot and musketball. public class StartupClientOnly { public static void preInitClientOnly() { } public static void initClientOnly() { // required in order for the renderer to know how to render your item. Likely to change in the near future. ModelResourceLocation itemModelResourceLocation = new ModelResourceLocation("minecraftbyexample:mbe10_item_simple", "inventory"); final int DEFAULT_ITEM_SUBTYPE = 0; Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(StartupCommon.itemSimple, DEFAULT_ITEM_SUBTYPE, itemModelResourceLocation); ModelResourceLocation flintlockModelResourceLocation = new ModelResourceLocation("minecraftbyexample:flintlock", "inventory"); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(StartupCommon.itemFlintlock, DEFAULT_ITEM_SUBTYPE, flintlockModelResourceLocation); ModelResourceLocation musketBallModelResourceLocation = new ModelResourceLocation("minecraftbyexample:musketball", "inventory"); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(StartupCommon.itemMusketBall, DEFAULT_ITEM_SUBTYPE, musketBallModelResourceLocation); ModelResourceLocation blunderbussModelResourceLocation = new ModelResourceLocation("minecraftbyexample:blunderbuss", "inventory"); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(StartupCommon.itemBlunderbuss, DEFAULT_ITEM_SUBTYPE, blunderbussModelResourceLocation); ModelResourceLocation grapeshotModelResourceLocation = new ModelResourceLocation("minecraftbyexample:grapeshot", "inventory"); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(StartupCommon.itemGrapeshot, DEFAULT_ITEM_SUBTYPE, grapeshotModelResourceLocation); RenderManager reman = Minecraft.getMinecraft().getRenderManager(); RenderItem reIt = Minecraft.getMinecraft().getRenderItem(); System.out.println(StartupCommon.itemGrapeshot); RenderingRegistry.registerEntityRenderingHandler(EntityMusketBall.class, new RenderMusketBall(reman, StartupCommon.itemMusketBall, reIt, new ModelResourceLocation("minecraftbyexample:musketball"))); RenderingRegistry.registerEntityRenderingHandler(EntityGrapeshot.class, new RenderGrapeshot(reman, StartupCommon.itemGrapeshot, reIt)); } public static void postInitClientOnly() { } } package minecraftbyexample.mbe10_item_simple; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.entity.Render; import net.minecraft.client.renderer.entity.RenderItem; import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.client.resources.model.ModelResourceLocation; import net.minecraft.entity.Entity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; public class RenderGrapeshot extends Render { ModelResourceLocation modelResourceLocation; protected final Item item; private final RenderItem renderitem; private static final String __OBFID = "CL_00001008"; public RenderGrapeshot(RenderManager man) { super(man); item = new ItemGrapeshot(); renderitem = Minecraft.getMinecraft().getRenderItem(); modelResourceLocation = new ModelResourceLocation("minecraftbyexample:grapeshot"); } public RenderGrapeshot(RenderManager man, Item item, RenderItem renderItem) { super(man); this.item = item; this.renderitem = renderItem; modelResourceLocation = new ModelResourceLocation("minecraftbyexample:grapeshot"); } public void doRender(Entity entity, double x, double y, double z, float p_76986_8_, float partialTicks) { System.out.println("render grapeshot---------------------------------"); GlStateManager.pushMatrix(); GlStateManager.translate((float)x, (float)y, (float)z); GlStateManager.enableRescaleNormal(); GlStateManager.scale(0.5F, 0.5F, 0.5F); GlStateManager.rotate(-this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F); GlStateManager.rotate(this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F); //this.bindTexture(modelResourceLocation); this.renderitem.renderItemModel(this.convertEntitytoStack(entity)); GlStateManager.disableRescaleNormal(); GlStateManager.popMatrix(); super.doRender(entity, x, y, z, p_76986_8_, partialTicks); } public ItemStack convertEntitytoStack(Entity p_177082_1_) { return new ItemStack(this.item, 1); } @Override protected ResourceLocation getEntityTexture(Entity entity) { return modelResourceLocation; } } package minecraftbyexample.mbe10_item_simple; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.entity.Render; import net.minecraft.client.renderer.entity.RenderItem; import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.client.resources.model.ModelResourceLocation; import net.minecraft.entity.Entity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; public class RenderMusketBall extends Render { ModelResourceLocation modelResourceLocation; protected final Item item; private final RenderItem renderitem; private static final String __OBFID = "CL_00001008"; public RenderMusketBall(RenderManager man, Item item, RenderItem renderItem, ModelResourceLocation modelLoc) { super(man); this.item = item; this.renderitem = renderItem; modelResourceLocation = modelLoc; } public RenderMusketBall(RenderManager man) { super(man); item = new ItemGrapeshot(); renderitem = Minecraft.getMinecraft().getRenderItem(); //modelResourceLocation = new ModelResourceLocation("minecraftbyexample:musketball"); } public void doRender(Entity entity, double x, double y, double z, float p_76986_8_, float partialTicks) { GlStateManager.pushMatrix(); GlStateManager.translate((float)x, (float)y, (float)z); GlStateManager.enableRescaleNormal(); GlStateManager.scale(0.5F, 0.5F, 0.5F); GlStateManager.rotate(-this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F); GlStateManager.rotate(this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F); //this.bindTexture(modelResourceLocation); this.renderitem.renderItemModel(this.convertEntitytoStack(entity)); GlStateManager.disableRescaleNormal(); GlStateManager.popMatrix(); super.doRender(entity, x, y, z, p_76986_8_, partialTicks); } public ItemStack convertEntitytoStack(Entity p_177082_1_) { return new ItemStack(this.item, 1); } @Override protected ResourceLocation getEntityTexture(Entity entity) { return modelResourceLocation; } }
  24. Hi, I've just gotten started with modding, and would really like to begin playing around with mods. I got various recepies working, and got a tool and block registered and functioning, too... but I am, for reasons unclear to me, unable to get them to render. (Working in 1pt8) Despite following various "updating 1.7 to 1.8" tutorials to the letter. So, I'm wondering if there is a super-basic 1.8 compatible mod out there that adds one fully textured item and one block? I'd really like to get into experimenting with this instead of struggling with loading a bunch of json files. If there isn't, would someone be willing to create one?
×
×
  • Create New...

Important Information

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