Jump to content

Recommended Posts

Posted

I am making a mod were I have a copy of vanilla cocoa beans and thanks to a person called "VivaDaylight3" I have it working, but I have an issue with the render types method.

 

When I put this into my block class:

public int getRenderType()

    {

        return 28;

    }

 

(28 being the render cocoa render type)

 

 

I get this error:

 

---- Minecraft Crash Report ----

// You should try our sister game, Minceraft!

 

Time: 11/30/13 1:30 PM

Description: Unexpected error

 

java.lang.ClassCastException: mod.xtronius.extrafoods.blocks.BlockCropGrape cannot be cast to net.minecraft.block.BlockCocoa

at net.minecraft.client.renderer.RenderBlocks.renderBlockByRenderType(RenderBlocks.java:482)

at net.minecraft.client.renderer.WorldRenderer.updateRenderer(WorldRenderer.java:224)

at net.minecraft.client.renderer.RenderGlobal.updateRenderers(RenderGlobal.java:1551)

at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1129)

at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1002)

at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:946)

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

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

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

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

 

 

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

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

 

-- Head --

Stacktrace:

at net.minecraft.client.renderer.RenderBlocks.renderBlockByRenderType(RenderBlocks.java:482)

at net.minecraft.client.renderer.WorldRenderer.updateRenderer(WorldRenderer.java:224)

at net.minecraft.client.renderer.RenderGlobal.updateRenderers(RenderGlobal.java:1551)

at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1129)

 

-- Affected level --

Details:

Level name: MpServer

All players: 1 total; [EntityClientPlayerMP['Notch'/60, l='MpServer', x=395.67, y=8.62, z=1184.33]]

Chunk stats: MultiplayerChunkCache: 185

Level seed: 0

Level generator: ID 01 - flat, ver 0. Features enabled: false

Level generator options:

Level spawn location: World: (391,4,1195), Chunk: (at 7,0,11 in 24,74; contains blocks 384,0,1184 to 399,255,1199), Region: (0,2; contains chunks 0,64 to 31,95, blocks 0,0,1024 to 511,255,1535)

Level time: 544688 game time, 5000 day time

Level dimension: 0

Level storage version: 0x00000 - Unknown?

Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)

Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false

Forced entities: 13 total; [EntityBlock['unknown'/68, l='MpServer', x=407.45, y=5.50, z=1224.45], EntityBlock['unknown'/69, l='MpServer', x=397.50, y=9.45, z=1224.45], EntityBlock['unknown'/70, l='MpServer', x=397.45, y=5.45, z=1214.50], EntityBlock['unknown'/71, l='MpServer', x=407.45, y=5.45, z=1214.50], EntityBlock['unknown'/64, l='MpServer', x=397.50, y=9.45, z=1214.45], EntityBlock['unknown'/65, l='MpServer', x=407.45, y=5.50, z=1214.45], EntityBlock['unknown'/66, l='MpServer', x=397.50, y=5.45, z=1224.45], EntityBlock['unknown'/67, l='MpServer', x=397.45, y=5.50, z=1224.45], EntityBlock['unknown'/72, l='MpServer', x=397.45, y=9.45, z=1214.50], EntityBlock['unknown'/73, l='MpServer', x=407.45, y=9.45, z=1214.50], EntityBlock['unknown'/63, l='MpServer', x=397.45, y=5.50, z=1214.45], EntityBlock['unknown'/62, l='MpServer', x=397.50, y=5.45, z=1214.45], EntityClientPlayerMP['Notch'/60, l='MpServer', x=395.67, y=8.62, z=1184.33]]

Retry entities: 0 total; []

Server brand: fml,forge

Server type: Integrated singleplayer server

Stacktrace:

at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:440)

at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2312)

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

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

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

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

 

-- System Details --

Details:

Minecraft Version: 1.6.4

Operating System: Windows 7 (x86) version 6.1

Java Version: 1.7.0_45, Oracle Corporation

Java VM Version: Java HotSpot Client VM (mixed mode), Oracle Corporation

Memory: 863804888 bytes (823 MB) / 1067057152 bytes (1017 MB) up to 1067057152 bytes (1017 MB)

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

AABB Pool Size: 806 (45136 bytes; 0 MB) allocated, 2 (112 bytes; 0 MB) used

Suspicious classes: FML and Forge are installed

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

FML: MCP v8.11 FML v6.4.45.953 Minecraft Forge 9.11.1.953 11 mods loaded, 11 mods active

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

FML{6.4.45.953} [Forge Mod Loader] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

Forge{9.11.1.953} [Minecraft Forge] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

BattleCraftMod{MC 1.6.4-0.1 Alpha} [battle Craft Mod] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

BuildCraft|Core{@VERSION@} [buildCraft] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

BuildCraft|Builders{@VERSION@} [bC Builders] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

BuildCraft|Energy{@VERSION@} [bC Energy] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

BuildCraft|Factory{@VERSION@} [bC Factory] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

BuildCraft|Transport{@VERSION@} [bC Transport] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

BuildCraft|Silicon{@VERSION@} [bC Silicon] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

extrafoods{MC 1.6.4-0.1 Alpha} [Extra Foods Mod] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

Launched Version: 1.6

LWJGL: 2.9.0

OpenGL: Intel Bear Lake B GL version 1.4.0 - Build 8.14.10.1930, Intel

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

Type: Client (map_client.txt)

Resource Pack: Default

Current Language: English (US)

Profiler Position: N/A (disabled)

Vec3 Pool Size: 27 (1512 bytes; 0 MB) allocated, 21 (1176 bytes; 0 MB) used

 

 

Is there a way to fix this or will I have to make this into a tile entity and then custom render the block like that.

Sorry if I sound stupid or am making this more complicated than it needs to be because I am not the best at modding yet.

I would really appreciate any help anyone can give.

Don't be afraid to ask question when modding, there are no stupid question! Unless you don't know java then all your questions are stupid!

Posted

Hi

 

If you want to use the cocao rendering code to render your new block, you will need to make your new block extend BlockCocao instead of whatever it's currently extending, so that the cocao rendering code can work with it.

 

If that won't work for you, alternatively you could copy the cocao rendering code into your own renderer (eg ISimpleBlockRenderingHandler).  Some more information here-

http://greyminecraftcoder.blogspot.com.au/2013/07/block-rendering.html

and there is also some sample code here

http://greyminecraftcoder.blogspot.com.au/2013/09/sample-code-for-rendering-items.html

(look at the BlockPyramidRenderer section)

 

-TGG

 

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

    • I tried do download the essential mod to my mod pack but i didnt work. I paly on 1.21 and it should work. I use neoforge for my modding. The weird things is my friend somehow added the mod to his modpack and many others that I somehow can´t. Is there anything i can do? 
    • Thanks, I've now installed a slightly newer version and the server is at least starting up now.
    • i have the same issue. Found 1 Create mod class dependency(ies) in createdeco-1.3.3-1.19.2.jar, which are missing from the current create-1.19.2-0.5.1.i.jar Found 11 Create mod class dependency(ies) in createaddition-fabric+1.19.2-20230723a.jar, which are missing from the current create-1.19.2-0.5.1.i.jar Detailed walkthrough of mods which rely on missing Create mod classes: Mod: createaddition-fabric+1.19.2-20230723a.jar Missing classes of create: com/simibubi/create/compat/jei/category/sequencedAssembly/JeiSequencedAssemblySubCategory com/simibubi/create/compat/recipeViewerCommon/SequencedAssemblySubCategoryType com/simibubi/create/compat/rei/CreateREI com/simibubi/create/compat/rei/EmptyBackground com/simibubi/create/compat/rei/ItemIcon com/simibubi/create/compat/rei/category/CreateRecipeCategory com/simibubi/create/compat/rei/category/WidgetUtil com/simibubi/create/compat/rei/category/animations/AnimatedBlazeBurner com/simibubi/create/compat/rei/category/animations/AnimatedKinetics com/simibubi/create/compat/rei/category/sequencedAssembly/ReiSequencedAssemblySubCategory com/simibubi/create/compat/rei/display/CreateDisplay Mod: createdeco-1.3.3-1.19.2.jar Missing classes of create: com/simibubi/create/content/kinetics/fan/SplashingRecipe
    • The crash points to moonlight lib - try other builds or make a test without this mod and the mods requiring it
    • Do you have shaders enabled? There is an issue with the mod simpleclouds - remove this mod or disable shaders, if enabled  
  • Topics

×
×
  • Create New...

Important Information

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