Jump to content

Recommended Posts

Posted

When I put my mob model in eclipse (no errors I did everything right) this is my code:

 

 

ModelDeer:

// Date: 11/28/2014 4:20:07 PM

// Template version 1.1

// Java generated by Techne

// Keep in mind that you still need to fill in some blanks

// - ZeuX

 

 

 

 

 

 

package com.many231.deer;

 

import net.minecraft.client.model.ModelBase;

import net.minecraft.client.model.ModelRenderer;

import net.minecraft.entity.Entity;

 

public class ModelDeer extends ModelBase

{

  //fields

    ModelRenderer horn1;

    ModelRenderer horn4;

    ModelRenderer horn5;

    ModelRenderer horn6;

    ModelRenderer head;

    ModelRenderer body;

    ModelRenderer leg1;

    ModelRenderer leg2;

    ModelRenderer leg3;

    ModelRenderer leg4;

    ModelRenderer neck;

    ModelRenderer horn2;

    ModelRenderer tail;

    ModelRenderer horn3;

 

  public ModelDeer()

  {

    this.textureWidth = 64;

    this.textureHeight = 64;

   

    this.horn1 = new ModelRenderer(this, 44, 0);

    this.horn1.addBox(0F, 0F, 0F, 1, 3, 1);

    this.horn1.setRotationPoint(-2F, -3F, -9F);

    this.horn1.setTextureSize(64, 64);

    this.horn1.mirror = true;

      setRotation(horn1, 0.4089647F, 0F, 0F);

      this.horn4 = new ModelRenderer(this, 41, 0);

      this.horn4.addBox(0F, 0F, 0F, 1, 1, 4);

      this.horn4.setRotationPoint(-2F, -3.5F, -12F);

      this.horn4.setTextureSize(64, 64);

      this.horn4.mirror = true;

      setRotation(horn4, 0F, 0F, 0F);

      this.horn5 = new ModelRenderer(this, 41, 0);

      this.horn5.addBox(0F, 0F, 0F, 1, 2, 1);

      this.horn5.setRotationPoint(-2F, -5F, -11F);

      this.horn5.setTextureSize(64, 64);

      this.horn5.mirror = true;

      setRotation(horn5, 0F, 0F, 0F);

      this.horn6 = new ModelRenderer(this, 41, 0);

      this.horn6.addBox(0F, 0F, 0F, 1, 2, 1);

      this.horn6.setRotationPoint(1F, -5F, -11F);

      this.horn6.setTextureSize(64, 64);

      this.horn6.mirror = true;

      setRotation(horn6, 0F, 0F, 0F);

      this.head = new ModelRenderer(this, 0, 0);

      this.head.addBox(-4F, -4F, -6F, 4, 4, 8);

      this.head.setRotationPoint(2F, 4F, -7.5F);

      this.head.setTextureSize(64, 64);

      this.head.mirror = true;

      setRotation(head, 0.3717861F, 0F, 0F);

      this.body.mirror = true;

      this.body = new ModelRenderer(this, 26, 6);

      this.body.addBox(-3F, -10F, -7F, 6, 18, 6);

      this.body.setRotationPoint(0F, 7F, 1F);

      this.body.setTextureSize(64, 64);

      this.body.mirror = true;

      setRotation(body, 1.570796F, 0F, 0F);

      this.body.mirror = false;

      this.leg1 = new ModelRenderer(this, 0, 16);

      this.leg1.addBox(-3F, 0F, -2F, 2, 10, 2);

      this.leg1.setRotationPoint(0F, 14F, 7F);

      this.leg1.setTextureSize(64, 64);

      this.leg1.mirror = true;

      setRotation(leg1, 0F, 0F, 0F);

      this.leg2 = new ModelRenderer(this, 0, 16);

      this.leg2.addBox(-1F, 0F, -2F, 2, 10, 2);

      this.leg2.setRotationPoint(2F, 14F, 7F);

      this.leg2.setTextureSize(64, 64);

      this.leg2.mirror = true;

      setRotation(leg2, 0F, 0F, 0F);

      this.leg3 = new ModelRenderer(this, 0, 16);

      this.leg3.addBox(-3F, 0F, -3F, 2, 10, 2);

      this.leg3.setRotationPoint(0F, 14F, -5F);

      this.leg3.setTextureSize(64, 64);

      this.leg3.mirror = true;

      setRotation(leg3, 0F, 0F, 0F);

      this.leg4 = new ModelRenderer(this, 0, 16);

      this.leg4.addBox(-1F, 0F, -3F, 2, 10, 2);

      this.leg4.setRotationPoint(2F, 14F, -5F);

      this.leg4.setTextureSize(64, 64);

      this.leg4.mirror = true;

      setRotation(leg4, 0F, 0F, 0F);

      this.neck.mirror = true;

      this.neck = new ModelRenderer(this, 52, 0);

      this.neck.addBox(-2F, -3F, 0F, 2, 4, 6);

      this.neck.setRotationPoint(1F, 9F, -6F);

      this.neck.setTextureSize(64, 64);

      this.neck.mirror = true;

      setRotation(neck, 1.793868F, 0F, 0F);

      this.neck.mirror = false;

      this.horn2 = new ModelRenderer(this, 44, 0);

      this.horn2.addBox(0F, 0F, 0F, 1, 3, 1);

      this.horn2.setRotationPoint(1F, -3F, -9F);

      this.horn2.setTextureSize(64, 64);

      this.horn2.mirror = true;

      setRotation(horn2, 0.4089613F, 5.1E-06F, 0F);

      this.tail = new ModelRenderer(this, 27, 0);

      this.tail.addBox(0F, 0F, 0F, 2, 3, 1);

      this.tail.setRotationPoint(-1F, 9F, 8F);

      this.tail.setTextureSize(64, 64);

      this.tail.mirror = true;

      setRotation(tail, 0.632033F, 0F, 0F);

      this.horn3 = new ModelRenderer(this, 41, 0);

      this.horn3.addBox(0F, 0F, 0F, 1, 1, 4);

      this.horn3.setRotationPoint(1F, -3.5F, -12F);

      this.horn3.setTextureSize(64, 64);

      this.horn3.mirror = true;

      setRotation(horn3, 0F, 0F, 0F);

  }

 

  public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)

  {

    super.render(entity, f, f1, f2, f3, f4, f5);

    setRotationAngles(f, f1, f2, f3, f4, f5,entity);

    horn1.render(f5);

    horn4.render(f5);

    horn5.render(f5);

    horn6.render(f5);

    head.render(f5);

    body.render(f5);

    leg1.render(f5);

    leg2.render(f5);

    leg3.render(f5);

    leg4.render(f5);

    neck.render(f5);

    horn2.render(f5);

    tail.render(f5);

    horn3.render(f5);

  }

 

  private void setRotation(ModelRenderer model, float x, float y, float z)

  {

    model.rotateAngleX = x;

    model.rotateAngleY = y;

    model.rotateAngleZ = z;

  }

 

  public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)

  {

    super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);

  }

 

}

Error Log:

[16:32:51] [main/INFO] [GradleStart]: Extra: []

[16:32:51] [main/INFO] [GradleStart]: Running with arguments: [--userProperties, {}, --accessToken, {REDACTED}, --assetIndex, 1.8, --assetsDir, C:/Users/Manny/.gradle/caches/minecraft/assets, --version, 1.8, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.GradleStartCommon$GradleStartTweaker]

[16:32:51] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker

[16:32:51] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker

[16:32:51] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.GradleStartCommon$GradleStartTweaker

[16:32:51] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker

[16:32:51] [main/INFO] [FML]: Forge Mod Loader version 8.0.9.1016 for Minecraft 1.8 loading

[16:32:51] [main/INFO] [FML]: Java is Java HotSpot 64-Bit Server VM, version 1.7.0_67, running on Windows 7:amd64:6.1, installed at C:\Program Files\Java\jre7

[16:32:51] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation

[16:32:51] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.GradleStartCommon$GradleStartTweaker

[16:32:51] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin

[16:32:51] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker

[16:32:51] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker

[16:32:51] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker

[16:32:51] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker

[16:32:51] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper

[16:32:52] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!

[16:32:56] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing

[16:32:56] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker

[16:32:57] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker

[16:32:57] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker

[16:32:57] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}

[16:33:01] [Client thread/INFO]: Setting user: Player432

[16:33:01] [Client thread/INFO]: (Session ID is token:FML:Player432)

[16:33:08] [Client thread/INFO]: LWJGL Version: 2.9.1

[16:33:09] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization

[16:33:09] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization

[16:33:10] [Client thread/INFO] [FML]: Searching C:\Users\Manny\Desktop\Forge-1.8\eclipse\mods for mods

[16:33:10] [Client thread/INFO] [deer]: Mod deer is missing the required element 'name'. Substituting deer

[16:33:16] [Client thread/INFO] [FML]: Forge Mod Loader has identified 3 mods to load

[16:33:16] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, deer] at CLIENT

[16:33:16] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, deer] at SERVER

[16:33:17] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:deer

[16:33:17] [Client thread/INFO] [FML]: Processing ObjectHolder annotations

[16:33:17] [Client thread/INFO] [FML]: Found 384 ObjectHolder annotations

[16:33:17] [Client thread/INFO] [FML]: Applying holder lookups

[16:33:18] [Client thread/INFO] [FML]: Holder lookups applied

[16:33:18] [sound Library Loader/INFO]: Starting up SoundSystem...

[16:33:19] [Thread-7/INFO]: Initializing LWJGL OpenAL

[16:33:19] [Thread-7/INFO]: (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)

[16:33:19] [Thread-7/INFO]: OpenAL initialized.

[16:33:19] [sound Library Loader/INFO]: Sound engine started

[16:33:28] [Client thread/INFO]: Created: 512x512 textures-atlas

[16:33:31] [Client thread/ERROR] [FML]: Fatal errors were detected during the transition from INITIALIZATION to POSTINITIALIZATION. Loading cannot continue

[16:33:31] [Client thread/ERROR] [FML]:

mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized

FML{8.0.9.1016} [Forge Mod Loader] (fmlSrc-1.8-8.0.9.1016-1.8.jar) Unloaded->Constructed->Pre-initialized->Initialized

deer{1.0} [deer] (bin) Unloaded->Constructed->Pre-initialized->Errored

[16:33:31] [Client thread/ERROR] [FML]: The following problems were captured during this phase

[16:33:31] [Client thread/ERROR] [FML]: Caught exception from deer

java.lang.NullPointerException

at com.many231.deer.ModelDeer.<init>(ModelDeer.java:71) ~[bin/:?]

at com.many231.deer.RenderDeer.<init>(RenderDeer.java:15) ~[bin/:?]

at com.many231.deer.DeerMod.init(DeerMod.java:29) ~[bin/:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_67]

at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:515) ~[fmlSrc-1.8-8.0.9.1016-1.8.jar:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_67]

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:208) ~[fmlSrc-1.8-8.0.9.1016-1.8.jar:?]

at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:187) ~[fmlSrc-1.8-8.0.9.1016-1.8.jar:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_67]

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:118) [LoadController.class:?]

at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:691) [Loader.class:?]

at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:283) [FMLClientHandler.class:?]

at net.minecraft.client.Minecraft.startGame(Minecraft.java:486) [Minecraft.class:?]

at net.minecraft.client.Minecraft.run(Minecraft.java:326) [Minecraft.class:?]

at net.minecraft.client.main.Main.main(Main.java:117) [Main.class:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_67]

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/:?]

[16:33:31] [Client thread/INFO] [sTDOUT]: [net.minecraft.init.Bootstrap:func_179870_a:568]: ---- Minecraft Crash Report ----

// Uh... Did I do that?

 

Time: 11/28/14 4:33 PM

Description: Initializing game

 

java.lang.NullPointerException: Initializing game

at com.many231.deer.ModelDeer.<init>(ModelDeer.java:71)

at com.many231.deer.RenderDeer.<init>(RenderDeer.java:15)

at com.many231.deer.DeerMod.init(DeerMod.java:29)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:515)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

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:208)

at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:187)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

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:691)

at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:283)

at net.minecraft.client.Minecraft.startGame(Minecraft.java:486)

at net.minecraft.client.Minecraft.run(Minecraft.java:326)

at net.minecraft.client.main.Main.main(Main.java:117)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)

at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78)

at GradleStart.main(GradleStart.java:45)

 

 

A detailed walkthrough of the error, its code path and all known details is as follows:

---------------------------------------------------------------------------------------

 

-- Head --

Stacktrace:

at com.many231.deer.ModelDeer.<init>(ModelDeer.java:71)

at com.many231.deer.RenderDeer.<init>(RenderDeer.java:15)

at com.many231.deer.DeerMod.init(DeerMod.java:29)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:515)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

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:208)

at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:187)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

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:691)

at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:283)

at net.minecraft.client.Minecraft.startGame(Minecraft.java:486)

 

-- Initialization --

Details:

Stacktrace:

at net.minecraft.client.Minecraft.run(Minecraft.java:326)

at net.minecraft.client.main.Main.main(Main.java:117)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)

at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78)

at GradleStart.main(GradleStart.java:45)

 

-- System Details --

Details:

Minecraft Version: 1.8

Operating System: Windows 7 (amd64) version 6.1

Java Version: 1.7.0_67, Oracle Corporation

Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation

Memory: 879904648 bytes (839 MB) / 1056309248 bytes (1007 MB) up to 1056309248 bytes (1007 MB)

JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M

IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0

FML: MCP v9.10 FML v8.0.9.1016 3 mods loaded, 3 mods active

mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized

FML{8.0.9.1016} [Forge Mod Loader] (fmlSrc-1.8-8.0.9.1016-1.8.jar) Unloaded->Constructed->Pre-initialized->Initialized

deer{1.0} [deer] (bin) Unloaded->Constructed->Pre-initialized->Errored

Launched Version: 1.8

LWJGL: 2.9.1

OpenGL: Intel® HD Graphics GL version 3.1.0 - Build 8.15.10.2712, Intel

GL Caps: Using GL 1.3 multitexturing.

Using GL 1.3 texture combiners.

Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.

Shaders are available because OpenGL 2.1 is supported.

VBOs are available because OpenGL 1.5 is supported.

 

Using VBOs: No

Is Modded: Definitely; Client brand changed to 'fml'

Type: Client (map_client.txt)

Resource Packs: []

Current Language: English (US)

Profiler Position: N/A (disabled)

[16:33:31] [Client thread/INFO] [sTDOUT]: [net.minecraft.init.Bootstrap:func_179870_a:568]: #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\Manny\Desktop\Forge-1.8\eclipse\.\crash-reports\crash-2014-11-28_16.33.31-client.txt

AL lib: (EE) alc_cleanup: 1 device not closed

 

 

Help!  :-\

Posted

I still get a crash?

<spoiler>

[17:26:02] [main/INFO] [GradleStart]: Extra: []

[17:26:02] [main/INFO] [GradleStart]: Running with arguments: [--userProperties, {}, --accessToken, {REDACTED}, --assetIndex, 1.8, --assetsDir, C:/Users/Manny/.gradle/caches/minecraft/assets, --version, 1.8, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.GradleStartCommon$GradleStartTweaker]

[17:26:02] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker

[17:26:02] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker

[17:26:02] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.GradleStartCommon$GradleStartTweaker

[17:26:02] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker

[17:26:02] [main/INFO] [FML]: Forge Mod Loader version 8.0.9.1016 for Minecraft 1.8 loading

[17:26:02] [main/INFO] [FML]: Java is Java HotSpot 64-Bit Server VM, version 1.7.0_67, running on Windows 7:amd64:6.1, installed at C:\Program Files\Java\jre7

[17:26:03] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation

[17:26:03] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.GradleStartCommon$GradleStartTweaker

[17:26:03] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin

[17:26:03] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker

[17:26:03] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker

[17:26:03] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker

[17:26:03] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker

[17:26:03] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper

[17:26:03] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!

[17:26:07] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing

[17:26:07] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker

[17:26:08] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker

[17:26:08] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker

[17:26:08] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}

[17:26:11] [Client thread/INFO]: Setting user: Player372

[17:26:11] [Client thread/INFO]: (Session ID is token:FML:Player372)

[17:26:19] [Client thread/INFO]: LWJGL Version: 2.9.1

[17:26:22] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization

[17:26:22] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization

[17:26:22] [Client thread/INFO] [FML]: Searching C:\Users\Manny\Desktop\Forge-1.8\eclipse\mods for mods

[17:26:23] [Client thread/INFO] [deer]: Mod deer is missing the required element 'name'. Substituting deer

[17:26:30] [Client thread/INFO] [FML]: Forge Mod Loader has identified 3 mods to load

[17:26:31] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, deer] at CLIENT

[17:26:31] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, deer] at SERVER

[17:26:32] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:deer

[17:26:32] [Client thread/INFO] [FML]: Processing ObjectHolder annotations

[17:26:32] [Client thread/INFO] [FML]: Found 384 ObjectHolder annotations

[17:26:33] [Client thread/INFO] [FML]: Applying holder lookups

[17:26:33] [Client thread/INFO] [FML]: Holder lookups applied

[17:26:33] [sound Library Loader/INFO]: Starting up SoundSystem...

[17:26:34] [Thread-7/INFO]: Initializing LWJGL OpenAL

[17:26:34] [Thread-7/INFO]: (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)

[17:26:35] [Thread-7/INFO]: OpenAL initialized.

[17:26:35] [sound Library Loader/INFO]: Sound engine started

[17:26:43] [Client thread/INFO]: Created: 512x512 textures-atlas

[17:26:46] [Client thread/ERROR] [FML]: Fatal errors were detected during the transition from INITIALIZATION to POSTINITIALIZATION. Loading cannot continue

[17:26:46] [Client thread/ERROR] [FML]:

mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized

FML{8.0.9.1016} [Forge Mod Loader] (fmlSrc-1.8-8.0.9.1016-1.8.jar) Unloaded->Constructed->Pre-initialized->Initialized

deer{1.0} [deer] (bin) Unloaded->Constructed->Pre-initialized->Errored

[17:26:46] [Client thread/ERROR] [FML]: The following problems were captured during this phase

[17:26:46] [Client thread/ERROR] [FML]: Caught exception from deer

java.lang.NullPointerException

at com.many231.deer.ModelDeer.<init>(ModelDeer.java:102) ~[bin/:?]

at com.many231.deer.RenderDeer.<init>(RenderDeer.java:15) ~[bin/:?]

at com.many231.deer.DeerMod.init(DeerMod.java:29) ~[bin/:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_67]

at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:515) ~[fmlSrc-1.8-8.0.9.1016-1.8.jar:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_67]

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:208) ~[fmlSrc-1.8-8.0.9.1016-1.8.jar:?]

at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:187) ~[fmlSrc-1.8-8.0.9.1016-1.8.jar:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_67]

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:118) [LoadController.class:?]

at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:691) [Loader.class:?]

at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:283) [FMLClientHandler.class:?]

at net.minecraft.client.Minecraft.startGame(Minecraft.java:486) [Minecraft.class:?]

at net.minecraft.client.Minecraft.run(Minecraft.java:326) [Minecraft.class:?]

at net.minecraft.client.main.Main.main(Main.java:117) [Main.class:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_67]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_67]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_67]

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/:?]

[17:26:47] [Client thread/INFO] [sTDOUT]: [net.minecraft.init.Bootstrap:func_179870_a:568]: ---- Minecraft Crash Report ----

// But it works on my machine.

 

Time: 11/28/14 5:26 PM

Description: Initializing game

 

java.lang.NullPointerException: Initializing game

at com.many231.deer.ModelDeer.<init>(ModelDeer.java:102)

at com.many231.deer.RenderDeer.<init>(RenderDeer.java:15)

at com.many231.deer.DeerMod.init(DeerMod.java:29)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:515)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

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:208)

at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:187)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

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:691)

at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:283)

at net.minecraft.client.Minecraft.startGame(Minecraft.java:486)

at net.minecraft.client.Minecraft.run(Minecraft.java:326)

at net.minecraft.client.main.Main.main(Main.java:117)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)

at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78)

at GradleStart.main(GradleStart.java:45)

 

 

A detailed walkthrough of the error, its code path and all known details is as follows:

---------------------------------------------------------------------------------------

 

-- Head --

Stacktrace:

at com.many231.deer.ModelDeer.<init>(ModelDeer.java:102)

at com.many231.deer.RenderDeer.<init>(RenderDeer.java:15)

at com.many231.deer.DeerMod.init(DeerMod.java:29)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:515)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

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:208)

at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:187)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

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:691)

at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:283)

at net.minecraft.client.Minecraft.startGame(Minecraft.java:486)

 

-- Initialization --

Details:

Stacktrace:

at net.minecraft.client.Minecraft.run(Minecraft.java:326)

at net.minecraft.client.main.Main.main(Main.java:117)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)

at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78)

at GradleStart.main(GradleStart.java:45)

 

-- System Details --

Details:

Minecraft Version: 1.8

Operating System: Windows 7 (amd64) version 6.1

Java Version: 1.7.0_67, Oracle Corporation

Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation

Memory: 879793696 bytes (839 MB) / 1056309248 bytes (1007 MB) up to 1056309248 bytes (1007 MB)

JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M

IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0

FML: MCP v9.10 FML v8.0.9.1016 3 mods loaded, 3 mods active

mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized

FML{8.0.9.1016} [Forge Mod Loader] (fmlSrc-1.8-8.0.9.1016-1.8.jar) Unloaded->Constructed->Pre-initialized->Initialized

deer{1.0} [deer] (bin) Unloaded->Constructed->Pre-initialized->Errored

Launched Version: 1.8

LWJGL: 2.9.1

OpenGL: Intel® HD Graphics GL version 3.1.0 - Build 8.15.10.2712, Intel

GL Caps: Using GL 1.3 multitexturing.

Using GL 1.3 texture combiners.

Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.

Shaders are available because OpenGL 2.1 is supported.

VBOs are available because OpenGL 1.5 is supported.

 

Using VBOs: No

Is Modded: Definitely; Client brand changed to 'fml'

Type: Client (map_client.txt)

Resource Packs: []

Current Language: English (US)

Profiler Position: N/A (disabled)

[17:26:47] [Client thread/INFO] [sTDOUT]: [net.minecraft.init.Bootstrap:func_179870_a:568]: #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\Manny\Desktop\Forge-1.8\eclipse\.\crash-reports\crash-2014-11-28_17.26.46-client.txt

AL lib: (EE) alc_cleanup: 1 device not closed

</spoiler>

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Version 1.19 - Forge 41.0.63 I want to create a wolf entity that I can ride, so far it seems to be working, but the problem is that when I get on the wolf, I can’t control it. I then discovered that the issue is that the server doesn’t detect that I’m riding the wolf, so I’m struggling with synchronization. However, it seems to not be working properly. As I understand it, the server receives the packet but doesn’t register it correctly. I’m a bit new to Java, and I’ll try to provide all the relevant code and prints *The comments and prints are translated by chatgpt since they were originally in Spanish* Thank you very much in advance No player is mounted, or the passenger is not a player. No player is mounted, or the passenger is not a player. No player is mounted, or the passenger is not a player. No player is mounted, or the passenger is not a player. No player is mounted, or the passenger is not a player. MountableWolfEntity package com.vals.valscraft.entity; import com.vals.valscraft.network.MountSyncPacket; import com.vals.valscraft.network.NetworkHandler; import net.minecraft.client.Minecraft; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.network.syncher.EntityDataSerializers; import net.minecraft.network.syncher.SynchedEntityData; import net.minecraft.server.MinecraftServer; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.Mob; import net.minecraft.world.entity.ai.attributes.AttributeSupplier; import net.minecraft.world.entity.ai.attributes.Attributes; import net.minecraft.world.entity.animal.Wolf; import net.minecraft.world.entity.player.Player; import net.minecraft.world.entity.Entity; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; import net.minecraft.world.phys.Vec3; import net.minecraftforge.event.TickEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.network.PacketDistributor; public class MountableWolfEntity extends Wolf { private boolean hasSaddle; private static final EntityDataAccessor<Byte> DATA_ID_FLAGS = SynchedEntityData.defineId(MountableWolfEntity.class, EntityDataSerializers.BYTE); public MountableWolfEntity(EntityType<? extends Wolf> type, Level level) { super(type, level); this.hasSaddle = false; } @Override protected void defineSynchedData() { super.defineSynchedData(); this.entityData.define(DATA_ID_FLAGS, (byte)0); } public static AttributeSupplier.Builder createAttributes() { return Wolf.createAttributes() .add(Attributes.MAX_HEALTH, 20.0) .add(Attributes.MOVEMENT_SPEED, 0.3); } @Override public InteractionResult mobInteract(Player player, InteractionHand hand) { ItemStack itemstack = player.getItemInHand(hand); if (itemstack.getItem() == Items.SADDLE && !this.hasSaddle()) { if (!player.isCreative()) { itemstack.shrink(1); } this.setSaddle(true); return InteractionResult.SUCCESS; } else if (!level.isClientSide && this.hasSaddle()) { player.startRiding(this); MountSyncPacket packet = new MountSyncPacket(true); // 'true' means the player is mounted NetworkHandler.CHANNEL.sendToServer(packet); // Ensure the server handles the packet return InteractionResult.SUCCESS; } return InteractionResult.PASS; } @Override public void travel(Vec3 travelVector) { if (this.isVehicle() && this.getControllingPassenger() instanceof Player) { System.out.println("The wolf has a passenger."); System.out.println("The passenger is a player."); Player player = (Player) this.getControllingPassenger(); // Ensure the player is the controller this.setYRot(player.getYRot()); this.yRotO = this.getYRot(); this.setXRot(player.getXRot() * 0.5F); this.setRot(this.getYRot(), this.getXRot()); this.yBodyRot = this.getYRot(); this.yHeadRot = this.yBodyRot; float forward = player.zza; float strafe = player.xxa; if (forward <= 0.0F) { forward *= 0.25F; } this.flyingSpeed = this.getSpeed() * 0.1F; this.setSpeed((float) this.getAttributeValue(Attributes.MOVEMENT_SPEED) * 1.5F); this.setDeltaMovement(new Vec3(strafe, travelVector.y, forward).scale(this.getSpeed())); this.calculateEntityAnimation(this, false); } else { // The wolf does not have a passenger or the passenger is not a player System.out.println("No player is mounted, or the passenger is not a player."); super.travel(travelVector); } } public boolean hasSaddle() { return this.hasSaddle; } public void setSaddle(boolean hasSaddle) { this.hasSaddle = hasSaddle; } @Override protected void dropEquipment() { super.dropEquipment(); if (this.hasSaddle()) { this.spawnAtLocation(Items.SADDLE); this.setSaddle(false); } } @SubscribeEvent public static void onServerTick(TickEvent.ServerTickEvent event) { if (event.phase == TickEvent.Phase.START) { MinecraftServer server = net.minecraftforge.server.ServerLifecycleHooks.getCurrentServer(); if (server != null) { for (ServerPlayer player : server.getPlayerList().getPlayers()) { if (player.isPassenger() && player.getVehicle() instanceof MountableWolfEntity) { MountableWolfEntity wolf = (MountableWolfEntity) player.getVehicle(); System.out.println("Tick: " + player.getName().getString() + " is correctly mounted on " + wolf); } } } } } private boolean lastMountedState = false; @Override public void tick() { super.tick(); if (!this.level.isClientSide) { // Only on the server boolean isMounted = this.isVehicle() && this.getControllingPassenger() instanceof Player; // Only print if the state changed if (isMounted != lastMountedState) { if (isMounted) { Player player = (Player) this.getControllingPassenger(); // Verify the passenger is a player System.out.println("Server: Player " + player.getName().getString() + " is now mounted."); } else { System.out.println("Server: The wolf no longer has a passenger."); } lastMountedState = isMounted; } } } @Override public void addPassenger(Entity passenger) { super.addPassenger(passenger); if (passenger instanceof Player) { Player player = (Player) passenger; if (!this.level.isClientSide && player instanceof ServerPlayer) { // Send the packet to the server to indicate the player is mounted NetworkHandler.CHANNEL.send(PacketDistributor.PLAYER.with(() -> (ServerPlayer) player), new MountSyncPacket(true)); } } } @Override public void removePassenger(Entity passenger) { super.removePassenger(passenger); if (passenger instanceof Player) { Player player = (Player) passenger; if (!this.level.isClientSide && player instanceof ServerPlayer) { // Send the packet to the server to indicate the player is no longer mounted NetworkHandler.CHANNEL.send(PacketDistributor.PLAYER.with(() -> (ServerPlayer) player), new MountSyncPacket(false)); } } } @Override public boolean isControlledByLocalInstance() { Entity entity = this.getControllingPassenger(); return entity instanceof Player; } @Override public void positionRider(Entity passenger) { if (this.hasPassenger(passenger)) { double xOffset = Math.cos(Math.toRadians(this.getYRot() + 90)) * 0.4; double zOffset = Math.sin(Math.toRadians(this.getYRot() + 90)) * 0.4; passenger.setPos(this.getX() + xOffset, this.getY() + this.getPassengersRidingOffset() + passenger.getMyRidingOffset(), this.getZ() + zOffset); } } } MountSyncPacket package com.vals.valscraft.network; import com.vals.valscraft.entity.MountableWolfEntity; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.player.Player; import net.minecraftforge.network.NetworkEvent; import java.util.function.Supplier; public class MountSyncPacket { private final boolean isMounted; public MountSyncPacket(boolean isMounted) { this.isMounted = isMounted; } public void encode(FriendlyByteBuf buffer) { buffer.writeBoolean(isMounted); } public static MountSyncPacket decode(FriendlyByteBuf buffer) { return new MountSyncPacket(buffer.readBoolean()); } public void handle(NetworkEvent.Context context) { context.enqueueWork(() -> { ServerPlayer player = context.getSender(); // Get the player from the context if (player != null) { // Verifies if the player has dismounted if (!isMounted) { Entity vehicle = player.getVehicle(); if (vehicle instanceof MountableWolfEntity wolf) { // Logic to remove the player as a passenger wolf.removePassenger(player); System.out.println("Server: Player " + player.getName().getString() + " is no longer mounted."); } } } }); context.setPacketHandled(true); // Marks the packet as handled } } networkHandler package com.vals.valscraft.network; import com.vals.valscraft.valscraft; import net.minecraft.resources.ResourceLocation; import net.minecraftforge.network.NetworkRegistry; import net.minecraftforge.network.simple.SimpleChannel; import net.minecraftforge.network.NetworkEvent; import java.util.function.Supplier; public class NetworkHandler { private static final String PROTOCOL_VERSION = "1"; public static final SimpleChannel CHANNEL = NetworkRegistry.newSimpleChannel( new ResourceLocation(valscraft.MODID, "main"), () -> PROTOCOL_VERSION, PROTOCOL_VERSION::equals, PROTOCOL_VERSION::equals ); public static void init() { int packetId = 0; // Register the mount synchronization packet CHANNEL.registerMessage( packetId++, MountSyncPacket.class, MountSyncPacket::encode, MountSyncPacket::decode, (msg, context) -> msg.handle(context.get()) // Get the context with context.get() ); } }  
    • Do you use features of inventory profiles next (ipnext) or is there a change without it?
    • Remove rubidium - you are already using embeddium, which is a fork of rubidium
  • Topics

×
×
  • Create New...

Important Information

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