/** Recursively called by generate() (generate) and optionally by itself. */ protected void recursiveGenerate( World par1World, int par2, int par3, int par4, int par5, byte[] par6ArrayOfByte) { if (!this.structureMap.containsKey(Long.valueOf(ChunkCoordIntPair.chunkXZ2Int(par2, par3)))) { this.rand.nextInt(); try { if (this.canSpawnStructureAtCoords(par2, par3)) { StructureStart var7 = this.getStructureStart(par2, par3); this.structureMap.put(Long.valueOf(ChunkCoordIntPair.chunkXZ2Int(par2, par3)), var7); } } catch (Throwable var10) { CrashReport var8 = CrashReport.makeCrashReport(var10, "Exception preparing structure feature"); CrashReportCategory var9 = var8.makeCategory("Feature being prepared"); var9.addCrashSectionCallable( "Is feature chunk", new CallableIsFeatureChunk(this, par2, par3)); var9.addCrashSection( "Chunk location", String.format("%d,%d", new Object[] {Integer.valueOf(par2), Integer.valueOf(par3)})); var9.addCrashSectionCallable("Chunk pos hash", new CallableChunkPosHash(this, par2, par3)); var9.addCrashSectionCallable("Structure type", new CallableStructureType(this)); throw new ReportedException(var8); } } }
public void onUpdateEntity() { try { super.onUpdate(); for (int var1 = 0; var1 < this.inventory.getSizeInventory(); ++var1) { ItemStack var6 = this.inventory.getStackInSlot(var1); if (var6 != null && Item.itemsList[var6.itemID].isMap() && this.playerNetServerHandler.packetSize() <= 5) { Packet var8 = ((ItemMapBase) Item.itemsList[var6.itemID]) .createMapDataPacket(var6, this.worldObj, this); if (var8 != null) { this.playerNetServerHandler.sendPacketToPlayer(var8); } } } if (this.func_110143_aJ() != this.lastHealth || this.lastFoodLevel != this.foodStats.getFoodLevel() || this.foodStats.getSaturationLevel() == 0.0F != this.wasHungry) { this.playerNetServerHandler.sendPacketToPlayer( new Packet8UpdateHealth( this.func_110143_aJ(), this.foodStats.getFoodLevel(), this.foodStats.getSaturationLevel())); this.lastHealth = this.func_110143_aJ(); this.lastFoodLevel = this.foodStats.getFoodLevel(); this.wasHungry = this.foodStats.getSaturationLevel() == 0.0F; } if (this.func_110143_aJ() + this.func_110139_bj() != this.field_130068_bO) { this.field_130068_bO = this.func_110143_aJ() + this.func_110139_bj(); Collection var5 = this.getWorldScoreboard().func_96520_a(ScoreObjectiveCriteria.field_96638_f); Iterator var7 = var5.iterator(); while (var7.hasNext()) { ScoreObjective var9 = (ScoreObjective) var7.next(); this.getWorldScoreboard() .func_96529_a(this.getEntityName(), var9) .func_96651_a(Arrays.asList(new EntityPlayer[] {this})); } } if (this.experienceTotal != this.lastExperience) { this.lastExperience = this.experienceTotal; this.playerNetServerHandler.sendPacketToPlayer( new Packet43Experience(this.experience, this.experienceTotal, this.experienceLevel)); } } catch (Throwable var4) { CrashReport var2 = CrashReport.makeCrashReport(var4, "Ticking player"); CrashReportCategory var3 = var2.makeCategory("Player being ticked"); this.func_85029_a(var3); throw new ReportedException(var2); } }
private CrashReport func_82581_a( String p_82581_1_, int p_82581_2_, ClassCastException p_82581_3_) { CrashReport var4 = CrashReport.func_85055_a(p_82581_3_, "Reading NBT data"); CrashReportCategory var5 = var4.func_85057_a("Corrupt NBT tag", 1); var5.func_71500_a("Tag type found", new CallableTagCompound1(this, p_82581_1_)); var5.func_71500_a("Tag type expected", new CallableTagCompound2(this, p_82581_2_)); var5.func_71507_a("Tag name", p_82581_1_); if (this.func_74740_e() != null && this.func_74740_e().length() > 0) { var5.func_71507_a("Tag parent", this.func_74740_e()); } return var4; }
/** is threadsafe, unless it throws an exception, then */ private WatchableObject getWatchedObject(int par1) { this.field_75694_d.readLock().lock(); WatchableObject var2; try { var2 = (WatchableObject) this.watchedObjects.get(Integer.valueOf(par1)); } catch (Throwable var5) { CrashReport var4 = new CrashReport("getting synched entity data", var5); var4.addCrashSection("EntityData ID", Integer.valueOf(par1)); throw new ReportedException(var4); } this.field_75694_d.readLock().unlock(); return var2; }
/** Handles all incoming connections and packets */ public void handleNetworkListenThread() { for (int var1 = 0; var1 < this.connections.size(); ++var1) { NetServerHandler var2 = (NetServerHandler) this.connections.get(var1); try { var2.handlePackets(); } catch (Exception var5) { if (var2.netManager instanceof MemoryConnection) { CrashReport var4 = CrashReport.makeCrashReport(var5, "Ticking memory connection"); throw new ReportedException(var4); } this.mcServer .getLogAgent() .logWarningException( "Failed to handle packet for " + var2.playerEntity.getEntityName() + "/" + var2.playerEntity.getPlayerIP() + ": " + var5, var5); var2.kickPlayer("Internal server error"); } if (var2.connectionClosed) { this.connections.remove(var1--); } var2.netManager.wakeThreads(); } }
public void func_72567_b(Packet p_72567_1_) { if (p_72567_1_ instanceof Packet3Chat) { Packet3Chat var2 = (Packet3Chat) p_72567_1_; int var3 = this.field_72574_e.func_71126_v(); if (var3 == 2) { return; } if (var3 == 1 && !var2.func_73475_d()) { return; } } try { this.field_72575_b.func_74429_a(p_72567_1_); } catch (Throwable var5) { CrashReport var6 = CrashReport.func_85055_a(var5, "Sending packet"); CrashReportCategory var4 = var6.func_85058_a("Packet being sent"); var4.func_71500_a("Packet ID", new CallablePacketID(this, p_72567_1_)); var4.func_71500_a("Packet class", new CallablePacketClass(this, p_72567_1_)); throw new ReportedException(var6); } }
public CrashReport func_71230_b(CrashReport p_71230_1_) { p_71230_1_ = super.func_71230_b(p_71230_1_); p_71230_1_.func_85056_g().func_71500_a("Type", new CallableType3(this)); p_71230_1_.func_85056_g().func_71500_a("Is Modded", new CallableIsModded(this)); return p_71230_1_; }
/** Runs through the list of updates to run and ticks them */ public boolean tickUpdates(boolean par1) { int var2 = this.pendingTickListEntriesTreeSet.size(); if (var2 != this.pendingTickListEntriesHashSet.size()) { throw new IllegalStateException("TickNextTick list out of synch"); } else { if (var2 > 1000) { var2 = 1000; } this.theProfiler.startSection("cleaning"); NextTickListEntry var4; for (int var3 = 0; var3 < var2; ++var3) { var4 = (NextTickListEntry) this.pendingTickListEntriesTreeSet.first(); if (!par1 && var4.scheduledTime > this.worldInfo.getWorldTotalTime()) { break; } this.pendingTickListEntriesTreeSet.remove(var4); this.pendingTickListEntriesHashSet.remove(var4); this.pendingTickListEntriesThisTick.add(var4); } this.theProfiler.endSection(); this.theProfiler.startSection("ticking"); Iterator var14 = this.pendingTickListEntriesThisTick.iterator(); while (var14.hasNext()) { var4 = (NextTickListEntry) var14.next(); var14.remove(); byte var5 = 0; if (this.checkChunksExist( var4.xCoord - var5, var4.yCoord - var5, var4.zCoord - var5, var4.xCoord + var5, var4.yCoord + var5, var4.zCoord + var5)) { int var6 = this.getBlockId(var4.xCoord, var4.yCoord, var4.zCoord); if (var6 > 0 && Block.isAssociatedBlockID(var6, var4.blockID)) { try { Block.blocksList[var6].updateTick( this, var4.xCoord, var4.yCoord, var4.zCoord, this.rand); } catch (Throwable var13) { CrashReport var8 = CrashReport.makeCrashReport(var13, "Exception while ticking a block"); CrashReportCategory var9 = var8.makeCategory("Block being ticked"); int var10; try { var10 = this.getBlockMetadata(var4.xCoord, var4.yCoord, var4.zCoord); } catch (Throwable var12) { var10 = -1; } CrashReportCategory.func_85068_a( var9, var4.xCoord, var4.yCoord, var4.zCoord, var6, var10); throw new ReportedException(var8); } } } else { this.scheduleBlockUpdate(var4.xCoord, var4.yCoord, var4.zCoord, var4.blockID, 0); } } this.theProfiler.endSection(); this.pendingTickListEntriesThisTick.clear(); return !this.pendingTickListEntriesTreeSet.isEmpty(); } }
/** Adds the server info, including from theWorldServer, to the crash report. */ public CrashReport addServerInfoToCrashReport(CrashReport par1CrashReport) { par1CrashReport = super.addServerInfoToCrashReport(par1CrashReport); par1CrashReport.func_85056_g().addCrashSectionCallable("Is Modded", new CallableType(this)); par1CrashReport.func_85056_g().addCrashSectionCallable("Type", new CallableServerType(this)); return par1CrashReport; }
public PanelCrashReport(CrashReport p_i3010_1_) { this.setBackground(new Color(3028036)); this.setLayout(new BorderLayout()); StringWriter var2 = new StringWriter(); p_i3010_1_.func_71505_b().printStackTrace(new PrintWriter(var2)); String var3 = var2.toString(); String var4 = ""; String var5 = ""; try { var5 = var5 + "Generated " + (new SimpleDateFormat()).format(new Date()) + "\n"; var5 = var5 + "\n"; var5 = var5 + p_i3010_1_.func_90021_c(); var4 = GL11.glGetString(7936); } catch (Throwable var9) { var5 = var5 + "[failed to get system properties (" + var9 + ")]\n"; } var5 = var5 + "\n\n"; var5 = var5 + var3; String var6 = ""; var6 = var6 + "\n"; var6 = var6 + "\n"; if (var3.contains("Pixel format not accelerated")) { var6 = var6 + " Bad video card drivers! \n"; var6 = var6 + " ----------------------- \n"; var6 = var6 + "\n"; var6 = var6 + "Minecraft was unable to start because it failed to find an accelerated OpenGL mode.\n"; var6 = var6 + "This can usually be fixed by updating the video card drivers.\n"; if (var4.toLowerCase().contains("nvidia")) { var6 = var6 + "\n"; var6 = var6 + "You might be able to find drivers for your video card here:\n"; var6 = var6 + " http://www.nvidia.com/\n"; } else if (var4.toLowerCase().contains("ati")) { var6 = var6 + "\n"; var6 = var6 + "You might be able to find drivers for your video card here:\n"; var6 = var6 + " http://www.amd.com/\n"; } } else { var6 = var6 + " Minecraft has crashed! \n"; var6 = var6 + " ---------------------- \n"; var6 = var6 + "\n"; var6 = var6 + "Minecraft has stopped running because it encountered a problem; " + p_i3010_1_.func_71501_a() + "\n\n"; File var7 = p_i3010_1_.func_71497_f(); if (var7 == null) { p_i3010_1_.func_71508_a( new File( new File(Minecraft.func_71380_b(), "crash-reports"), "crash-" + (new SimpleDateFormat("yyyy-MM-dd_HH.mm.ss")).format(new Date()) + "-client.txt"), Minecraft.func_71410_x().func_98033_al()); var7 = p_i3010_1_.func_71497_f(); } if (var7 != null) { String var8 = var7.getAbsolutePath(); var6 = var6 + "A full error report has been saved to " + var8 + " - Please include a copy of that file (Not this screen!) if you report this crash to anyone; without it, they will not be able to help fix the crash :("; var5 = "Full report at:\n" + var8 + "\nPlease show that file to Mojang, NOT just this screen!\n\n" + var5; } else { var6 = var6 + "We were unable to save this report to a file."; } var6 = var6 + "\n"; } var6 = var6 + "\n"; var6 = var6 + "\n"; var6 = var6 + "\n"; var6 = var6 + "--- BEGIN ERROR REPORT " + Integer.toHexString(var6.hashCode()) + " --------\n"; var6 = var6 + var5; var6 = var6 + "--- END ERROR REPORT " + Integer.toHexString(var6.hashCode()) + " ----------\n"; var6 = var6 + "\n"; var6 = var6 + "\n"; TextArea var10 = new TextArea(var6, 0, 0, 1); var10.setFont(new Font("Monospaced", 0, 12)); this.add(new CanvasMojangLogo(), "North"); this.add(new CanvasCrashReport(80), "East"); this.add(new CanvasCrashReport(80), "West"); this.add(new CanvasCrashReport(100), "South"); this.add(var10, "Center"); }