shit
This commit is contained in:
+34274
-34342
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -448,7 +448,6 @@ public class GuiIngame extends Gui {
|
||||
ScorePlayerTeam t = this.mc.theWorld.getScoreboard().getPlayersTeam(p.name);
|
||||
maxNameWidth = Math.max(maxNameWidth, var8.getStringWidth(ScorePlayerTeam.formatPlayerName(t, p.name)));
|
||||
}
|
||||
// Now compute the final column width based on the widest formatted name measured above
|
||||
int var46 = Math.min(Math.max(120, maxNameWidth + 30), Math.max(120, var6 - 20));
|
||||
int var19 = (var6 - columns * var46) / 2;
|
||||
int var47 = 10;
|
||||
@@ -468,14 +467,11 @@ public class GuiIngame extends Gui {
|
||||
GuiPlayerInfo var48 = var42.get(i);
|
||||
ScorePlayerTeam var49 = this.mc.theWorld.getScoreboard().getPlayersTeam(var48.name);
|
||||
String var50 = ScorePlayerTeam.formatPlayerName(var49, var48.name);
|
||||
// If there are no color codes at all but the team defines a color, prepend it
|
||||
String stripped = StringUtils.stripControlCodes(var50);
|
||||
if (stripped == null) stripped = "";
|
||||
if (stripped.trim().isEmpty()) {
|
||||
// Completely blank after stripping -> ensure visibility
|
||||
var50 = EnumChatFormatting.RESET + var48.name;
|
||||
} else if (var49 != null && var50.equals(stripped)) {
|
||||
// Team exists but formatted name contains no color codes -> apply team color prefix
|
||||
var50 = var49.getColorPrefix() + var50;
|
||||
}
|
||||
var8.drawStringWithShadow(var50, var221, var231, 0xFFFFFF);
|
||||
|
||||
@@ -522,9 +522,7 @@ public class GuiMainMenu extends GuiScreen implements GuiYesNoCallback {
|
||||
this.mc.getTextureManager().bindTexture(backgroundTexture2);
|
||||
this.rotateAndBlurSkybox(parFloat1);
|
||||
|
||||
// it is unintentionally discarded and the previous iteration is used
|
||||
|
||||
// this.rotateAndBlurSkybox(parFloat1);
|
||||
|
||||
_wglBindFramebuffer(0x8D40, null);
|
||||
|
||||
|
||||
@@ -91,7 +91,6 @@ public class GuiNewChat extends Gui {
|
||||
}
|
||||
}
|
||||
|
||||
// Do not modify GL_ALPHA_TEST state here to avoid unintended transparency side-effects
|
||||
|
||||
if (var3) {
|
||||
var9 = this.field_146247_f.fontRenderer.FONT_HEIGHT;
|
||||
|
||||
@@ -55,7 +55,6 @@ public class PlayerManager {
|
||||
private final int[][] xzDirectionsConst = new int[][] { { 1, 0 }, { 0, 1 }, { -1, 0 }, { 0, -1 } };
|
||||
private static final String __OBFID = "CL_00001434";
|
||||
|
||||
// Recursion guard - infinite recursion'ı önlemek için
|
||||
private static final java.util.Set<String> populatingChunks = new java.util.HashSet<String>();
|
||||
|
||||
public PlayerManager(WorldServer p_i1176_1_) {
|
||||
@@ -64,8 +63,6 @@ public class PlayerManager {
|
||||
|
||||
}
|
||||
|
||||
// SINGLEPLAYER FIX: Constructor'da chunk population yapmayalım - dosya sistemi henüz hazır değil
|
||||
// Population sadece chunk yüklenirken yapılacak
|
||||
|
||||
/**
|
||||
* Manuel ağaç generation - biome decoration çalışmıyorsa direkt ağaç ekler
|
||||
@@ -78,10 +75,8 @@ public class PlayerManager {
|
||||
int baseX = chunkX * 16;
|
||||
int baseZ = chunkZ * 16;
|
||||
|
||||
// Biome'u al
|
||||
net.minecraft.world.biome.BiomeGenBase biome = world.getBiomeGenForCoords(baseX + 8, baseZ + 8);
|
||||
|
||||
// Ağaç generation sayısını biome'a göre ayarla
|
||||
int treeCount = 0;
|
||||
if (biome == net.minecraft.world.biome.BiomeGenBase.forest ||
|
||||
biome == net.minecraft.world.biome.BiomeGenBase.forestHills) {
|
||||
@@ -107,45 +102,36 @@ public class PlayerManager {
|
||||
field_152627_a.info("Manually generating {} trees for chunk ({}, {}) in biome {}",
|
||||
treeCount, chunkX, chunkZ, biome.biomeName);
|
||||
|
||||
// Ağaçları yerleştir
|
||||
for (int i = 0; i < treeCount; i++) {
|
||||
int x = baseX + random.nextInt(16);
|
||||
int z = baseZ + random.nextInt(16);
|
||||
int y = world.getHeightValue(x, z);
|
||||
|
||||
// Uygun yer kontrolü
|
||||
if (y > 60 && y < 120) {
|
||||
net.minecraft.block.Block groundBlock = world.getBlock(x, y - 1, z);
|
||||
if (groundBlock == net.minecraft.init.Blocks.grass ||
|
||||
groundBlock == net.minecraft.init.Blocks.dirt) {
|
||||
|
||||
// Ağaç türünü biome'a göre seç
|
||||
net.minecraft.world.gen.feature.WorldGenerator treeGen;
|
||||
if (biome == net.minecraft.world.biome.BiomeGenBase.field_150583_P || // Birch Forest
|
||||
biome == net.minecraft.world.biome.BiomeGenBase.field_150582_Q) { // Birch Forest Hills
|
||||
// Birch tree - metadata 2 for birch log
|
||||
treeGen = new net.minecraft.world.gen.feature.WorldGenTrees(false, 5, 2, 2, false);
|
||||
} else if (biome == net.minecraft.world.biome.BiomeGenBase.field_150585_R) { // Roofed Forest
|
||||
treeGen = new net.minecraft.world.gen.feature.WorldGenCanopyTree(false);
|
||||
} else if (biome == net.minecraft.world.biome.BiomeGenBase.jungle ||
|
||||
biome == net.minecraft.world.biome.BiomeGenBase.jungleHills) {
|
||||
// Jungle tree - metadata 3 for jungle log
|
||||
treeGen = new net.minecraft.world.gen.feature.WorldGenTrees(false, 4, 3, 3, true);
|
||||
} else if (biome == net.minecraft.world.biome.BiomeGenBase.field_150588_X || // Savanna
|
||||
biome == net.minecraft.world.biome.BiomeGenBase.field_150587_Y) { // Savanna Plateau
|
||||
treeGen = new net.minecraft.world.gen.feature.WorldGenSavannaTree(false);
|
||||
} else if (biome == net.minecraft.world.biome.BiomeGenBase.taiga ||
|
||||
biome == net.minecraft.world.biome.BiomeGenBase.taigaHills) {
|
||||
// Spruce tree - metadata 1 for spruce log
|
||||
treeGen = new net.minecraft.world.gen.feature.WorldGenTrees(false, 6, 1, 1, false);
|
||||
} else {
|
||||
// Normal oak tree
|
||||
treeGen = new net.minecraft.world.gen.feature.WorldGenTrees(false);
|
||||
}
|
||||
|
||||
// Ağacı yerleştir
|
||||
if (treeGen.generate(world, random, x, y, z)) {
|
||||
// Başarılı generation log'u
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -160,22 +146,18 @@ public class PlayerManager {
|
||||
* Chunk'ın decoration'a ihtiyacı olup olmadığını kontrol eder
|
||||
*/
|
||||
private static boolean isChunkEmpty(net.minecraft.world.chunk.Chunk chunk) {
|
||||
// Ağaç ve decoration eksikliğini tespit etmek için daha hassas heuristic
|
||||
try {
|
||||
int treeBlocks = 0;
|
||||
int decorationBlocks = 0;
|
||||
int totalSurfaceBlocks = 0;
|
||||
|
||||
// Daha yoğun sampling - ağaçları kaçırmamak için
|
||||
for (int x = 0; x < 16; x += 2) {
|
||||
for (int z = 0; z < 16; z += 2) {
|
||||
// Yüzey seviyesini bul
|
||||
for (int y = 80; y >= 60; y--) {
|
||||
net.minecraft.block.Block block = chunk.func_150810_a(x, y, z);
|
||||
if (block != net.minecraft.init.Blocks.air) {
|
||||
totalSurfaceBlocks++;
|
||||
|
||||
// Ağaç blokları (log, leaves)
|
||||
if (block == net.minecraft.init.Blocks.log ||
|
||||
block == net.minecraft.init.Blocks.log2 ||
|
||||
block == net.minecraft.init.Blocks.leaves ||
|
||||
@@ -183,7 +165,6 @@ public class PlayerManager {
|
||||
treeBlocks++;
|
||||
}
|
||||
|
||||
// Diğer decoration blokları
|
||||
if (block != net.minecraft.init.Blocks.stone &&
|
||||
block != net.minecraft.init.Blocks.dirt &&
|
||||
block != net.minecraft.init.Blocks.grass &&
|
||||
@@ -198,7 +179,6 @@ public class PlayerManager {
|
||||
}
|
||||
}
|
||||
|
||||
// Ağaç yok veya çok az decoration varsa chunk boş sayılır
|
||||
boolean noTrees = treeBlocks == 0;
|
||||
boolean lowDecoration = totalSurfaceBlocks > 0 && (decorationBlocks * 100 / totalSurfaceBlocks) < 15;
|
||||
|
||||
@@ -345,10 +325,8 @@ public class PlayerManager {
|
||||
ChunkCoordIntPair cc = (ChunkCoordIntPair) itRem.next();
|
||||
Chunk ch = this.theWorldServer.getChunkFromChunkCoords(cc.chunkXPos, cc.chunkZPos);
|
||||
|
||||
// Singleplayer'da chunk population sorununu çöz - remaining chunk'lar için - GÜVENLİ YAKLAŞIM
|
||||
String chunkKey = cc.chunkXPos + "," + cc.chunkZPos;
|
||||
if (!populatingChunks.contains(chunkKey)) {
|
||||
// Chunk'ın decoration durumunu kontrol et
|
||||
boolean needsDecoration = !ch.isTerrainPopulated || isChunkEmpty(ch);
|
||||
|
||||
if (needsDecoration) {
|
||||
@@ -357,8 +335,6 @@ public class PlayerManager {
|
||||
PlayerManager.field_152627_a.info("SAFE remaining chunk population for ({}, {}) - populated: {}, empty: {}",
|
||||
cc.chunkXPos, cc.chunkZPos, ch.isTerrainPopulated, isChunkEmpty(ch));
|
||||
|
||||
// SADECE MANUEL AĞAÇ GENERATION YAP - normal population neighboring chunk'lara ihtiyaç duyuyor
|
||||
// ve bunlar henüz dosya sisteminde olmayabilir
|
||||
generateTreesManually(ch, cc.chunkXPos, cc.chunkZPos);
|
||||
|
||||
ch.setChunkModified();
|
||||
@@ -583,22 +559,18 @@ public class PlayerManager {
|
||||
this.chunkLocation = new ChunkCoordIntPair(p_i1518_2_, p_i1518_3_);
|
||||
PlayerManager.this.getWorldServer().theChunkProviderServer.loadChunk(p_i1518_2_, p_i1518_3_);
|
||||
|
||||
// Singleplayer'da chunk population sorununu çöz - GÜVENLİ YAKLAŞIM
|
||||
String chunkKey = p_i1518_2_ + "," + p_i1518_3_;
|
||||
if (!populatingChunks.contains(chunkKey)) {
|
||||
populatingChunks.add(chunkKey);
|
||||
try {
|
||||
Chunk ch = PlayerManager.this.theWorldServer.getChunkFromChunkCoords(p_i1518_2_, p_i1518_3_);
|
||||
if (ch != null) {
|
||||
// Chunk'ın decoration durumunu kontrol et - basit bir heuristic
|
||||
boolean needsDecoration = !ch.isTerrainPopulated || isChunkEmpty(ch);
|
||||
|
||||
if (needsDecoration) {
|
||||
PlayerManager.field_152627_a.info("SAFE chunk population for ({}, {}) - populated: {}, empty: {}",
|
||||
p_i1518_2_, p_i1518_3_, ch.isTerrainPopulated, isChunkEmpty(ch));
|
||||
|
||||
// SADECE MANUEL AĞAÇ GENERATION YAP - normal population neighboring chunk'lara ihtiyaç duyuyor
|
||||
// ve bunlar henüz dosya sisteminde olmayabilir
|
||||
generateTreesManually(ch, p_i1518_2_, p_i1518_3_);
|
||||
|
||||
ch.setChunkModified();
|
||||
|
||||
@@ -149,7 +149,6 @@ public final class SpawnerAnimals {
|
||||
return var5;
|
||||
}
|
||||
|
||||
// Null check for entity creation
|
||||
if (var41 == null) {
|
||||
continue;
|
||||
}
|
||||
@@ -251,7 +250,6 @@ public final class SpawnerAnimals {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Null check for entity creation
|
||||
if (var22 == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -130,7 +130,6 @@ public class ChunkProviderServer implements IChunkProvider {
|
||||
this.loadedChunks.add(var5);
|
||||
var5.onChunkLoad();
|
||||
|
||||
// Singleplayer chunk population fix - GÜVENLİ YAKLAŞIM
|
||||
var5.populateChunk(this, this, p_73158_1_, p_73158_2_);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user