• Recently Browsing

    No registered users viewing this page.

  • Posts

    • You can use the Java Proxy-API to create instances of inaccessible interfaces. You will then have to use reflection to invoke the CookingRecipeSerializer constructor, because to invoke it directly you'd have to refer to the interface class by name, which you can't do.
    • Marking solved. silly mistake. I did not specify the positions of the particleand thus it spawned at the world origin 0,0,0 as expected from the vertex code
    • I am experiencing an issue with rendering the custom particle. Everything is set up properly(I have tested it with the vanilla implementation) and issues only occur when I begin to use custom rendering. @Override public void renderParticle(IVertexBuilder buffer, ActiveRenderInfo renderInfo, float partialTicks) { RenderSystem.pushMatrix(); RenderSystem.enableDepthTest(); RenderSystem.disableTexture(); BufferBuilder buf = Tessellator.getInstance().getBuffer(); buf.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_COLOR); IVertexBuilder buff = buf.getVertexBuilder(); int j = this.getBrightnessForRender(partialTicks); Vec3d projectedView = renderInfo.getProjectedView(); RenderSystem.translated(-projectedView.x, -projectedView.y, -projectedView.z); injectPreBuffer(buff); //TOP buff.pos(1, 1, 1).tex(minU, minV).color(r, g, b, a).lightmap(j).endVertex(); buff.pos(0, 1, 1).tex(minU, minV).color(r, g, b, a).lightmap(j).endVertex(); buff.pos(0, 1, 0).tex(minU, minV).color(r, g, b, a).lightmap(j).endVertex(); buff.pos(1, 1, 0).tex(minU, minV).color(r, g, b, a).lightmap(j).endVertex(); //BOTOM buff.pos(1, 0, 1).tex(minU, minV).color(r, g, b, a).lightmap(j).endVertex(); buff.pos(0, 0, 1).tex(minU, minV).color(r, g, b, a).lightmap(j).endVertex(); buff.pos(0, 0, 0).tex(minU, minV).color(r, g, b, a).lightmap(j).endVertex(); buff.pos(1, 0, 0).tex(minU, minV).color(r, g, b, a).lightmap(j).endVertex(); //Side1 buff.pos(1, 1, 0).tex(minU, minV).color(r, g, b, a).lightmap(j).endVertex(); buff.pos(0, 1, 0).tex(minU, minV).color(r, g, b, a).lightmap(j).endVertex(); buff.pos(0, 0, 0).tex(minU, minV).color(r, g, b, a).lightmap(j).endVertex(); buff.pos(1, 0, 0).tex(minU, minV).color(r, g, b, a).lightmap(j).endVertex(); //Side2 buff.pos(1, 1, 1).tex(minU, minV).color(r, g, b, a).lightmap(j).endVertex(); buff.pos(0, 1, 1).tex(minU, minV).color(r, g, b, a).lightmap(j).endVertex(); buff.pos(0, 0, 1).tex(minU, minV).color(r, g, b, a).lightmap(j).endVertex(); buff.pos(1, 0, 1).tex(minU, minV).color(r, g, b, a).lightmap(j).endVertex(); //Side3 buff.pos(0, 1, 1).tex(minU, minV).color(r, g, b, a).lightmap(j).endVertex(); buff.pos(0, 0, 1).tex(minU, minV).color(r, g, b, a).lightmap(j).endVertex(); buff.pos(0, 0, 0).tex(minU, minV).color(r, g, b, a).lightmap(j).endVertex(); buff.pos(0, 1, 0).tex(minU, minV).color(r, g, b, a).lightmap(j).endVertex(); //Side4 buff.pos(1, 1, 1).tex(minU, minV).color(r, g, b, a).lightmap(j).endVertex(); buff.pos(1, 0, 1).tex(minU, minV).color(r, g, b, a).lightmap(j).endVertex(); buff.pos(1, 0, 0).tex(minU, minV).color(r, g, b, a).lightmap(j).endVertex(); buff.pos(1, 1, 0).tex(minU, minV).color(r, g, b, a).lightmap(j).endVertex(); injectPostBuffer(buff); Tessellator.getInstance().draw(); RenderSystem.enableTexture(); RenderSystem.popAttributes(); RenderSystem.popMatrix(); } @Override public IParticleRenderType getRenderType() { return IParticleRenderType.CUSTOM; } This rendering code does not produce errors but it doesn't render anything either.  If I remove this: Tesselator.getInstance().draw(); The game crashes with: Description: Rendering Particle java.lang.IllegalStateException: Already building! at net.minecraft.client.renderer.BufferBuilder.begin(BufferBuilder.java:176) ~[forge-1.15.2-31.1.44_mapped_snapshot_20200225-1.15.1-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.papaprime.gaze.client.fx.CubicParticle.renderParticle(CubicParticle.java:50) ~[main/:?] {re:classloading} at net.minecraft.client.particle.ParticleManager.renderParticles(ParticleManager.java:330) ~[forge-1.15.2-31.1.44_mapped_snapshot_20200225-1.15.1-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.renderer.WorldRenderer.updateCameraAndRender(WorldRenderer.java:1084) ~[forge-1.15.2-31.1.44_mapped_snapshot_20200225-1.15.1-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.renderer.GameRenderer.renderWorld(GameRenderer.java:612) ~[forge-1.15.2-31.1.44_mapped_snapshot_20200225-1.15.1-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.renderer.GameRenderer.updateCameraAndRender(GameRenderer.java:434) ~[forge-1.15.2-31.1.44_mapped_snapshot_20200225-1.15.1-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:962) ~[forge-1.15.2-31.1.44_mapped_snapshot_20200225-1.15.1-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.run(Minecraft.java:559) ~[forge-1.15.2-31.1.44_mapped_snapshot_20200225-1.15.1-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.main.Main.main(Main.java:177) ~[forge-1.15.2-31.1.44_mapped_snapshot_20200225-1.15.1-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_251] {} at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_251] {} at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_251] {} at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_251] {} at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55) ~[forge-1.15.2-31.1.44_mapped_snapshot_20200225-1.15.1-recomp.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-5.0.0.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-5.0.0.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-5.0.0.jar:?] {} at cpw.mods.modlauncher.Launcher.run(Launcher.java:81) [modlauncher-5.0.0.jar:?] {} at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) [modlauncher-5.0.0.jar:?] {} at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:102) [forge-1.15.2-31.1.44_mapped_snapshot_20200225-1.15.1-recomp.jar:?] {} A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Render thread Stacktrace: at net.minecraft.client.renderer.BufferBuilder.begin(BufferBuilder.java:176) at net.papaprime.gaze.client.fx.CubicParticle.renderParticle(CubicParticle.java:50) -- Particle being rendered -- Details: Particle: VoidFX, Pos (148.37379868704417,140.37968291644503,154.80088228616063), RGBA (1.0,1.0,1.0,1.0), Age 5 Particle Type: CUSTOM Stacktrace: at net.minecraft.client.particle.ParticleManager.renderParticles(ParticleManager.java:330) at net.minecraft.client.renderer.WorldRenderer.updateCameraAndRender(WorldRenderer.java:1084) at net.minecraft.client.renderer.GameRenderer.renderWorld(GameRenderer.java:612) The debug loop does not have any other interesting details. If I use the vertex buffer provided in the method and slight adjustments to my code, which also means that I do not get the buffer builder instance, I get the following crash: Description: Rendering Particle java.lang.IllegalStateException: BufferBuilder not started at net.minecraft.client.renderer.BufferBuilder.getCurrentElement(BufferBuilder.java:322) ~[forge-1.15.2-31.1.44_mapped_snapshot_20200225-1.15.1-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at com.mojang.blaze3d.vertex.IVertexConsumer.pos(IVertexConsumer.java:21) ~[forge-1.15.2-31.1.44_mapped_snapshot_20200225-1.15.1-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.papaprime.gaze.client.fx.CubicParticle.renderParticle(CubicParticle.java:47) ~[main/:?] {re:classloading} at net.minecraft.client.particle.ParticleManager.renderParticles(ParticleManager.java:330) ~[forge-1.15.2-31.1.44_mapped_snapshot_20200225-1.15.1-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.renderer.WorldRenderer.updateCameraAndRender(WorldRenderer.java:1084) ~[forge-1.15.2-31.1.44_mapped_snapshot_20200225-1.15.1-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.renderer.GameRenderer.renderWorld(GameRenderer.java:612) ~[forge-1.15.2-31.1.44_mapped_snapshot_20200225-1.15.1-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.renderer.GameRenderer.updateCameraAndRender(GameRenderer.java:434) ~[forge-1.15.2-31.1.44_mapped_snapshot_20200225-1.15.1-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:962) ~[forge-1.15.2-31.1.44_mapped_snapshot_20200225-1.15.1-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.run(Minecraft.java:559) ~[forge-1.15.2-31.1.44_mapped_snapshot_20200225-1.15.1-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.main.Main.main(Main.java:177) ~[forge-1.15.2-31.1.44_mapped_snapshot_20200225-1.15.1-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_251] {} at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_251] {} at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_251] {} at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_251] {} at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55) ~[forge-1.15.2-31.1.44_mapped_snapshot_20200225-1.15.1-recomp.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-5.0.0.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-5.0.0.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-5.0.0.jar:?] {} at cpw.mods.modlauncher.Launcher.run(Launcher.java:81) [modlauncher-5.0.0.jar:?] {} at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) [modlauncher-5.0.0.jar:?] {} at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:102) [forge-1.15.2-31.1.44_mapped_snapshot_20200225-1.15.1-recomp.jar:?] {} A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Render thread Stacktrace: at net.minecraft.client.renderer.BufferBuilder.getCurrentElement(BufferBuilder.java:322) at com.mojang.blaze3d.vertex.IVertexConsumer.pos(IVertexConsumer.java:21) at net.papaprime.gaze.client.fx.CubicParticle.renderParticle(CubicParticle.java:47) -- Particle being rendered -- Details: Particle: VoidFX, Pos (134.74721086926692,93.8254443294199,107.66141755800653), RGBA (1.0,1.0,1.0,1.0), Age 6 Particle Type: CUSTOM Stacktrace: at net.minecraft.client.particle.ParticleManager.renderParticles(ParticleManager.java:330) at net.minecraft.client.renderer.WorldRenderer.updateCameraAndRender(WorldRenderer.java:1084) at net.minecraft.client.renderer.GameRenderer.renderWorld(GameRenderer.java:612)  
    • I try to create a smeltingrecipe that is capable of creating diffrent results based on the nbt of the input (Enchantments shall persist from ingriedient to result). Therefore I want to create a custom-smelting recipe and use the CookingRecipeSerializer since it provides what I need. But as far as I can see it is not possible to do so, since the functional Interface that is needed in CookingRecipeSerializer is not public. I think it would be bad practise to just rewrite the CookingRecipeSerializer exactly as it is just to access it. Is there a way around that? Or is reflection needed or even capable of that?
    • I never messed with the userProperties argument. Is it tied to the user? If so what would i do to fix it? If not what could be the issue?
  • Topics

  • Who's Online (See full list)