Jump to content

Recommended Posts

Posted

I got this when I closed my GUI.

 

 

[10:59:23] [Client thread/INFO] [sTDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:663]: ---- Minecraft Crash Report ----

// I just don't know what went wrong :(

 

Time: 07/07/15 10:59

Description: Updating screen events

 

java.util.ConcurrentModificationException

at com.google.common.collect.HashBiMap$Itr.checkForConcurrentModification(HashBiMap.java:339)

at com.google.common.collect.HashBiMap$Itr.hasNext(HashBiMap.java:345)

at net.minecraft.client.audio.SoundManager.resumeAllSounds(SoundManager.java:483)

at net.minecraft.client.audio.SoundHandler.resumeSounds(SoundHandler.java:261)

at net.minecraft.client.Minecraft.displayGuiScreen(Minecraft.java:988)

at net.minecraft.client.Minecraft.setIngameFocus(Minecraft.java:1431)

at net.minecraft.client.Minecraft.displayGuiScreen(Minecraft.java:989)

at com.fredtargaryen.floocraft.client.gui.GuiTeleport.actionPerformed(GuiTeleport.java:119)

at com.fredtargaryen.floocraft.client.gui.GuiTeleport.actionPerformed(GuiTeleport.java:153)

at net.minecraft.client.gui.GuiScreen.mouseClicked(GuiScreen.java:510)

at net.minecraft.client.gui.GuiScreen.handleMouseInput(GuiScreen.java:602)

at com.fredtargaryen.floocraft.client.gui.GuiTeleport.handleMouseInput(GuiTeleport.java:243)

at net.minecraft.client.gui.GuiScreen.handleInput(GuiScreen.java:571)

 

 

But here's the GuiTeleport file:

 

 

package com.fredtargaryen.floocraft.client.gui;

import com.fredtargaryen.floocraft.DataReference;
import com.fredtargaryen.floocraft.FloocraftBase;
import com.fredtargaryen.floocraft.network.PacketHandler;
import com.fredtargaryen.floocraft.network.messages.MessageFireplaceList;
import com.fredtargaryen.floocraft.network.messages.MessageFireplaceListRequest;
import com.fredtargaryen.floocraft.network.messages.MessageTeleportEntity;
import com.fredtargaryen.floocraft.proxy.ClientProxy;
import com.google.common.collect.Lists;
import net.minecraft.client.renderer.WorldRenderer;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.GuiSlot;
import net.minecraft.client.renderer.Tessellator;
import org.lwjgl.input.Keyboard;
import org.lwjgl.opengl.GL11;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

@SideOnly(Side.CLIENT)
public class GuiTeleport extends GuiScreen
{
/** The title string that is displayed in the top-centre of the screen. */ protected String screenTitle = "===Choose a destination===";
private String status;

//"Go!".
private GuiButton goBtn;
//"Cancel"
private GuiButton cancelBtn;

private List<String> placenamelist = new ArrayList<String>();
private List<Integer> xcoordlist = new ArrayList<Integer>();
private List<Integer> ycoordlist = new ArrayList<Integer>();
private List<Integer> zcoordlist = new ArrayList<Integer>();
private List<Boolean> enabledlist = new ArrayList<Boolean>();

private boolean receivedLists;

private PlaceList scrollWindow;

private int initX, initY, initZ;

public GuiTeleport(int x, int y, int z)
{
this.initX = x;
this.initY = y;
this.initZ = z;
this.refresh();
}

/** * Adds the buttons (and other controls) to the screen in question. */ public void initGui()
{
this.buttonList.clear();
Keyboard.enableRepeatEvents(true);
GuiButton refreshButton = new GuiButton(-2, this.width - 100, 0, 98, 20, "Refresh");
refreshButton.enabled = false;
this.buttonList.add(this.goBtn = new GuiButton(-3, this.width / 2 - 100, this.height / 4 + 144, 98, 20, "Go!"));
this.goBtn.enabled = false;
this.buttonList.add(this.cancelBtn = new GuiButton(-1, this.width / 2 + 2, this.height / 4 + 144, 98, 20, "Cancel"));
if (receivedLists)
{
refreshButton.enabled = true;
this.scrollWindow = new PlaceList();
}
this.buttonList.add(refreshButton);
}

/** * Called when the screen is unloaded. Used to disable keyboard repeat events */ public void onGuiClosed()
{
ClientProxy proxy = (ClientProxy) FloocraftBase.proxy;
Keyboard.enableRepeatEvents(false);
proxy.overrideTicker.start();
}

/** * Called from the main game loop to update the screen. */ public void updateScreen()
{
super.updateScreen();
if (!this.receivedLists)
{
this.status = "Loading...";
}
else //if the lists were received...
{
//if they are empty...
if (this.placenamelist.size() == 0) {
this.status = "No places found";
} else {
this.status = "";
}
}
}

/** * Fired when a control is clicked. This is the equivalent of ActionListener.actionPerformed(ActionEvent e). */ protected void actionPerformed(GuiButton par1GuiButton)
{
if (par1GuiButton.enabled)
{
//Cancel
if (par1GuiButton.id == -1)
{
((ClientProxy) FloocraftBase.proxy).overrideTicker.start();
this.mc.displayGuiScreen(null);
}
//Refresh
else if(par1GuiButton.id == -2)
{
this.refresh();
}
//Go!
else if(par1GuiButton.id == -3)
{
int initX = this.initX;
int initY = this.initY;
int initZ = this.initZ;
int destX = xcoordlist.get(this.scrollWindow.getSelectedElement());
int destY = ycoordlist.get(this.scrollWindow.getSelectedElement());
int destZ = zcoordlist.get(this.scrollWindow.getSelectedElement());
try
{
if(!(initX == destX && initY == destY && initZ == destZ))
{
MessageTeleportEntity m = new MessageTeleportEntity();
m.initX = initX;
m.initY = initY;
m.initZ = initZ;
m.destX = destX;
m.destY = destY;
m.destZ = destZ;
PacketHandler.INSTANCE.sendToServer(m);
}
}
catch(Exception e)
{
e.printStackTrace();
}
this.actionPerformed(GuiTeleport.this.cancelBtn);
}
}
}

/** * Fired when a key is typed. This is the equivalent of KeyListener.keyTyped(KeyEvent e). */ protected void keyTyped(char par1, int par2)
{
if (par2 == 1)
{
this.actionPerformed(this.cancelBtn);
}
}

/** * Draws the screen and all the components in it. */ @Override
@SideOnly(Side.CLIENT)
public void drawScreen(int mousex, int mousey, float partialticks)
{
this.drawCenteredString(this.fontRendererObj,
this.status,
this.width / 2,
this.height / 4 + 48,
13158600);
GL11.glPushMatrix();
GL11.glTranslatef((float) (this.width / 2), 0.0F, 50.0F);
float f1 = 93.75F;
GL11.glScalef(-f1, -f1, -f1);
GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
GL11.glPopMatrix();
if (this.scrollWindow != null) {
this.scrollWindow.drawScreen(mousex, mousey, partialticks);
}
this.drawCenteredString(this.fontRendererObj,
this.screenTitle,
this.width / 2,
15,
16777215);
super.drawScreen(mousex, mousey, partialticks);
}

private void refresh()
{
this.placenamelist.clear();
this.xcoordlist.clear();
this.ycoordlist.clear();
this.zcoordlist.clear();
this.enabledlist.clear();
this.receivedLists = false;
this.initGui();
PacketHandler.INSTANCE.sendToServer(new MessageFireplaceListRequest());
}

public void onMessageReceived(MessageFireplaceList m)
{
try
{
this.placenamelist = m.placenamelist;
this.xcoordlist = m.xcoordlist;
this.ycoordlist = m.ycoordlist;
this.zcoordlist = m.zcoordlist;
this.enabledlist = m.enabledlist;
this.receivedLists = true;
}
catch(Exception ex)
{
ex.printStackTrace();
}
this.initGui();
}

/** * Returns true if this GUI should pause the game when it is displayed in single-player */ @Override
public boolean doesGuiPauseGame()
{
return false;
}

@Override
public void handleMouseInput()
{
try
{
this.scrollWindow.handleMouseInput();
super.handleMouseInput();
}
catch(IOException e)
{
e.printStackTrace();
}
}

@SideOnly(Side.CLIENT)
class PlaceList extends GuiSlot
{
private final java.util.List l = Lists.newArrayList();
private static final String __OBFID = "CL_00000699";

public PlaceList()
{
super(GuiTeleport.this.mc, GuiTeleport.this.width, GuiTeleport.this.height, 32, GuiTeleport.this.height - 65 + 4, 18);
this.setShowSelectionBox(true);
}

protected int getSize()
{
return GuiTeleport.this.placenamelist.size();
}

/** * The element in the slot that was clicked, boolean for whether it was double clicked or not */ protected void elementClicked(int id, boolean isDoubleClick, int mousex, int mousey)
{
GuiTeleport.this.goBtn.enabled = GuiTeleport.this.enabledlist.get(id);
}

/** * Returns true if the element passed in is currently selected */ protected boolean isSelected(int id)
{
return id == this.selectedElement;
}

/** * Return the height of the content being scrolled */ @Override
protected int getContentHeight()
{
return this.getSize() * 18;
}

@Override
protected void drawBackground(){}

@Override
protected void drawSlot(int id, int p_148126_2_, int p_148126_3_, int p_148126_4_, int p_148126_6_, int p_148126_7_)
{
GuiTeleport.this.drawCenteredString(GuiTeleport.this.fontRendererObj, GuiTeleport.this.placenamelist.get(id), this.width / 2, p_148126_3_ + 1, GuiTeleport.this.enabledlist.get(id) ? 65280 : 16711680);
}

@Override
public void drawScreen(int i, int j, float f)
{
super.drawScreen(i, j, f);
this.flooverlayBackground(0, this.top);
this.flooverlayBackground(this.bottom, this.height);
}
/** * Overlays the background to hide scrolled items */ private void flooverlayBackground(int p_148136_1_, int p_148136_2_)
{
WorldRenderer wr = Tessellator.getInstance().getWorldRenderer();
GuiTeleport.this.mc.getTextureManager().bindTexture(DataReference.TP_BACKGROUND);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
float f = 32.0F;
wr.startDrawingQuads();
wr.addVertexWithUV((double)this.left, (double)p_148136_2_, 0.0D, 0.0D, (double)((float)p_148136_2_ / f));
wr.addVertexWithUV((double)(this.left + this.width), (double)p_148136_2_, 0.0D, (double)((float)this.width / f), (double)((float)p_148136_2_ / f));
wr.addVertexWithUV((double) (this.left + this.width), (double) p_148136_1_, 0.0D, (double) ((float) this.width / f), (double) ((float)p_148136_1_ / f));
wr.addVertexWithUV((double) this.left, (double) p_148136_1_, 0.0D, 0.0D, (double) ((float)p_148136_1_ / f));
Tessellator.getInstance().draw();
}

@Override
protected void drawContainerBackground(Tessellator tessellator)
{
}

public int getSelectedElement()
{
return this.selectedElement;
}
}
}

 

 

So I don't understand what I could have done wrong... Please can someone help?

 

Thanks for reading.

Posted

Are you using custom packets of some sort? You'd have to take nto account that packets are on another thread now, so you'd have to do something to make them work.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Posted

It has nothing to do with sounds, at least not directly - ConcurrentModificationException happens when a single object is being modified from more than one place at the same time. This can happen especially easily with Collections (e.g. List), for example, even something as simple as the following might throw a CoMod:

List<String> list = new ArrayList<String>();
list.add("One");
list.add("Two");
for (String s : list) {
list.remove(s);
}

It only gets more likely if you have the same object being manipulated from more places, especially if you start involving other threads, and the same strategies apply for dealing with it.

 

In your particular case, your crash log pointed to #actionPerformed in your GUI class, instigated by a mouse click: com.fredtargaryen.floocraft.client.gui.GuiTeleport.actionPerformed(GuiTeleport.java:119)

 

I would look through all of the code that you call before and after that section, as well as if you have any other code operating on these (e.g. a tick handler) to see if you are modifying Collections somewhere, as that is probably the most common cause of CoMod exceptions.

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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • But your Launcher does not find it   Java path is: /run/user/1000/doc/3f910b8/java Checking Java version... Java checker returned some invalid data we don't understand: Check the Azul Zulu site and select your OS and download the latest Java 8 build for Linux https://www.azul.com/downloads/?version=java-8-lts&package=jre#zulu After installation, check the path and put this path into your Launcher Java settings (Java Executable)
    • Try other builds of pehkui and origins++ until you find a working combination
    • Some Create addons are only compatible with Create 6 or Create 5 - so not both versions at the same time Try older builds of Create Stuff and Additions This is the last build before the Create 6 update: https://www.curseforge.com/minecraft/mc-mods/create-stuff-additions/files/6168370
    • ✅ Crobo Coupon Code: 51k3b0je — Get Your \$25 Amazon Gift Card Bonus! If you’re new to Crobo and want to make the most out of your first transaction, you’ve come to the right place. The **Crobo coupon code: 51k3b0je** is a fantastic way to get started. By using this code, you can unlock an exclusive **\$25 Amazon gift card** after completing your first eligible transfer. Let’s dive deep into how the **Crobo coupon code: 51k3b0je** works, why you should use it, and how to claim your reward. --- 🌟 What is Crobo? Crobo is a trusted, modern platform designed for **international money transfers**. It offers fast, secure, and low-cost transactions, making it a favorite choice for individuals and businesses alike. Crobo is committed to transparency, low fees, and competitive exchange rates. And with promo deals like the **Crobo coupon code: 51k3b0je**, it becomes even more attractive. Crobo focuses on providing customers with: * Quick transfer speeds * Minimal fees * Safe, encrypted transactions * Great referral and promo code rewards When you choose Crobo, you’re choosing a platform that values your time, money, and loyalty. And now with the **Crobo coupon code: 51k3b0je**, you can start your Crobo journey with a **bonus reward**! ---# 💥 What is the Crobo Coupon Code: 51k3b0je? The **Crobo coupon code: 51k3b0je** is a **special promotional code** designed for new users. By entering this code during signup, you’ll be eligible for: ✅ A **\$25 Amazon gift card** after your first qualifying transfer. ✅ Access to Crobo’s referral system to earn more rewards. ✅ The ability to combine with future seasonal Crobo discounts. Unlike generic promo codes that just offer small fee reductions, the **Crobo coupon code: 51k3b0je** directly gives you a tangible, valuable reward — perfect for online shopping or gifting. --- ### 🎯 Why Use Crobo Coupon Code: 51k3b0je? There are many reasons why users choose to apply the **Crobo coupon code: 51k3b0je**: 🌟 **Free bonus reward** — Your first transfer can instantly earn you a \$25 Amazon gift card. 🌟 **Trusted platform** — Crobo is known for secure, fast, and affordable transfers. 🌟 **Easy to apply** — Simply enter **Crobo coupon code: 51k3b0je** at signup — no complicated steps. 🌟 **Referral opportunities** — Once you’ve used **Crobo coupon code: 51k3b0je**, you can invite friends and earn more rewards. 🌟 **Stackable savings** — Pair **Crobo coupon code: 51k3b0je** with Crobo’s ongoing offers or holiday deals for even more benefits. --- ### 📝 How to Use Crobo Coupon Code: 51k3b0je Getting started with **Crobo coupon code: 51k3b0je** is quick and easy. Just follow these steps: 1️⃣ **Download the Crobo app** (available on Google Play Store and Apple App Store) or visit the official Crobo website. 2️⃣ **Start the sign-up process** by entering your basic details (name, email, phone number, etc.). 3️⃣ When prompted, enter **Crobo coupon code: 51k3b0je** in the promo code or coupon code field. 4️⃣ Complete your first transaction — be sure to meet the minimum amount required to qualify for the reward (usually specified in Crobo’s promo terms). 5️⃣ After the transaction is verified, receive your **\$25 Amazon gift card** directly via email or within your Crobo account. --- ### 💡 Tips to Maximize Your Crobo Coupon Code: 51k3b0je Bonus 👉 **Transfer the minimum qualifying amount or more** — this ensures you meet the conditions for the gift card. 👉 **Refer friends after your signup** — Crobo allows users who’ve signed up with codes like **Crobo coupon code: 51k3b0je** to share their own code for extra bonuses. 👉 **Check for additional Crobo promotions** — sometimes Crobo offers seasonal or regional deals that stack with the coupon code. 👉 **Complete your transaction soon after signup** — many bonuses have time limits, so act quickly! --- ### 🚀 Frequently Asked Questions about Crobo Coupon Code: 51k3b0je **Q: Can I use Crobo coupon code: 51k3b0je if I already have a Crobo account?** A: No — the **Crobo coupon code: 51k3b0je** is intended for **new users only**. It must be applied during the initial registration process. --- **Q: How long does it take to get the \$25 Amazon gift card after using Crobo coupon code: 51k3b0je?** A: Typically, the gift card is sent **within a few business days** after your first qualifying transfer is completed and verified. --- **Q: Are there hidden fees when using Crobo coupon code: 51k3b0je?** A: No — Crobo is transparent about its fees. The **Crobo coupon code: 51k3b0je** simply adds a bonus reward without increasing your costs. --- **Q: Can I combine Crobo coupon code: 51k3b0je with other promo codes?** A: The **Crobo coupon code: 51k3b0je** is generally applied as a standalone signup bonus. However, Crobo often offers **ongoing promotions** that may apply to future transactions. ---  📌 Reference Crobo promo code: {51k3b0je} Crobo discount code: {51k3b0je} --- # 🌍 Final Thoughts If you want to enjoy safe, fast, and affordable money transfers with an added bonus, **Crobo coupon code: 51k3b0je** is your best option. Not only will you experience excellent service, but you’ll also earn a **\$25 Amazon gift card** — a reward that you can use immediately for shopping or gifts. 👉 **Don’t wait — sign up today using Crobo coupon code: 51k3b0je and claim your bonus!**
  • Topics

×
×
  • Create New...

Important Information

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