Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Rendering ItemStack in TESR


shadowfacts
 Share

Recommended Posts

So I've got a

TileEntity

that contains an

ItemStack

. The TESR for the TE should render the item spinning and bobbing up and down in the block. I've run into a problem because my block isn't a normal 1m^3 block, but much smaller.

 

I've tried two approaches to rendering the item, neither of which has been completely successful.

 

My first approach was getting the

IBakedModel

for the stack using

RenderItem

and then also use

RenderItem

to render that model. This worked and stayed in the proper position while rotating/bobbing. However, the item was rendered completely dark and I wasn't able to find a fix (screenshot).

 

My second approach was to use

RenderItem

to get the

IBakedModel

for the stack and use

BlockModelRenderer

to render the model. This resulted in the item rendering properly lit, but the item was moving with the player (not in a 1:1 fashion, but something else).

Don't make mods if you don't know Java.

Check out my website: http://shadowfacts.net

Developer of many mods

Link to comment
Share on other sites

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
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.

 Share



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I've been trying to get a server running on my Raspberry Pi, but run.sh won't function properly! I've used chmod, but it fails every time I try to run it. Here's the output: pi@raspberrypi:~/🅱️orge $ sudo chmod +x run.sh pi@raspberrypi:~/🅱️orge $ ./run.sh Exception in thread "main" java.lang.ExceptionInInitializerError at cpw.mods.securejarhandler@1.0.3/cpw.mods.jarhandling.SecureJar.from(SecureJar.java:58) at cpw.mods.securejarhandler@1.0.3/cpw.mods.jarhandling.SecureJar.from(SecureJar.java:50) at cpw.mods.securejarhandler@1.0.3/cpw.mods.jarhandling.SecureJar.from(SecureJar.java:42) at cpw.mods.bootstraplauncher@1.0.0/cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:93) Caused by: java.lang.IllegalArgumentException: Error decoding percent encoded characters at java.base/sun.net.www.ParseUtil.decode(ParseUtil.java:218) at java.base/jdk.internal.loader.URLClassPath$FileLoader.<init>(URLClassPath.java:1219) at java.base/jdk.internal.loader.URLClassPath$3.run(URLClassPath.java:488) at java.base/jdk.internal.loader.URLClassPath$3.run(URLClassPath.java:482) at java.base/java.security.AccessController.doPrivileged(AccessController.java:712) at java.base/jdk.internal.loader.URLClassPath.getLoader(URLClassPath.java:481) at java.base/jdk.internal.loader.URLClassPath.getLoader(URLClassPath.java:449) at java.base/jdk.internal.loader.URLClassPath$1.next(URLClassPath.java:345) at java.base/jdk.internal.loader.URLClassPath$1.hasMoreElements(URLClassPath.java:356) at java.base/jdk.internal.loader.BuiltinClassLoader$1.hasNext(BuiltinClassLoader.java:408) at java.base/jdk.internal.loader.BuiltinClassLoader$1.hasMoreElements(BuiltinClassLoader.java:416) at java.base/java.lang.CompoundEnumeration.next(ClassLoader.java:2725) at java.base/java.lang.CompoundEnumeration.hasMoreElements(ClassLoader.java:2734) at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.nextProviderClass(ServiceLoader.java:1210) at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1228) at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1273) at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1309) at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1393) at java.base/java.nio.file.spi.FileSystemProvider.loadInstalledProviders(FileSystemProvider.java:156) at java.base/java.nio.file.spi.FileSystemProvider$1.run(FileSystemProvider.java:207) at java.base/java.nio.file.spi.FileSystemProvider$1.run(FileSystemProvider.java:204) at java.base/java.security.AccessController.doPrivileged(AccessController.java:318) at java.base/java.nio.file.spi.FileSystemProvider.installedProviders(FileSystemProvider.java:204) at cpw.mods.securejarhandler@1.0.3/cpw.mods.jarhandling.impl.Jar.<clinit>(Jar.java:29) ... 4 more (Yes, the 🅱️s are intentional)
    • when i press install on any version it says "adfoc.us redirected you too many times" and i cant install any version. please help.
    • I've got flywheel installed but it still gives me the exit on error
    • https://www.dropbox.com/s/zrit7mgov31left/2022-08-14-7.log?dl=0
  • Topics

×
×
  • Create New...

Important Information

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