Jump to content

[1.11] Dragon Dying FX.


Lambda

Recommended Posts

  • Replies 53
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

How would I go about converting this? If I just copypaste most of it, I get an error about:

 

---- Minecraft Crash Report ----
// I just don't know what went wrong 

Time: 1/1/17 9:07 PM
Description: Ticking block entity

java.lang.RuntimeException: No OpenGL context found in the current thread.
at org.lwjgl.opengl.GLContext.getCapabilities(GLContext.java:124)
at org.lwjgl.opengl.GL11.glDisable(GL11.java:1020)
at net.minecraft.client.renderer.GlStateManager$BooleanState.setState(GlStateManager.java:936)
at net.minecraft.client.renderer.GlStateManager$BooleanState.setDisabled(GlStateManager.java:916)
at net.minecraft.client.renderer.GlStateManager.disableColorMaterial(GlStateManager.java:101)
at net.minecraft.client.renderer.RenderHelper.disableStandardItemLighting(RenderHelper.java:24)
at com.lambda.plentifulutilities.util.ResourceUtil.renderDragonEffects(ResourceUtil.java:314)
at com.lambda.plentifulutilities.block.tile.TileEntityRestorer.renderFX(TileEntityRestorer.java:117)
at com.lambda.plentifulutilities.block.tile.TileEntityRestorer.updateEntity(TileEntityRestorer.java:57)
at com.lambda.plentifulutilities.block.tile.TileEntityBase.update(TileEntityBase.java:169)
at net.minecraft.world.World.updateEntities(World.java:1942)
at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:647)
at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:794)
at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:698)
at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:156)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:547)
at java.lang.Thread.run(Thread.java:745)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Server thread
Stacktrace:
at org.lwjgl.opengl.GLContext.getCapabilities(GLContext.java:124)
at org.lwjgl.opengl.GL11.glDisable(GL11.java:1020)
at net.minecraft.client.renderer.GlStateManager$BooleanState.setState(GlStateManager.java:936)
at net.minecraft.client.renderer.GlStateManager$BooleanState.setDisabled(GlStateManager.java:916)
at net.minecraft.client.renderer.GlStateManager.disableColorMaterial(GlStateManager.java:101)
at net.minecraft.client.renderer.RenderHelper.disableStandardItemLighting(RenderHelper.java:24)
at com.lambda.plentifulutilities.util.ResourceUtil.renderDragonEffects(ResourceUtil.java:314)
at com.lambda.plentifulutilities.block.tile.TileEntityRestorer.renderFX(TileEntityRestorer.java:117)
at com.lambda.plentifulutilities.block.tile.TileEntityRestorer.updateEntity(TileEntityRestorer.java:57)
at com.lambda.plentifulutilities.block.tile.TileEntityBase.update(TileEntityBase.java:169)

-- Block entity being ticked --
Details:
Name: plentifulutilities:restorer // com.lambda.plentifulutilities.block.tile.TileEntityRestorer
Block type: ID #240 (tile.plentifulutilities.block_restorer // com.lambda.plentifulutilities.block.BlockRestorer)
Block data value: 0 / 0x0 / 0b0000
Block location: World: (-182,76,-128), Chunk: (at 10,4,0 in -12,-8; contains blocks -192,0,-128 to -177,255,-113), Region: (-1,-1; contains chunks -32,-32 to -1,-1, blocks -512,0,-512 to -1,255,-1)
Actual block type: ID #240 (tile.plentifulutilities.block_restorer // com.lambda.plentifulutilities.block.BlockRestorer)
Actual block data value: 0 / 0x0 / 0b0000
Stacktrace:
at net.minecraft.world.World.updateEntities(World.java:1942)
at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:647)

-- Affected level --
Details:
Level name: New World
All players: 0 total; []
Chunk stats: ServerChunkCache: 625 Drop: 0
Level seed: 7057027942463294864
Level generator: ID 00 - default, ver 1. Features enabled: true
Level generator options: 
Level spawn location: World: (-59,64,-119), Chunk: (at 5,4,9 in -4,-8; contains blocks -64,0,-128 to -49,255,-113), Region: (-1,-1; contains chunks -32,-32 to -1,-1, blocks -512,0,-512 to -1,255,-1)
Level time: 7384 game time, 7384 day time
Level dimension: 0
Level storage version: 0x04ABD - Anvil
Level weather: Rain time: 113235 (now: false), thunder time: 36505 (now: false)
Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: true
Stacktrace:
at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:794)
at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:698)
at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:156)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:547)
at java.lang.Thread.run(Thread.java:745)

-- System Details --
Details:
Minecraft Version: 1.11.2
Operating System: Windows 10 (amd64) version 10.0
Java Version: 1.8.0_91, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 761163968 bytes (725 MB) / 1495269376 bytes (1426 MB) up to 3814195200 bytes (3637 MB)
JVM Flags: 0 total; 
IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 95
FML: MCP 9.38 Powered by Forge 13.20.0.2201 5 mods loaded, 5 mods active
States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
UCHIJAAAA	minecraft{1.11.2} [Minecraft] (minecraft.jar) 
UCHIJAAAA	mcp{9.19} [Minecraft Coder Pack] (minecraft.jar) 
UCHIJAAAA	FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.11.2-13.20.0.2201.jar) 
UCHIJAAAA	forge{13.20.0.2201} [Minecraft Forge] (forgeSrc-1.11.2-13.20.0.2201.jar) 
UCHIJAAAA	plentifulutilities{${version}} [Plentiful Utilities] (PlentifulUtilities_main) 
Loaded coremods (and transformers): 
GL info: ~~ERROR~~ RuntimeException: No OpenGL context found in the current thread.
Profiler Position: N/A (disabled)
Player Count: 0 / 8; []
Type: Integrated Server (map_client.txt)
Is Modded: Definitely; Client brand changed to 'fml,forge'

 

 

With this:

  public static void renderDragonEffects(World world) {
        Tessellator tessellator = Tessellator.getInstance();
        VertexBuffer vertexbuffer = tessellator.getBuffer();
        RenderHelper.disableStandardItemLighting();
        float f = world.getWorldTime() % 256;
        float f1 = 0.0F;

        if (f > 0.8F)
        {
            f1 = (f - 0.8F) / 0.2F;
        }

        Random random = new Random(432L);
        GlStateManager.disableTexture2D();
        GlStateManager.shadeModel(7425);
        GlStateManager.enableBlend();
        GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE);
        GlStateManager.disableAlpha();
        GlStateManager.enableCull();
        GlStateManager.depthMask(false);
        GlStateManager.pushMatrix();
        GlStateManager.translate(0.0F, -1.0F, -2.0F);

        for (int i = 0; (float)i < (f + f * f) / 2.0F * 60.0F; ++i)
        {
            GlStateManager.rotate(random.nextFloat() * 360.0F, 1.0F, 0.0F, 0.0F);
            GlStateManager.rotate(random.nextFloat() * 360.0F, 0.0F, 1.0F, 0.0F);
            GlStateManager.rotate(random.nextFloat() * 360.0F, 0.0F, 0.0F, 1.0F);
            GlStateManager.rotate(random.nextFloat() * 360.0F, 1.0F, 0.0F, 0.0F);
            GlStateManager.rotate(random.nextFloat() * 360.0F, 0.0F, 1.0F, 0.0F);
            GlStateManager.rotate(random.nextFloat() * 360.0F + f * 90.0F, 0.0F, 0.0F, 1.0F);
            float f2 = random.nextFloat() * 20.0F + 5.0F + f1 * 10.0F;
            float f3 = random.nextFloat() * 2.0F + 1.0F + f1 * 2.0F;
            vertexbuffer.begin(6, DefaultVertexFormats.POSITION_COLOR);
            vertexbuffer.pos(0.0D, 0.0D, 0.0D).color(255, 255, 255, (int)(255.0F * (1.0F - f1))).endVertex();
            vertexbuffer.pos(-0.866D * (double)f3, (double)f2, (double)(-0.5F * f3)).color(255, 0, 255, 0).endVertex();
            vertexbuffer.pos(0.866D * (double)f3, (double)f2, (double)(-0.5F * f3)).color(255, 0, 255, 0).endVertex();
            vertexbuffer.pos(0.0D, (double)f2, (double)(1.0F * f3)).color(255, 0, 255, 0).endVertex();
            vertexbuffer.pos(-0.866D * (double)f3, (double)f2, (double)(-0.5F * f3)).color(255, 0, 255, 0).endVertex();
            tessellator.draw();
        }

        GlStateManager.popMatrix();
        GlStateManager.depthMask(true);
        GlStateManager.disableCull();
        GlStateManager.disableBlend();
        GlStateManager.shadeModel(7424);
        GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        GlStateManager.enableTexture2D();
        GlStateManager.enableAlpha();
        RenderHelper.enableStandardItemLighting();
    }

Relatively new to modding.

Currently developing:

https://github.com/LambdaXV/DynamicGenerators

Link to comment
Share on other sites

which is called evreytcik

 

Where?

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

update function within a TE, I want those to render when the boolean stored is true.

That won't work, the update method in TEs don't have access to rendering. You will need to use a FastTESR.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

How would I go about translating it into a TESR? Without changing the core design of it? I have done basically nothing with TESR. Other than laser rendering.

The same way as you did for the normal TESR except render your FX only when the boolean is true.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

What boolean? I have an if statement set for when the block is ready to run ex:

 

            if(lookForStruct() == 4) {
   renderFX(); //which inside here is where the code is.
}

lookForStruct() == 4

Is a boolean, and you even called it a boolean lol.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

Well, yeah I call it in there, but still crashes my game with the same error

Update your github and if you wouldn't mind telling me which classes I should look at or a base directory.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

Okay, the the two classes you'll want:

 

blocks>te>TileEntityRestorer

 

util>ResourceUtil

Where is your FastTESR? and you are still calling renderFX()

https://github.com/LambdaXV/PlentifulUtilities/blob/master/src/main/java/com/lambda/plentifulutilities/block/tile/TileEntityRestorer.java#L59

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

Oh... so you just want this line:

        ResourceUtil.renderDragonEffects(world);

 

above renderFX();?

No....Are we looking at the same code? You need a new class that extends FastTESR. This will render the lasers and dragon FX. The TEs update does not have access to rendering code, meaning you cant render from there.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

Oh, again, haven't messed very much with TESR.. So I just put the FX code inside a class that extends FastTESR and call it like I already do w/ my lasers? My lasers work perfectly fine though.

That is because your Laser is a particle and ResourceUtil.renderLaser is called by ParticleLaser.renderParticle, which has access to rendering.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

Announcements




×
×
  • Create New...

Important Information

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