Jump to content

Recommended Posts

Posted

I am getting an error when using block model at ClientProxy.registerRenderThings();

 

Crash Report

 

---- Minecraft Crash Report ----

// But it works on my machine.

 

Time: 7/13/15 9:46 PM

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

 

cpw.mods.fml.common.LoaderException: java.lang.ClassNotFoundException: com.soultechnamei.alchemicreachions.ClientProxy

at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:76)

at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:512)

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)

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.ClassNotFoundException: com.soultechnamei.alchemicreachions.ClientProxy

at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191)

at java.lang.ClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at cpw.mods.fml.common.ModClassLoader.loadClass(ModClassLoader.java:58)

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Unknown Source)

at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:59)

... 35 more

Caused by: java.lang.NullPointerException

at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:182)

... 41 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.7.0_79, Oracle Corporation

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

Memory: 308576480 bytes (294 MB) / 519438336 bytes (495 MB) up to 1056309248 bytes (1007 MB)

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

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.1448 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.1448-1.7.10.jar)

UC Forge{10.13.4.1448} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1448-1.7.10.jar)

UE Alchemic Reactions{1.0} [Alchemic Reactions] (bin)

GL info: ' Vendor: 'Intel' Version: '2.1.0 - Build 8.15.10.2413' Renderer: 'Intel® B43 Express Chipset'

 

ClientProxy

 

package com.soultechnamei.alchemicreactions;

 

import com.soultechnamei.alchemicreactions.entity.BBACEntity;

import com.soultechnamei.alchemicreactions.entity.render.BBACEntityRender;

 

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

 

public class ClientProxy extends CommonProxy {

 

public void registerRenderThings() {

        ClientRegistry.bindTileEntitySpecialRenderer(BBACEntity.class, new BBACEntityRender());

}

 

}

 

 

BBACEntityRender

 

package com.soultechnamei.alchemicreactions.entity.render;

 

import org.lwjgl.opengl.GL11;

 

import com.soultechnamei.alchemicreactions.entity.Model.BBACEntityModel;

 

import net.minecraft.block.Block;

import net.minecraft.client.Minecraft;

import net.minecraft.client.renderer.OpenGlHelper;

import net.minecraft.client.renderer.Tessellator;

import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;

import net.minecraft.entity.Entity;

import net.minecraft.tileentity.TileEntity;

import net.minecraft.util.ResourceLocation;

import net.minecraft.world.World;

 

public class BBACEntityRender extends TileEntitySpecialRenderer  {

private final BBACEntityModel model;

 

public BBACEntityRender() {

this.model = new BBACEntityModel();

}

 

private void adjustRotatePivotViaMeta(World world, int x, int y, int z) {

int meta = world.getBlockMetadata(x, y, z);

GL11.glPushMatrix();

GL11.glRotatef(meta * (-90), 0.0F, 0.0F, 1.0F);

GL11.glPopMatrix();

}

 

public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale) {

 

GL11.glPushMatrix();

GL11.glTranslatef((float) x + 0.5F, (float) y + 1.5F, (float) z + 0.5F);

ResourceLocation textures = (new ResourceLocation("[yourmodidhere]:textures/blocks/TrafficLightPoleRed.png"));

Minecraft.getMinecraft().renderEngine.bindTexture(textures);

GL11.glPushMatrix();

GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);

this.model.render((Entity) null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);

GL11.glPopMatrix();

GL11.glPopMatrix();

}

 

private void adjustLightFixture(World world, int i, int j, int k, Block block) {

Tessellator tess = Tessellator.instance;

float brightness = block.getLightValue(world, i, j, k);

int skyLight = world.getLightBrightnessForSkyBlocks(i, j, k, 0);

int modulousModifier = skyLight % 65536;

int divModifier = skyLight / 65536;

tess.setColorOpaque_F(brightness, brightness, brightness);

OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float) modulousModifier, divModifier);

}

 

}

 

Main Mod File

 

package com.soultechnamei.alchemicreactions;

 

import net.minecraft.block.Block;

import net.minecraft.block.material.Material;

import net.minecraft.creativetab.CreativeTabs;

import net.minecraft.init.Blocks;

import net.minecraft.item.Item;

import net.minecraft.world.World;

import net.minecraftforge.common.MinecraftForge;

 

import com.soultechnamei.alchemicreactions.blocks.BBAC;

import com.soultechnamei.alchemicreactions.entity.BBACEntity;

import com.soultechnamei.alchemicreactions.items.ItemBAC;

import com.soultechnamei.alchemicreactions.items.ItemBEG;

import com.soultechnamei.alchemicreactions.ModEventHandler;

 

import cpw.mods.fml.common.FMLCommonHandler;

import cpw.mods.fml.common.Mod;

import cpw.mods.fml.common.Mod.EventHandler;

import cpw.mods.fml.common.SidedProxy;

import cpw.mods.fml.common.event.FMLInitializationEvent;

import cpw.mods.fml.common.event.FMLPreInitializationEvent;

import cpw.mods.fml.common.registry.GameRegistry;

 

@Mod(modid = ReactionsMain.MODID, version = ReactionsMain.VERSION)

public class ReactionsMain {

public static final String MODID = "Alchemic Reactions";

public static final String VERSION = "1.0";

 

public static Item BAC; // Basic Alchemy Circle

public static Item BEG;

 

public static Block BBAC;

 

 

ModEventHandler e = new ModEventHandler();

   

@SidedProxy(clientSide="com.soultechnamei.alchemicreachions.ClientProxy", serverSide="com.soultechnamei.alchemicreachionstions.CommonProxy")

public static CommonProxy proxy;

 

@EventHandler

public void preinit(FMLPreInitializationEvent event) {

       

FMLCommonHandler.instance().bus().register(e);

        MinecraftForge.EVENT_BUS.register(e);

 

 

// Blocks

BBAC = new BBAC(Material.rock).setHardness(1.5F).setStepSound(Block.soundTypeStone).setBlockName("BBAC")

.setCreativeTab(CreativeTabs.tabBlock);

// Items

BAC = new ItemBAC();

        BEG = new ItemBEG();

// Game Registry

GameRegistry.registerItem(BAC, "Basic Alchemy Circle");

      GameRegistry.registerItem(BEG, "Basic Essence Gem");

     

GameRegistry.registerBlock(BBAC, "BBAC");

 

ClientProxy.registerRenderThings();

GameRegistry.registerTileEntity(BBACEntity.class, "tileEntityTrafficLight");

 

}

}

 

 

BBAC (OUR BLOCK)

 

package com.soultechnamei.alchemicreactions.blocks;

 

import net.minecraft.block.Block;

import net.minecraft.block.BlockContainer;

import net.minecraft.block.material.Material;

import net.minecraft.entity.player.EntityPlayer;

import net.minecraft.init.Blocks;

import net.minecraft.tileentity.TileEntity;

import net.minecraft.world.World;

 

import com.soultechnamei.alchemicreactions.ModEventHandler;

import com.soultechnamei.alchemicreactions.entity.BBACEntity;

 

public class BBAC extends BlockContainer  {

 

public BBAC(Material material) {

super(material);

 

}

 

public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int i, float f, float g,

float t) {

if (!world.isRemote) {

Block B = world.getBlock(x, y - 1, z);

if (B == Blocks.grass) {

world.setBlock(x, y - 1, z, Blocks.sand);

} else if (B == Blocks.dirt) {

world.setBlock(x, y - 1, z, Blocks.sand);

} else {

 

}

 

} else {

 

}

return true;

}

 

@Override

public int getRenderType() {

return -1;

}

 

@Override

public boolean isOpaqueCube() {

return false;

}

 

public boolean renderAsNormalBlock() {

return false;

}

 

@Override

public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {

 

return new BBACEntity();

}

 

}

 

 

Model

 

 

package com.soultechnamei.alchemicreactions.entity.Model;

 

import net.minecraft.client.model.ModelBase;

import net.minecraft.client.model.ModelRenderer;

import net.minecraft.entity.Entity;

 

public class BBACEntityModel extends ModelBase {

// fields

ModelRenderer Shape1;

 

public BBACEntityModel() {

textureWidth = 32;

textureHeight = 32;

 

Shape1 = new ModelRenderer(this, 0, 0);

Shape1.addBox(0F, 0F, 0F, 16, 0, 16);

Shape1.setRotationPoint(-8F, 23.95F, -8F);

Shape1.setTextureSize(32, 32);

Shape1.mirror = true;

setRotation(Shape1, 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);

Shape1.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);

}

 

}

 

 

 

Any Ideas?

Posted

It can't find your proxy class:

java.lang.ClassNotFoundException: com.soultechnamei.alchemicreachions.ClientProxy

// but your ClientProxy is here:
package com.soultechnamei.alchemicreactions;

// your CommonProxy is even more garbled:
com.soultechnamei.alchemicreachionstions.CommonProxy

So, should it be 'reactions', or 'reachions'? :P

Posted

Though once fixed the error in the code did not leave. The "ClientProxy.registerRenderThings(); " is giving Cannot make a static reference to the non-static method registerRenderThings() from the type ClientProxy

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



×
×
  • Create New...

Important Information

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