Git Product home page Git Product logo

Comments (14)

 avatar commented on September 27, 2024 2

Great news, sp tagged the issue today, it seems they might actually attempt to fix it.

from ultimate-car-mod.

henkelmax avatar henkelmax commented on September 27, 2024

This is a known issue in combination with OptiFine. Please report this error on the OptiFine issue tracker.

from ultimate-car-mod.

 avatar commented on September 27, 2024

Actually, I'm fairly sure you can fix this yourself. You see, this issue is because you don't delete the text that resides at the top of the gas station before deleting the block itself. I can destroy the gas station from the bottom up just fine, but from the top down, it crashes. All other mods that have two-block-tall blocks can be destroyed just fine and they do not have text on the top half of the block.

Try adding it to your code where the text box object gets destroyed before the rest of the block (I notice the text kinda floats there if I break from the top down, which results in the game crash, as if optifine can no longer reference the text box to destroy it.)

from ultimate-car-mod.

henkelmax avatar henkelmax commented on September 27, 2024

I don't exactly know what you mean with text object. If you know the cause of the problem you can send me a permalink of the piece of code you mean.

from ultimate-car-mod.

 avatar commented on September 27, 2024

The gas station has a visual text box similar to a sign that renders on the top half of the block. This text does not disappear if the top half of the block gets destroyed, which results in optifine losing track of the text box which causes the crash. However, if I destroy the block from the bottom up, the text disappears before the top half gets destroyed.

This means that the crash is caused by your code not destroying the text (usually it says stuff like "No car" on it) before the block gets destroyed. The text should be destroyed first before the block (this is the same for signs). I will search your code for the code that isn't doing this as well as attach a screenshot

from ultimate-car-mod.

 avatar commented on September 27, 2024

Capture
See here how the text does not disappear/get destroyed? it should always be destroyed first, not the block.
Capture2

from ultimate-car-mod.

henkelmax avatar henkelmax commented on September 27, 2024

I think you don't understand how text rendering works. The text is actually rendered by the bottom block. It the bottom block is there, the text is also there. There is no such thing as a text object that holds the text. It is just rendering code of the bottom block (Same used for chests, shulkerboxes, signs, banners etc.).
There is also no "keeping track" of text objects.

But maybe I am understanding you wrong. Let me know if you find something.

from ultimate-car-mod.

 avatar commented on September 27, 2024

With further investigation, I have a suspicion about fixTop(). Considering you do this every tick in the bottom block class of the gas station, this could cause the state of the top block to return null whilst it is being destroyed, causing fixTop to panic and cause this crash. since destroying the bottom block disables this code, this could explain why it does not crash when the gas station is destroyed bottom-up

if (world.getGameTime() % 100 == 0) {
fixTop();
}

why perform this every tick if the block gets oriented upon placement? it's not like it can suddenly change orientation after it is placed.

from ultimate-car-mod.

 avatar commented on September 27, 2024

image
in fact, the debug log seems to say that is the issue. when top disappears before the bottom, your code panics over a null reference to it.

from ultimate-car-mod.

 avatar commented on September 27, 2024

again, other modded two-high blocks do not experience this, this is an issue tied specifically to your mod and yours alone.

from ultimate-car-mod.

henkelmax avatar henkelmax commented on September 27, 2024

The fixTop() is used to re-add the top when upgrading from an older version, as earlier versions just used the bottom part of the gas station.
But this should not impact anything as I am checking if the top block is actually a gas station block:

if (top.getBlock().equals(ModBlocks.FUEL_STATION_TOP)) {

And block states should never return null. It is always minecraft:air if there is no block.

image
in fact, the debug log seems to say that is the issue. when top disappears before the bottom, your code panics over a null reference to it.

This stack trace doesn't directly reference any of my classes. It seems that this problem is a little bit more complicated than that. Not only because the issue only occurs in combination with optifine.

But because optifine is closed source, I can't look into their code to see whats going on there.

java.lang.NullPointerException: Unexpected error
	at net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher.func_228850_a_(TileEntityRendererDispatcher.java:97) ~[?:?] {re:classloading,pl:accesstransformer:B,xf:OptiFine:default,xf:Vivecraft:default}
	at net.minecraft.client.renderer.WorldRenderer.func_228426_a_(WorldRenderer.java:1801) ~[?:?] {re:classloading,pl:accesstransformer:B,xf:OptiFine:default,xf:Vivecraft:default}
	at net.minecraft.client.renderer.GameRenderer.func_228378_a_(GameRenderer.java:1022) ~[?:?] {re:classloading,pl:accesstransformer:B,xf:OptiFine:default,xf:Vivecraft:default}
	at net.minecraft.client.renderer.GameRenderer.func_195458_a(GameRenderer.java:693) ~[?:?] {re:classloading,pl:accesstransformer:B,xf:OptiFine:default,xf:Vivecraft:default}
	at net.minecraft.client.Minecraft.func_195542_b(Minecraft.java:1218) ~[?:?] {re:classloading,pl:accesstransformer:B,xf:Vivecraft:default}
	at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:723) ~[?:?] {re:classloading,pl:accesstransformer:B,xf:Vivecraft:default}
	at net.minecraft.client.main.Main.main(Main.java:184) ~[1.16.2.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {}
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?] {}
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {}
	at java.lang.reflect.Method.invoke(Method.java:564) ~[?:?] {}
	at net.minecraftforge.fml.loading.FMLClientLaunchProvider.lambda$launchService$0(FMLClientLaunchProvider.java:51) ~[forge-1.16.2-33.0.32.jar:33.0] {}
	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-6.1.1.jar:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-6.1.1.jar:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-6.1.1.jar:?] {}
	at cpw.mods.modlauncher.Launcher.run(Launcher.java:81) [modlauncher-6.1.1.jar:?] {}
	at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) [modlauncher-6.1.1.jar:?] {}

And as you see in your logs: pl:accesstransformer:B,xf:OptiFine:default
There is definitely optifine involved.

from ultimate-car-mod.

 avatar commented on September 27, 2024

Then why is it that other mods can handle the same dual-block style with optifine whilst yours cannot? maybe it's a good idea to peek at another mod's dual-block code?

from ultimate-car-mod.

 avatar commented on September 27, 2024

I have notified optifine of the issue and will pass any messages along as necessary (although I still have reason to believe optifine is not at fault, even though their rendering code is included in the path trace)

from ultimate-car-mod.

henkelmax avatar henkelmax commented on September 27, 2024

Then why is it that other mods can handle the same dual-block style with optifine whilst yours cannot? maybe it's a good idea to peek at another mod's dual-block code?

Every mod has its own multi block code. This one is really unique as it is a rotatable block that has a special renderer as well as a normal block model, is rotatable, has a GUI, is interactable and has a fluid interface.

I have notified optifine of the issue and will pass any messages along as necessary (although I still have reason to believe optifine is not at fault, even though their rendering code is included in the path trace)

I am pretty sure there is some mistake somewhere in my code, but the problem is, that I cant find out the problem if I don't have access to their source code.

Don't get your hopes too high on the optifine issue. I also reported some issues to them, and it seems they don't care about problems with other mods or forge in general.

from ultimate-car-mod.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.