Replace all uses of java.util.Random

This commit is contained in:
PeytonPlayz595 2024-10-14 21:05:44 -04:00
parent 33ba016e56
commit 1d73282fde
92 changed files with 341 additions and 250 deletions

View File

@ -318,7 +318,6 @@ public class GL11_1 {
public static int fogCfgSerial = 0;
public static int fogMode = 1;
static boolean fogEnabled = false;
public static boolean fogPremultiply = false;
public static float fogStart = 1.0f;
public static float fogEnd = 1.0f;
public static float fogDensity = 1.0f;
@ -923,11 +922,6 @@ public class GL11_1 {
}
public static final void glBlendFunc(int srcFactor, int dstFactor) {
boolean flag = fogPremultiply;
fogPremultiply = (srcFactor == GL_ONE && dstFactor == GL_ONE_MINUS_SRC_ALPHA);
if(fogPremultiply != flag) {
fogCfgSerial++;
}
if(overlayFBOBlending) {
int srcBits = (srcFactor | (GL_ONE << 16));
int dstBits = (dstFactor | (GL_ONE_MINUS_SRC_ALPHA << 16));

View File

@ -2,7 +2,7 @@ package net.PeytonPlayz585.sound;
import java.io.FileNotFoundException;
import java.util.Map;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
import net.PeytonPlayz585.opengl.GL11;
import net.minecraft.client.Minecraft;
@ -52,7 +52,7 @@ public class SoundManager {
}
}
} else {
Random rand = new Random();
EaglercraftRandom rand = new EaglercraftRandom();
int i1 = rand.nextInt(4 - 1 + 1) + 1;
int i2 = GL11.EaglerAdapterImpl2.beginPlayback(file + i1 + ".mp3", f, g, h, i * Minecraft.getMinecraft().gameSettings.soundVolume, j);
if(i2 == -1) {
@ -166,7 +166,7 @@ public class SoundManager {
}
if(!GL11.EaglerAdapterImpl2.isPlaying(song) && musicFlag && !musicTimerSet) {
Random rand = new Random();
EaglercraftRandom rand = new EaglercraftRandom();
musicTimer = rand.nextInt(6 - 3 + 1) + 3;
musicTimer = musicTimer * 60;
musicTimer = musicTimer * 20;
@ -187,7 +187,7 @@ public class SoundManager {
}
if(!GL11.EaglerAdapterImpl2.isPlaying(song) && !musicFlag) {
Random rand = new Random();
EaglercraftRandom rand = new EaglercraftRandom();
int i = rand.nextInt(2);
if(i == 0) {

View File

@ -6,7 +6,7 @@ import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.ListIterator;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
import java.util.Set;
import javax.sound.sampled.AudioFormat;
@ -98,7 +98,7 @@ public class SoundSystem {
/**
* Generates random numbers.
*/
public Random randomNumberGenerator;
public EaglercraftRandom randomNumberGenerator;
/**
* Name of this class.
@ -208,7 +208,7 @@ public class SoundSystem {
+ "...", 0);
// create the random number generator:
randomNumberGenerator = new Random();
randomNumberGenerator = new EaglercraftRandom();
// create the command queue:
commandQueue = new LinkedList<CommandObject>();
// create the working source playlist:

View File

@ -0,0 +1,97 @@
package net.PeytonPlayz585;
public class EaglercraftRandom {
private long seed = 69;
private static final long multiplier = 0x5DEECE66DL;
private static final long addend = 0xBL;
private static final long mask = (1L << 48) - 1;
public EaglercraftRandom() {
this((long)(Math.random() * 9007199254740991.0));
}
public EaglercraftRandom(long seed) {
setSeed(seed);
}
private static long initialScramble(long seed) {
return (seed ^ multiplier) & mask;
}
public void setSeed(long seed) {
this.seed = initialScramble(seed);
haveNextNextGaussian = true;
}
protected int next(int bits) {
seed = (seed * multiplier + addend) & mask;
return (int) (seed >>> (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;
}
}
}

View File

@ -573,7 +573,7 @@ public class FixedFunctionShader {
}
}
if(fogCfgSerial != GL11.fogCfgSerial) {
int fogModex = GL11.fogPremultiply ? 2 : GL11.fogMode;
int fogModex = GL11.fogMode;
float fogStarty = GL11.fogStart;
float fogEndz = GL11.fogEnd - fogStarty;
float fogDensityw = GL11.fogDensity;

View File

@ -1,7 +1,7 @@
package net.minecraft.src;
import java.util.ArrayList;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class Block {
public static final StepSound soundPowderFootstep = new StepSound("stone", 1.0F, 1.0F);
@ -251,10 +251,10 @@ public class Block {
return true;
}
public void updateTick(World var1, int var2, int var3, int var4, Random var5) {
public void updateTick(World var1, int var2, int var3, int var4, EaglercraftRandom var5) {
}
public void randomDisplayTick(World var1, int var2, int var3, int var4, Random var5) {
public void randomDisplayTick(World var1, int var2, int var3, int var4, EaglercraftRandom var5) {
}
public void onBlockDestroyedByPlayer(World var1, int var2, int var3, int var4, int var5) {
@ -273,11 +273,11 @@ public class Block {
public void onBlockRemoval(World var1, int var2, int var3, int var4) {
}
public int quantityDropped(Random var1) {
public int quantityDropped(EaglercraftRandom var1) {
return 1;
}
public int idDropped(int var1, Random var2) {
public int idDropped(int var1, EaglercraftRandom var2) {
return this.blockID;
}

View File

@ -1,6 +1,6 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class BlockBookshelf extends Block {
public BlockBookshelf(int var1, int var2) {
@ -11,7 +11,7 @@ public class BlockBookshelf extends Block {
return var1 <= 1 ? 4 : this.blockIndexInTexture;
}
public int quantityDropped(Random var1) {
public int quantityDropped(EaglercraftRandom var1) {
return 0;
}
}

View File

@ -1,6 +1,6 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class BlockButton extends Block {
protected BlockButton(int var1, int var2) {
@ -202,7 +202,7 @@ public class BlockButton extends Block {
return true;
}
public void updateTick(World var1, int var2, int var3, int var4, Random var5) {
public void updateTick(World var1, int var2, int var3, int var4, EaglercraftRandom var5) {
if(!var1.multiplayerWorld) {
int var6 = var1.getBlockMetadata(var2, var3, var4);
if((var6 & 8) != 0) {

View File

@ -1,6 +1,6 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class BlockCactus extends Block {
protected BlockCactus(int var1, int var2) {
@ -8,7 +8,7 @@ public class BlockCactus extends Block {
this.setTickOnLoad(true);
}
public void updateTick(World var1, int var2, int var3, int var4, Random var5) {
public void updateTick(World var1, int var2, int var3, int var4, EaglercraftRandom var5) {
if(var1.getBlockId(var2, var3 + 1, var4) == 0) {
int var6;
for(var6 = 1; var1.getBlockId(var2, var3 - var6, var4) == this.blockID; ++var6) {

View File

@ -1,9 +1,9 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class BlockChest extends BlockContainer {
private Random field_457_a = new Random();
private EaglercraftRandom field_457_a = new EaglercraftRandom();
protected BlockChest(int var1) {
super(var1, Material.wood);

View File

@ -1,17 +1,17 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class BlockClay extends Block {
public BlockClay(int var1, int var2) {
super(var1, var2, Material.clay);
}
public int idDropped(int var1, Random var2) {
public int idDropped(int var1, EaglercraftRandom var2) {
return Item.clay.shiftedIndex;
}
public int quantityDropped(Random var1) {
public int quantityDropped(EaglercraftRandom var1) {
return 4;
}
}

View File

@ -1,6 +1,6 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class BlockCrops extends BlockFlower {
protected BlockCrops(int var1, int var2) {
@ -15,7 +15,7 @@ public class BlockCrops extends BlockFlower {
return var1 == Block.tilledField.blockID;
}
public void updateTick(World var1, int var2, int var3, int var4, Random var5) {
public void updateTick(World var1, int var2, int var3, int var4, EaglercraftRandom var5) {
super.updateTick(var1, var2, var3, var4, var5);
if(var1.getBlockLightValue(var2, var3 + 1, var4) >= 9) {
int var6 = var1.getBlockMetadata(var2, var3, var4);
@ -100,11 +100,11 @@ public class BlockCrops extends BlockFlower {
}
public int idDropped(int var1, Random var2) {
public int idDropped(int var1, EaglercraftRandom var2) {
return var1 == 7 ? Item.wheat.shiftedIndex : -1;
}
public int quantityDropped(Random var1) {
public int quantityDropped(EaglercraftRandom var1) {
return 1;
}
}

View File

@ -1,6 +1,6 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class BlockDoor extends Block {
protected BlockDoor(int var1, Material var2) {
@ -176,7 +176,7 @@ public class BlockDoor extends Block {
}
public int idDropped(int var1, Random var2) {
public int idDropped(int var1, EaglercraftRandom var2) {
return (var1 & 8) != 0 ? 0 : (this.blockMaterial == Material.iron ? Item.doorSteel.shiftedIndex : Item.doorWood.shiftedIndex);
}

View File

@ -1,6 +1,6 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class BlockFire extends Block {
private int[] chanceToEncourageFire = new int[256];
@ -38,7 +38,7 @@ public class BlockFire extends Block {
return 3;
}
public int quantityDropped(Random var1) {
public int quantityDropped(EaglercraftRandom var1) {
return 0;
}
@ -46,7 +46,7 @@ public class BlockFire extends Block {
return 10;
}
public void updateTick(World var1, int var2, int var3, int var4, Random var5) {
public void updateTick(World var1, int var2, int var3, int var4, EaglercraftRandom var5) {
if(var1.multiplayerWorld) {
return;
}
@ -96,7 +96,7 @@ public class BlockFire extends Block {
}
}
private void tryToCatchBlockOnFire(World var1, int var2, int var3, int var4, int var5, Random var6) {
private void tryToCatchBlockOnFire(World var1, int var2, int var3, int var4, int var5, EaglercraftRandom var6) {
if(var1.multiplayerWorld) {
return;
}
@ -173,7 +173,7 @@ public class BlockFire extends Block {
}
}
public void randomDisplayTick(World var1, int var2, int var3, int var4, Random var5) {
public void randomDisplayTick(World var1, int var2, int var3, int var4, EaglercraftRandom var5) {
if(var5.nextInt(24) == 0) {
var1.playSoundEffect((double)((float)var2 + 0.5F), (double)((float)var3 + 0.5F), (double)((float)var4 + 0.5F), "fire.fire", 1.0F + var5.nextFloat(), var5.nextFloat() * 0.7F + 0.3F);
}

View File

@ -1,6 +1,6 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class BlockFlower extends Block {
protected BlockFlower(int var1, int var2) {
@ -24,7 +24,7 @@ public class BlockFlower extends Block {
this.func_268_h(var1, var2, var3, var4);
}
public void updateTick(World var1, int var2, int var3, int var4, Random var5) {
public void updateTick(World var1, int var2, int var3, int var4, EaglercraftRandom var5) {
this.func_268_h(var1, var2, var3, var4);
}

View File

@ -1,6 +1,6 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class BlockFlowing extends BlockFluids {
int field_460_a = 0;
@ -18,7 +18,7 @@ public class BlockFlowing extends BlockFluids {
var1.func_665_h(var2, var3, var4);
}
public void updateTick(World var1, int var2, int var3, int var4, Random var5) {
public void updateTick(World var1, int var2, int var3, int var4, EaglercraftRandom var5) {
int var6 = this.func_290_h(var1, var2, var3, var4);
byte var7 = 1;
if(this.blockMaterial == Material.lava && !var1.worldProvider.field_6479_d) {

View File

@ -1,6 +1,6 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public abstract class BlockFluids extends Block {
protected BlockFluids(int var1, Material var2) {
@ -66,11 +66,11 @@ public abstract class BlockFluids extends Block {
return 4;
}
public int idDropped(int var1, Random var2) {
public int idDropped(int var1, EaglercraftRandom var2) {
return 0;
}
public int quantityDropped(Random var1) {
public int quantityDropped(EaglercraftRandom var1) {
return 0;
}
@ -173,7 +173,7 @@ public abstract class BlockFluids extends Block {
return var5 > var6 ? var5 : var6;
}
public void updateTick(World var1, int var2, int var3, int var4, Random var5) {
public void updateTick(World var1, int var2, int var3, int var4, EaglercraftRandom var5) {
super.updateTick(var1, var2, var3, var4, var5);
}
@ -181,7 +181,7 @@ public abstract class BlockFluids extends Block {
return this.blockMaterial == Material.water ? 1 : 0;
}
public void randomDisplayTick(World var1, int var2, int var3, int var4, Random var5) {
public void randomDisplayTick(World var1, int var2, int var3, int var4, EaglercraftRandom var5) {
if(this.blockMaterial == Material.water && var5.nextInt(64) == 0) {
int var6 = var1.getBlockMetadata(var2, var3, var4);
if(var6 > 0 && var6 < 8) {

View File

@ -1,10 +1,10 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class BlockFurnace extends BlockContainer {
private final boolean isActive;
private Random field_457_a = new Random();
private EaglercraftRandom field_457_a = new EaglercraftRandom();
protected BlockFurnace(int var1, boolean var2) {
super(var1, Material.rock);
@ -12,7 +12,7 @@ public class BlockFurnace extends BlockContainer {
this.blockIndexInTexture = 45;
}
public int idDropped(int var1, Random var2) {
public int idDropped(int var1, EaglercraftRandom var2) {
return Block.stoneOvenIdle.blockID;
}
@ -89,7 +89,7 @@ public class BlockFurnace extends BlockContainer {
}
}
public void randomDisplayTick(World var1, int var2, int var3, int var4, Random var5) {
public void randomDisplayTick(World var1, int var2, int var3, int var4, EaglercraftRandom var5) {
if(this.isActive) {
int var6 = var1.getBlockMetadata(var2, var3, var4);
float var7 = (float)var2 + 0.5F;

View File

@ -1,13 +1,13 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class BlockGlass extends BlockBreakable {
public BlockGlass(int var1, int var2, Material var3, boolean var4) {
super(var1, var2, var3, var4);
}
public int quantityDropped(Random var1) {
public int quantityDropped(EaglercraftRandom var1) {
return 0;
}
}

View File

@ -1,6 +1,6 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class BlockGrass extends Block {
protected BlockGrass(int var1) {
@ -27,7 +27,7 @@ public class BlockGrass extends Block {
return ColorizerGrass.func_4147_a(var5, var7);
}
public void updateTick(World var1, int var2, int var3, int var4, Random var5) {
public void updateTick(World var1, int var2, int var3, int var4, EaglercraftRandom var5) {
if(var1.getBlockLightValue(var2, var3 + 1, var4) < 4 && var1.getBlockMaterial(var2, var3 + 1, var4).getCanBlockGrass()) {
if(var5.nextInt(4) != 0) {
return;
@ -45,7 +45,7 @@ public class BlockGrass extends Block {
}
public int idDropped(int var1, Random var2) {
public int idDropped(int var1, EaglercraftRandom var2) {
return Block.dirt.idDropped(0, var2);
}
}

View File

@ -1,13 +1,13 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class BlockGravel extends BlockSand {
public BlockGravel(int var1, int var2) {
super(var1, var2);
}
public int idDropped(int var1, Random var2) {
public int idDropped(int var1, EaglercraftRandom var2) {
return var2.nextInt(10) == 0 ? Item.flint.shiftedIndex : this.blockID;
}
}

View File

@ -1,6 +1,6 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class BlockIce extends BlockBreakable {
public BlockIce(int var1, int var2) {
@ -25,11 +25,11 @@ public class BlockIce extends BlockBreakable {
}
public int quantityDropped(Random var1) {
public int quantityDropped(EaglercraftRandom var1) {
return 0;
}
public void updateTick(World var1, int var2, int var3, int var4, Random var5) {
public void updateTick(World var1, int var2, int var3, int var4, EaglercraftRandom var5) {
if(var1.getSavedLightValue(EnumSkyBlock.Block, var2, var3, var4) > 11 - Block.lightOpacity[this.blockID]) {
this.dropBlockAsItem(var1, var2, var3, var4, var1.getBlockMetadata(var2, var3, var4));
var1.setBlockWithNotify(var2, var3, var4, Block.waterMoving.blockID);

View File

@ -1,6 +1,6 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class BlockLadder extends Block {
protected BlockLadder(int var1, int var2) {
@ -115,7 +115,7 @@ public class BlockLadder extends Block {
super.onNeighborBlockChange(var1, var2, var3, var4, var5);
}
public int quantityDropped(Random var1) {
public int quantityDropped(EaglercraftRandom var1) {
return 1;
}
}

View File

@ -1,6 +1,6 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class BlockLeaves extends BlockLeavesBase {
private int baseIndexInPNG;
@ -40,7 +40,7 @@ public class BlockLeaves extends BlockLeavesBase {
}
}
public void updateTick(World var1, int var2, int var3, int var4, Random var5) {
public void updateTick(World var1, int var2, int var3, int var4, EaglercraftRandom var5) {
if (var1.multiplayerWorld) {
return;
}
@ -122,11 +122,11 @@ public class BlockLeaves extends BlockLeavesBase {
var1.setBlockWithNotify(var2, var3, var4, 0);
}
public int quantityDropped(Random var1) {
public int quantityDropped(EaglercraftRandom var1) {
return var1.nextInt(20) == 0 ? 1 : 0;
}
public int idDropped(int var1, Random var2) {
public int idDropped(int var1, EaglercraftRandom var2) {
return Block.sapling.blockID;
}

View File

@ -1,13 +1,13 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class BlockLightStone extends Block {
public BlockLightStone(int var1, int var2, Material var3) {
super(var1, var2, var3);
}
public int idDropped(int var1, Random var2) {
public int idDropped(int var1, EaglercraftRandom var2) {
return Item.lightStoneDust.shiftedIndex;
}
}

View File

@ -1,6 +1,6 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class BlockLog extends Block {
protected BlockLog(int var1) {
@ -8,11 +8,11 @@ public class BlockLog extends Block {
this.blockIndexInTexture = 20;
}
public int quantityDropped(Random var1) {
public int quantityDropped(EaglercraftRandom var1) {
return 1;
}
public int idDropped(int var1, Random var2) {
public int idDropped(int var1, EaglercraftRandom var2) {
return Block.wood.blockID;
}

View File

@ -1,6 +1,6 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class BlockMinecartTrack extends Block {
protected BlockMinecartTrack(int var1, int var2) {
@ -43,7 +43,7 @@ public class BlockMinecartTrack extends Block {
return 9;
}
public int quantityDropped(Random var1) {
public int quantityDropped(EaglercraftRandom var1) {
return 1;
}

View File

@ -1,6 +1,6 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class BlockMobSpawner extends BlockContainer {
protected BlockMobSpawner(int var1, int var2) {
@ -11,11 +11,11 @@ public class BlockMobSpawner extends BlockContainer {
return new TileEntityMobSpawner();
}
public int idDropped(int var1, Random var2) {
public int idDropped(int var1, EaglercraftRandom var2) {
return 0;
}
public int quantityDropped(Random var1) {
public int quantityDropped(EaglercraftRandom var1) {
return 0;
}

View File

@ -1,17 +1,17 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class BlockObsidian extends BlockStone {
public BlockObsidian(int var1, int var2) {
super(var1, var2);
}
public int quantityDropped(Random var1) {
public int quantityDropped(EaglercraftRandom var1) {
return 1;
}
public int idDropped(int var1, Random var2) {
public int idDropped(int var1, EaglercraftRandom var2) {
return Block.obsidian.blockID;
}
}

View File

@ -1,17 +1,17 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class BlockOre extends Block {
public BlockOre(int var1, int var2) {
super(var1, var2, Material.rock);
}
public int idDropped(int var1, Random var2) {
public int idDropped(int var1, EaglercraftRandom var2) {
return this.blockID == Block.oreCoal.blockID ? Item.coal.shiftedIndex : (this.blockID == Block.oreDiamond.blockID ? Item.diamond.shiftedIndex : this.blockID);
}
public int quantityDropped(Random var1) {
public int quantityDropped(EaglercraftRandom var1) {
return 1;
}
}

View File

@ -1,6 +1,6 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class BlockPortal extends BlockBreakable {
public BlockPortal(int var1, int var2) {
@ -122,7 +122,7 @@ public class BlockPortal extends BlockBreakable {
return true;
}
public int quantityDropped(Random var1) {
public int quantityDropped(EaglercraftRandom var1) {
return 0;
}
@ -136,7 +136,7 @@ public class BlockPortal extends BlockBreakable {
}
}
public void randomDisplayTick(World var1, int var2, int var3, int var4, Random var5) {
public void randomDisplayTick(World var1, int var2, int var3, int var4, EaglercraftRandom var5) {
if(var5.nextInt(100) == 0) {
var1.playSoundEffect((double)var2 + 0.5D, (double)var3 + 0.5D, (double)var4 + 0.5D, "portal.portal", 1.0F, var5.nextFloat() * 0.4F + 0.8F);
}

View File

@ -1,7 +1,7 @@
package net.minecraft.src;
import java.util.List;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class BlockPressurePlate extends Block {
private EnumMobType triggerMobType;
@ -50,7 +50,7 @@ public class BlockPressurePlate extends Block {
}
public void updateTick(World var1, int var2, int var3, int var4, Random var5) {
public void updateTick(World var1, int var2, int var3, int var4, EaglercraftRandom var5) {
if(!var1.multiplayerWorld) {
if(var1.getBlockMetadata(var2, var3, var4) != 0) {
this.setStateIfMobInteractsWithPlate(var1, var2, var3, var4);

View File

@ -1,6 +1,6 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class BlockRedstoneOre extends Block {
private boolean field_468_a;
@ -41,22 +41,22 @@ public class BlockRedstoneOre extends Block {
}
public void updateTick(World var1, int var2, int var3, int var4, Random var5) {
public void updateTick(World var1, int var2, int var3, int var4, EaglercraftRandom var5) {
if(this.blockID == Block.oreRedstoneGlowing.blockID) {
var1.setBlockWithNotify(var2, var3, var4, Block.oreRedstone.blockID);
}
}
public int idDropped(int var1, Random var2) {
public int idDropped(int var1, EaglercraftRandom var2) {
return Item.redstone.shiftedIndex;
}
public int quantityDropped(Random var1) {
public int quantityDropped(EaglercraftRandom var1) {
return 4 + var1.nextInt(2);
}
public void randomDisplayTick(World var1, int var2, int var3, int var4, Random var5) {
public void randomDisplayTick(World var1, int var2, int var3, int var4, EaglercraftRandom var5) {
if(this.field_468_a) {
this.func_319_i(var1, var2, var3, var4);
}
@ -64,7 +64,7 @@ public class BlockRedstoneOre extends Block {
}
private void func_319_i(World var1, int var2, int var3, int var4) {
Random var5 = var1.rand;
EaglercraftRandom var5 = var1.rand;
double var6 = 1.0D / 16.0D;
for(int var8 = 0; var8 < 6; ++var8) {

View File

@ -2,7 +2,7 @@ package net.minecraft.src;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class BlockRedstoneTorch extends BlockTorch {
private boolean torchActive = false;
@ -84,7 +84,7 @@ public class BlockRedstoneTorch extends BlockTorch {
return var5 == 5 && var1.isBlockIndirectlyProvidingPowerTo(var2, var3 - 1, var4, 0) ? true : (var5 == 3 && var1.isBlockIndirectlyProvidingPowerTo(var2, var3, var4 - 1, 2) ? true : (var5 == 4 && var1.isBlockIndirectlyProvidingPowerTo(var2, var3, var4 + 1, 3) ? true : (var5 == 1 && var1.isBlockIndirectlyProvidingPowerTo(var2 - 1, var3, var4, 4) ? true : var5 == 2 && var1.isBlockIndirectlyProvidingPowerTo(var2 + 1, var3, var4, 5))));
}
public void updateTick(World var1, int var2, int var3, int var4, Random var5) {
public void updateTick(World var1, int var2, int var3, int var4, EaglercraftRandom var5) {
boolean var6 = this.func_15232_h(var1, var2, var3, var4);
while(torchUpdates.size() > 0 && var1.worldTime - ((RedstoneUpdateInfo)torchUpdates.get(0)).updateTime > 100L) {
@ -120,7 +120,7 @@ public class BlockRedstoneTorch extends BlockTorch {
return var5 == 0 ? this.isPoweringTo(var1, var2, var3, var4, var5) : false;
}
public int idDropped(int var1, Random var2) {
public int idDropped(int var1, EaglercraftRandom var2) {
return Block.torchRedstoneActive.blockID;
}
@ -128,7 +128,7 @@ public class BlockRedstoneTorch extends BlockTorch {
return true;
}
public void randomDisplayTick(World var1, int var2, int var3, int var4, Random var5) {
public void randomDisplayTick(World var1, int var2, int var3, int var4, EaglercraftRandom var5) {
if(this.torchActive) {
int var6 = var1.getBlockMetadata(var2, var3, var4);
double var7 = (double)((float)var2 + 0.5F) + (double)(var5.nextFloat() - 0.5F) * 0.2D;

View File

@ -1,6 +1,6 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class BlockRedstoneWire extends Block {
private boolean wiresProvidePower = true;
@ -245,7 +245,7 @@ public class BlockRedstoneWire extends Block {
}
}
public int idDropped(int var1, Random var2) {
public int idDropped(int var1, EaglercraftRandom var2) {
return Item.redstone.shiftedIndex;
}
@ -291,7 +291,7 @@ public class BlockRedstoneWire extends Block {
return this.wiresProvidePower;
}
public void randomDisplayTick(World var1, int var2, int var3, int var4, Random var5) {
public void randomDisplayTick(World var1, int var2, int var3, int var4, EaglercraftRandom var5) {
if(var1.getBlockMetadata(var2, var3, var4) > 0) {
double var6 = (double)var2 + 0.5D + ((double)var5.nextFloat() - 0.5D) * 0.2D;
double var8 = (double)((float)var3 + 1.0F / 16.0F);

View File

@ -1,6 +1,6 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class BlockReed extends Block {
protected BlockReed(int var1, int var2) {
@ -11,7 +11,7 @@ public class BlockReed extends Block {
this.setTickOnLoad(true);
}
public void updateTick(World var1, int var2, int var3, int var4, Random var5) {
public void updateTick(World var1, int var2, int var3, int var4, EaglercraftRandom var5) {
if(var1.getBlockId(var2, var3 + 1, var4) == 0) {
int var6;
for(var6 = 1; var1.getBlockId(var2, var3 - var6, var4) == this.blockID; ++var6) {
@ -55,7 +55,7 @@ public class BlockReed extends Block {
return null;
}
public int idDropped(int var1, Random var2) {
public int idDropped(int var1, EaglercraftRandom var2) {
return Item.reed.shiftedIndex;
}

View File

@ -1,6 +1,6 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class BlockSand extends Block {
public static boolean fallInstantly = false;
@ -17,7 +17,7 @@ public class BlockSand extends Block {
var1.scheduleBlockUpdate(var2, var3, var4, this.blockID);
}
public void updateTick(World var1, int var2, int var3, int var4, Random var5) {
public void updateTick(World var1, int var2, int var3, int var4, EaglercraftRandom var5) {
this.tryToFall(var1, var2, var3, var4);
}

View File

@ -1,6 +1,6 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class BlockSapling extends BlockFlower {
protected BlockSapling(int var1, int var2) {
@ -9,7 +9,7 @@ public class BlockSapling extends BlockFlower {
this.setBlockBounds(0.5F - var3, 0.0F, 0.5F - var3, 0.5F + var3, var3 * 2.0F, 0.5F + var3);
}
public void updateTick(World var1, int var2, int var3, int var4, Random var5) {
public void updateTick(World var1, int var2, int var3, int var4, EaglercraftRandom var5) {
super.updateTick(var1, var2, var3, var4, var5);
if(var1.getBlockLightValue(var2, var3 + 1, var4) >= 9 && var5.nextInt(5) == 0) {
int var6 = var1.getBlockMetadata(var2, var3, var4);

View File

@ -1,6 +1,6 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class BlockSign extends BlockContainer {
private Class signEntityClass;
@ -73,7 +73,7 @@ public class BlockSign extends BlockContainer {
}
}
public int idDropped(int var1, Random var2) {
public int idDropped(int var1, EaglercraftRandom var2) {
return Item.sign.shiftedIndex;
}

View File

@ -1,6 +1,6 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class BlockSnow extends Block {
protected BlockSnow(int var1, int var2) {
@ -52,15 +52,15 @@ public class BlockSnow extends Block {
var1.setBlockWithNotify(var2, var3, var4, 0);
}
public int idDropped(int var1, Random var2) {
public int idDropped(int var1, EaglercraftRandom var2) {
return Item.snowball.shiftedIndex;
}
public int quantityDropped(Random var1) {
public int quantityDropped(EaglercraftRandom var1) {
return 0;
}
public void updateTick(World var1, int var2, int var3, int var4, Random var5) {
public void updateTick(World var1, int var2, int var3, int var4, EaglercraftRandom var5) {
if(var1.getSavedLightValue(EnumSkyBlock.Block, var2, var3, var4) > 11) {
this.dropBlockAsItem(var1, var2, var3, var4, var1.getBlockMetadata(var2, var3, var4));
var1.setBlockWithNotify(var2, var3, var4, 0);

View File

@ -1,6 +1,6 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class BlockSnowBlock extends Block {
protected BlockSnowBlock(int var1, int var2) {
@ -8,15 +8,15 @@ public class BlockSnowBlock extends Block {
this.setTickOnLoad(true);
}
public int idDropped(int var1, Random var2) {
public int idDropped(int var1, EaglercraftRandom var2) {
return Item.snowball.shiftedIndex;
}
public int quantityDropped(Random var1) {
public int quantityDropped(EaglercraftRandom var1) {
return 4;
}
public void updateTick(World var1, int var2, int var3, int var4, Random var5) {
public void updateTick(World var1, int var2, int var3, int var4, EaglercraftRandom var5) {
if(var1.getSavedLightValue(EnumSkyBlock.Block, var2, var3, var4) > 11) {
this.dropBlockAsItem(var1, var2, var3, var4, var1.getBlockMetadata(var2, var3, var4));
var1.setBlockWithNotify(var2, var3, var4, 0);

View File

@ -1,6 +1,6 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class BlockSoil extends Block {
protected BlockSoil(int var1) {
@ -27,7 +27,7 @@ public class BlockSoil extends Block {
return var1 == 1 && var2 > 0 ? this.blockIndexInTexture - 1 : (var1 == 1 ? this.blockIndexInTexture : 2);
}
public void updateTick(World var1, int var2, int var3, int var4, Random var5) {
public void updateTick(World var1, int var2, int var3, int var4, EaglercraftRandom var5) {
if(var5.nextInt(5) == 0) {
if(this.func_274_i(var1, var2, var3, var4)) {
var1.setBlockMetadataWithNotify(var2, var3, var4, 7);
@ -87,7 +87,7 @@ public class BlockSoil extends Block {
}
public int idDropped(int var1, Random var2) {
public int idDropped(int var1, EaglercraftRandom var2) {
return Block.dirt.idDropped(0, var2);
}
}

View File

@ -1,7 +1,7 @@
package net.minecraft.src;
import java.util.ArrayList;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class BlockStairs extends Block {
private Block modelBlock;
@ -65,7 +65,7 @@ public class BlockStairs extends Block {
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
}
public void randomDisplayTick(World var1, int var2, int var3, int var4, Random var5) {
public void randomDisplayTick(World var1, int var2, int var3, int var4, EaglercraftRandom var5) {
this.modelBlock.randomDisplayTick(var1, var2, var3, var4, var5);
}
@ -89,11 +89,11 @@ public class BlockStairs extends Block {
return this.modelBlock.func_234_g();
}
public int idDropped(int var1, Random var2) {
public int idDropped(int var1, EaglercraftRandom var2) {
return this.modelBlock.idDropped(var1, var2);
}
public int quantityDropped(Random var1) {
public int quantityDropped(EaglercraftRandom var1) {
return this.modelBlock.quantityDropped(var1);
}
@ -154,7 +154,7 @@ public class BlockStairs extends Block {
this.modelBlock.onEntityWalking(var1, var2, var3, var4, var5);
}
public void updateTick(World var1, int var2, int var3, int var4, Random var5) {
public void updateTick(World var1, int var2, int var3, int var4, EaglercraftRandom var5) {
this.modelBlock.updateTick(var1, var2, var3, var4, var5);
}

View File

@ -1,6 +1,6 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class BlockStationary extends BlockFluids {
protected BlockStationary(int var1, Material var2) {
@ -29,7 +29,7 @@ public class BlockStationary extends BlockFluids {
var1.field_1043_h = false;
}
public void updateTick(World var1, int var2, int var3, int var4, Random var5) {
public void updateTick(World var1, int var2, int var3, int var4, EaglercraftRandom var5) {
if(this.blockMaterial == Material.lava) {
int var6 = var5.nextInt(3);

View File

@ -1,6 +1,6 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class BlockStep extends Block {
private boolean field_469_a;
@ -41,7 +41,7 @@ public class BlockStep extends Block {
}
public int idDropped(int var1, Random var2) {
public int idDropped(int var1, EaglercraftRandom var2) {
return Block.stairSingle.blockID;
}

View File

@ -1,13 +1,13 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class BlockStone extends Block {
public BlockStone(int var1, int var2) {
super(var1, var2, Material.rock);
}
public int idDropped(int var1, Random var2) {
public int idDropped(int var1, EaglercraftRandom var2) {
return Block.cobblestone.blockID;
}
}

View File

@ -1,6 +1,6 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class BlockTNT extends Block {
public BlockTNT(int var1, int var2) {
@ -19,7 +19,7 @@ public class BlockTNT extends Block {
}
public int quantityDropped(Random var1) {
public int quantityDropped(EaglercraftRandom var1) {
return 0;
}

View File

@ -1,6 +1,6 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class BlockTorch extends Block {
protected BlockTorch(int var1, int var2) {
@ -53,7 +53,7 @@ public class BlockTorch extends Block {
var1.setBlockMetadataWithNotify(var2, var3, var4, var6);
}
public void updateTick(World var1, int var2, int var3, int var4, Random var5) {
public void updateTick(World var1, int var2, int var3, int var4, EaglercraftRandom var5) {
super.updateTick(var1, var2, var3, var4, var5);
if(var1.getBlockMetadata(var2, var3, var4) == 0) {
this.onBlockAdded(var1, var2, var3, var4);
@ -138,7 +138,7 @@ public class BlockTorch extends Block {
return super.collisionRayTrace(var1, var2, var3, var4, var5, var6);
}
public void randomDisplayTick(World var1, int var2, int var3, int var4, Random var5) {
public void randomDisplayTick(World var1, int var2, int var3, int var4, EaglercraftRandom var5) {
int var6 = var1.getBlockMetadata(var2, var3, var4);
double var7 = (double)((float)var2 + 0.5F);
double var9 = (double)((float)var3 + 0.7F);

View File

@ -4,7 +4,7 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class Chunk {
public static boolean field_1540_a;
@ -591,7 +591,7 @@ public class Chunk {
return var8;
}
public Random func_997_a(long var1) {
return new Random(this.worldObj.randomSeed + (long)(this.xPosition * this.xPosition * 4987142) + (long)(this.xPosition * 5947611) + (long)(this.zPosition * this.zPosition) * 4392871L + (long)(this.zPosition * 389711) ^ var1);
public EaglercraftRandom func_997_a(long var1) {
return new EaglercraftRandom(this.worldObj.randomSeed + (long)(this.xPosition * this.xPosition * 4987142) + (long)(this.xPosition * 5947611) + (long)(this.zPosition * this.zPosition) * 4392871L + (long)(this.zPosition * 389711) ^ var1);
}
}

View File

@ -1,9 +1,9 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class ChunkProviderGenerate implements IChunkProvider {
private Random rand;
private EaglercraftRandom rand;
private NoiseGeneratorOctaves field_912_k;
private NoiseGeneratorOctaves field_911_l;
private NoiseGeneratorOctaves field_910_m;
@ -29,7 +29,7 @@ public class ChunkProviderGenerate implements IChunkProvider {
public ChunkProviderGenerate(World var1, long var2) {
this.worldObj = var1;
this.rand = new Random(var2);
this.rand = new EaglercraftRandom(var2);
this.field_912_k = new NoiseGeneratorOctaves(this.rand, 16);
this.field_911_l = new NoiseGeneratorOctaves(this.rand, 16);
this.field_910_m = new NoiseGeneratorOctaves(this.rand, 8);

View File

@ -1,9 +1,9 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class ChunkProviderHell implements IChunkProvider {
private Random field_4170_h;
private EaglercraftRandom field_4170_h;
private NoiseGeneratorOctaves field_4169_i;
private NoiseGeneratorOctaves field_4168_j;
private NoiseGeneratorOctaves field_4167_k;
@ -25,7 +25,7 @@ public class ChunkProviderHell implements IChunkProvider {
public ChunkProviderHell(World var1, long var2) {
this.field_4164_n = var1;
this.field_4170_h = new Random(var2);
this.field_4170_h = new EaglercraftRandom(var2);
this.field_4169_i = new NoiseGeneratorOctaves(this.field_4170_h, 16);
this.field_4168_j = new NoiseGeneratorOctaves(this.field_4170_h, 16);
this.field_4167_k = new NoiseGeneratorOctaves(this.field_4170_h, 8);

View File

@ -2,7 +2,7 @@ package net.minecraft.src;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
import net.PeytonPlayz585.opengl.GL11;
@ -10,7 +10,7 @@ public class EffectRenderer {
protected World worldObj;
private List[] field_1728_b = new List[4];
private RenderEngine field_1731_c;
private Random rand = new Random();
private EaglercraftRandom rand = new EaglercraftRandom();
public EffectRenderer(World var1, RenderEngine var2) {
if(var1 != null) {

View File

@ -1,7 +1,7 @@
package net.minecraft.src;
import java.util.List;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public abstract class Entity {
private static int field_864_a = 0;
@ -48,7 +48,7 @@ public abstract class Entity {
public boolean field_9314_ba = false;
public float field_632_aO = 0.0F;
public boolean field_9313_bc = false;
protected Random rand = new Random();
protected EaglercraftRandom rand = new EaglercraftRandom();
public int field_9311_be = 0;
public int field_9310_bf = 1;
public int fire = 0;

View File

@ -2,7 +2,7 @@ package net.minecraft.src;
import java.nio.FloatBuffer;
import java.util.List;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
import net.PeytonPlayz585.glemu.GameOverlayFramebuffer;
import net.PeytonPlayz585.input.Keyboard;
@ -27,7 +27,7 @@ public class EntityRenderer {
private double cameraYaw = 0.0D;
private double cameraPitch = 0.0D;
private long field_1384_l = System.currentTimeMillis();
private Random field_1383_m = new Random();
private EaglercraftRandom field_1383_m = new EaglercraftRandom();
volatile int field_1394_b = 0;
volatile int field_1393_c = 0;
FloatBuffer fogColorBuffer = GLAllocation.createDirectFloatBuffer(16);

View File

@ -3,12 +3,12 @@ package net.minecraft.src;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
import java.util.Set;
public class Explosion {
public boolean field_12257_a = false;
private Random field_12250_h = new Random();
private EaglercraftRandom field_12250_h = new EaglercraftRandom();
private World field_12249_i;
public double field_12256_b;
public double field_12255_c;

View File

@ -2,7 +2,7 @@ package net.minecraft.src;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
import net.PeytonPlayz585.awt.Color;
import net.PeytonPlayz585.input.Keyboard;
@ -13,7 +13,7 @@ import net.minecraft.client.Minecraft;
public class GuiIngame extends Gui {
private static RenderItem itemRenderer = new RenderItem();
private List chatMessageList = new ArrayList();
private Random rand = new Random();
private EaglercraftRandom rand = new EaglercraftRandom();
private Minecraft mc;
public String field_933_a = null;
private int updateCounter = 0;

View File

@ -6,14 +6,14 @@ import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
import net.PeytonPlayz585.opengl.GL11;
import net.PeytonPlayz585.util.glu.GLU;
import net.minecraft.client.Minecraft;
public class GuiMainMenu extends GuiScreen {
private static final Random rand = new Random();
private static final EaglercraftRandom rand = new EaglercraftRandom();
String[] minecraftLogo = new String[]{" * * * * * *** *** *** *** *** ***", " ** ** * ** * * * * * * * * * ", " * * * * * * * ** * ** *** ** * ", " * * * * ** * * * * * * * * ", " * * * * * *** *** * * * * * * "};
private LogoEffectRandomizer[][] logoEffects;
private float updateCounter = 0.0F;
@ -222,7 +222,7 @@ public class GuiMainMenu extends GuiScreen {
GL11.glEnable(GL11.GL_CULL_FACE);
}
static Random getRand() {
static EaglercraftRandom getRand() {
return rand;
}
}

View File

@ -1,9 +1,9 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class Item {
protected static Random itemRand = new Random();
protected static EaglercraftRandom itemRand = new EaglercraftRandom();
public static Item[] itemsList = new Item[32000];
public static Item shovelSteel = (new ItemSpade(0, 2)).setIconIndex(82);
public static Item pickaxeSteel = (new ItemPickaxe(1, 2)).setIconIndex(98);

View File

@ -1,10 +1,10 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class MapGenBase {
protected int field_1306_a = 8;
protected Random field_1305_b = new Random();
protected EaglercraftRandom field_1305_b = new EaglercraftRandom();
public void func_867_a(IChunkProvider var1, World var2, int var3, int var4, byte[] var5) {
int var6 = this.field_1306_a;

View File

@ -1,6 +1,6 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class MapGenCaves extends MapGenBase {
protected void func_870_a(int var1, int var2, byte[] var3, double var4, double var6, double var8) {
@ -12,7 +12,7 @@ public class MapGenCaves extends MapGenBase {
double var19 = (double)(var2 * 16 + 8);
float var21 = 0.0F;
float var22 = 0.0F;
Random var23 = new Random(this.field_1305_b.nextLong());
EaglercraftRandom var23 = new EaglercraftRandom(this.field_1305_b.nextLong());
if(var14 <= 0) {
int var24 = this.field_1306_a * 16 - 16;
var14 = var24 - var23.nextInt(var24 / 4);

View File

@ -1,6 +1,6 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class MapGenCavesHell extends MapGenBase {
protected void func_4129_a(int var1, int var2, byte[] var3, double var4, double var6, double var8) {
@ -12,7 +12,7 @@ public class MapGenCavesHell extends MapGenBase {
double var19 = (double)(var2 * 16 + 8);
float var21 = 0.0F;
float var22 = 0.0F;
Random var23 = new Random(this.field_1305_b.nextLong());
EaglercraftRandom var23 = new EaglercraftRandom(this.field_1305_b.nextLong());
if(var14 <= 0) {
int var24 = this.field_1306_a * 16 - 16;
var14 = var24 - var23.nextInt(var24 / 4);

View File

@ -1,6 +1,6 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class ModelGhast extends ModelBase {
ModelRenderer body;
@ -11,7 +11,7 @@ public class ModelGhast extends ModelBase {
this.body = new ModelRenderer(0, 0);
this.body.func_921_a(-8.0F, -8.0F, -8.0F, 16, 16, 16);
this.body.offsetY += (float)(24 + var1);
Random var2 = new Random(1660L);
EaglercraftRandom var2 = new EaglercraftRandom(1660L);
for(int var3 = 0; var3 < this.tentacles.length; ++var3) {
this.tentacles[var3] = new ModelRenderer(0, 0);

View File

@ -2,7 +2,7 @@ package net.minecraft.src;
import java.io.IOException;
import java.net.UnknownHostException;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
import net.minecraft.client.Minecraft;
public class NetClientHandler extends NetHandler {
@ -12,7 +12,7 @@ public class NetClientHandler extends NetHandler {
private Minecraft mc;
private WorldClient worldClient;
private boolean field_1210_g = false;
Random rand = new Random();
EaglercraftRandom rand = new EaglercraftRandom();
public NetClientHandler(Minecraft var1, String var2) throws IOException, UnknownHostException {
this.mc = var1;

View File

@ -1,6 +1,6 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
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}};
@ -12,10 +12,10 @@ public class NoiseGenerator2 {
private static final double field_4293_g = (3.0D - Math.sqrt(3.0D)) / 6.0D;
public NoiseGenerator2() {
this(new Random());
this(new EaglercraftRandom());
}
public NoiseGenerator2(Random var1) {
public NoiseGenerator2(EaglercraftRandom var1) {
this.field_4295_e = new int[512];
this.field_4292_a = var1.nextDouble() * 256.0D;
this.field_4291_b = var1.nextDouble() * 256.0D;

View File

@ -1,12 +1,12 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class NoiseGeneratorOctaves extends NoiseGenerator {
private NoiseGeneratorPerlin[] generatorCollection;
private int field_1191_b;
public NoiseGeneratorOctaves(Random var1, int var2) {
public NoiseGeneratorOctaves(EaglercraftRandom var1, int var2) {
this.field_1191_b = var2;
this.generatorCollection = new NoiseGeneratorPerlin[var2];

View File

@ -1,12 +1,12 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class NoiseGeneratorOctaves2 extends NoiseGenerator {
private NoiseGenerator2[] field_4234_a;
private int field_4233_b;
public NoiseGeneratorOctaves2(Random var1, int var2) {
public NoiseGeneratorOctaves2(EaglercraftRandom var1, int var2) {
this.field_4233_b = var2;
this.field_4234_a = new NoiseGenerator2[var2];

View File

@ -1,6 +1,6 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class NoiseGeneratorPerlin extends NoiseGenerator {
private int[] permutations;
@ -9,10 +9,10 @@ public class NoiseGeneratorPerlin extends NoiseGenerator {
public double zCoord;
public NoiseGeneratorPerlin() {
this(new Random());
this(new EaglercraftRandom());
}
public NoiseGeneratorPerlin(Random var1) {
public NoiseGeneratorPerlin(EaglercraftRandom var1) {
this.permutations = new int[512];
this.xCoord = var1.nextDouble() * 256.0D;
this.yCoord = var1.nextDouble() * 256.0D;

View File

@ -5,7 +5,7 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
import net.PeytonPlayz585.opengl.GL11;
import net.minecraft.client.Minecraft;
@ -107,7 +107,7 @@ public class RenderGlobal implements IWorldAccess {
}
private void func_950_f() {
Random var1 = new Random(10842L);
EaglercraftRandom var1 = new EaglercraftRandom(10842L);
Tessellator var2 = Tessellator.instance;
var2.startDrawingQuads();

View File

@ -1,13 +1,13 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
import net.PeytonPlayz585.opengl.GL11;
import net.PeytonPlayz585.opengl.GL12;
public class RenderItem extends Render {
private RenderBlocks renderBlocks = new RenderBlocks();
private Random random = new Random();
private EaglercraftRandom random = new EaglercraftRandom();
public RenderItem() {
this.field_9246_c = 0.15F;

View File

@ -1,12 +1,12 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
import net.PeytonPlayz585.opengl.GL11;
import net.PeytonPlayz585.opengl.GL12;
public class RenderPainting extends Render {
private Random rand = new Random();
private EaglercraftRandom rand = new EaglercraftRandom();
public void a(EntityPainting var1, double var2, double var4, double var6, float var8, float var9) {
this.rand.setSeed(187L);

View File

@ -1,9 +1,9 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class Teleporter {
private Random field_4232_a = new Random();
private EaglercraftRandom field_4232_a = new EaglercraftRandom();
public void func_4107_a(World var1, Entity var2) {
if(!this.func_4106_b(var1, var2)) {

View File

@ -1,6 +1,6 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class TexturePortalFX extends TextureFX {
private int field_4227_g = 0;
@ -8,7 +8,7 @@ public class TexturePortalFX extends TextureFX {
public TexturePortalFX() {
super(Block.portal.blockIndexInTexture);
Random var1 = new Random(100L);
EaglercraftRandom var1 = new EaglercraftRandom(100L);
for(int var2 = 0; var2 < 32; ++var2) {
for(int var3 = 0; var3 < 16; ++var3) {

View File

@ -15,7 +15,7 @@ import java.util.Collection;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
import java.util.Set;
import java.util.TreeSet;
@ -41,7 +41,7 @@ public class World implements IBlockAccess {
public long field_1054_E;
protected int autosavePeriod;
public int difficultySetting;
public Random rand;
public EaglercraftRandom rand;
public int spawnX;
public int spawnY;
public int spawnZ;
@ -113,7 +113,7 @@ public class World implements IBlockAccess {
}
public World(String var1, String var2) {
this(var1, var2, (new Random()).nextLong());
this(var1, var2, (new EaglercraftRandom()).nextLong());
}
public World(String var1, WorldProvider var2, long var3) {
@ -128,12 +128,12 @@ public class World implements IBlockAccess {
this.worldTime = 0L;
this.field_1019_F = 16777215L;
this.skylightSubtracted = 0;
this.field_9437_g = (new Random()).nextInt();
this.field_9437_g = (new EaglercraftRandom()).nextInt();
this.field_9436_h = 1013904223;
this.field_1043_h = false;
this.field_1054_E = System.currentTimeMillis();
this.autosavePeriod = 40;
this.rand = new Random();
this.rand = new EaglercraftRandom();
this.field_1033_r = false;
this.worldAccesses = new ArrayList();
this.randomSeed = 0L;
@ -164,12 +164,12 @@ public class World implements IBlockAccess {
this.worldTime = 0L;
this.field_1019_F = 16777215L;
this.skylightSubtracted = 0;
this.field_9437_g = (new Random()).nextInt();
this.field_9437_g = (new EaglercraftRandom()).nextInt();
this.field_9436_h = 1013904223;
this.field_1043_h = false;
this.field_1054_E = System.currentTimeMillis();
this.autosavePeriod = 40;
this.rand = new Random();
this.rand = new EaglercraftRandom();
this.field_1033_r = false;
this.worldAccesses = new ArrayList();
this.randomSeed = 0L;
@ -212,12 +212,12 @@ public class World implements IBlockAccess {
this.worldTime = 0L;
this.field_1019_F = 16777215L;
this.skylightSubtracted = 0;
this.field_9437_g = (new Random()).nextInt();
this.field_9437_g = (new EaglercraftRandom()).nextInt();
this.field_9436_h = 1013904223;
this.field_1043_h = false;
this.field_1054_E = System.currentTimeMillis();
this.autosavePeriod = 40;
this.rand = new Random();
this.rand = new EaglercraftRandom();
this.field_1033_r = false;
this.worldAccesses = new ArrayList();
this.randomSeed = 0L;
@ -1779,7 +1779,7 @@ public class World implements IBlockAccess {
public void randomDisplayUpdates(int var1, int var2, int var3) {
byte var4 = 16;
Random var5 = new Random();
EaglercraftRandom var5 = new EaglercraftRandom();
for(int var6 = 0; var6 < 1000; ++var6) {
int var7 = var1 + this.rand.nextInt(var4) - this.rand.nextInt(var4);

View File

@ -1,6 +1,6 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class WorldChunkManager {
private NoiseGeneratorOctaves2 field_4194_e;
@ -15,9 +15,9 @@ public class WorldChunkManager {
}
public WorldChunkManager(World var1) {
this.field_4194_e = new NoiseGeneratorOctaves2(new Random(var1.randomSeed * 9871L), 4);
this.field_4193_f = new NoiseGeneratorOctaves2(new Random(var1.randomSeed * 39811L), 4);
this.field_4192_g = new NoiseGeneratorOctaves2(new Random(var1.randomSeed * 543321L), 2);
this.field_4194_e = new NoiseGeneratorOctaves2(new EaglercraftRandom(var1.randomSeed * 9871L), 4);
this.field_4193_f = new NoiseGeneratorOctaves2(new EaglercraftRandom(var1.randomSeed * 39811L), 4);
this.field_4192_g = new NoiseGeneratorOctaves2(new EaglercraftRandom(var1.randomSeed * 543321L), 2);
}
public MobSpawnerBase func_4074_a(ChunkCoordIntPair var1) {

View File

@ -1,10 +1,10 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class WorldGenBigTree extends WorldGenerator {
static final byte[] field_882_a = new byte[]{(byte)2, (byte)0, (byte)0, (byte)1, (byte)2, (byte)1};
Random field_881_b = new Random();
EaglercraftRandom field_881_b = new EaglercraftRandom();
World worldObj;
int[] field_879_d = new int[]{0, 0, 0};
int field_878_e = 0;
@ -324,7 +324,7 @@ public class WorldGenBigTree extends WorldGenerator {
this.field_872_k = var5;
}
public boolean generate(World var1, Random var2, int var3, int var4, int var5) {
public boolean generate(World var1, EaglercraftRandom var2, int var3, int var4, int var5) {
this.worldObj = var1;
long var6 = var2.nextLong();
this.field_881_b.setSeed(var6);

View File

@ -1,9 +1,9 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class WorldGenCactus extends WorldGenerator {
public boolean generate(World var1, Random var2, int var3, int var4, int var5) {
public boolean generate(World var1, EaglercraftRandom var2, int var3, int var4, int var5) {
for(int var6 = 0; var6 < 10; ++var6) {
int var7 = var3 + var2.nextInt(8) - var2.nextInt(8);
int var8 = var4 + var2.nextInt(4) - var2.nextInt(4);

View File

@ -1,6 +1,6 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class WorldGenClay extends WorldGenerator {
private int clayBlockId = Block.blockClay.blockID;
@ -10,7 +10,7 @@ public class WorldGenClay extends WorldGenerator {
this.numberOfBlocks = var1;
}
public boolean generate(World var1, Random var2, int var3, int var4, int var5) {
public boolean generate(World var1, EaglercraftRandom var2, int var3, int var4, int var5) {
if(var1.getBlockMaterial(var3, var4, var5) != Material.water) {
return false;
} else {

View File

@ -1,9 +1,9 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class WorldGenDungeons extends WorldGenerator {
public boolean generate(World var1, Random var2, int var3, int var4, int var5) {
public boolean generate(World var1, EaglercraftRandom var2, int var3, int var4, int var5) {
byte var6 = 3;
int var7 = var2.nextInt(2) + 2;
int var8 = var2.nextInt(2) + 2;
@ -104,12 +104,12 @@ public class WorldGenDungeons extends WorldGenerator {
}
}
private ItemStack pickCheckLootItem(Random var1) {
private ItemStack pickCheckLootItem(EaglercraftRandom var1) {
int var2 = var1.nextInt(11);
return var2 == 0 ? new ItemStack(Item.saddle) : (var2 == 1 ? new ItemStack(Item.ingotIron, var1.nextInt(4) + 1) : (var2 == 2 ? new ItemStack(Item.bread) : (var2 == 3 ? new ItemStack(Item.wheat, var1.nextInt(4) + 1) : (var2 == 4 ? new ItemStack(Item.gunpowder, var1.nextInt(4) + 1) : (var2 == 5 ? new ItemStack(Item.silk, var1.nextInt(4) + 1) : (var2 == 6 ? new ItemStack(Item.bucketEmpty) : (var2 == 7 && var1.nextInt(100) == 0 ? new ItemStack(Item.appleGold) : (var2 == 8 && var1.nextInt(2) == 0 ? new ItemStack(Item.redstone, var1.nextInt(4) + 1) : (var2 == 9 && var1.nextInt(10) == 0 ? new ItemStack(Item.itemsList[Item.record13.shiftedIndex + var1.nextInt(2)]) : null)))))))));
}
private String pickMobSpawner(Random var1) {
private String pickMobSpawner(EaglercraftRandom var1) {
int var2 = var1.nextInt(4);
return var2 == 0 ? "Skeleton" : (var2 == 1 ? "Zombie" : (var2 == 2 ? "Zombie" : (var2 == 3 ? "Spider" : "")));
}

View File

@ -1,9 +1,9 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class WorldGenFire extends WorldGenerator {
public boolean generate(World var1, Random var2, int var3, int var4, int var5) {
public boolean generate(World var1, EaglercraftRandom var2, int var3, int var4, int var5) {
for(int var6 = 0; var6 < 64; ++var6) {
int var7 = var3 + var2.nextInt(8) - var2.nextInt(8);
int var8 = var4 + var2.nextInt(4) - var2.nextInt(4);

View File

@ -1,6 +1,6 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class WorldGenFlowers extends WorldGenerator {
private int plantBlockId;
@ -9,7 +9,7 @@ public class WorldGenFlowers extends WorldGenerator {
this.plantBlockId = var1;
}
public boolean generate(World var1, Random var2, int var3, int var4, int var5) {
public boolean generate(World var1, EaglercraftRandom var2, int var3, int var4, int var5) {
for(int var6 = 0; var6 < 64; ++var6) {
int var7 = var3 + var2.nextInt(8) - var2.nextInt(8);
int var8 = var4 + var2.nextInt(4) - var2.nextInt(4);

View File

@ -1,6 +1,6 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class WorldGenHellLava extends WorldGenerator {
private int field_4158_a;
@ -9,7 +9,7 @@ public class WorldGenHellLava extends WorldGenerator {
this.field_4158_a = var1;
}
public boolean generate(World var1, Random var2, int var3, int var4, int var5) {
public boolean generate(World var1, EaglercraftRandom var2, int var3, int var4, int var5) {
if(var1.getBlockId(var3, var4 + 1, var5) != Block.bloodStone.blockID) {
return false;
} else if(var1.getBlockId(var3, var4, var5) != 0 && var1.getBlockId(var3, var4, var5) != Block.bloodStone.blockID) {

View File

@ -1,6 +1,6 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class WorldGenLakes extends WorldGenerator {
private int field_15235_a;
@ -9,7 +9,7 @@ public class WorldGenLakes extends WorldGenerator {
this.field_15235_a = var1;
}
public boolean generate(World var1, Random var2, int var3, int var4, int var5) {
public boolean generate(World var1, EaglercraftRandom var2, int var3, int var4, int var5) {
var3 -= 8;
for(var5 -= 8; var4 > 0 && var1.getBlockId(var3, var4, var5) == 0; --var4) {

View File

@ -1,9 +1,9 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class WorldGenLightStone1 extends WorldGenerator {
public boolean generate(World var1, Random var2, int var3, int var4, int var5) {
public boolean generate(World var1, EaglercraftRandom var2, int var3, int var4, int var5) {
if(var1.getBlockId(var3, var4, var5) != 0) {
return false;
} else if(var1.getBlockId(var3, var4 + 1, var5) != Block.bloodStone.blockID) {

View File

@ -1,9 +1,9 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class WorldGenLightStone2 extends WorldGenerator {
public boolean generate(World var1, Random var2, int var3, int var4, int var5) {
public boolean generate(World var1, EaglercraftRandom var2, int var3, int var4, int var5) {
if(var1.getBlockId(var3, var4, var5) != 0) {
return false;
} else if(var1.getBlockId(var3, var4 + 1, var5) != Block.bloodStone.blockID) {

View File

@ -1,6 +1,6 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class WorldGenLiquids extends WorldGenerator {
private int liquidBlockId;
@ -9,7 +9,7 @@ public class WorldGenLiquids extends WorldGenerator {
this.liquidBlockId = var1;
}
public boolean generate(World var1, Random var2, int var3, int var4, int var5) {
public boolean generate(World var1, EaglercraftRandom var2, int var3, int var4, int var5) {
if(var1.getBlockId(var3, var4 + 1, var5) != Block.stone.blockID) {
return false;
} else if(var1.getBlockId(var3, var4 - 1, var5) != Block.stone.blockID) {

View File

@ -1,6 +1,6 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class WorldGenMinable extends WorldGenerator {
private int minableBlockId;
@ -11,7 +11,7 @@ public class WorldGenMinable extends WorldGenerator {
this.numberOfBlocks = var2;
}
public boolean generate(World var1, Random var2, int var3, int var4, int var5) {
public boolean generate(World var1, EaglercraftRandom var2, int var3, int var4, int var5) {
float var6 = var2.nextFloat() * (float)Math.PI;
double var7 = (double)((float)(var3 + 8) + MathHelper.sin(var6) * (float)this.numberOfBlocks / 8.0F);
double var9 = (double)((float)(var3 + 8) - MathHelper.sin(var6) * (float)this.numberOfBlocks / 8.0F);

View File

@ -1,9 +1,9 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class WorldGenPumpkin extends WorldGenerator {
public boolean generate(World var1, Random var2, int var3, int var4, int var5) {
public boolean generate(World var1, EaglercraftRandom var2, int var3, int var4, int var5) {
for(int var6 = 0; var6 < 64; ++var6) {
int var7 = var3 + var2.nextInt(8) - var2.nextInt(8);
int var8 = var4 + var2.nextInt(4) - var2.nextInt(4);

View File

@ -1,9 +1,9 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class WorldGenReed extends WorldGenerator {
public boolean generate(World var1, Random var2, int var3, int var4, int var5) {
public boolean generate(World var1, EaglercraftRandom var2, int var3, int var4, int var5) {
for(int var6 = 0; var6 < 20; ++var6) {
int var7 = var3 + var2.nextInt(4) - var2.nextInt(4);
int var8 = var4;

View File

@ -1,9 +1,9 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public class WorldGenTrees extends WorldGenerator {
public boolean generate(World var1, Random var2, int var3, int var4, int var5) {
public boolean generate(World var1, EaglercraftRandom var2, int var3, int var4, int var5) {
int var6 = var2.nextInt(3) + 4;
boolean var7 = true;
if(var4 >= 1 && var4 + var6 + 1 <= 128) {

View File

@ -1,9 +1,9 @@
package net.minecraft.src;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
public abstract class WorldGenerator {
public abstract boolean generate(World var1, Random var2, int var3, int var4, int var5);
public abstract boolean generate(World var1, EaglercraftRandom var2, int var3, int var4, int var5);
public void func_517_a(double var1, double var3, double var5) {
}

View File

@ -68,9 +68,9 @@ public class WorldRenderer {
this.field_1753_k = var3 - this.field_1750_n;
float var4 = 2.0F;
this.field_1736_v = AxisAlignedBB.getBoundingBox((double)((float)var1 - var4), (double)((float)var2 - var4), (double)((float)var3 - var4), (double)((float)(var1 + this.field_1758_f) + var4), (double)((float)(var2 + this.field_1757_g) + var4), (double)((float)(var3 + this.field_1756_h) + var4));
//GL11.glNewList(this.field_1744_C + 2, GL11.GL_COMPILE);
//RenderItem.renderAABB(AxisAlignedBB.getBoundingBoxFromPool((double)((float)this.field_1752_l - var4), (double)((float)this.field_1751_m - var4), (double)((float)this.field_1750_n - var4), (double)((float)(this.field_1752_l + this.field_1758_f) + var4), (double)((float)(this.field_1751_m + this.field_1757_g) + var4), (double)((float)(this.field_1750_n + this.field_1756_h) + var4)));
//GL11.glEndList();
GL11.glNewList(this.field_1744_C + 2, GL11.GL_COMPILE);
RenderItem.renderAABB(AxisAlignedBB.getBoundingBoxFromPool((double)((float)this.field_1752_l - var4), (double)((float)this.field_1751_m - var4), (double)((float)this.field_1750_n - var4), (double)((float)(this.field_1752_l + this.field_1758_f) + var4), (double)((float)(this.field_1751_m + this.field_1757_g) + var4), (double)((float)(this.field_1750_n + this.field_1756_h) + var4)));
GL11.glEndList();
this.MarkDirty();
}
}

View File

@ -2,7 +2,7 @@ package net.PeytonPlayz585.sound;
import java.io.FileNotFoundException;
import java.util.Map;
import java.util.Random;
import net.PeytonPlayz585.EaglercraftRandom;
import net.PeytonPlayz585.opengl.GL11;
import net.minecraft.client.Minecraft;
@ -50,7 +50,7 @@ public class SoundManager {
}
}
} else {
Random rand = new Random();
EaglercraftRandom rand = new EaglercraftRandom();
int i1 = rand.nextInt(4 - 1 + 1) + 1;
int i2 = GL11.EaglerAdapterImpl2.beginPlayback(file + i1 + ".mp3", f, g, h, i * Minecraft.getMinecraft().gameSettings.soundVolume, j);
if(i2 == -1) {
@ -164,7 +164,7 @@ public class SoundManager {
}
if(!GL11.EaglerAdapterImpl2.isPlaying(song) && musicFlag && !musicTimerSet) {
Random rand = new Random();
EaglercraftRandom rand = new EaglercraftRandom();
musicTimer = rand.nextInt(6 - 3 + 1) + 3;
musicTimer = musicTimer * 60;
musicTimer = musicTimer * 20;
@ -185,7 +185,7 @@ public class SoundManager {
}
if(!GL11.EaglerAdapterImpl2.isPlaying(song) && !musicFlag) {
Random rand = new Random();
EaglercraftRandom rand = new EaglercraftRandom();
int i = rand.nextInt(2);
if(i == 0) {