Raycoms Posted September 14, 2016 Posted September 14, 2016 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 Quote
jeffryfisher Posted September 14, 2016 Posted September 14, 2016 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. Quote 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.
Raycoms Posted September 14, 2016 Author Posted September 14, 2016 I searched the methods and couldn't find any SideOnly tag. Quote
Draco18s Posted September 14, 2016 Posted September 14, 2016 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? Quote 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.
Raycoms Posted September 14, 2016 Author Posted September 14, 2016 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) Quote
Raycoms Posted September 14, 2016 Author Posted September 14, 2016 Sorry, first render method was the code of the wrong branch. https://github.com/Minecolonies/minecolonies/blob/feature/%2357-Update-to-1.10.2/src/main/java/com/schematica/client/renderer/RenderSchematic.java this is the 1.10 now. Quote
Draco18s Posted September 14, 2016 Posted September 14, 2016 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; Quote 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.
Raycoms Posted September 14, 2016 Author Posted September 14, 2016 Ahh. So how do I get the playerList on the server side? And how may I fix the sounds and the second crash? Quote
Raycoms Posted September 14, 2016 Author Posted September 14, 2016 MinecraftServer doesn't seem to have this methods. Quote
Raycoms Posted September 14, 2016 Author Posted September 14, 2016 Fixed it with: this.getWorld().getMinecraftServer().getPlayerList().getPlayerList() But still didn't fix the sounds neither the other crash, anyone any idea? Quote
Animefan8888 Posted September 14, 2016 Posted September 14, 2016 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? Quote 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.
Raycoms Posted September 14, 2016 Author Posted September 14, 2016 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. Quote
Animefan8888 Posted September 14, 2016 Posted September 14, 2016 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. Quote 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.
Raycoms Posted September 14, 2016 Author Posted September 14, 2016 How do I call existing sound events, where do I get them? Quote
Animefan8888 Posted September 14, 2016 Posted September 14, 2016 How do I call existing sound events, where do I get them? Item Items SoundEvent... plural Quote 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.
Raycoms Posted September 14, 2016 Author Posted September 14, 2016 Thanks alot. The crash I posted unfortunately still happens. Quote
jeffryfisher Posted September 15, 2016 Posted September 15, 2016 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. Quote 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.
Raycoms Posted September 15, 2016 Author Posted September 15, 2016 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 Quote
Recommended Posts
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.