GregTechCEu Modern

GregTechCEu Modern

6M Downloads

Exception thrown in Jade showing Quantum Tank

Taskeren opened this issue ยท 5 comments

commented

Checked for existing issues

  • I have checked for existing issues, and have found none.

Tested latest version

  • I have checked that this occurs on the latest version.

GregTech CEu Version

7.1.4

Minecraft Version

1.20.1 Forge

Recipe Viewer Installed

EMI

Environment

Singleplayer

Cross-Mod Interaction

Yes

Other Installed Mods

My mod https://github.com/ElytraServers/gtm-quality-of-life. LMK if you want to have further details.

Expected Behavior

Not crashing the game.

Actual Behavior

java.lang.IllegalStateException: Can't modify the empty stack.
	at TRANSFORMER/[email protected]/net.minecraftforge.fluids.FluidStack.setAmount(FluidStack.java:175)
	at TRANSFORMER/[email protected]/com.gregtechceu.gtceu.api.misc.forge.QuantumFluidHandlerItemStack.getFluid(QuantumFluidHandlerItemStack.java:45)
	at TRANSFORMER/[email protected]/com.gregtechceu.gtceu.api.misc.forge.QuantumFluidHandlerItemStack.getFluidInTank(QuantumFluidHandlerItemStack.java:73)
	at TRANSFORMER/[email protected]/cn.elytra.mod.gtmqol.client.item_decorator.FluidHandlerItemDecorator.render(FluidHandlerItemDecorator.java:79)
	at TRANSFORMER/[email protected]/net.minecraftforge.client.ItemDecoratorHandler.render(ItemDecoratorHandler.java:62)
	at TRANSFORMER/[email protected]/snownee.jade.util.ClientProxy.renderItemDecorationsExtra(ClientProxy.java:288)
	at TRANSFORMER/[email protected]/snownee.jade.overlay.DisplayHelper.renderGuiItemDecorations(DisplayHelper.java:95)
	at TRANSFORMER/[email protected]/snownee.jade.overlay.DisplayHelper.drawItem(DisplayHelper.java:208)
	at TRANSFORMER/[email protected]/snownee.jade.impl.ui.ItemStackElement.render(ItemStackElement.java:50)
	at TRANSFORMER/[email protected]/snownee.jade.overlay.TooltipRenderer.draw(TooltipRenderer.java:117)
	at TRANSFORMER/[email protected]/snownee.jade.overlay.OverlayRenderer.renderOverlay(OverlayRenderer.java:206)
	at TRANSFORMER/[email protected]/snownee.jade.overlay.OverlayRenderer.renderOverlay478757(OverlayRenderer.java:149)
	at TRANSFORMER/[email protected]/snownee.jade.util.ClientProxy.onRenderTick(ClientProxy.java:163)
{Count:1b,id:"gtceu:opv_quantum_tank",tag:{stored:{Amount:0,FluidName:"minecraft:empty"},storedAmount:0L}}

I want to render a item decoration to show the inside fluids of the quantum tanks, but it looks like Jade or GTM not handle this condition properly.

Steps to Reproduce

Just simply place a quantum tank and look at it.

Additional Information

No response

commented

don't quantum tanks already render their contents in the item?

commented

don't quantum tanks already render their contents in the item?

Yes, but it's too small to know what kind of fluid in it.
I made this item decoration mainly for the drums, and btw the quantum tanks.

commented

by the way, that should be a PR to gtm instead of being in an addon

commented

by the way, that should be a PR to gtm instead of being in an addon

I don't know if ppl managing GTM have interest in this. My PRs have been rejected many times in all kind of mods. :(

Thanks anyway, I'll try to contribute GTM more.

commented

I am part of the people managing GTM, and yes, we do want this.
We just haven't gotten around to implementing it.