Jump to content

Recommended Posts

Posted

Our users are getting some strange crashes on 1.10:

 

This crash happens on world load it seems.

 

http://pastebin.com/QzsgULS9

 

It seems to be a problem with the following method:

 

 private void renderWorld(final float partialTicks, final long finishTimeNano)
    {
        GlStateManager.enableCull();
        this.profiler.endStartSection("culling");
        @NotNull final Frustum frustum = new Frustum();
        final Entity entity = this.mc.getRenderViewEntity();

        final double x = playerPositionOffset.xCoord;
        final double y = playerPositionOffset.yCoord;
        final double z = playerPositionOffset.zCoord;
        frustum.setPosition(x, y, z);

        GlStateManager.shadeModel(GL11.GL_SMOOTH);

        this.profiler.endStartSection("prepareterrain");
        this.mc.getTextureManager().bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
        RenderHelper.disableStandardItemLighting();

        this.profiler.endStartSection("terrain_setup");
        setupTerrain(entity, partialTicks, frustum, this.frameCount, isInsideWorld(x, y, z));
        this.frameCount++;

        this.profiler.endStartSection("updatechunks");
        updateChunks(finishTimeNano / 2);

        this.profiler.endStartSection("terrain");
        GlStateManager.matrixMode(GL11.GL_MODELVIEW);
        GlStateManager.pushMatrix();
        GlStateManager.enableBlend();
        GlStateManager.tryBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0);
        renderBlockLayer(BlockRenderLayer.SOLID, (double)partialTicks, PASS, entity);
        renderBlockLayer(BlockRenderLayer.CUTOUT_MIPPED, (double)partialTicks, PASS, entity);
        this.mc.getTextureManager().getTexture(TextureMap.LOCATION_BLOCKS_TEXTURE).setBlurMipmap(false, false);
        renderBlockLayer(BlockRenderLayer.CUTOUT, (double)partialTicks, PASS, entity);
        this.mc.getTextureManager().getTexture(TextureMap.LOCATION_BLOCKS_TEXTURE).restoreLastBlurMipmap();
        GlStateManager.disableBlend();
        GlStateManager.shadeModel(GL11.GL_FLAT);
        GlStateManager.alphaFunc(GL11.GL_GREATER, 0.1F);
        GlStateManager.matrixMode(GL11.GL_MODELVIEW);
        GlStateManager.popMatrix();

        GlStateManager.pushMatrix();
        this.profiler.endStartSection("entities");
        RenderHelper.enableStandardItemLighting();
        GlStateManager.enableBlend();
        GlStateManager.tryBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0);
        renderEntities(entity, frustum, partialTicks);
        GlStateManager.disableBlend();
        RenderHelper.disableStandardItemLighting();
        disableLightmap();
        GlStateManager.matrixMode(GL11.GL_MODELVIEW);
        GlStateManager.popMatrix();

        GlStateManager.enableCull();
        GlStateManager.alphaFunc(GL11.GL_GREATER, 0.1F);
        this.mc.getTextureManager().bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
        GlStateManager.shadeModel(GL11.GL_SMOOTH);

        GlStateManager.depthMask(false);
        GlStateManager.pushMatrix();
        this.profiler.endStartSection("translucent");
        GlStateManager.enableBlend();
        GlStateManager.tryBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0);
        renderBlockLayer(BlockRenderLayer.TRANSLUCENT, (double)partialTicks, PASS, entity);
        GlStateManager.disableBlend();
        GlStateManager.popMatrix();
        GlStateManager.depthMask(true);

        GlStateManager.shadeModel(GL11.GL_FLAT);
        GlStateManager.enableCull();
    }

 

Whole file: https://github.com/Minecolonies/minecolonies/blob/feature/%2357-Update-to-1.10.2/src/main/java/com/schematica/client/renderer/RenderSchematic.java

 

 

 

Posted

It looks like you've attempted to use a client-side class (Minecraft) on a server where it doesn't exist. That's not strange at all, so you might want to edit your subject line.

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

Posted

Your crash occurs in

com.minecolonies.colony.Colony

which is not available on your github.

Also what Jeffry said.

 

I searched the methods and couldn't find any SideOnly tag.

 

Searched what class?

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.

Posted

here is the colony class:

 

https://github.com/Minecolonies/minecolonies/blob/feature/%2357-Update-to-1.10.2/src/main/java/com/minecolonies/colony/Colony.java

 

and I searched all calls on the crashing line:

 

Minecraft.getMinecraft().getIntegratedServer().getServer().getPlayerList().getPlayerList()

 

the getMinecraft, the getIntegreatedServer, the getServer, the getPlayerList and again the getPlayerList, and none of them were marked as sideOnly(Side.Client)

Posted

the getMinecraft, the getIntegreatedServer, the getServer, the getPlayerList and again the getPlayerList, and none of them were marked as sideOnly(Side.Client)

 

The entire Minecraft class is client side only:

 

import net.minecraft.client.Minecraft;

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.

Posted

Fixed it with: this.getWorld().getMinecraftServer().getPlayerList().getPlayerList()

 

 

But still didn't fix the sounds neither the other crash, anyone any idea?

Why are you passing null for the first parameter?

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.

Posted

Because I want to play it for the custom entity and not for the player but at the position.

And I don't have the player at the moment in the code.

 

But the problem here is that:

 

new SoundEvent(new ResourceLocation("random.pop")

 

Doesn't exist anymore at that location, actually I was not able to locate the sounds anymore.

Posted

Because I want to play it for the custom entity and not for the player but at the position.

And I don't have the player at the moment in the code.

 

But the problem here is that:

 

new SoundEvent(new ResourceLocation("random.pop")

 

Doesn't exist anymore at that location, actually I was not able to locate the sounds anymore.

It is because you are creating a new SoundEvent like items they are singletons.

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.

Posted

Post the new crash. Better yet, read it and do some debugging.

 

Also: Please ack where I first said you ref'd client-side Minecraft on the server. Given your posted error message (class Minecraft did not exist!), that should have fixed you.

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

Posted

I knew that it was because of clientSide only but I couldn't find which method I shouldn't have called.

I created a new threat for the error to be able to view and analyze it better

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.