проблема с кодом Моба

Версия Minecraft
1.7.10

Endless

Любитель OpenGL
270
11
82
---- Minecraft Crash Report ----
// Why did you do that?

Time: 09.02.19 10:36
Description: There was a severe problem during mod loading that has caused the game to fail

cpw.mods.fml.common.LoaderException: java.lang.Error: Unresolved compilation problem:
Syntax error on token "registerRenderers", Identifier expected after this token

at cpw.mods.fml.common.LoadController.transition(LoadController.java:163)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:544)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:208)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:522)
at net.minecraft.client.Minecraft.run(Minecraft.java:942)
at net.minecraft.client.main.Main.main(Main.java:164)
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(Unknown Source)
at GradleStart.main(Unknown Source)
Caused by: java.lang.Error: Unresolved compilation problem:
Syntax error on token "registerRenderers", Identifier expected after this token

at com.BreachCraft.Main.main.<init>(main.java:18)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at cpw.mods.fml.common.ILanguageAdapter$JavaAdapter.getNewInstance(ILanguageAdapter.java:173)
at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:506)
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 cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190)
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 cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:513)
... 12 more


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

-- System Details --
Details:
Minecraft Version: 1.7.10
Operating System: Windows 7 (amd64) version 6.1
Java Version: 1.8.0_171, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 776080784 bytes (740 MB) / 1056309248 bytes (1007 MB) up to 1056309248 bytes (1007 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1558 4 mods loaded, 4 mods active
States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
UC mcp{9.05} [Minecraft Coder Pack] (minecraft.jar)
UC FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1558-1.7.10.jar)
UC Forge{10.13.4.1558} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1558-1.7.10.jar)
UE scpbreachcraft{1.0} [SCP Breach Craft] (bin)
GL info: ' Vendor: 'NVIDIA Corporation' Version: '3.3.0' Renderer: 'GeForce 9600 GT/PCIe/SSE2'
Дальше идут классы возможно в которых и заключается ошибка
package com.BreachCraft.Main;

import cpw.mods.fml.client.registry.RenderingRegistry;

public class ClientProxy {

public void registerRenderers()
{
RenderingRegistry.registerEntityRenderingHandler(SCPobject106.class, new RenderSCPobject106(new ModelBiped(), 0.5F));
}

}
Да неправильное название класса ( не надо обращать внимание)
package com.BreachCraft.Main;

import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.registry.EntityRegistry;
import net.minecraft.entity.EntityList;

@mod (modid = "scpbreachcraft", name="SCP Breach Craft", version = "1.0", acceptedMinecraftVersions = "[1.7.10]")

public class main {



public static final String MODID = "scpbreachcraft";
public static final String VERSION = "1.0";

proxy.registerRenderers();

public static void registerEntity(Class entityClass, String name, int primaryColor, int secondaryColor)
{
int entityID = EntityRegistry.findGlobalUniqueEntityId();
long seed = name.hashCode();

EntityRegistry.registerGlobalEntityID(entityClass, name, entityID);
Object instance = null;
EntityRegistry.registerModEntity(entityClass, name, entityID, instance, 64, 1, true);
EntityList.entityEggs.put(Integer.valueOf(entityID), new EntityList.EntityEggInfo(entityID, primaryColor, secondaryColor));
}
@EventHandler
public void preInit(FMLPreInitializationEvent event)
{
registerEntity(SCPobject106.class, "scp106", 0x708090, 0xDCDCDC);
}

}
package com.BreachCraft.Main;

import net.minecraft.client.model.ModelBiped;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;

public class RenderSCPobject106 {

private static final ResourceLocation textureLocation = new ResourceLocation("textures/entity/SCPobject106.png");

public void RenderTest(ModelBiped model, float shadowSize)
{
super(model, shadowSize);
}

protected ResourceLocation getEntityTexture(Entity par1Entity)
{
return textureLocation;
}

}
Ну и сам класс моба (мне кажется тут проблема в конструкторе, хз как исправить)
package com.BreachCraft.Main;

import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.EntityAINearestAttackableTarget;
import net.minecraft.entity.ai.EntityAIWander;
import net.minecraft.entity.ai.EntityAIWatchClosest;
import net.minecraft.entity.ai.attributes.IAttribute;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;

public class SCPobject106 extends EntityMob {


public SCPobject106(World world) {
super(world);
this.tasks.addTask();
this.tasks.addTask(1, new EntityAIWatchClosest(this, EntityPlayer.class, 15.0F));
this.tasks.addTask(2, new EntityAILookIdle(this));
this.targetTasks.addTask(3, new EntityAIHurtByTarget(this, false));
this.targetTasks.addTask(4, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 0, true));

}



public boolean isAIEnabled()
{
return true;


}
}
надо бы мне руки оторвать, за этот говно-код :/
P.S. есть еще классы (но вроде мне кажется, что в них все нормально)
 
Последнее редактирование:

Endless

Любитель OpenGL
270
11
82
@SRCRecordzz сяб <3, но я разобрался только с одним файлом (осознаю какой я не внимательный и впадаю в депрессию)
package com.BreachCraft.Main;

import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.renderer.entity.RenderBiped;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;

public class RenderSCPobject106 extends RenderBiped
{

public RenderSCPobject106(ModelBiped model, float shadowSize) {
super(model, shadowSize);
}

private static final ResourceLocation textureLocation = new ResourceLocation("textures/entity/SCPobject106.png");


protected ResourceLocation getEntityTexture(Entity par1Entity)
{
return textureLocation;
}

}
Но остались еще, и сколько не смотрю пытаюсь осознать, что блин таскам не нравится :(
package com.BreachCraft.Main;

import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.EntityAINearestAttackableTarget;
import net.minecraft.entity.ai.EntityAIWander;
import net.minecraft.entity.ai.EntityAIWatchClosest;
import net.minecraft.entity.ai.attributes.IAttribute;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;

public class SCPobject106 extends EntityMob {


public SCPobject106(World world) {
super(world);
this.tasks.addTask(0, new EntityAIWander(this, 1.0D));
this.tasks.addTask(1, new EntityAIWatchClosest(this, EntityPlayer.class, 15.0F));
this.tasks.addTask(2, new EntityAILookIdle(this));
this.targetTasks.addTask(3, new EntityAIHurtByTarget(this, false));
this.targetTasks.addTask(4, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 0, true));

}



public boolean isAIEnabled()
{
return true;


}
}
походу я правда тупой
 
Последнее редактирование:

Endless

Любитель OpenGL
270
11
82
---- Minecraft Crash Report ----
// You're mean.

Time: 09.02.19 19:39
Description: Initializing game

java.lang.NullPointerException: Initializing game
at cpw.mods.fml.common.registry.EntityRegistry.doModEntityRegistration(EntityRegistry.java:171)
at cpw.mods.fml.common.registry.EntityRegistry.registerModEntity(EntityRegistry.java:150)
at com.BreachCraft.Main.main.registerEntity(main.java:27)
at com.BreachCraft.Main.main.preInit(main.java:33)
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 cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:532)
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 cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190)
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 cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119)
at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:556)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:243)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:522)
at net.minecraft.client.Minecraft.run(Minecraft.java:942)
at net.minecraft.client.main.Main.main(Main.java:164)
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(Unknown Source)
at GradleStart.main(Unknown Source)


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

-- Head --
Stacktrace:
at cpw.mods.fml.common.registry.EntityRegistry.doModEntityRegistration(EntityRegistry.java:171)
at cpw.mods.fml.common.registry.EntityRegistry.registerModEntity(EntityRegistry.java:150)
at com.BreachCraft.Main.main.registerEntity(main.java:27)
at com.BreachCraft.Main.main.preInit(main.java:33)
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 cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:532)
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 cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190)
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 cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119)
at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:556)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:243)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:522)

-- Initialization --
Details:
Stacktrace:
at net.minecraft.client.Minecraft.run(Minecraft.java:942)
at net.minecraft.client.main.Main.main(Main.java:164)
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(Unknown Source)
at GradleStart.main(Unknown Source)

-- System Details --
Details:
Minecraft Version: 1.7.10
Operating System: Windows 7 (amd64) version 6.1
Java Version: 1.8.0_171, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 903277688 bytes (861 MB) / 1056309248 bytes (1007 MB) up to 1056309248 bytes (1007 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1558 4 mods loaded, 4 mods active
States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
UCH mcp{9.05} [Minecraft Coder Pack] (minecraft.jar)
UCH FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1558-1.7.10.jar)
UCH Forge{10.13.4.1558} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1558-1.7.10.jar)
UCE scpbreachcraft{1.0} [SCP Breach Craft] (bin)
GL info: ' Vendor: 'NVIDIA Corporation' Version: '3.3.0' Renderer: 'GeForce 9600 GT/PCIe/SSE2'
Launched Version: 1.7.10
LWJGL: 2.9.1
OpenGL: GeForce 9600 GT/PCIe/SSE2 GL version 3.3.0, NVIDIA Corporation
GL Caps: Using GL 1.3 multitexturing.
Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
Anisotropic filtering is supported and maximum anisotropy is 16.
Shaders are available because OpenGL 2.1 is supported.

Is Modded: Definitely; Client brand changed to 'fml,forge'
Type: Client (map_client.txt)
Resource Packs: []
Current Language: English (US)
Profiler Position: N/A (disabled)
Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
Anisotropic Filtering: Off (1)
новая ошибка
 

Endless

Любитель OpenGL
270
11
82
И кроме ошибок AI моба помогите с
Код:
package com.BreachCraft.Main;

import cpw.mods.fml.client.registry.RenderingRegistry;
import net.minecraft.client.model.ModelBiped;

public class ClientProxy extends CommonProxy {
   
    @Override
    public void registerRenderers()  
    {
        RenderingRegistry.registerEntityRenderingHandler(SCPobject106.class, new RenderSCPobject106 (null, 0));  
    }
}
он ссылается на registerEntityRenderingHandler что ошибка там
 
Сверху