The Tree System

Download this jar and add it to your project dependencies:

Funny, it was in the library - on the internet :wink:

:joy::joy::joy:

where are the project dependencies? is it the library?

I have integration with the library as well in jMB.

I put it in my library but it still doesn’t work

I’m holding a red piece of string. Can you tell me how long it is?

I put it i my MatDefs folder and get another error message.

Uncaught exception thrown in Thread[jME3 Main,5,main]
UnsupportedOperationException

Exceptions are useless without the stack trace. Don’t even bother telling us about them if you don’t/won’t include it.

Why did you do that?

Are you using the SDK? Given your apparent skill level I highly recommend you use either the SDK or JMB… but you can use gradle also.

Anyway, in the SDK, add the jar to your project dependencies… in the tree. Where you see all of the other JME jars and stuff. It should be there. Not anywhere else.

ok I’ll try

I think the TreeLighting.j3md dependency is fixed. But I get another error when I try to view the model in the SDK. Also I get an error when running the game.

Well around these parts you get an error when you don’t post your error message and stack trace :wink:

This is my error message:

Uncaught exception thrown in Thread[jME3 Main,5,main]
UnsupportedOperationException

This is my stack trace:

SEVERE: Uncaught exception thrown in Thread[jME3 Main,5,main]
java.lang.UnsupportedOperationException
at com.jme3.material.plugins.J3MLoader.readTechnique(J3MLoader.java:655)
at com.jme3.material.plugins.J3MLoader.loadFromRoot(J3MLoader.java:775)
at com.jme3.material.plugins.J3MLoader.load(J3MLoader.java:796)
at com.jme3.asset.DesktopAssetManager.loadLocatedAsset(DesktopAssetManager.java:259)
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:373)
at com.jme3.material.Material.read(Material.java:1056)
at com.jme3.export.binary.BinaryImporter.readObject(BinaryImporter.java:342)
at com.jme3.export.binary.BinaryInputCapsule.readSavable(BinaryInputCapsule.java:457)
at com.jme3.scene.Geometry.read(Geometry.java:641)
at com.jme3.export.binary.BinaryImporter.readObject(BinaryImporter.java:342)
at com.jme3.export.binary.BinaryInputCapsule.resolveIDs(BinaryInputCapsule.java:483)
at com.jme3.export.binary.BinaryInputCapsule.readSavableArray(BinaryInputCapsule.java:471)
at com.jme3.export.binary.BinaryInputCapsule.readSavableArrayList(BinaryInputCapsule.java:587)
at com.jme3.scene.Node.read(Node.java:744)
at com.jme3.export.binary.BinaryImporter.readObject(BinaryImporter.java:342)
at com.jme3.export.binary.BinaryInputCapsule.resolveIDs(BinaryInputCapsule.java:483)
at com.jme3.export.binary.BinaryInputCapsule.readSavableArray(BinaryInputCapsule.java:471)
at com.jme3.export.binary.BinaryInputCapsule.readSavableArrayList(BinaryInputCapsule.java:587)
at com.jme3.scene.Node.read(Node.java:744)
at com.jme3.export.binary.BinaryImporter.readObject(BinaryImporter.java:342)
at com.jme3.export.binary.BinaryImporter.load(BinaryImporter.java:242)
at com.jme3.export.binary.BinaryImporter.load(BinaryImporter.java:125)
at com.jme3.export.binary.BinaryImporter.load(BinaryImporter.java:109)
at com.jme3.export.binary.BinaryLoader.load(BinaryLoader.java:36)
at com.jme3.asset.DesktopAssetManager.loadLocatedAsset(DesktopAssetManager.java:259)
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:373)
at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:416)
at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:420)
at mygame.Main.simpleInitApp(Main.java:129)
at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:220)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:130)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:211)
at java.lang.Thread.run(Thread.java:748)

What version of JME are you using?

v3.2.1-stable-sdk3

What is this line in your code?

Just googling the error message led me to this one:

I’m not sure because I changed my code but I think it’s this code where I load my tree.
Spatial tree = assetManager.loadModel("/Models/tree2.j3o");

Ah, yes, I haven’t cut a release since those fixes.