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

[1.16.1] Fabulous Graphics Doesn't Render Lines


mrp_v2
 Share

Recommended Posts

I have a mod that draws lines in the world, and everything works fine with Fast or Fancy graphics. However, with Fabulous graphics, no lines render at all. I've tried to look for the differences between Fabulous and Fancy graphics, but I can't find anything that looks useful. Anyone know why something that renders with Fancy graphics wouldn't render with Fabulous graphics?

Example code:

@SubscribeEvent
public static void renderEvent(RenderWorldLastEvent event) {
	@SuppressWarnings("resource")
	PlayerEntity player = Minecraft.getInstance().player;
  	Vector3d playerPos = player.getEyePosition(event.getPartialTicks());
  	//used to use lightning, but now uses a custom render type that is a mix of lightning and transparency
  	IVertexBuilder builder = Minecraft.getInstance().getRenderTypeBuffers().getBufferSource().getBuffer(RenderType.getLightning());
  	event.getMatrixStack().push();
  	event.getMatrixStack().translate(-playerPos.x, -playerPos.y, -playerPos.z);
  	Matrix4f matrix = event.getMatrixStack().getLast().getMatrix();
  	//example draw - makes a squre
  	builder.pos(matrix, 0, 70, 0).color(255, 255, 255, 255).endVertex();
  	builder.pos(matrix, 1, 70, 0).color(255, 255, 255, 255).endVertex();
  	builder.pos(matrix, 1, 70, 1).color(255, 255, 255, 255).endVertex();
  	builder.pos(matrix, 0, 70, 1).color(255, 255, 255, 255).endVertex();
  	//end draw
  	event.getMatrixStack().pop();
  	Minecraft.getInstance().getRenderTypeBuffers().getBufferSource().finish(RenderType.getLightning());
}

 

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.

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

    • does anybody know how to fix this? (Im not too tech savy and dont know alot) basically i made anew modpack today. Tried to create a new world and it crashes every time with this as the crash exit code : ---- Minecraft Crash Report ---- // I let you down. Sorry Time: 24/09/21 18:12 Description: Starting integrated server java.lang.NullPointerException: Starting integrated server     at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:770) ~[guava-21.0.jar:?] {}     at com.google.common.collect.ImmutableCollection$ArrayBasedBuilder.add(ImmutableCollection.java:477) ~[guava-21.0.jar:?] {}     at com.google.common.collect.ImmutableList$Builder.add(ImmutableList.java:758) ~[guava-21.0.jar:?] {}     at com.google.common.collect.CollectCollectors$$Lambda$2173/998099820.accept(Unknown Source) ~[?:?] {}     at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169) ~[?:1.8.0_51] {}     at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[?:1.8.0_51] {}     at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[?:1.8.0_51] {}     at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374) ~[?:1.8.0_51] {}     at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:512) ~[?:1.8.0_51] {}     at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:502) ~[?:1.8.0_51] {}     at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[?:1.8.0_51] {}     at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0_51] {}     at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) ~[?:1.8.0_51] {}     at net.minecraft.world.biome.provider.BiomeProvider.<init>(SourceFile:38) ~[?:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B}     at org.infernalstudios.infernalexp.world.dimension.ModNetherBiomeProvider.<init>(ModNetherBiomeProvider.java:63) ~[?:2.2.0] {re:mixin,re:classloading}     at org.infernalstudios.infernalexp.util.NoiseChunkGeneratorUtil.lambda$null$0(NoiseChunkGeneratorUtil.java:39) ~[?:2.2.0] {re:mixin,re:classloading}     at org.infernalstudios.infernalexp.util.NoiseChunkGeneratorUtil$$Lambda$2595/1435857604.apply(Unknown Source) ~[?:?] {}     at com.mojang.serialization.codecs.RecordCodecBuilder$Instance.lambda$ap3$6(RecordCodecBuilder.java:286) ~[datafixerupper-4.0.26.jar:?] {re:classloading}     at com.mojang.serialization.codecs.RecordCodecBuilder$Instance$$Lambda$932/1229281613.apply(Unknown Source) ~[?:?] {}     at com.mojang.serialization.codecs.RecordCodecBuilder$2.encode(RecordCodecBuilder.java:112) ~[datafixerupper-4.0.26.jar:?] {}     at com.mojang.serialization.codecs.KeyDispatchCodec.encode(KeyDispatchCodec.java:92) ~[datafixerupper-4.0.26.jar:?] {}     at com.mojang.serialization.MapCodec$MapCodecCodec.encode(MapCodec.java:96) ~[datafixerupper-4.0.26.jar:?] {}     at com.mojang.serialization.Encoder.encodeStart(Encoder.java:14) ~[datafixerupper-4.0.26.jar:?] {re:classloading}     at com.mojang.serialization.codecs.FieldEncoder.encode(FieldEncoder.java:24) ~[datafixerupper-4.0.26.jar:?] {}     at com.mojang.serialization.MapCodec$1.encode(MapCodec.java:39) ~[datafixerupper-4.0.26.jar:?] {}     at com.mojang.serialization.codecs.RecordCodecBuilder$Instance$4.encode(RecordCodecBuilder.java:223) ~[datafixerupper-4.0.26.jar:?] {}     at com.mojang.serialization.codecs.RecordCodecBuilder$2.encode(RecordCodecBuilder.java:112) ~[datafixerupper-4.0.26.jar:?] {}     at com.mojang.serialization.MapCodec$MapCodecCodec.encode(MapCodec.java:96) ~[datafixerupper-4.0.26.jar:?] {}     at com.mojang.serialization.Encoder.encodeStart(Encoder.java:14) ~[datafixerupper-4.0.26.jar:?] {re:classloading}     at com.mojang.serialization.codecs.BaseMapCodec.encode(BaseMapCodec.java:52) ~[datafixerupper-4.0.26.jar:?] {re:classloading}     at net.minecraftforge.common.LenientUnboundedMapCodec.encode(LenientUnboundedMapCodec.java:75) ~[?:?] {re:classloading}     at net.minecraftforge.common.LenientUnboundedMapCodec.encode(LenientUnboundedMapCodec.java:22) ~[?:?] {re:classloading}     at com.mojang.serialization.Encoder$1.encode(Encoder.java:25) ~[datafixerupper-4.0.26.jar:?] {}     at com.mojang.serialization.Codec$2.encode(Codec.java:76) ~[datafixerupper-4.0.26.jar:?] {}     at net.minecraft.util.registry.SimpleRegistryCodec.encode(SourceFile:28) ~[?:?] {re:classloading}     at net.minecraft.util.registry.SimpleRegistryCodec.encode(SourceFile:11) ~[?:?] {re:classloading}     at com.mojang.serialization.Encoder$1.encode(Encoder.java:25) ~[datafixerupper-4.0.26.jar:?] {}     at com.mojang.serialization.Codec$2.encode(Codec.java:76) ~[datafixerupper-4.0.26.jar:?] {}     at com.mojang.serialization.Encoder.encodeStart(Encoder.java:14) ~[datafixerupper-4.0.26.jar:?] {re:classloading}     at com.mojang.serialization.codecs.FieldEncoder.encode(FieldEncoder.java:24) ~[datafixerupper-4.0.26.jar:?] {}     at com.mojang.serialization.MapCodec$1.encode(MapCodec.java:39) ~[datafixerupper-4.0.26.jar:?] {}     at com.mojang.serialization.codecs.RecordCodecBuilder$Instance$6.encode(RecordCodecBuilder.java:296) ~[datafixerupper-4.0.26.jar:?] {}     at com.mojang.serialization.codecs.RecordCodecBuilder$2.encode(RecordCodecBuilder.java:112) ~[datafixerupper-4.0.26.jar:?] {}     at com.mojang.serialization.MapCodec$MapCodecCodec.encode(MapCodec.java:96) ~[datafixerupper-4.0.26.jar:?] {}     at com.mojang.serialization.Encoder$1.encode(Encoder.java:25) ~[datafixerupper-4.0.26.jar:?] {}     at com.mojang.serialization.Codec$2.encode(Codec.java:76) ~[datafixerupper-4.0.26.jar:?] {}     at com.mojang.serialization.Encoder.encodeStart(Encoder.java:14) ~[datafixerupper-4.0.26.jar:?] {re:classloading}     at net.minecraft.world.storage.ServerWorldInfo.func_237370_a_(SourceFile:250) ~[?:?] {re:classloading,pl:accesstransformer:B}     at net.minecraft.world.storage.ServerWorldInfo.func_230411_a_(SourceFile:231) ~[?:?] {re:classloading,pl:accesstransformer:B}     at net.minecraft.world.storage.SaveFormat$LevelSave.func_237288_a_(SaveFormat.java:341) ~[?:?] {re:computing_frames,re:mixin,re:classloading}     at net.minecraft.world.storage.SaveFormat$LevelSave.func_237287_a_(SaveFormat.java:336) ~[?:?] {re:computing_frames,re:mixin,re:classloading}     at net.minecraft.client.Minecraft.loadWorld(Minecraft.java:1740) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:abnormals_core.mixins.json:client.MinecraftMixin,pl:mixin:APP:outer_end.mixins.json:BackgroundMusicMixin,pl:mixin:APP:randompatches.mixins.json:client.MinecraftMixin,pl:mixin:APP:betterendforge.mixins.json:MinecraftMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.Minecraft.func_238192_a_(Minecraft.java:1685) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:abnormals_core.mixins.json:client.MinecraftMixin,pl:mixin:APP:outer_end.mixins.json:BackgroundMusicMixin,pl:mixin:APP:randompatches.mixins.json:client.MinecraftMixin,pl:mixin:APP:betterendforge.mixins.json:MinecraftMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.gui.screen.CreateWorldScreen.func_195352_j(CreateWorldScreen.java:260) ~[?:?] {re:classloading,pl:runtimedistcleaner:A}     at net.minecraft.client.gui.screen.CreateWorldScreen.lambda$init$11(CreateWorldScreen.java:205) ~[?:?] {re:classloading,pl:runtimedistcleaner:A}     at net.minecraft.client.gui.screen.CreateWorldScreen$$Lambda$13249/653350518.onPress(Unknown Source) ~[?:?] {}     at net.minecraft.client.gui.widget.button.Button.func_230930_b_(SourceFile:33) ~[?:?] {re:classloading,pl:accesstransformer:B,re:mixin,pl:accesstransformer:B}     at net.minecraft.client.gui.widget.button.AbstractButton.func_230982_a_(SourceFile:16) ~[?:?] {re:classloading,re:mixin}     at net.minecraft.client.gui.widget.Widget.func_231044_a_(Widget.java:136) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A}     at net.minecraft.client.gui.INestedGuiEventHandler.func_231044_a_(SourceFile:27) ~[?:?] {re:computing_frames,re:mixin,re:classloading}     at net.minecraft.client.MouseHelper.func_198033_b(MouseHelper.java:87) ~[?:?] {re:mixin,pl:runtimedistcleaner:A,re:classloading,pl:mixin:APP:randompatches.mixins.json:client.keybindings.MouseHelperMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.MouseHelper$$Lambda$12852/788532761.run(Unknown Source) ~[?:?] {}     at net.minecraft.client.gui.screen.Screen.func_231153_a_(Screen.java:427) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:computing_frames,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:quark.mixins.json:client.ScreenMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.MouseHelper.func_198023_a(MouseHelper.java:85) ~[?:?] {re:mixin,pl:runtimedistcleaner:A,re:classloading,pl:mixin:APP:randompatches.mixins.json:client.keybindings.MouseHelperMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.MouseHelper.func_228030_c_(MouseHelper.java:181) ~[?:?] {re:mixin,pl:runtimedistcleaner:A,re:classloading,pl:mixin:APP:randompatches.mixins.json:client.keybindings.MouseHelperMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.MouseHelper$$Lambda$12851/2033249737.run(Unknown Source) ~[?:?] {}     at net.minecraft.util.concurrent.ThreadTaskExecutor.execute(ThreadTaskExecutor.java:111) ~[?:?] {re:mixin,pl:accesstransformer:B,xf:OptiFine:default,re:computing_frames,pl:accesstransformer:B,xf:OptiFine:default,re:classloading,pl:accesstransformer:B,xf:OptiFine:default}     at net.minecraft.client.MouseHelper.func_228028_b_(MouseHelper.java:180) ~[?:?] {re:mixin,pl:runtimedistcleaner:A,re:classloading,pl:mixin:APP:randompatches.mixins.json:client.keybindings.MouseHelperMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.MouseHelper$$Lambda$10760/310858279.invoke(Unknown Source) ~[?:?] {}     at org.lwjgl.glfw.GLFWMouseButtonCallbackI.callback(GLFWMouseButtonCallbackI.java:36) ~[lwjgl-glfw-3.2.2.jar:build 10] {}     at org.lwjgl.system.JNI.invokeV(Native Method) ~[lwjgl-3.2.2.jar:build 10] {}     at org.lwjgl.glfw.GLFW.glfwWaitEventsTimeout(GLFW.java:3174) ~[lwjgl-glfw-3.2.2.jar:build 10] {}     at com.mojang.blaze3d.systems.RenderSystem.limitDisplayFPS(SourceFile:127) ~[?:?] {re:mixin,re:classloading}     at net.minecraft.client.Minecraft.func_195542_b(Minecraft.java:999) [?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:abnormals_core.mixins.json:client.MinecraftMixin,pl:mixin:APP:outer_end.mixins.json:BackgroundMusicMixin,pl:mixin:APP:randompatches.mixins.json:client.MinecraftMixin,pl:mixin:APP:betterendforge.mixins.json:MinecraftMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:607) [?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:abnormals_core.mixins.json:client.MinecraftMixin,pl:mixin:APP:outer_end.mixins.json:BackgroundMusicMixin,pl:mixin:APP:randompatches.mixins.json:client.MinecraftMixin,pl:mixin:APP:betterendforge.mixins.json:MinecraftMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.main.Main.main(Main.java:184) [?:?] {re:classloading,pl:runtimedistcleaner:A}     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51] {}     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_51] {}     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_51] {}     at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_51] {}     at net.minecraftforge.fml.loading.FMLClientLaunchProvider.lambda$launchService$0(FMLClientLaunchProvider.java:51) [forge-1.16.5-36.2.5.jar:36.2] {}     at net.minecraftforge.fml.loading.FMLClientLaunchProvider$$Lambda$489/929856893.call(Unknown Source) [forge-1.16.5-36.2.5.jar:36.2] {}     at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-8.0.9.jar:?] {}     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-8.0.9.jar:?] {}     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-8.0.9.jar:?] {}     at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [modlauncher-8.0.9.jar:?] {re:classloading}     at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [modlauncher-8.0.9.jar:?] {re:classloading}    
    • I think I've got it. Or at least a base to start working from. if (toolRef.getHarvestLevel(heldItems, ToolType.AXE, playerRef, blockState) <= 0) { event.setCanceled(true); } I've implemented it into my existing onBlockBreak event, because I was having issues to get it working for the HarvestCheck event. For a weird reason it wouldn't accept the BlockState reference inside the getHarvestLevel() method, when I was using it on HarvestCheck event. I'd still prefer any kind of reflection method though. Was way less complicated.
    • It's not only the tools. Let me explain. I remove some of the vanilla tools, primarily those made of wood, and then only need to check for tools in general. Ontop of that I've build some custom tools, which allows me to define what exactly they are allowed to harvest, and what not, in the specific custom tool class. Then I check against AIR(for having no item in my hands at all), entirely disallowing to harvest anything but for example, DIRT, CROPS, and stuff you'd need no tools to harvest in reality. Which leaves harvest with blocks in my hand open to be addressed. In the past I was just using the "setRequiresTool" reflection method, so I couldn't bypass my prohibition of harvesting anything with only AIR, or random blocks in my hand.
    • I have no idea what you are trying to do here. If you want to check for any tools, why do you have an if statement at all...?
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.