Fix broken math, depth test and crash
This commit is contained in:
parent
93eea7be63
commit
de1a5c024f
|
@ -10,9 +10,6 @@ import net.PeytonPlayz585.glemu.FixedFunctionShader;
|
||||||
import net.PeytonPlayz585.glemu.GLObjectMap;
|
import net.PeytonPlayz585.glemu.GLObjectMap;
|
||||||
|
|
||||||
import net.lax1dude.eaglercraft.adapter.EaglerAdapterImpl2;
|
import net.lax1dude.eaglercraft.adapter.EaglerAdapterImpl2;
|
||||||
import net.minecraft.client.Minecraft;
|
|
||||||
import net.minecraft.src.GLAllocation;
|
|
||||||
import net.minecraft.src.Vec3D;
|
|
||||||
import net.PeytonPlayz585.glemu.vector.*;
|
import net.PeytonPlayz585.glemu.vector.*;
|
||||||
|
|
||||||
import static net.PeytonPlayz585.glemu.StreamBuffer.StreamBufferInstance;
|
import static net.PeytonPlayz585.glemu.StreamBuffer.StreamBufferInstance;
|
||||||
|
@ -250,25 +247,41 @@ public class EaglerAdapterGL30 extends EaglerAdapterImpl2 {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static float clearDepth = -999.0f;
|
||||||
public static final void glClearDepth(float p1) {
|
public static final void glClearDepth(float p1) {
|
||||||
_wglClearDepth(-p1);
|
p1 = 1.0f - p1;
|
||||||
|
if(p1 != clearDepth) {
|
||||||
|
_wglClearDepth(p1);
|
||||||
|
clearDepth = p1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static final int GL_GEQUAL = RealOpenGLEnums.GL_GEQUAL;
|
||||||
|
public static final int GL_LESS = RealOpenGLEnums.GL_LESS;
|
||||||
|
static int stateDepthFunc = -1;
|
||||||
public static final void glDepthFunc(int p1) {
|
public static final void glDepthFunc(int p1) {
|
||||||
int f = _wGL_GEQUAL;
|
int rev = p1;
|
||||||
switch (p1) {
|
switch(p1) {
|
||||||
case GL_GREATER:
|
case GL_GREATER:
|
||||||
f = _wGL_LESS;
|
rev = _wGL_LESS;
|
||||||
break;
|
break;
|
||||||
case GL_LEQUAL:
|
case GL_GEQUAL:
|
||||||
f = _wGL_GEQUAL;
|
rev = _wGL_LEQUAL;
|
||||||
break;
|
break;
|
||||||
case GL_EQUAL:
|
case GL_EQUAL:
|
||||||
f = _wGL_EQUAL;
|
rev = _wGL_EQUAL;
|
||||||
default:
|
break;
|
||||||
|
case GL_LEQUAL:
|
||||||
|
rev = _wGL_GEQUAL;
|
||||||
|
break;
|
||||||
|
case GL_LESS:
|
||||||
|
rev = _wGL_GREATER;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
_wglDepthFunc(f);
|
if(rev != stateDepthFunc) {
|
||||||
|
_wglDepthFunc(rev);
|
||||||
|
stateDepthFunc = rev;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final void glAlphaFunc(int p1, float p2) {
|
public static final void glAlphaFunc(int p1, float p2) {
|
||||||
|
|
|
@ -2,7 +2,6 @@ package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BiomeGenBase {
|
public class BiomeGenBase {
|
||||||
public static final BiomeGenBase rainforest = (new BiomeGenRainforest()).setColor(588342).setBiomeName("Rainforest").func_4124_a(2094168);
|
public static final BiomeGenBase rainforest = (new BiomeGenRainforest()).setColor(588342).setBiomeName("Rainforest").func_4124_a(2094168);
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BiomeGenForest extends BiomeGenBase {
|
public class BiomeGenForest extends BiomeGenBase {
|
||||||
public BiomeGenForest() {
|
public BiomeGenForest() {
|
||||||
this.spawnableCreatureList.add(new SpawnListEntry(EntityWolf.class, 2));
|
this.spawnableCreatureList.add(new SpawnListEntry(EntityWolf.class, 2));
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BiomeGenRainforest extends BiomeGenBase {
|
public class BiomeGenRainforest extends BiomeGenBase {
|
||||||
public WorldGenerator getRandomWorldGenForTrees(Random var1) {
|
public WorldGenerator getRandomWorldGenForTrees(Random var1) {
|
||||||
return (WorldGenerator)(var1.nextInt(3) == 0 ? new WorldGenBigTree() : new WorldGenTrees());
|
return (WorldGenerator)(var1.nextInt(3) == 0 ? new WorldGenBigTree() : new WorldGenTrees());
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BiomeGenTaiga extends BiomeGenBase {
|
public class BiomeGenTaiga extends BiomeGenBase {
|
||||||
public BiomeGenTaiga() {
|
public BiomeGenTaiga() {
|
||||||
this.spawnableCreatureList.add(new SpawnListEntry(EntityWolf.class, 2));
|
this.spawnableCreatureList.add(new SpawnListEntry(EntityWolf.class, 2));
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class Block {
|
public class Block {
|
||||||
public static final StepSound soundPowderFootstep = new StepSound("stone", 1.0F, 1.0F);
|
public static final StepSound soundPowderFootstep = new StepSound("stone", 1.0F, 1.0F);
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockBed extends Block {
|
public class BlockBed extends Block {
|
||||||
public static final int[][] headBlockToFootBlockMap = new int[][]{{0, 1}, {-1, 0}, {0, -1}, {1, 0}};
|
public static final int[][] headBlockToFootBlockMap = new int[][]{{0, 1}, {-1, 0}, {0, -1}, {1, 0}};
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockBookshelf extends Block {
|
public class BlockBookshelf extends Block {
|
||||||
public BlockBookshelf(int var1, int var2) {
|
public BlockBookshelf(int var1, int var2) {
|
||||||
super(var1, var2, Material.wood);
|
super(var1, var2, Material.wood);
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockButton extends Block {
|
public class BlockButton extends Block {
|
||||||
protected BlockButton(int var1, int var2) {
|
protected BlockButton(int var1, int var2) {
|
||||||
super(var1, var2, Material.circuits);
|
super(var1, var2, Material.circuits);
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockCactus extends Block {
|
public class BlockCactus extends Block {
|
||||||
protected BlockCactus(int var1, int var2) {
|
protected BlockCactus(int var1, int var2) {
|
||||||
super(var1, var2, Material.cactus);
|
super(var1, var2, Material.cactus);
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockCake extends Block {
|
public class BlockCake extends Block {
|
||||||
protected BlockCake(int var1, int var2) {
|
protected BlockCake(int var1, int var2) {
|
||||||
super(var1, var2, Material.cakeMaterial);
|
super(var1, var2, Material.cakeMaterial);
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockChest extends BlockContainer {
|
public class BlockChest extends BlockContainer {
|
||||||
private Random random = new Random();
|
private Random random = new Random();
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockClay extends Block {
|
public class BlockClay extends Block {
|
||||||
public BlockClay(int var1, int var2) {
|
public BlockClay(int var1, int var2) {
|
||||||
super(var1, var2, Material.clay);
|
super(var1, var2, Material.clay);
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockCrops extends BlockFlower {
|
public class BlockCrops extends BlockFlower {
|
||||||
protected BlockCrops(int var1, int var2) {
|
protected BlockCrops(int var1, int var2) {
|
||||||
super(var1, var2);
|
super(var1, var2);
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockDeadBush extends BlockFlower {
|
public class BlockDeadBush extends BlockFlower {
|
||||||
protected BlockDeadBush(int var1, int var2) {
|
protected BlockDeadBush(int var1, int var2) {
|
||||||
super(var1, var2);
|
super(var1, var2);
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockDetectorRail extends BlockRail {
|
public class BlockDetectorRail extends BlockRail {
|
||||||
public BlockDetectorRail(int var1, int var2) {
|
public BlockDetectorRail(int var1, int var2) {
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockDispenser extends BlockContainer {
|
public class BlockDispenser extends BlockContainer {
|
||||||
private Random random = new Random();
|
private Random random = new Random();
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockDoor extends Block {
|
public class BlockDoor extends Block {
|
||||||
protected BlockDoor(int var1, Material var2) {
|
protected BlockDoor(int var1, Material var2) {
|
||||||
super(var1, var2);
|
super(var1, var2);
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockFarmland extends Block {
|
public class BlockFarmland extends Block {
|
||||||
protected BlockFarmland(int var1) {
|
protected BlockFarmland(int var1) {
|
||||||
super(var1, Material.ground);
|
super(var1, Material.ground);
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockFire extends Block {
|
public class BlockFire extends Block {
|
||||||
private int[] chanceToEncourageFire = new int[256];
|
private int[] chanceToEncourageFire = new int[256];
|
||||||
private int[] abilityToCatchFire = new int[256];
|
private int[] abilityToCatchFire = new int[256];
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockFlower extends Block {
|
public class BlockFlower extends Block {
|
||||||
protected BlockFlower(int var1, int var2) {
|
protected BlockFlower(int var1, int var2) {
|
||||||
super(var1, Material.plants);
|
super(var1, Material.plants);
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockFlowing extends BlockFluid {
|
public class BlockFlowing extends BlockFluid {
|
||||||
int numAdjacentSources = 0;
|
int numAdjacentSources = 0;
|
||||||
boolean[] isOptimalFlowDirection = new boolean[4];
|
boolean[] isOptimalFlowDirection = new boolean[4];
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public abstract class BlockFluid extends Block {
|
public abstract class BlockFluid extends Block {
|
||||||
protected BlockFluid(int var1, Material var2) {
|
protected BlockFluid(int var1, Material var2) {
|
||||||
super(var1, (var2 == Material.lava ? 14 : 12) * 16 + 13, var2);
|
super(var1, (var2 == Material.lava ? 14 : 12) * 16 + 13, var2);
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockFurnace extends BlockContainer {
|
public class BlockFurnace extends BlockContainer {
|
||||||
private Random furnaceRand = new Random();
|
private Random furnaceRand = new Random();
|
||||||
private final boolean isActive;
|
private final boolean isActive;
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockGlass extends BlockBreakable {
|
public class BlockGlass extends BlockBreakable {
|
||||||
public BlockGlass(int var1, int var2, Material var3, boolean var4) {
|
public BlockGlass(int var1, int var2, Material var3, boolean var4) {
|
||||||
super(var1, var2, var3, var4);
|
super(var1, var2, var3, var4);
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockGlowStone extends Block {
|
public class BlockGlowStone extends Block {
|
||||||
public BlockGlowStone(int var1, int var2, Material var3) {
|
public BlockGlowStone(int var1, int var2, Material var3) {
|
||||||
super(var1, var2, var3);
|
super(var1, var2, var3);
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockGrass extends Block {
|
public class BlockGrass extends Block {
|
||||||
protected BlockGrass(int var1) {
|
protected BlockGrass(int var1) {
|
||||||
super(var1, Material.grassMaterial);
|
super(var1, Material.grassMaterial);
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockGravel extends BlockSand {
|
public class BlockGravel extends BlockSand {
|
||||||
public BlockGravel(int var1, int var2) {
|
public BlockGravel(int var1, int var2) {
|
||||||
super(var1, var2);
|
super(var1, var2);
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockIce extends BlockBreakable {
|
public class BlockIce extends BlockBreakable {
|
||||||
public BlockIce(int var1, int var2) {
|
public BlockIce(int var1, int var2) {
|
||||||
super(var1, var2, Material.ice, false);
|
super(var1, var2, Material.ice, false);
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockLadder extends Block {
|
public class BlockLadder extends Block {
|
||||||
protected BlockLadder(int var1, int var2) {
|
protected BlockLadder(int var1, int var2) {
|
||||||
super(var1, var2, Material.circuits);
|
super(var1, var2, Material.circuits);
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockLeaves extends BlockLeavesBase {
|
public class BlockLeaves extends BlockLeavesBase {
|
||||||
private int baseIndexInPNG;
|
private int baseIndexInPNG;
|
||||||
int[] adjacentTreeBlocks;
|
int[] adjacentTreeBlocks;
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockLockedChest extends Block {
|
public class BlockLockedChest extends Block {
|
||||||
protected BlockLockedChest(int var1) {
|
protected BlockLockedChest(int var1) {
|
||||||
super(var1, Material.wood);
|
super(var1, Material.wood);
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockLog extends Block {
|
public class BlockLog extends Block {
|
||||||
protected BlockLog(int var1) {
|
protected BlockLog(int var1) {
|
||||||
super(var1, Material.wood);
|
super(var1, Material.wood);
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockMobSpawner extends BlockContainer {
|
public class BlockMobSpawner extends BlockContainer {
|
||||||
protected BlockMobSpawner(int var1, int var2) {
|
protected BlockMobSpawner(int var1, int var2) {
|
||||||
super(var1, var2, Material.rock);
|
super(var1, var2, Material.rock);
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockMushroom extends BlockFlower {
|
public class BlockMushroom extends BlockFlower {
|
||||||
protected BlockMushroom(int var1, int var2) {
|
protected BlockMushroom(int var1, int var2) {
|
||||||
super(var1, var2);
|
super(var1, var2);
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockObsidian extends BlockStone {
|
public class BlockObsidian extends BlockStone {
|
||||||
public BlockObsidian(int var1, int var2) {
|
public BlockObsidian(int var1, int var2) {
|
||||||
super(var1, var2);
|
super(var1, var2);
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockOre extends Block {
|
public class BlockOre extends Block {
|
||||||
public BlockOre(int var1, int var2) {
|
public BlockOre(int var1, int var2) {
|
||||||
super(var1, var2, Material.rock);
|
super(var1, var2, Material.rock);
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockPistonExtension extends Block {
|
public class BlockPistonExtension extends Block {
|
||||||
private int field_31053_a = -1;
|
private int field_31053_a = -1;
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockPistonMoving extends BlockContainer {
|
public class BlockPistonMoving extends BlockContainer {
|
||||||
public BlockPistonMoving(int var1) {
|
public BlockPistonMoving(int var1) {
|
||||||
super(var1, Material.field_31067_B);
|
super(var1, Material.field_31067_B);
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockPortal extends BlockBreakable {
|
public class BlockPortal extends BlockBreakable {
|
||||||
public BlockPortal(int var1, int var2) {
|
public BlockPortal(int var1, int var2) {
|
||||||
super(var1, var2, Material.portal, false);
|
super(var1, var2, Material.portal, false);
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockPressurePlate extends Block {
|
public class BlockPressurePlate extends Block {
|
||||||
private EnumMobType triggerMobType;
|
private EnumMobType triggerMobType;
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockRail extends Block {
|
public class BlockRail extends Block {
|
||||||
private final boolean isPowered;
|
private final boolean isPowered;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockRedstoneOre extends Block {
|
public class BlockRedstoneOre extends Block {
|
||||||
private boolean field_468_a;
|
private boolean field_468_a;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockRedstoneRepeater extends Block {
|
public class BlockRedstoneRepeater extends Block {
|
||||||
public static final double[] field_22024_a = new double[]{-0.0625D, 1.0D / 16.0D, 0.1875D, 0.3125D};
|
public static final double[] field_22024_a = new double[]{-0.0625D, 1.0D / 16.0D, 0.1875D, 0.3125D};
|
||||||
private static final int[] field_22023_b = new int[]{1, 2, 3, 4};
|
private static final int[] field_22023_b = new int[]{1, 2, 3, 4};
|
||||||
|
|
|
@ -2,7 +2,6 @@ package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockRedstoneTorch extends BlockTorch {
|
public class BlockRedstoneTorch extends BlockTorch {
|
||||||
private boolean torchActive = false;
|
private boolean torchActive = false;
|
||||||
|
|
|
@ -2,7 +2,6 @@ package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Random;
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
public class BlockRedstoneWire extends Block {
|
public class BlockRedstoneWire extends Block {
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockReed extends Block {
|
public class BlockReed extends Block {
|
||||||
protected BlockReed(int var1, int var2) {
|
protected BlockReed(int var1, int var2) {
|
||||||
super(var1, Material.plants);
|
super(var1, Material.plants);
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockSand extends Block {
|
public class BlockSand extends Block {
|
||||||
public static boolean fallInstantly = false;
|
public static boolean fallInstantly = false;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockSapling extends BlockFlower {
|
public class BlockSapling extends BlockFlower {
|
||||||
protected BlockSapling(int var1, int var2) {
|
protected BlockSapling(int var1, int var2) {
|
||||||
super(var1, var2);
|
super(var1, var2);
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockSign extends BlockContainer {
|
public class BlockSign extends BlockContainer {
|
||||||
private Class signEntityClass;
|
private Class signEntityClass;
|
||||||
private boolean isFreestanding;
|
private boolean isFreestanding;
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockSnow extends Block {
|
public class BlockSnow extends Block {
|
||||||
protected BlockSnow(int var1, int var2) {
|
protected BlockSnow(int var1, int var2) {
|
||||||
super(var1, var2, Material.snow);
|
super(var1, var2, Material.snow);
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockSnowBlock extends Block {
|
public class BlockSnowBlock extends Block {
|
||||||
protected BlockSnowBlock(int var1, int var2) {
|
protected BlockSnowBlock(int var1, int var2) {
|
||||||
super(var1, var2, Material.builtSnow);
|
super(var1, var2, Material.builtSnow);
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockStairs extends Block {
|
public class BlockStairs extends Block {
|
||||||
private Block modelBlock;
|
private Block modelBlock;
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockStationary extends BlockFluid {
|
public class BlockStationary extends BlockFluid {
|
||||||
protected BlockStationary(int var1, Material var2) {
|
protected BlockStationary(int var1, Material var2) {
|
||||||
super(var1, var2);
|
super(var1, var2);
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockStep extends Block {
|
public class BlockStep extends Block {
|
||||||
public static final String[] field_22037_a = new String[]{"stone", "sand", "wood", "cobble"};
|
public static final String[] field_22037_a = new String[]{"stone", "sand", "wood", "cobble"};
|
||||||
private boolean blockType;
|
private boolean blockType;
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockStone extends Block {
|
public class BlockStone extends Block {
|
||||||
public BlockStone(int var1, int var2) {
|
public BlockStone(int var1, int var2) {
|
||||||
super(var1, var2, Material.rock);
|
super(var1, var2, Material.rock);
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockTNT extends Block {
|
public class BlockTNT extends Block {
|
||||||
public BlockTNT(int var1, int var2) {
|
public BlockTNT(int var1, int var2) {
|
||||||
super(var1, var2, Material.tnt);
|
super(var1, var2, Material.tnt);
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockTallGrass extends BlockFlower {
|
public class BlockTallGrass extends BlockFlower {
|
||||||
protected BlockTallGrass(int var1, int var2) {
|
protected BlockTallGrass(int var1, int var2) {
|
||||||
super(var1, var2);
|
super(var1, var2);
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockTorch extends Block {
|
public class BlockTorch extends Block {
|
||||||
protected BlockTorch(int var1, int var2) {
|
protected BlockTorch(int var1, int var2) {
|
||||||
super(var1, var2, Material.circuits);
|
super(var1, var2, Material.circuits);
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class BlockWeb extends Block {
|
public class BlockWeb extends Block {
|
||||||
public BlockWeb(int var1, int var2) {
|
public BlockWeb(int var1, int var2) {
|
||||||
super(var1, var2, Material.field_31068_A);
|
super(var1, var2, Material.field_31068_A);
|
||||||
|
|
|
@ -5,7 +5,6 @@ import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class Chunk {
|
public class Chunk {
|
||||||
public static boolean isLit;
|
public static boolean isLit;
|
||||||
|
|
|
@ -49,7 +49,9 @@ public class ChunkLoader implements IChunkLoader {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return loadChunkIntoWorldFromCompound(var1, var6);
|
Chunk var7 = loadChunkIntoWorldFromCompound(var1, var6);
|
||||||
|
var7.func_25124_i();
|
||||||
|
return var7;
|
||||||
} catch(IOException e) {
|
} catch(IOException e) {
|
||||||
GL11.deleteFile(var4);
|
GL11.deleteFile(var4);
|
||||||
return null;
|
return null;
|
||||||
|
@ -57,26 +59,6 @@ public class ChunkLoader implements IChunkLoader {
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
// if(var4 != null && GL11.exists(var4)) {
|
|
||||||
// try {
|
|
||||||
// ByteArrayInputStream var5 = new ByteArrayInputStream(GL11.readFile(var4));
|
|
||||||
// NBTTagCompound var6 = CompressedStreamTools.func_1138_a(var5);
|
|
||||||
// Chunk var7 = loadChunkIntoWorldFromCompound(var1, var6.getCompoundTag("Level"));
|
|
||||||
// if(!var7.isAtLocation(var2, var3)) {
|
|
||||||
// System.out.println("Chunk file at " + var2 + "," + var3 + " is in the wrong location; relocating. (Expected " + var2 + ", " + var3 + ", got " + var7.xPosition + ", " + var7.zPosition + ")");
|
|
||||||
// var6.setInteger("xPos", var2);
|
|
||||||
// var6.setInteger("zPos", var3);
|
|
||||||
// var7 = loadChunkIntoWorldFromCompound(var1, var6.getCompoundTag("Level"));
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// var7.func_25124_i();
|
|
||||||
// return var7;
|
|
||||||
// } catch (Exception var8) {
|
|
||||||
// var8.printStackTrace();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void saveChunk(World var1, Chunk var2) throws IOException {
|
public void saveChunk(World var1, Chunk var2) throws IOException {
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class ChunkProviderGenerate implements IChunkProvider {
|
public class ChunkProviderGenerate implements IChunkProvider {
|
||||||
private Random rand;
|
private Random rand;
|
||||||
private NoiseGeneratorOctaves field_912_k;
|
private NoiseGeneratorOctaves field_912_k;
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class ChunkProviderHell implements IChunkProvider {
|
public class ChunkProviderHell implements IChunkProvider {
|
||||||
private Random hellRNG;
|
private Random hellRNG;
|
||||||
private NoiseGeneratorOctaves field_4169_i;
|
private NoiseGeneratorOctaves field_4169_i;
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class ChunkProviderSky implements IChunkProvider {
|
public class ChunkProviderSky implements IChunkProvider {
|
||||||
private Random field_28087_j;
|
private Random field_28087_j;
|
||||||
private NoiseGeneratorOctaves field_28086_k;
|
private NoiseGeneratorOctaves field_28086_k;
|
||||||
|
|
|
@ -4,6 +4,7 @@ import java.io.ByteArrayInputStream;
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.DataInputStream;
|
import java.io.DataInputStream;
|
||||||
import java.io.DataOutputStream;
|
import java.io.DataOutputStream;
|
||||||
|
import java.io.EOFException;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
@ -58,7 +59,9 @@ public class EaglerSaveFormat implements ISaveFormat {
|
||||||
}else {
|
}else {
|
||||||
throw new IOException("file '" + dir + "/level.dat' does not contain an NBTTagCompound");
|
throw new IOException("file '" + dir + "/level.dat' does not contain an NBTTagCompound");
|
||||||
}
|
}
|
||||||
}catch(IOException e) {
|
}catch(EOFException e) {
|
||||||
|
//L
|
||||||
|
} catch(IOException e) {
|
||||||
System.err.println("Failed to load world data for '" + saveDir + "/level.dat'");
|
System.err.println("Failed to load world data for '" + saveDir + "/level.dat'");
|
||||||
System.err.println("It will be kept for future recovery");
|
System.err.println("It will be kept for future recovery");
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|
|
@ -2,7 +2,7 @@ package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Random;
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
public class EffectRenderer {
|
public class EffectRenderer {
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class EmptyChunk extends Chunk {
|
public class EmptyChunk extends Chunk {
|
||||||
public EmptyChunk(World var1, int var2, int var3) {
|
public EmptyChunk(World var1, int var2, int var3) {
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public abstract class Entity {
|
public abstract class Entity {
|
||||||
private static int nextEntityID = 0;
|
private static int nextEntityID = 0;
|
||||||
|
|
|
@ -2,7 +2,6 @@ package net.minecraft.src;
|
||||||
|
|
||||||
import java.nio.FloatBuffer;
|
import java.nio.FloatBuffer;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import net.PeytonPlayz585.glemu.GameOverlayFramebuffer;
|
import net.PeytonPlayz585.glemu.GameOverlayFramebuffer;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class EntitySheep extends EntityAnimal {
|
public class EntitySheep extends EntityAnimal {
|
||||||
public static final float[][] fleeceColorTable = new float[][]{{1.0F, 1.0F, 1.0F}, {0.95F, 0.7F, 0.2F}, {0.9F, 0.5F, 0.85F}, {0.6F, 0.7F, 0.95F}, {0.9F, 0.9F, 0.2F}, {0.5F, 0.8F, 0.1F}, {0.95F, 0.7F, 0.8F}, {0.3F, 0.3F, 0.3F}, {0.6F, 0.6F, 0.6F}, {0.3F, 0.6F, 0.7F}, {0.7F, 0.4F, 0.9F}, {0.2F, 0.4F, 0.8F}, {0.5F, 0.4F, 0.3F}, {0.4F, 0.5F, 0.2F}, {0.8F, 0.3F, 0.3F}, {0.1F, 0.1F, 0.1F}};
|
public static final float[][] fleeceColorTable = new float[][]{{1.0F, 1.0F, 1.0F}, {0.95F, 0.7F, 0.2F}, {0.9F, 0.5F, 0.85F}, {0.6F, 0.7F, 0.95F}, {0.9F, 0.9F, 0.2F}, {0.5F, 0.8F, 0.1F}, {0.95F, 0.7F, 0.8F}, {0.3F, 0.3F, 0.3F}, {0.6F, 0.6F, 0.6F}, {0.3F, 0.6F, 0.7F}, {0.7F, 0.4F, 0.9F}, {0.2F, 0.4F, 0.8F}, {0.5F, 0.4F, 0.3F}, {0.4F, 0.5F, 0.2F}, {0.8F, 0.3F, 0.3F}, {0.1F, 0.1F, 0.1F}};
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,6 @@ package net.minecraft.src;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Random;
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
public class Explosion {
|
public class Explosion {
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
import org.lwjgl.input.Mouse;
|
import org.lwjgl.input.Mouse;
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
import org.lwjgl.opengl.GL12;
|
import org.lwjgl.opengl.GL12;
|
||||||
|
@ -143,13 +142,15 @@ public class GuiAchievements extends GuiScreen {
|
||||||
var5 = field_27123_v - 1;
|
var5 = field_27123_v - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int var6 = this.mc.renderEngine.getTexture("/terrain.png");
|
|
||||||
int var7 = this.mc.renderEngine.getTexture("/achievement/bg.png");
|
int var7 = this.mc.renderEngine.getTexture("/achievement/bg.png");
|
||||||
int var8 = (this.width - this.field_27121_a) / 2;
|
int var8 = (this.width - this.field_27121_a) / 2;
|
||||||
int var9 = (this.height - this.field_27119_i) / 2;
|
int var9 = (this.height - this.field_27119_i) / 2;
|
||||||
int var10 = var8 + 16;
|
int var10 = var8 + 16;
|
||||||
int var11 = var9 + 17;
|
int var11 = var9 + 17;
|
||||||
this.zLevel = 0.0F;
|
this.zLevel = 0.0F;
|
||||||
|
GL11.glClearDepth(0.0f);
|
||||||
|
GL11.glClear(GL11.GL_DEPTH_BUFFER_BIT);
|
||||||
|
GL11.glClearDepth(1.0f);
|
||||||
GL11.glDepthFunc(GL11.GL_GEQUAL);
|
GL11.glDepthFunc(GL11.GL_GEQUAL);
|
||||||
GL11.glPushMatrix();
|
GL11.glPushMatrix();
|
||||||
GL11.glTranslatef(0.0F, 0.0F, -200.0F);
|
GL11.glTranslatef(0.0F, 0.0F, -200.0F);
|
||||||
|
@ -157,7 +158,6 @@ public class GuiAchievements extends GuiScreen {
|
||||||
GL11.glDisable(GL11.GL_LIGHTING);
|
GL11.glDisable(GL11.GL_LIGHTING);
|
||||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||||
GL11.glEnable(GL11.GL_COLOR_MATERIAL);
|
GL11.glEnable(GL11.GL_COLOR_MATERIAL);
|
||||||
this.mc.renderEngine.bindTexture(var6);
|
|
||||||
int var12 = var4 + 288 >> 4;
|
int var12 = var4 + 288 >> 4;
|
||||||
int var13 = var5 + 288 >> 4;
|
int var13 = var5 + 288 >> 4;
|
||||||
int var14 = (var4 + 288) % 16;
|
int var14 = (var4 + 288) % 16;
|
||||||
|
@ -193,6 +193,7 @@ public class GuiAchievements extends GuiScreen {
|
||||||
var26 = Block.bedrock.blockIndexInTexture;
|
var26 = Block.bedrock.blockIndexInTexture;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GL11.glBindTexture(this.mc.renderEngine.getTexture("/terrain.png"));
|
||||||
this.drawTexturedModalRect(var10 + var24 * 16 - var14, var11 + var22 * 16 - var15, var26 % 16 << 4, var26 >> 4 << 4, 16, 16);
|
this.drawTexturedModalRect(var10 + var24 * 16 - var14, var11 + var22 * 16 - var15, var26 % 16 << 4, var26 >> 4 << 4, 16, 16);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
import org.lwjgl.input.Keyboard;
|
import org.lwjgl.input.Keyboard;
|
||||||
|
|
||||||
public class GuiCreateWorld extends GuiScreen {
|
public class GuiCreateWorld extends GuiScreen {
|
||||||
|
|
|
@ -2,7 +2,7 @@ package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Random;
|
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
import org.lwjgl.opengl.GL12;
|
import org.lwjgl.opengl.GL12;
|
||||||
|
|
|
@ -6,7 +6,7 @@ import java.nio.charset.Charset;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Random;
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
public class GuiMainMenu extends GuiScreen {
|
public class GuiMainMenu extends GuiScreen {
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class Item {
|
public class Item {
|
||||||
protected static Random itemRand = new Random();
|
protected static Random itemRand = new Random();
|
||||||
public static Item[] itemsList = new Item[32000];
|
public static Item[] itemsList = new Item[32000];
|
||||||
|
|
|
@ -5,15 +5,15 @@ import java.io.Reader;
|
||||||
import java.io.StringReader;
|
import java.io.StringReader;
|
||||||
|
|
||||||
public final class J_JdomParser {
|
public final class J_JdomParser {
|
||||||
public J_JsonRootNode func_27366_a(Reader var1) throws IOException, J_InvalidSyntaxException {
|
public J_JsonRootNode func_27366_a(String var1) throws IOException, J_InvalidSyntaxException {
|
||||||
J_JsonListenerToJdomAdapter var2 = new J_JsonListenerToJdomAdapter();
|
J_JsonListenerToJdomAdapter var2 = new J_JsonListenerToJdomAdapter();
|
||||||
(new J_SajParser()).func_27463_a(var1, var2);
|
(new J_SajParser()).func_27463_a(var1, var2); //TODO: Find out why this shit crashes
|
||||||
return var2.func_27208_a();
|
return var2.func_27208_a();
|
||||||
}
|
}
|
||||||
|
|
||||||
public J_JsonRootNode func_27367_a(String var1) throws J_InvalidSyntaxException {
|
public J_JsonRootNode func_27367_a(String var1) throws J_InvalidSyntaxException {
|
||||||
try {
|
try {
|
||||||
J_JsonRootNode var2 = this.func_27366_a(new StringReader(var1));
|
J_JsonRootNode var2 = this.func_27366_a(var1);
|
||||||
return var2;
|
return var2;
|
||||||
} catch (IOException var4) {
|
} catch (IOException var4) {
|
||||||
throw new RuntimeException("Coding failure in Argo: StringWriter gave an IOException", var4);
|
throw new RuntimeException("Coding failure in Argo: StringWriter gave an IOException", var4);
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Stack;
|
import java.util.LinkedList;
|
||||||
|
|
||||||
final class J_JsonListenerToJdomAdapter implements J_JsonListener {
|
final class J_JsonListenerToJdomAdapter implements J_JsonListener {
|
||||||
private final Stack field_27210_a = new Stack();
|
private final LinkedList<J_NodeContainer> field_27210_a = new LinkedList<J_NodeContainer>();
|
||||||
private J_JsonNodeBuilder field_27209_b;
|
private J_JsonNodeBuilder field_27209_b;
|
||||||
|
|
||||||
J_JsonRootNode func_27208_a() {
|
J_JsonRootNode func_27208_a() {
|
||||||
|
|
|
@ -1,63 +1,54 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.Reader;
|
|
||||||
import java.nio.CharBuffer;
|
|
||||||
|
|
||||||
final class J_PositionTrackingPushbackReader implements J_ThingWithPosition {
|
final class J_PositionTrackingPushbackReader implements J_ThingWithPosition {
|
||||||
private final CharBuffer field_27338_a;
|
private String field_27338_a;
|
||||||
private int field_27337_b = 0;
|
private int field_27337_b = 0;
|
||||||
private int field_27340_c = 1;
|
private int field_27340_c = 1;
|
||||||
private boolean field_27339_d = false;
|
private boolean field_27339_d = false;
|
||||||
|
private int index = 0;
|
||||||
|
|
||||||
public J_PositionTrackingPushbackReader(Reader var1) {
|
public J_PositionTrackingPushbackReader(String var1) {
|
||||||
CharBuffer buffer;
|
if(var1 == null) {
|
||||||
try {
|
this.field_27338_a = "";
|
||||||
StringBuilder builder = new StringBuilder();
|
|
||||||
int c;
|
|
||||||
while ((c = var1.read()) != -1) {
|
|
||||||
builder.append((char) c);
|
|
||||||
}
|
|
||||||
buffer = CharBuffer.wrap(builder);
|
|
||||||
} catch(IOException e) {
|
|
||||||
buffer = CharBuffer.allocate(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.field_27338_a = buffer;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void func_27334_a(char var1) {
|
|
||||||
field_27338_a.position(field_27338_a.position() - 1);
|
|
||||||
if (var1 == '\n' && !field_27339_d) {
|
|
||||||
field_27337_b = 0;
|
|
||||||
field_27340_c--;
|
|
||||||
} else {
|
} else {
|
||||||
field_27337_b--;
|
this.field_27338_a = var1;
|
||||||
if (field_27337_b < 0) {
|
|
||||||
field_27337_b = 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
field_27339_d = var1 == '\n';
|
|
||||||
|
public void func_27334_a(char var1) throws IOException {
|
||||||
|
--this.field_27337_b;
|
||||||
|
if(this.field_27337_b < 0) {
|
||||||
|
this.field_27337_b = 0;
|
||||||
|
}
|
||||||
|
index--;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void func_27335_a(char[] var1) {
|
public void func_27335_a(char[] var1) {
|
||||||
for (int i = var1.length - 1; i >= 0; i--) {
|
this.field_27337_b -= var1.length;
|
||||||
func_27334_a(var1[i]);
|
if(this.field_27337_b < 0) {
|
||||||
|
this.field_27337_b = 0;
|
||||||
}
|
}
|
||||||
|
index -= var1.length;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int func_27333_c() throws IOException {
|
public int func_27333_c() throws IOException {
|
||||||
int var1 = field_27338_a.get();
|
if (index >= field_27338_a.length()) {
|
||||||
func_27332_a(var1);
|
return -1; //EOF reached (I think)
|
||||||
|
}
|
||||||
|
char var1 = field_27338_a.charAt(index++);
|
||||||
|
this.func_27332_a(var1);
|
||||||
return var1;
|
return var1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int func_27336_b(char[] var1) throws IOException {
|
public int func_27336_b(char[] var1) throws IOException {
|
||||||
int var2 = field_27338_a.read(CharBuffer.wrap(var1));
|
int length = Math.min(var1.length, field_27338_a.length() - index);
|
||||||
for (int i = 0; i < var2; i++) {
|
for (int i = 0; i < length; i++) {
|
||||||
func_27332_a(var1[i]);
|
var1[i] = field_27338_a.charAt(index++);
|
||||||
|
this.func_27332_a(var1[i]);
|
||||||
}
|
}
|
||||||
return var2;
|
return length;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void func_27332_a(int var1) {
|
private void func_27332_a(int var1) {
|
||||||
|
|
|
@ -5,7 +5,7 @@ import java.io.Reader;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
public final class J_SajParser {
|
public final class J_SajParser {
|
||||||
public void func_27463_a(Reader var1, J_JsonListener var2) throws IOException, J_InvalidSyntaxException {
|
public void func_27463_a(String var1, J_JsonListener var2) throws IOException, J_InvalidSyntaxException {
|
||||||
J_PositionTrackingPushbackReader var3 = new J_PositionTrackingPushbackReader(var1);
|
J_PositionTrackingPushbackReader var3 = new J_PositionTrackingPushbackReader(var1);
|
||||||
char var4 = (char)var3.func_27333_c();
|
char var4 = (char)var3.func_27333_c();
|
||||||
switch(var4) {
|
switch(var4) {
|
||||||
|
@ -26,8 +26,6 @@ public final class J_SajParser {
|
||||||
int var5 = this.func_27448_l(var3);
|
int var5 = this.func_27448_l(var3);
|
||||||
if(var5 != -1) {
|
if(var5 != -1) {
|
||||||
throw new J_InvalidSyntaxException("Got unexpected trailing character [" + (char)var5 + "].", var3);
|
throw new J_InvalidSyntaxException("Got unexpected trailing character [" + (char)var5 + "].", var3);
|
||||||
} else {
|
|
||||||
var2.func_27204_c();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,7 +74,6 @@ public final class J_SajParser {
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean var5 = false;
|
boolean var5 = false;
|
||||||
|
|
||||||
while(!var5) {
|
while(!var5) {
|
||||||
char var6 = (char)this.func_27448_l(var1);
|
char var6 = (char)this.func_27448_l(var1);
|
||||||
switch(var6) {
|
switch(var6) {
|
||||||
|
@ -178,34 +175,34 @@ public final class J_SajParser {
|
||||||
}
|
}
|
||||||
|
|
||||||
private String func_27459_a(J_PositionTrackingPushbackReader var1) throws IOException, J_InvalidSyntaxException {
|
private String func_27459_a(J_PositionTrackingPushbackReader var1) throws IOException, J_InvalidSyntaxException {
|
||||||
StringBuilder var2 = new StringBuilder();
|
String var2 = "";
|
||||||
char var3 = (char)var1.func_27333_c();
|
char var3 = (char)var1.func_27333_c();
|
||||||
if(45 == var3) {
|
if(45 == var3) {
|
||||||
var2.append('-');
|
var2 = var2 + '-';
|
||||||
} else {
|
} else {
|
||||||
var1.func_27334_a(var3);
|
var1.func_27334_a(var3);
|
||||||
}
|
}
|
||||||
|
|
||||||
var2.append(this.func_27451_b(var1));
|
var2 = var2 + this.func_27451_b(var1);
|
||||||
return var2.toString();
|
return var2;
|
||||||
}
|
}
|
||||||
|
|
||||||
private String func_27451_b(J_PositionTrackingPushbackReader var1) throws IOException, J_InvalidSyntaxException {
|
private String func_27451_b(J_PositionTrackingPushbackReader var1) throws IOException, J_InvalidSyntaxException {
|
||||||
StringBuilder var2 = new StringBuilder();
|
String var2 = "";
|
||||||
char var3 = (char)var1.func_27333_c();
|
char var3 = (char)var1.func_27333_c();
|
||||||
if(48 == var3) {
|
if(48 == var3) {
|
||||||
var2.append('0');
|
var2 = var2 + '0';
|
||||||
var2.append(this.func_27462_f(var1));
|
var2 = var2 + this.func_27462_f(var1);
|
||||||
var2.append(this.func_27454_g(var1));
|
var2 = var2 + this.func_27454_g(var1);
|
||||||
} else {
|
} else {
|
||||||
var1.func_27334_a(var3);
|
var1.func_27334_a(var3);
|
||||||
var2.append(this.func_27460_c(var1));
|
var2 = var2 + this.func_27460_c(var1);
|
||||||
var2.append(this.func_27456_e(var1));
|
var2 = var2 + this.func_27456_e(var1);
|
||||||
var2.append(this.func_27462_f(var1));
|
var2 = var2 + this.func_27462_f(var1);
|
||||||
var2.append(this.func_27454_g(var1));
|
var2 = var2 + this.func_27454_g(var1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return var2.toString();
|
return var2;
|
||||||
}
|
}
|
||||||
|
|
||||||
private char func_27460_c(J_PositionTrackingPushbackReader var1) throws IOException, J_InvalidSyntaxException {
|
private char func_27460_c(J_PositionTrackingPushbackReader var1) throws IOException, J_InvalidSyntaxException {
|
||||||
|
@ -246,7 +243,7 @@ public final class J_SajParser {
|
||||||
}
|
}
|
||||||
|
|
||||||
private String func_27456_e(J_PositionTrackingPushbackReader var1) throws IOException {
|
private String func_27456_e(J_PositionTrackingPushbackReader var1) throws IOException {
|
||||||
StringBuilder var2 = new StringBuilder();
|
String var2 = "";
|
||||||
boolean var3 = false;
|
boolean var3 = false;
|
||||||
|
|
||||||
while(!var3) {
|
while(!var3) {
|
||||||
|
@ -262,7 +259,7 @@ public final class J_SajParser {
|
||||||
case '7':
|
case '7':
|
||||||
case '8':
|
case '8':
|
||||||
case '9':
|
case '9':
|
||||||
var2.append(var4);
|
var2 = var2 + var4;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
var3 = true;
|
var3 = true;
|
||||||
|
@ -270,52 +267,52 @@ public final class J_SajParser {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return var2.toString();
|
return var2;
|
||||||
}
|
}
|
||||||
|
|
||||||
private String func_27462_f(J_PositionTrackingPushbackReader var1) throws IOException, J_InvalidSyntaxException {
|
private String func_27462_f(J_PositionTrackingPushbackReader var1) throws IOException, J_InvalidSyntaxException {
|
||||||
StringBuilder var2 = new StringBuilder();
|
String var2 = "";
|
||||||
char var3 = (char)var1.func_27333_c();
|
char var3 = (char)var1.func_27333_c();
|
||||||
if(var3 == 46) {
|
if(var3 == 46) {
|
||||||
var2.append('.');
|
var2 = var2 + '.';
|
||||||
var2.append(this.func_27458_d(var1));
|
var2 = var2 + this.func_27458_d(var1);
|
||||||
var2.append(this.func_27456_e(var1));
|
var2 = var2 + this.func_27456_e(var1);
|
||||||
} else {
|
} else {
|
||||||
var1.func_27334_a(var3);
|
var1.func_27334_a(var3);
|
||||||
}
|
}
|
||||||
|
|
||||||
return var2.toString();
|
return var2;
|
||||||
}
|
}
|
||||||
|
|
||||||
private String func_27454_g(J_PositionTrackingPushbackReader var1) throws IOException, J_InvalidSyntaxException {
|
private String func_27454_g(J_PositionTrackingPushbackReader var1) throws IOException, J_InvalidSyntaxException {
|
||||||
StringBuilder var2 = new StringBuilder();
|
String var2 = "";
|
||||||
char var3 = (char)var1.func_27333_c();
|
char var3 = (char)var1.func_27333_c();
|
||||||
if(var3 != 46 && var3 != 69) {
|
if(var3 != 46 && var3 != 69) {
|
||||||
var1.func_27334_a(var3);
|
var1.func_27334_a(var3);
|
||||||
} else {
|
} else {
|
||||||
var2.append('E');
|
var2 = var2 + 'E';
|
||||||
var2.append(this.func_27461_h(var1));
|
var2 = var2 + this.func_27461_h(var1);
|
||||||
var2.append(this.func_27458_d(var1));
|
var2 = var2 + this.func_27458_d(var1);
|
||||||
var2.append(this.func_27456_e(var1));
|
var2 = var2 + this.func_27456_e(var1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return var2.toString();
|
return var2;
|
||||||
}
|
}
|
||||||
|
|
||||||
private String func_27461_h(J_PositionTrackingPushbackReader var1) throws IOException {
|
private String func_27461_h(J_PositionTrackingPushbackReader var1) throws IOException {
|
||||||
StringBuilder var2 = new StringBuilder();
|
String var2 = "";
|
||||||
char var3 = (char)var1.func_27333_c();
|
char var3 = (char)var1.func_27333_c();
|
||||||
if(var3 != 43 && var3 != 45) {
|
if(var3 != 43 && var3 != 45) {
|
||||||
var1.func_27334_a(var3);
|
var1.func_27334_a(var3);
|
||||||
} else {
|
} else {
|
||||||
var2.append(var3);
|
var2 = var2 + var3;
|
||||||
}
|
}
|
||||||
|
|
||||||
return var2.toString();
|
return var2;
|
||||||
}
|
}
|
||||||
|
|
||||||
private String func_27452_i(J_PositionTrackingPushbackReader var1) throws IOException, J_InvalidSyntaxException {
|
private String func_27452_i(J_PositionTrackingPushbackReader var1) throws IOException, J_InvalidSyntaxException {
|
||||||
StringBuilder var2 = new StringBuilder();
|
String var2 = "";
|
||||||
char var3 = (char)var1.func_27333_c();
|
char var3 = (char)var1.func_27333_c();
|
||||||
if(34 != var3) {
|
if(34 != var3) {
|
||||||
throw new J_InvalidSyntaxException("Expected [\"] but got [" + var3 + "].", var1);
|
throw new J_InvalidSyntaxException("Expected [\"] but got [" + var3 + "].", var1);
|
||||||
|
@ -330,14 +327,14 @@ public final class J_SajParser {
|
||||||
break;
|
break;
|
||||||
case '\\':
|
case '\\':
|
||||||
char var6 = this.func_27457_j(var1);
|
char var6 = this.func_27457_j(var1);
|
||||||
var2.append(var6);
|
var2 = var2 + var6;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
var2.append(var5);
|
var2 = var2 + var5;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return var2.toString();
|
return var2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -389,18 +386,17 @@ public final class J_SajParser {
|
||||||
int var4 = Integer.parseInt(String.valueOf(var2), 16);
|
int var4 = Integer.parseInt(String.valueOf(var2), 16);
|
||||||
return var4;
|
return var4;
|
||||||
} catch (NumberFormatException var6) {
|
} catch (NumberFormatException var6) {
|
||||||
|
System.out.println("yee3");
|
||||||
var1.func_27335_a(var2);
|
var1.func_27335_a(var2);
|
||||||
|
System.out.println("yee4");
|
||||||
throw new J_InvalidSyntaxException("Unable to parse [" + String.valueOf(var2) + "] as a hexidecimal number.", var6, var1);
|
throw new J_InvalidSyntaxException("Unable to parse [" + String.valueOf(var2) + "] as a hexidecimal number.", var6, var1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private int func_27448_l(J_PositionTrackingPushbackReader var1) throws IOException {
|
private int func_27448_l(J_PositionTrackingPushbackReader var1) throws IOException {
|
||||||
boolean var3 = false;
|
while(true) {
|
||||||
|
int var2 = var1.func_27333_c();
|
||||||
int var2;
|
|
||||||
do {
|
|
||||||
var2 = var1.func_27333_c();
|
|
||||||
switch(var2) {
|
switch(var2) {
|
||||||
case 9:
|
case 9:
|
||||||
case 10:
|
case 10:
|
||||||
|
@ -408,10 +404,9 @@ public final class J_SajParser {
|
||||||
case 32:
|
case 32:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
var3 = true;
|
|
||||||
}
|
|
||||||
} while(!var3);
|
|
||||||
|
|
||||||
return var2;
|
return var2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class MapGenBase {
|
public class MapGenBase {
|
||||||
protected int field_1306_a = 8;
|
protected int field_1306_a = 8;
|
||||||
protected Random rand = new Random();
|
protected Random rand = new Random();
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class MapGenCaves extends MapGenBase {
|
public class MapGenCaves extends MapGenBase {
|
||||||
protected void func_870_a(int var1, int var2, byte[] var3, double var4, double var6, double var8) {
|
protected void func_870_a(int var1, int var2, byte[] var3, double var4, double var6, double var8) {
|
||||||
this.releaseEntitySkin(var1, var2, var3, var4, var6, var8, 1.0F + this.rand.nextFloat() * 6.0F, 0.0F, 0.0F, -1, -1, 0.5D);
|
this.releaseEntitySkin(var1, var2, var3, var4, var6, var8, 1.0F + this.rand.nextFloat() * 6.0F, 0.0F, 0.0F, -1, -1, 0.5D);
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class MapGenCavesHell extends MapGenBase {
|
public class MapGenCavesHell extends MapGenBase {
|
||||||
protected void func_4129_a(int var1, int var2, byte[] var3, double var4, double var6, double var8) {
|
protected void func_4129_a(int var1, int var2, byte[] var3, double var4, double var6, double var8) {
|
||||||
this.func_4128_a(var1, var2, var3, var4, var6, var8, 1.0F + this.rand.nextFloat() * 6.0F, 0.0F, 0.0F, -1, -1, 0.5D);
|
this.func_4128_a(var1, var2, var3, var4, var6, var8, 1.0F + this.rand.nextFloat() * 6.0F, 0.0F, 0.0F, -1, -1, 0.5D);
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class ModelGhast extends ModelBase {
|
public class ModelGhast extends ModelBase {
|
||||||
ModelRenderer body;
|
ModelRenderer body;
|
||||||
ModelRenderer[] tentacles = new ModelRenderer[9];
|
ModelRenderer[] tentacles = new ModelRenderer[9];
|
||||||
|
|
|
@ -6,7 +6,7 @@ import java.io.IOException;
|
||||||
//import java.net.URL;
|
//import java.net.URL;
|
||||||
//import java.net.UnknownHostException;
|
//import java.net.UnknownHostException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Random;
|
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
|
|
||||||
public class NetClientHandler extends NetHandler {
|
public class NetClientHandler extends NetHandler {
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class NoiseGenerator2 {
|
public class NoiseGenerator2 {
|
||||||
private static int[][] field_4296_d = new int[][]{{1, 1, 0}, {-1, 1, 0}, {1, -1, 0}, {-1, -1, 0}, {1, 0, 1}, {-1, 0, 1}, {1, 0, -1}, {-1, 0, -1}, {0, 1, 1}, {0, -1, 1}, {0, 1, -1}, {0, -1, -1}};
|
private static int[][] field_4296_d = new int[][]{{1, 1, 0}, {-1, 1, 0}, {1, -1, 0}, {-1, -1, 0}, {1, 0, 1}, {-1, 0, 1}, {1, 0, -1}, {-1, 0, -1}, {0, 1, 1}, {0, -1, 1}, {0, 1, -1}, {0, -1, -1}};
|
||||||
private int[] field_4295_e;
|
private int[] field_4295_e;
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class NoiseGeneratorOctaves extends NoiseGenerator {
|
public class NoiseGeneratorOctaves extends NoiseGenerator {
|
||||||
private NoiseGeneratorPerlin[] generatorCollection;
|
private NoiseGeneratorPerlin[] generatorCollection;
|
||||||
private int field_1191_b;
|
private int field_1191_b;
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class NoiseGeneratorOctaves2 extends NoiseGenerator {
|
public class NoiseGeneratorOctaves2 extends NoiseGenerator {
|
||||||
private NoiseGenerator2[] field_4234_a;
|
private NoiseGenerator2[] field_4234_a;
|
||||||
private int field_4233_b;
|
private int field_4233_b;
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class NoiseGeneratorPerlin extends NoiseGenerator {
|
public class NoiseGeneratorPerlin extends NoiseGenerator {
|
||||||
private int[] permutations;
|
private int[] permutations;
|
||||||
public double xCoord;
|
public double xCoord;
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class Particle {
|
public class Particle {
|
||||||
private static Random field_25128_s = new Random();
|
private static Random field_25128_s = new Random();
|
||||||
public double field_25146_a;
|
public double field_25146_a;
|
||||||
|
|
118
src/net/minecraft/src/Random.java
Normal file
118
src/net/minecraft/src/Random.java
Normal file
|
@ -0,0 +1,118 @@
|
||||||
|
package net.minecraft.src;
|
||||||
|
|
||||||
|
import java.util.concurrent.atomic.AtomicLong;
|
||||||
|
|
||||||
|
public class Random {
|
||||||
|
|
||||||
|
private final AtomicLong seed;
|
||||||
|
|
||||||
|
private static final long multiplier = 0x5DEECE66DL;
|
||||||
|
private static final long addend = 0xBL;
|
||||||
|
private static final long mask = (1L << 48) - 1;
|
||||||
|
|
||||||
|
public Random() {
|
||||||
|
this(seedUniquifier() ^ System.nanoTime());
|
||||||
|
}
|
||||||
|
|
||||||
|
private static long seedUniquifier() {
|
||||||
|
for (;;) {
|
||||||
|
long current = seedUniquifier.get();
|
||||||
|
long next = current * 181783497276652981L;
|
||||||
|
if (seedUniquifier.compareAndSet(current, next))
|
||||||
|
return next;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final AtomicLong seedUniquifier
|
||||||
|
= new AtomicLong(8682522807148012L);
|
||||||
|
|
||||||
|
public Random(long seed) {
|
||||||
|
this.seed = new AtomicLong(initialScramble(seed));
|
||||||
|
}
|
||||||
|
|
||||||
|
private static long initialScramble(long seed) {
|
||||||
|
return (seed ^ multiplier) & mask;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSeed(long seed) {
|
||||||
|
this.seed.set(initialScramble(seed));
|
||||||
|
haveNextNextGaussian = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected int next(int bits) {
|
||||||
|
long oldseed, nextseed;
|
||||||
|
AtomicLong seed = this.seed;
|
||||||
|
do {
|
||||||
|
oldseed = seed.get();
|
||||||
|
nextseed = (oldseed * multiplier + addend) & mask;
|
||||||
|
} while (!seed.compareAndSet(oldseed, nextseed));
|
||||||
|
return (int)(nextseed >>> (48 - bits));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void nextBytes(byte[] bytes) {
|
||||||
|
for (int i = 0, len = bytes.length; i < len; )
|
||||||
|
for (int rnd = nextInt(),
|
||||||
|
n = Math.min(len - i, Integer.SIZE/Byte.SIZE);
|
||||||
|
n-- > 0; rnd >>= Byte.SIZE)
|
||||||
|
bytes[i++] = (byte)rnd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int nextInt() {
|
||||||
|
return next(32);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int nextInt(int n) {
|
||||||
|
if (n <= 0)
|
||||||
|
throw new IllegalArgumentException("n must be positive");
|
||||||
|
|
||||||
|
if ((n & -n) == n) // i.e., n is a power of 2
|
||||||
|
return (int)((n * (long)next(31)) >> 31);
|
||||||
|
|
||||||
|
int bits, val;
|
||||||
|
do {
|
||||||
|
bits = next(31);
|
||||||
|
val = bits % n;
|
||||||
|
} while (bits - val + (n-1) < 0);
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long nextLong() {
|
||||||
|
// it's okay that the bottom word remains signed.
|
||||||
|
return ((long)(next(32)) << 32) + next(32);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean nextBoolean() {
|
||||||
|
return next(1) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float nextFloat() {
|
||||||
|
return next(24) / ((float)(1 << 24));
|
||||||
|
}
|
||||||
|
|
||||||
|
public double nextDouble() {
|
||||||
|
return (((long)(next(26)) << 27) + next(27))
|
||||||
|
/ (double)(1L << 53);
|
||||||
|
}
|
||||||
|
|
||||||
|
private double nextNextGaussian;
|
||||||
|
private boolean haveNextNextGaussian = false;
|
||||||
|
|
||||||
|
public double nextGaussian() {
|
||||||
|
// See Knuth, ACP, Section 3.4.1 Algorithm C.
|
||||||
|
if (haveNextNextGaussian) {
|
||||||
|
haveNextNextGaussian = false;
|
||||||
|
return nextNextGaussian;
|
||||||
|
} else {
|
||||||
|
double v1, v2, s;
|
||||||
|
do {
|
||||||
|
v1 = 2 * nextDouble() - 1; // between -1 and 1
|
||||||
|
v2 = 2 * nextDouble() - 1; // between -1 and 1
|
||||||
|
s = v1 * v1 + v2 * v2;
|
||||||
|
} while (s >= 1 || s == 0);
|
||||||
|
double multiplier = StrictMath.sqrt(-2 * StrictMath.log(s)/s);
|
||||||
|
nextNextGaussian = v2 * multiplier;
|
||||||
|
haveNextNextGaussian = true;
|
||||||
|
return v1 * multiplier;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -4,7 +4,7 @@ import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Random;
|
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
import org.lwjgl.opengl.GL12;
|
import org.lwjgl.opengl.GL12;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
public class RenderLightningBolt extends Render {
|
public class RenderLightningBolt extends Render {
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
import org.lwjgl.opengl.GL12;
|
import org.lwjgl.opengl.GL12;
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,6 @@ import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class SoundPool {
|
public class SoundPool {
|
||||||
private Random rand = new Random();
|
private Random rand = new Random();
|
||||||
|
|
|
@ -96,8 +96,8 @@ public class StatFileWriter {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
String var2 = "local";
|
String var2 = "local";
|
||||||
StringBuilder var3 = new StringBuilder();
|
String var3 = "";
|
||||||
J_JsonRootNode var4 = (new J_JdomParser()).func_27367_a(var0);
|
J_JsonRootNode var4 = (new J_JdomParser()).func_27367_a(var0); //Crashes!?!?
|
||||||
List var5 = var4.func_27217_b(new Object[]{"stats-change"});
|
List var5 = var4.func_27217_b(new Object[]{"stats-change"});
|
||||||
Iterator var6 = var5.iterator();
|
Iterator var6 = var5.iterator();
|
||||||
|
|
||||||
|
@ -111,8 +111,8 @@ public class StatFileWriter {
|
||||||
if(var12 == null) {
|
if(var12 == null) {
|
||||||
System.out.println(var10 + " is not a valid stat");
|
System.out.println(var10 + " is not a valid stat");
|
||||||
} else {
|
} else {
|
||||||
var3.append(StatList.func_27361_a(var10).statGuid).append(",");
|
var3 = var3 + StatList.func_27361_a(var10).statGuid + ",";
|
||||||
var3.append(var11).append(",");
|
var3 = var3 + var11 + ",";
|
||||||
var1.put(var12, Integer.valueOf(var11));
|
var1.put(var12, Integer.valueOf(var11));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -131,41 +131,41 @@ public class StatFileWriter {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String func_27185_a(String var0, String var1, Map var2) {
|
public static String func_27185_a(String var0, String var1, Map var2) {
|
||||||
StringBuilder var3 = new StringBuilder();
|
String var3 = "";
|
||||||
StringBuilder var4 = new StringBuilder();
|
String var4 = "";
|
||||||
boolean var5 = true;
|
boolean var5 = true;
|
||||||
var3.append("{\r\n");
|
var3 = var3 + "{\r\n";
|
||||||
if(var0 != null && var1 != null) {
|
if(var0 != null && var1 != null) {
|
||||||
var3.append(" \"user\":{\r\n");
|
var3 = var3 + " \"user\":{\r\n";
|
||||||
var3.append(" \"name\":\"").append(var0).append("\",\r\n");
|
var3 = var3 + " \"name\":\"" + var0 + "\",\r\n";
|
||||||
var3.append(" \"sessionid\":\"").append(var1).append("\"\r\n");
|
var3 = var3 + " \"sessionid\":\"" + var1 + "\"\r\n";
|
||||||
var3.append(" },\r\n");
|
var3 = var3 + " },\r\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
var3.append(" \"stats-change\":[");
|
var3 = var3 + " \"stats-change\":[";
|
||||||
Iterator var6 = var2.keySet().iterator();
|
Iterator var6 = var2.keySet().iterator();
|
||||||
|
|
||||||
while(var6.hasNext()) {
|
while(var6.hasNext()) {
|
||||||
StatBase var7 = (StatBase)var6.next();
|
StatBase var7 = (StatBase)var6.next();
|
||||||
if(!var5) {
|
if(!var5) {
|
||||||
var3.append("},");
|
var3 = var3 + "},";
|
||||||
} else {
|
} else {
|
||||||
var5 = false;
|
var5 = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
var3.append("\r\n {\"").append(var7.statId).append("\":").append(var2.get(var7));
|
var3 = var3 + "\r\n {\"" + var7.statId + "\":" + var2.get(var7);
|
||||||
var4.append(var7.statGuid).append(",");
|
var4 = var4 + var7.statGuid + ",";
|
||||||
var4.append(var2.get(var7)).append(",");
|
var4 = var4 + var2.get(var7) + ",";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!var5) {
|
if(!var5) {
|
||||||
var3.append("}");
|
var3 = var3 + "}";
|
||||||
}
|
}
|
||||||
|
|
||||||
MD5String var8 = new MD5String(var1);
|
MD5String var8 = new MD5String(var1);
|
||||||
var3.append("\r\n ],\r\n");
|
var3 = var3 + "\r\n ],\r\n";
|
||||||
var3.append(" \"checksum\":\"").append(var8.func_27369_a(var4.toString())).append("\"\r\n");
|
var3 = var3 + " \"checksum\":\"" + var8.func_27369_a(var4) + "\"\r\n";
|
||||||
var3.append("}");
|
var3 = var3 + "}";
|
||||||
return var3.toString();
|
return var3.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -63,37 +63,12 @@ public class StatsSyncher {
|
||||||
}
|
}
|
||||||
|
|
||||||
private Map func_27408_a(String var1) {
|
private Map func_27408_a(String var1) {
|
||||||
BufferedReader var2 = null;
|
byte[] bytes = GL11.readFile(var1);
|
||||||
|
if (bytes == null || bytes.length == 0) {
|
||||||
try {
|
|
||||||
var2 = new BufferedReader(new InputStreamReader(new ByteArrayInputStream(GL11.readFile(var1))));
|
|
||||||
String var3 = "";
|
|
||||||
StringBuilder var4 = new StringBuilder();
|
|
||||||
|
|
||||||
while(true) {
|
|
||||||
var3 = var2.readLine();
|
|
||||||
if(var3 == null) {
|
|
||||||
Map var5 = StatFileWriter.func_27177_a(var4.toString());
|
|
||||||
return var5;
|
|
||||||
}
|
|
||||||
|
|
||||||
var4.append(var3);
|
|
||||||
}
|
|
||||||
} catch (Exception var15) {
|
|
||||||
var15.printStackTrace();
|
|
||||||
} finally {
|
|
||||||
if(var2 != null) {
|
|
||||||
try {
|
|
||||||
var2.close();
|
|
||||||
} catch (Exception var14) {
|
|
||||||
var14.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
return StatFileWriter.func_27177_a(new String(""));
|
||||||
|
}
|
||||||
|
|
||||||
private void func_27410_a(Map var1, String var2, String var3, String var4) throws IOException {
|
private void func_27410_a(Map var1, String var2, String var3, String var4) throws IOException {
|
||||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class Teleporter {
|
public class Teleporter {
|
||||||
private Random field_4232_a = new Random();
|
private Random field_4232_a = new Random();
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user