fixed stray references to java.util.Random

This commit is contained in:
LAX1DUDE 2022-03-20 23:01:44 -07:00
parent 1172088b4b
commit f6a47fd9fe
101 changed files with 379 additions and 272 deletions

View File

@ -1,7 +1,6 @@
package net.lax1dude.eaglercraft; package net.lax1dude.eaglercraft;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Random;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.src.NBTTagCompound; import net.minecraft.src.NBTTagCompound;
@ -19,7 +18,7 @@ public class EaglerProfile {
public static ArrayList<byte[]> skinDatas = new ArrayList(); public static ArrayList<byte[]> skinDatas = new ArrayList();
public static ArrayList<Integer> glTex = new ArrayList(); public static ArrayList<Integer> glTex = new ArrayList();
public static final Random rand; public static final EaglercraftRandom rand;
public static int getSkinSize(int len) { public static int getSkinSize(int len) {
for(int i = 0; i < SKIN_DATA_SIZE.length; ++i) { for(int i = 0; i < SKIN_DATA_SIZE.length; ++i) {
@ -156,7 +155,7 @@ public class EaglerProfile {
"Yeeg" "Yeeg"
}; };
rand = new Random(); rand = new EaglercraftRandom();
do { do {
username = usernameDefaultWords[rand.nextInt(usernameDefaultWords.length)] + usernameDefaultWords[rand.nextInt(usernameDefaultWords.length)] + (10 + rand.nextInt(90)); username = usernameDefaultWords[rand.nextInt(usernameDefaultWords.length)] + usernameDefaultWords[rand.nextInt(usernameDefaultWords.length)] + (10 + rand.nextInt(90));

View File

@ -0,0 +1,97 @@
package net.lax1dude.eaglercraft;
public class ProfileUUID {
public final long msb;
public final long lsb;
public ProfileUUID(long msb, long lsb) {
this.msb = msb;
this.lsb = lsb;
}
public ProfileUUID(byte[] uuid) {
long msb = 0;
long lsb = 0;
for (int i = 0; i < 8; i++)
msb = (msb << 8) | (uuid[i] & 0xff);
for (int i = 8; i < 16; i++)
lsb = (lsb << 8) | (uuid[i] & 0xff);
this.msb = msb;
this.lsb = lsb;
}
public ProfileUUID(String uuid) {
String[] components = uuid.split("-");
if (components.length != 5)
throw new IllegalArgumentException("Invalid UUID string: " + uuid);
for (int i = 0; i < 5; i++)
components[i] = "0x" + components[i];
long mostSigBits = Long.decode(components[0]).longValue();
mostSigBits <<= 16;
mostSigBits |= Long.decode(components[1]).longValue();
mostSigBits <<= 16;
mostSigBits |= Long.decode(components[2]).longValue();
long leastSigBits = Long.decode(components[3]).longValue();
leastSigBits <<= 48;
leastSigBits |= Long.decode(components[4]).longValue();
this.msb = mostSigBits;
this.lsb = leastSigBits;
}
private static byte long7(long x) { return (byte)(x >> 56); }
private static byte long6(long x) { return (byte)(x >> 48); }
private static byte long5(long x) { return (byte)(x >> 40); }
private static byte long4(long x) { return (byte)(x >> 32); }
private static byte long3(long x) { return (byte)(x >> 24); }
private static byte long2(long x) { return (byte)(x >> 16); }
private static byte long1(long x) { return (byte)(x >> 8); }
private static byte long0(long x) { return (byte)(x ); }
public byte[] getBytes() {
byte[] ret = new byte[16];
ret[0] = long7(msb);
ret[1] = long6(msb);
ret[2] = long5(msb);
ret[3] = long4(msb);
ret[4] = long3(msb);
ret[5] = long2(msb);
ret[6] = long1(msb);
ret[7] = long0(msb);
ret[8] = long7(lsb);
ret[9] = long6(lsb);
ret[10] = long5(lsb);
ret[11] = long4(lsb);
ret[12] = long3(lsb);
ret[13] = long2(lsb);
ret[14] = long1(lsb);
ret[15] = long0(lsb);
return ret;
}
@Override
public String toString() {
return (digits(msb >> 32, 8) + "-" + digits(msb >> 16, 4) + "-" + digits(msb, 4) + "-"
+ digits(lsb >> 48, 4) + "-" + digits(lsb, 12));
}
private static String digits(long val, int digits) {
long hi = 1L << (digits * 4);
return Long.toHexString(hi | (val & (hi - 1))).substring(1);
}
@Override
public int hashCode() {
long hilo = msb ^ lsb;
return ((int) (hilo >> 32)) ^ (int) hilo;
}
@Override
public boolean equals(Object o) {
return (o instanceof ProfileUUID) && ((ProfileUUID)o).lsb == lsb && ((ProfileUUID)o).msb == msb;
}
}

View File

@ -4,8 +4,8 @@ import java.nio.ByteBuffer;
import java.nio.ByteOrder; import java.nio.ByteOrder;
import java.nio.IntBuffer; import java.nio.IntBuffer;
import java.util.HashMap; import java.util.HashMap;
import java.util.Random;
import net.lax1dude.eaglercraft.EaglercraftRandom;
import net.lax1dude.eaglercraft.glemu.vector.Matrix4f; import net.lax1dude.eaglercraft.glemu.vector.Matrix4f;
import static net.lax1dude.eaglercraft.adapter.EaglerAdapterImpl2._wGL_CULL_FACE; import static net.lax1dude.eaglercraft.adapter.EaglerAdapterImpl2._wGL_CULL_FACE;
@ -233,7 +233,7 @@ public class EffectPipeline {
} }
} }
private static final Random deevis = new Random(); private static final EaglercraftRandom deevis = new EaglercraftRandom();
private static float[] projBuffer = new float[16]; private static float[] projBuffer = new float[16];
private static float[] projBufferInv = new float[16]; private static float[] projBufferInv = new float[16];
@ -447,7 +447,7 @@ public class EffectPipeline {
_wglBindAttributeLocation(prog, 0, "a_pos"); _wglBindAttributeLocation(prog, 0, "a_pos");
if(_wglGetUniformLocation(prog, "ssao_kernel[0]") != null) { if(_wglGetUniformLocation(prog, "ssao_kernel[0]") != null) {
Random r = new Random("eeeaglerrENOPHILEr".hashCode()); EaglercraftRandom r = new EaglercraftRandom("eeeaglerrENOPHILEr".hashCode());
for(int j = 0; j < 24; j++) { for(int j = 0; j < 24; j++) {
float x = r.nextFloat() * 2.0f - 1.0f; float x = r.nextFloat() * 2.0f - 1.0f;
float y = r.nextFloat() * 2.0f - 1.0f; float y = r.nextFloat() * 2.0f - 1.0f;

View File

@ -1,7 +1,6 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Iterator; import net.lax1dude.eaglercraft.EaglercraftRandom;
import java.util.Random;
public class BlockBed extends BlockDirectional { public class BlockBed extends BlockDirectional {
/** Maps the foot-of-bed block to the head-of-bed block. */ /** Maps the foot-of-bed block to the head-of-bed block. */
@ -100,7 +99,7 @@ public class BlockBed extends BlockDirectional {
/** /**
* Returns the ID of the items to drop on destruction. * Returns the ID of the items to drop on destruction.
*/ */
public int idDropped(int par1, Random par2Random, int par3) { public int idDropped(int par1, EaglercraftRandom par2Random, int par3) {
return isBlockHeadOfBed(par1) ? 0 : Item.bed.itemID; return isBlockHeadOfBed(par1) ? 0 : Item.bed.itemID;
} }

View File

@ -1,6 +1,6 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockBookshelf extends Block { public class BlockBookshelf extends Block {
public BlockBookshelf(int par1) { public BlockBookshelf(int par1) {
@ -19,14 +19,14 @@ public class BlockBookshelf extends Block {
/** /**
* Returns the quantity of items to drop on block destruction. * Returns the quantity of items to drop on block destruction.
*/ */
public int quantityDropped(Random par1Random) { public int quantityDropped(EaglercraftRandom par1Random) {
return 3; return 3;
} }
/** /**
* Returns the ID of the items to drop on destruction. * Returns the ID of the items to drop on destruction.
*/ */
public int idDropped(int par1, Random par2Random, int par3) { public int idDropped(int par1, EaglercraftRandom par2Random, int par3) {
return Item.book.itemID; return Item.book.itemID;
} }
} }

View File

@ -1,10 +1,11 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.List; import java.util.List;
import java.util.Random;
import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockBrewingStand extends BlockContainer { public class BlockBrewingStand extends BlockContainer {
private Random rand = new Random(); private EaglercraftRandom rand = new EaglercraftRandom();
private Icon theIcon; private Icon theIcon;
public BlockBrewingStand(int par1) { public BlockBrewingStand(int par1) {
@ -82,7 +83,7 @@ public class BlockBrewingStand extends BlockContainer {
* A randomly called display update to be able to add particles or other items * A randomly called display update to be able to add particles or other items
* for display * for display
*/ */
public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random) { public void randomDisplayTick(World par1World, int par2, int par3, int par4, EaglercraftRandom par5Random) {
double var6 = (double) ((float) par2 + 0.4F + par5Random.nextFloat() * 0.2F); double var6 = (double) ((float) par2 + 0.4F + par5Random.nextFloat() * 0.2F);
double var8 = (double) ((float) par3 + 0.7F + par5Random.nextFloat() * 0.3F); double var8 = (double) ((float) par3 + 0.7F + par5Random.nextFloat() * 0.3F);
double var10 = (double) ((float) par4 + 0.4F + par5Random.nextFloat() * 0.2F); double var10 = (double) ((float) par4 + 0.4F + par5Random.nextFloat() * 0.2F);
@ -132,7 +133,7 @@ public class BlockBrewingStand extends BlockContainer {
/** /**
* Returns the ID of the items to drop on destruction. * Returns the ID of the items to drop on destruction.
*/ */
public int idDropped(int par1, Random par2Random, int par3) { public int idDropped(int par1, EaglercraftRandom par2Random, int par3) {
return Item.brewingStand.itemID; return Item.brewingStand.itemID;
} }

View File

@ -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 BlockButton extends Block { public abstract class BlockButton extends Block {
/** Whether this button is sensible to arrows, used by wooden buttons. */ /** Whether this button is sensible to arrows, used by wooden buttons. */

View File

@ -1,6 +1,6 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockCactus extends Block { public class BlockCactus extends Block {
private Icon cactusTopIcon; private Icon cactusTopIcon;
@ -15,7 +15,7 @@ public class BlockCactus extends Block {
/** /**
* Ticks the block if it's been scheduled * Ticks the block if it's been scheduled
*/ */
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) { public void updateTick(World par1World, int par2, int par3, int par4, EaglercraftRandom par5Random) {
if (par1World.isAirBlock(par2, par3 + 1, par4)) { if (par1World.isAirBlock(par2, par3 + 1, par4)) {
int var6; int var6;

View File

@ -1,6 +1,6 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockCake extends Block { public class BlockCake extends Block {
private Icon cakeTopIcon; private Icon cakeTopIcon;
@ -154,14 +154,14 @@ public class BlockCake extends Block {
/** /**
* Returns the quantity of items to drop on block destruction. * Returns the quantity of items to drop on block destruction.
*/ */
public int quantityDropped(Random par1Random) { public int quantityDropped(EaglercraftRandom par1Random) {
return 0; return 0;
} }
/** /**
* Returns the ID of the items to drop on destruction. * Returns the ID of the items to drop on destruction.
*/ */
public int idDropped(int par1, Random par2Random, int par3) { public int idDropped(int par1, EaglercraftRandom par2Random, int par3) {
return 0; return 0;
} }

View File

@ -1,7 +1,8 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.List; import java.util.List;
import java.util.Random;
import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockCauldron extends Block { public class BlockCauldron extends Block {
private Icon field_94378_a; private Icon field_94378_a;
@ -110,7 +111,7 @@ public class BlockCauldron extends Block {
/** /**
* Returns the ID of the items to drop on destruction. * Returns the ID of the items to drop on destruction.
*/ */
public int idDropped(int par1, Random par2Random, int par3) { public int idDropped(int par1, EaglercraftRandom par2Random, int par3) {
return Item.cauldron.itemID; return Item.cauldron.itemID;
} }

View File

@ -1,10 +1,11 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Iterator; import java.util.Iterator;
import java.util.Random;
import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockChest extends BlockContainer { public class BlockChest extends BlockContainer {
private final Random random = new Random(); private final EaglercraftRandom random = new EaglercraftRandom();
/** Determines whether of not the chest is trapped. */ /** Determines whether of not the chest is trapped. */
public final int isTrapped; public final int isTrapped;

View File

@ -1,6 +1,6 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockClay extends Block { public class BlockClay extends Block {
public BlockClay(int par1) { public BlockClay(int par1) {
@ -11,14 +11,14 @@ public class BlockClay extends Block {
/** /**
* Returns the ID of the items to drop on destruction. * Returns the ID of the items to drop on destruction.
*/ */
public int idDropped(int par1, Random par2Random, int par3) { public int idDropped(int par1, EaglercraftRandom par2Random, int par3) {
return Item.clay.itemID; return Item.clay.itemID;
} }
/** /**
* Returns the quantity of items to drop on block destruction. * Returns the quantity of items to drop on block destruction.
*/ */
public int quantityDropped(Random par1Random) { public int quantityDropped(EaglercraftRandom par1Random) {
return 4; return 4;
} }
} }

View File

@ -1,6 +1,6 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockCocoa extends BlockDirectional { public class BlockCocoa extends BlockDirectional {
public static final String[] cocoaIcons = new String[] { "cocoa_0", "cocoa_1", "cocoa_2" }; public static final String[] cocoaIcons = new String[] { "cocoa_0", "cocoa_1", "cocoa_2" };
@ -30,7 +30,7 @@ public class BlockCocoa extends BlockDirectional {
/** /**
* Ticks the block if it's been scheduled * Ticks the block if it's been scheduled
*/ */
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) { public void updateTick(World par1World, int par2, int par3, int par4, EaglercraftRandom par5Random) {
if (!this.canBlockStay(par1World, par2, par3, par4)) { if (!this.canBlockStay(par1World, par2, par3, par4)) {
this.dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0); this.dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0);
par1World.setBlockToAir(par2, par3, par4); par1World.setBlockToAir(par2, par3, par4);

View File

@ -1,6 +1,6 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockCommandBlock extends BlockContainer { public class BlockCommandBlock extends BlockContainer {
public BlockCommandBlock(int par1) { public BlockCommandBlock(int par1) {
@ -18,7 +18,7 @@ public class BlockCommandBlock extends BlockContainer {
/** /**
* Ticks the block if it's been scheduled * Ticks the block if it's been scheduled
*/ */
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) { public void updateTick(World par1World, int par2, int par3, int par4, EaglercraftRandom par5Random) {
TileEntity var6 = par1World.getBlockTileEntity(par2, par3, par4); TileEntity var6 = par1World.getBlockTileEntity(par2, par3, par4);
if (var6 != null && var6 instanceof TileEntityCommandBlock) { if (var6 != null && var6 instanceof TileEntityCommandBlock) {

View File

@ -1,6 +1,6 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockCrops extends BlockFlower { public class BlockCrops extends BlockFlower {
private Icon[] iconArray; private Icon[] iconArray;
@ -27,7 +27,7 @@ public class BlockCrops extends BlockFlower {
/** /**
* Ticks the block if it's been scheduled * Ticks the block if it's been scheduled
*/ */
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) { public void updateTick(World par1World, int par2, int par3, int par4, EaglercraftRandom par5Random) {
super.updateTick(par1World, par2, par3, par4, par5Random); super.updateTick(par1World, par2, par3, par4, par5Random);
if (par1World.getBlockLightValue(par2, par3 + 1, par4) >= 9) { if (par1World.getBlockLightValue(par2, par3 + 1, par4) >= 9) {
@ -141,14 +141,14 @@ public class BlockCrops extends BlockFlower {
/** /**
* Returns the ID of the items to drop on destruction. * Returns the ID of the items to drop on destruction.
*/ */
public int idDropped(int par1, Random par2Random, int par3) { public int idDropped(int par1, EaglercraftRandom par2Random, int par3) {
return par1 == 7 ? this.getCropItem() : this.getSeedItem(); return par1 == 7 ? this.getCropItem() : this.getSeedItem();
} }
/** /**
* Returns the quantity of items to drop on block destruction. * Returns the quantity of items to drop on block destruction.
*/ */
public int quantityDropped(Random par1Random) { public int quantityDropped(EaglercraftRandom par1Random) {
return 1; return 1;
} }

View File

@ -1,8 +1,6 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockDaylightDetector extends BlockContainer { public class BlockDaylightDetector extends BlockContainer {
private Icon[] iconArray = new Icon[2]; private Icon[] iconArray = new Icon[2];
@ -34,7 +32,7 @@ public class BlockDaylightDetector extends BlockContainer {
/** /**
* Ticks the block if it's been scheduled * Ticks the block if it's been scheduled
*/ */
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) { public void updateTick(World par1World, int par2, int par3, int par4, EaglercraftRandom par5Random) {
} }
/** /**

View File

@ -1,6 +1,6 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockDeadBush extends BlockFlower { public class BlockDeadBush extends BlockFlower {
protected BlockDeadBush(int par1) { protected BlockDeadBush(int par1) {
@ -20,7 +20,7 @@ public class BlockDeadBush extends BlockFlower {
/** /**
* Returns the ID of the items to drop on destruction. * Returns the ID of the items to drop on destruction.
*/ */
public int idDropped(int par1, Random par2Random, int par3) { public int idDropped(int par1, EaglercraftRandom par2Random, int par3) {
return -1; return -1;
} }
} }

View File

@ -1,10 +1,10 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockDispenser extends BlockContainer { public class BlockDispenser extends BlockContainer {
/** Registry for all dispense behaviors. */ /** Registry for all dispense behaviors. */
protected Random random = new Random(); protected EaglercraftRandom random = new EaglercraftRandom();
protected Icon furnaceTopIcon; protected Icon furnaceTopIcon;
protected Icon furnaceFrontIcon; protected Icon furnaceFrontIcon;
protected Icon field_96473_e; protected Icon field_96473_e;

View File

@ -1,6 +1,6 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockDoor extends Block { public class BlockDoor extends Block {
private static final String[] doorIconNames = new String[] { "doorWood_lower", "doorWood_upper", "doorIron_lower", "doorIron_upper" }; private static final String[] doorIconNames = new String[] { "doorWood_lower", "doorWood_upper", "doorIron_lower", "doorIron_upper" };
@ -302,7 +302,7 @@ public class BlockDoor extends Block {
/** /**
* Returns the ID of the items to drop on destruction. * Returns the ID of the items to drop on destruction.
*/ */
public int idDropped(int par1, Random par2Random, int par3) { public int idDropped(int par1, EaglercraftRandom par2Random, int par3) {
return (par1 & 8) != 0 ? 0 : (this.blockMaterial == Material.iron ? Item.doorIron.itemID : Item.doorWood.itemID); return (par1 & 8) != 0 ? 0 : (this.blockMaterial == Material.iron ? Item.doorIron.itemID : Item.doorWood.itemID);
} }

View File

@ -1,6 +1,6 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockDragonEgg extends Block { public class BlockDragonEgg extends Block {
public BlockDragonEgg(int par1) { public BlockDragonEgg(int par1) {
@ -27,7 +27,7 @@ public class BlockDragonEgg extends Block {
/** /**
* Ticks the block if it's been scheduled * Ticks the block if it's been scheduled
*/ */
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) { public void updateTick(World par1World, int par2, int par3, int par4, EaglercraftRandom par5Random) {
this.fallIfPossible(par1World, par2, par3, par4); this.fallIfPossible(par1World, par2, par3, par4);
} }

View File

@ -1,7 +1,8 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.List; import java.util.List;
import java.util.Random;
import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockEndPortal extends BlockContainer { public class BlockEndPortal extends BlockContainer {
/** /**
@ -67,7 +68,7 @@ public class BlockEndPortal extends BlockContainer {
/** /**
* Returns the quantity of items to drop on block destruction. * Returns the quantity of items to drop on block destruction.
*/ */
public int quantityDropped(Random par1Random) { public int quantityDropped(EaglercraftRandom par1Random) {
return 0; return 0;
} }
@ -75,7 +76,7 @@ public class BlockEndPortal extends BlockContainer {
* A randomly called display update to be able to add particles or other items * A randomly called display update to be able to add particles or other items
* for display * for display
*/ */
public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random) { public void randomDisplayTick(World par1World, int par2, int par3, int par4, EaglercraftRandom par5Random) {
double var6 = (double) ((float) par2 + par5Random.nextFloat()); double var6 = (double) ((float) par2 + par5Random.nextFloat());
double var8 = (double) ((float) par3 + 0.8F); double var8 = (double) ((float) par3 + 0.8F);
double var10 = (double) ((float) par4 + par5Random.nextFloat()); double var10 = (double) ((float) par4 + par5Random.nextFloat());

View File

@ -1,7 +1,8 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.List; import java.util.List;
import java.util.Random;
import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockEndPortalFrame extends Block { public class BlockEndPortalFrame extends Block {
private Icon field_94400_a; private Icon field_94400_a;
@ -86,7 +87,7 @@ public class BlockEndPortalFrame extends Block {
/** /**
* Returns the ID of the items to drop on destruction. * Returns the ID of the items to drop on destruction.
*/ */
public int idDropped(int par1, Random par2Random, int par3) { public int idDropped(int par1, EaglercraftRandom par2Random, int par3) {
return 0; return 0;
} }

View File

@ -1,6 +1,6 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockEnderChest extends BlockContainer { public class BlockEnderChest extends BlockContainer {
protected BlockEnderChest(int par1) { protected BlockEnderChest(int par1) {
@ -36,14 +36,14 @@ public class BlockEnderChest extends BlockContainer {
/** /**
* Returns the ID of the items to drop on destruction. * Returns the ID of the items to drop on destruction.
*/ */
public int idDropped(int par1, Random par2Random, int par3) { public int idDropped(int par1, EaglercraftRandom par2Random, int par3) {
return Block.obsidian.blockID; return Block.obsidian.blockID;
} }
/** /**
* Returns the quantity of items to drop on block destruction. * Returns the quantity of items to drop on block destruction.
*/ */
public int quantityDropped(Random par1Random) { public int quantityDropped(EaglercraftRandom par1Random) {
return 8; return 8;
} }
@ -100,7 +100,7 @@ public class BlockEnderChest extends BlockContainer {
* A randomly called display update to be able to add particles or other items * A randomly called display update to be able to add particles or other items
* for display * for display
*/ */
public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random) { public void randomDisplayTick(World par1World, int par2, int par3, int par4, EaglercraftRandom par5Random) {
for (int var6 = 0; var6 < 3; ++var6) { for (int var6 = 0; var6 < 3; ++var6) {
double var10000 = (double) ((float) par2 + par5Random.nextFloat()); double var10000 = (double) ((float) par2 + par5Random.nextFloat());
double var9 = (double) ((float) par3 + par5Random.nextFloat()); double var9 = (double) ((float) par3 + par5Random.nextFloat());

View File

@ -1,6 +1,6 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockFire extends Block { public class BlockFire extends Block {
/** The chance this block will encourage nearby blocks to catch on fire */ /** The chance this block will encourage nearby blocks to catch on fire */
@ -87,7 +87,7 @@ public class BlockFire extends Block {
/** /**
* Returns the quantity of items to drop on block destruction. * Returns the quantity of items to drop on block destruction.
*/ */
public int quantityDropped(Random par1Random) { public int quantityDropped(EaglercraftRandom par1Random) {
return 0; return 0;
} }
@ -101,7 +101,7 @@ public class BlockFire extends Block {
/** /**
* Ticks the block if it's been scheduled * Ticks the block if it's been scheduled
*/ */
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) { public void updateTick(World par1World, int par2, int par3, int par4, EaglercraftRandom par5Random) {
if (par1World.getGameRules().getGameRuleBooleanValue("doFireTick")) { if (par1World.getGameRules().getGameRuleBooleanValue("doFireTick")) {
boolean var6 = par1World.getBlockId(par2, par3 - 1, par4) == Block.netherrack.blockID; boolean var6 = par1World.getBlockId(par2, par3 - 1, par4) == Block.netherrack.blockID;
@ -189,7 +189,7 @@ public class BlockFire extends Block {
return false; return false;
} }
private void tryToCatchBlockOnFire(World par1World, int par2, int par3, int par4, int par5, Random par6Random, int par7) { private void tryToCatchBlockOnFire(World par1World, int par2, int par3, int par4, int par5, EaglercraftRandom par6Random, int par7) {
int var8 = this.abilityToCatchFire[par1World.getBlockId(par2, par3, par4)]; int var8 = this.abilityToCatchFire[par1World.getBlockId(par2, par3, par4)];
if (par6Random.nextInt(par5) < var8) { if (par6Random.nextInt(par5) < var8) {
@ -305,7 +305,7 @@ public class BlockFire extends Block {
* A randomly called display update to be able to add particles or other items * A randomly called display update to be able to add particles or other items
* for display * for display
*/ */
public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random) { public void randomDisplayTick(World par1World, int par2, int par3, int par4, EaglercraftRandom par5Random) {
if (par5Random.nextInt(24) == 0) { if (par5Random.nextInt(24) == 0) {
par1World.playSound((double) ((float) par2 + 0.5F), (double) ((float) par3 + 0.5F), (double) ((float) par4 + 0.5F), "fire.fire", 1.0F + par5Random.nextFloat(), par5Random.nextFloat() * 0.7F + 0.3F, false); par1World.playSound((double) ((float) par2 + 0.5F), (double) ((float) par3 + 0.5F), (double) ((float) par4 + 0.5F), "fire.fire", 1.0F + par5Random.nextFloat(), par5Random.nextFloat() * 0.7F + 0.3F, false);
} }

View File

@ -1,6 +1,6 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockFlower extends Block { public class BlockFlower extends Block {
protected BlockFlower(int par1, Material par2Material) { protected BlockFlower(int par1, Material par2Material) {
@ -44,7 +44,7 @@ public class BlockFlower extends Block {
/** /**
* Ticks the block if it's been scheduled * Ticks the block if it's been scheduled
*/ */
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) { public void updateTick(World par1World, int par2, int par3, int par4, EaglercraftRandom par5Random) {
this.checkFlowerChange(par1World, par2, par3, par4); this.checkFlowerChange(par1World, par2, par3, par4);
} }

View File

@ -1,6 +1,6 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockFlowerPot extends Block { public class BlockFlowerPot extends Block {
public BlockFlowerPot(int par1) { public BlockFlowerPot(int par1) {
@ -130,7 +130,7 @@ public class BlockFlowerPot extends Block {
/** /**
* Returns the ID of the items to drop on destruction. * Returns the ID of the items to drop on destruction.
*/ */
public int idDropped(int par1, Random par2Random, int par3) { public int idDropped(int par1, EaglercraftRandom par2Random, int par3) {
return Item.flowerPot.itemID; return Item.flowerPot.itemID;
} }

View File

@ -1,6 +1,6 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockFlowing extends BlockFluid { public class BlockFlowing extends BlockFluid {
/** /**
@ -41,7 +41,7 @@ public class BlockFlowing extends BlockFluid {
/** /**
* Ticks the block if it's been scheduled * Ticks the block if it's been scheduled
*/ */
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) { public void updateTick(World par1World, int par2, int par3, int par4, EaglercraftRandom par5Random) {
int var6 = this.getFlowDecay(par1World, par2, par3, par4); int var6 = this.getFlowDecay(par1World, par2, par3, par4);
byte var7 = 1; byte var7 = 1;

View File

@ -1,8 +1,6 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public abstract class BlockFluid extends Block { public abstract class BlockFluid extends Block {
private Icon[] theIcon; private Icon[] theIcon;
@ -156,14 +154,14 @@ public abstract class BlockFluid extends Block {
/** /**
* Returns the ID of the items to drop on destruction. * Returns the ID of the items to drop on destruction.
*/ */
public int idDropped(int par1, Random par2Random, int par3) { public int idDropped(int par1, EaglercraftRandom par2Random, int par3) {
return 0; return 0;
} }
/** /**
* Returns the quantity of items to drop on block destruction. * Returns the quantity of items to drop on block destruction.
*/ */
public int quantityDropped(Random par1Random) { public int quantityDropped(EaglercraftRandom par1Random) {
return 0; return 0;
} }
@ -310,7 +308,7 @@ public abstract class BlockFluid extends Block {
* A randomly called display update to be able to add particles or other items * A randomly called display update to be able to add particles or other items
* for display * for display
*/ */
public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random) { public void randomDisplayTick(World par1World, int par2, int par3, int par4, EaglercraftRandom par5Random) {
int var6; int var6;
if (this.blockMaterial == Material.water) { if (this.blockMaterial == Material.water) {

View File

@ -1,13 +1,13 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockFurnace extends BlockContainer { public class BlockFurnace extends BlockContainer {
/** /**
* Is the random generator used by furnace to drop the inventory contents in * Is the random generator used by furnace to drop the inventory contents in
* random directions. * random directions.
*/ */
private final Random furnaceRand = new Random(); private final EaglercraftRandom furnaceRand = new EaglercraftRandom();
/** True if this is an active furnace, false if idle */ /** True if this is an active furnace, false if idle */
private final boolean isActive; private final boolean isActive;
@ -29,7 +29,7 @@ public class BlockFurnace extends BlockContainer {
/** /**
* Returns the ID of the items to drop on destruction. * Returns the ID of the items to drop on destruction.
*/ */
public int idDropped(int par1, Random par2Random, int par3) { public int idDropped(int par1, EaglercraftRandom par2Random, int par3) {
return Block.furnaceIdle.blockID; return Block.furnaceIdle.blockID;
} }
@ -70,7 +70,7 @@ public class BlockFurnace extends BlockContainer {
* A randomly called display update to be able to add particles or other items * A randomly called display update to be able to add particles or other items
* for display * for display
*/ */
public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random) { public void randomDisplayTick(World par1World, int par2, int par3, int par4, EaglercraftRandom par5Random) {
if (this.isActive) { if (this.isActive) {
int var6 = par1World.getBlockMetadata(par2, par3, par4); int var6 = par1World.getBlockMetadata(par2, par3, par4);
float var7 = (float) par2 + 0.5F; float var7 = (float) par2 + 0.5F;

View File

@ -1,6 +1,6 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockGlass extends BlockBreakable { public class BlockGlass extends BlockBreakable {
public BlockGlass(int par1, Material par2Material, boolean par3) { public BlockGlass(int par1, Material par2Material, boolean par3) {
@ -11,7 +11,7 @@ public class BlockGlass extends BlockBreakable {
/** /**
* Returns the quantity of items to drop on block destruction. * Returns the quantity of items to drop on block destruction.
*/ */
public int quantityDropped(Random par1Random) { public int quantityDropped(EaglercraftRandom par1Random) {
return 0; return 0;
} }

View File

@ -1,6 +1,6 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockGlowStone extends Block { public class BlockGlowStone extends Block {
public BlockGlowStone(int par1, Material par2Material) { public BlockGlowStone(int par1, Material par2Material) {
@ -12,21 +12,21 @@ public class BlockGlowStone extends Block {
* Returns the usual quantity dropped by the block plus a bonus of 1 to 'i' * Returns the usual quantity dropped by the block plus a bonus of 1 to 'i'
* (inclusive). * (inclusive).
*/ */
public int quantityDroppedWithBonus(int par1, Random par2Random) { public int quantityDroppedWithBonus(int par1, EaglercraftRandom par2Random) {
return MathHelper.clamp_int(this.quantityDropped(par2Random) + par2Random.nextInt(par1 + 1), 1, 4); return MathHelper.clamp_int(this.quantityDropped(par2Random) + par2Random.nextInt(par1 + 1), 1, 4);
} }
/** /**
* Returns the quantity of items to drop on block destruction. * Returns the quantity of items to drop on block destruction.
*/ */
public int quantityDropped(Random par1Random) { public int quantityDropped(EaglercraftRandom par1Random) {
return 2 + par1Random.nextInt(3); return 2 + par1Random.nextInt(3);
} }
/** /**
* Returns the ID of the items to drop on destruction. * Returns the ID of the items to drop on destruction.
*/ */
public int idDropped(int par1, Random par2Random, int par3) { public int idDropped(int par1, EaglercraftRandom par2Random, int par3) {
return Item.lightStoneDust.itemID; return Item.lightStoneDust.itemID;
} }
} }

View File

@ -1,6 +1,6 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockGravel extends BlockSand { public class BlockGravel extends BlockSand {
public BlockGravel(int par1) { public BlockGravel(int par1) {
@ -10,7 +10,7 @@ public class BlockGravel extends BlockSand {
/** /**
* Returns the ID of the items to drop on destruction. * Returns the ID of the items to drop on destruction.
*/ */
public int idDropped(int par1, Random par2Random, int par3) { public int idDropped(int par1, EaglercraftRandom par2Random, int par3) {
if (par3 > 3) { if (par3 > 3) {
par3 = 3; par3 = 3;
} }

View File

@ -1,7 +1,8 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.List; import java.util.List;
import java.util.Random;
import net.lax1dude.eaglercraft.EaglercraftRandom;
public abstract class BlockHalfSlab extends Block { public abstract class BlockHalfSlab extends Block {
protected final boolean isDoubleSlab; protected final boolean isDoubleSlab;
@ -77,7 +78,7 @@ public abstract class BlockHalfSlab extends Block {
/** /**
* Returns the quantity of items to drop on block destruction. * Returns the quantity of items to drop on block destruction.
*/ */
public int quantityDropped(Random par1Random) { public int quantityDropped(EaglercraftRandom par1Random) {
return this.isDoubleSlab ? 2 : 1; return this.isDoubleSlab ? 2 : 1;
} }

View File

@ -1,10 +1,11 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.List; import java.util.List;
import java.util.Random;
import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockHopper extends BlockContainer { public class BlockHopper extends BlockContainer {
private final Random field_94457_a = new Random(); private final EaglercraftRandom field_94457_a = new EaglercraftRandom();
private Icon hopperIcon; private Icon hopperIcon;
private Icon hopperTopIcon; private Icon hopperTopIcon;
private Icon hopperInsideIcon; private Icon hopperInsideIcon;

View File

@ -1,6 +1,6 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockIce extends BlockBreakable { public class BlockIce extends BlockBreakable {
public BlockIce(int par1) { public BlockIce(int par1) {
@ -58,14 +58,14 @@ public class BlockIce extends BlockBreakable {
/** /**
* Returns the quantity of items to drop on block destruction. * Returns the quantity of items to drop on block destruction.
*/ */
public int quantityDropped(Random par1Random) { public int quantityDropped(EaglercraftRandom par1Random) {
return 0; return 0;
} }
/** /**
* Ticks the block if it's been scheduled * Ticks the block if it's been scheduled
*/ */
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) { public void updateTick(World par1World, int par2, int par3, int par4, EaglercraftRandom par5Random) {
if (par1World.getSavedLightValue(EnumSkyBlock.Block, par2, par3, par4) > 11 - Block.lightOpacity[this.blockID]) { if (par1World.getSavedLightValue(EnumSkyBlock.Block, par2, par3, par4) > 11 - Block.lightOpacity[this.blockID]) {
if (par1World.provider.isHellWorld) { if (par1World.provider.isHellWorld) {
par1World.setBlockToAir(par2, par3, par4); par1World.setBlockToAir(par2, par3, par4);

View File

@ -1,6 +1,6 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockLadder extends Block { public class BlockLadder extends Block {
protected BlockLadder(int par1) { protected BlockLadder(int par1) {
@ -150,7 +150,7 @@ public class BlockLadder extends Block {
/** /**
* Returns the quantity of items to drop on block destruction. * Returns the quantity of items to drop on block destruction.
*/ */
public int quantityDropped(Random par1Random) { public int quantityDropped(EaglercraftRandom par1Random) {
return 1; return 1;
} }
} }

View File

@ -1,7 +1,8 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.List; import java.util.List;
import java.util.Random;
import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockLeaves extends BlockLeavesBase { public class BlockLeaves extends BlockLeavesBase {
public static final String[] LEAF_TYPES = new String[] { "oak", "spruce", "birch", "jungle" }; public static final String[] LEAF_TYPES = new String[] { "oak", "spruce", "birch", "jungle" };
@ -94,7 +95,7 @@ public class BlockLeaves extends BlockLeavesBase {
* A randomly called display update to be able to add particles or other items * A randomly called display update to be able to add particles or other items
* for display * for display
*/ */
public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random) { public void randomDisplayTick(World par1World, int par2, int par3, int par4, EaglercraftRandom par5Random) {
if (par1World.canLightningStrikeAt(par2, par3 + 1, par4) && !par1World.doesBlockHaveSolidTopSurface(par2, par3 - 1, par4) && par5Random.nextInt(15) == 1) { if (par1World.canLightningStrikeAt(par2, par3 + 1, par4) && !par1World.doesBlockHaveSolidTopSurface(par2, par3 - 1, par4) && par5Random.nextInt(15) == 1) {
double var6 = (double) ((float) par2 + par5Random.nextFloat()); double var6 = (double) ((float) par2 + par5Random.nextFloat());
double var8 = (double) par3 - 0.05D; double var8 = (double) par3 - 0.05D;
@ -111,14 +112,14 @@ public class BlockLeaves extends BlockLeavesBase {
/** /**
* Returns the quantity of items to drop on block destruction. * Returns the quantity of items to drop on block destruction.
*/ */
public int quantityDropped(Random par1Random) { public int quantityDropped(EaglercraftRandom par1Random) {
return par1Random.nextInt(20) == 0 ? 1 : 0; return par1Random.nextInt(20) == 0 ? 1 : 0;
} }
/** /**
* Returns the ID of the items to drop on destruction. * Returns the ID of the items to drop on destruction.
*/ */
public int idDropped(int par1, Random par2Random, int par3) { public int idDropped(int par1, EaglercraftRandom par2Random, int par3) {
return Block.sapling.blockID; return Block.sapling.blockID;
} }

View File

@ -1,6 +1,6 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockLockedChest extends Block { public class BlockLockedChest extends Block {
protected BlockLockedChest(int par1) { protected BlockLockedChest(int par1) {
@ -18,7 +18,7 @@ public class BlockLockedChest extends Block {
/** /**
* Ticks the block if it's been scheduled * Ticks the block if it's been scheduled
*/ */
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) { public void updateTick(World par1World, int par2, int par3, int par4, EaglercraftRandom par5Random) {
par1World.setBlockToAir(par2, par3, par4); par1World.setBlockToAir(par2, par3, par4);
} }

View File

@ -1,7 +1,8 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.List; import java.util.List;
import java.util.Random;
import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockLog extends Block { public class BlockLog extends Block {
/** The type of tree this log came from. */ /** The type of tree this log came from. */
@ -25,14 +26,14 @@ public class BlockLog extends Block {
/** /**
* Returns the quantity of items to drop on block destruction. * Returns the quantity of items to drop on block destruction.
*/ */
public int quantityDropped(Random par1Random) { public int quantityDropped(EaglercraftRandom par1Random) {
return 1; return 1;
} }
/** /**
* Returns the ID of the items to drop on destruction. * Returns the ID of the items to drop on destruction.
*/ */
public int idDropped(int par1, Random par2Random, int par3) { public int idDropped(int par1, EaglercraftRandom par2Random, int par3) {
return Block.wood.blockID; return Block.wood.blockID;
} }

View File

@ -1,6 +1,6 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockMelon extends Block { public class BlockMelon extends Block {
private Icon theIcon; private Icon theIcon;
@ -21,14 +21,14 @@ public class BlockMelon extends Block {
/** /**
* Returns the ID of the items to drop on destruction. * Returns the ID of the items to drop on destruction.
*/ */
public int idDropped(int par1, Random par2Random, int par3) { public int idDropped(int par1, EaglercraftRandom par2Random, int par3) {
return Item.melon.itemID; return Item.melon.itemID;
} }
/** /**
* Returns the quantity of items to drop on block destruction. * Returns the quantity of items to drop on block destruction.
*/ */
public int quantityDropped(Random par1Random) { public int quantityDropped(EaglercraftRandom par1Random) {
return 3 + par1Random.nextInt(5); return 3 + par1Random.nextInt(5);
} }
@ -36,7 +36,7 @@ public class BlockMelon extends Block {
* Returns the usual quantity dropped by the block plus a bonus of 1 to 'i' * Returns the usual quantity dropped by the block plus a bonus of 1 to 'i'
* (inclusive). * (inclusive).
*/ */
public int quantityDroppedWithBonus(int par1, Random par2Random) { public int quantityDroppedWithBonus(int par1, EaglercraftRandom par2Random) {
int var3 = this.quantityDropped(par2Random) + par2Random.nextInt(1 + par1); int var3 = this.quantityDropped(par2Random) + par2Random.nextInt(1 + par1);
if (var3 > 9) { if (var3 > 9) {

View File

@ -1,6 +1,6 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockMobSpawner extends BlockContainer { public class BlockMobSpawner extends BlockContainer {
protected BlockMobSpawner(int par1) { protected BlockMobSpawner(int par1) {
@ -18,14 +18,14 @@ public class BlockMobSpawner extends BlockContainer {
/** /**
* Returns the ID of the items to drop on destruction. * Returns the ID of the items to drop on destruction.
*/ */
public int idDropped(int par1, Random par2Random, int par3) { public int idDropped(int par1, EaglercraftRandom par2Random, int par3) {
return 0; return 0;
} }
/** /**
* Returns the quantity of items to drop on block destruction. * Returns the quantity of items to drop on block destruction.
*/ */
public int quantityDropped(Random par1Random) { public int quantityDropped(EaglercraftRandom par1Random) {
return 0; return 0;
} }

View File

@ -1,6 +1,6 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockMushroom extends BlockFlower { public class BlockMushroom extends BlockFlower {
private final String field_94374_a; private final String field_94374_a;
@ -16,7 +16,7 @@ public class BlockMushroom extends BlockFlower {
/** /**
* Ticks the block if it's been scheduled * Ticks the block if it's been scheduled
*/ */
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) { public void updateTick(World par1World, int par2, int par3, int par4, EaglercraftRandom par5Random) {
if (par5Random.nextInt(25) == 0) { if (par5Random.nextInt(25) == 0) {
byte var6 = 4; byte var6 = 4;
int var7 = 5; int var7 = 5;

View File

@ -1,6 +1,6 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockMushroomCap extends Block { public class BlockMushroomCap extends Block {
private static final String[] field_94429_a = new String[] { "mushroom_skin_brown", "mushroom_skin_red" }; private static final String[] field_94429_a = new String[] { "mushroom_skin_brown", "mushroom_skin_red" };
@ -33,7 +33,7 @@ public class BlockMushroomCap extends Block {
/** /**
* Returns the quantity of items to drop on block destruction. * Returns the quantity of items to drop on block destruction.
*/ */
public int quantityDropped(Random par1Random) { public int quantityDropped(EaglercraftRandom par1Random) {
int var2 = par1Random.nextInt(10) - 7; int var2 = par1Random.nextInt(10) - 7;
if (var2 < 0) { if (var2 < 0) {
@ -46,7 +46,7 @@ public class BlockMushroomCap extends Block {
/** /**
* Returns the ID of the items to drop on destruction. * Returns the ID of the items to drop on destruction.
*/ */
public int idDropped(int par1, Random par2Random, int par3) { public int idDropped(int par1, EaglercraftRandom par2Random, int par3) {
return Block.mushroomBrown.blockID + this.mushroomType; return Block.mushroomBrown.blockID + this.mushroomType;
} }

View File

@ -1,6 +1,6 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockNetherStalk extends BlockFlower { public class BlockNetherStalk extends BlockFlower {
private static final String[] field_94373_a = new String[] { "netherStalk_0", "netherStalk_1", "netherStalk_2" }; private static final String[] field_94373_a = new String[] { "netherStalk_0", "netherStalk_1", "netherStalk_2" };
@ -33,7 +33,7 @@ public class BlockNetherStalk extends BlockFlower {
/** /**
* Ticks the block if it's been scheduled * Ticks the block if it's been scheduled
*/ */
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) { public void updateTick(World par1World, int par2, int par3, int par4, EaglercraftRandom par5Random) {
int var6 = par1World.getBlockMetadata(par2, par3, par4); int var6 = par1World.getBlockMetadata(par2, par3, par4);
if (var6 < 3 && par5Random.nextInt(10) == 0) { if (var6 < 3 && par5Random.nextInt(10) == 0) {
@ -68,14 +68,14 @@ public class BlockNetherStalk extends BlockFlower {
/** /**
* Returns the ID of the items to drop on destruction. * Returns the ID of the items to drop on destruction.
*/ */
public int idDropped(int par1, Random par2Random, int par3) { public int idDropped(int par1, EaglercraftRandom par2Random, int par3) {
return 0; return 0;
} }
/** /**
* Returns the quantity of items to drop on block destruction. * Returns the quantity of items to drop on block destruction.
*/ */
public int quantityDropped(Random par1Random) { public int quantityDropped(EaglercraftRandom par1Random) {
return 0; return 0;
} }

View File

@ -1,6 +1,6 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockObsidian extends BlockStone { public class BlockObsidian extends BlockStone {
public BlockObsidian(int par1) { public BlockObsidian(int par1) {
@ -10,14 +10,14 @@ public class BlockObsidian extends BlockStone {
/** /**
* Returns the quantity of items to drop on block destruction. * Returns the quantity of items to drop on block destruction.
*/ */
public int quantityDropped(Random par1Random) { public int quantityDropped(EaglercraftRandom par1Random) {
return 1; return 1;
} }
/** /**
* Returns the ID of the items to drop on destruction. * Returns the ID of the items to drop on destruction.
*/ */
public int idDropped(int par1, Random par2Random, int par3) { public int idDropped(int par1, EaglercraftRandom par2Random, int par3) {
return Block.obsidian.blockID; return Block.obsidian.blockID;
} }
} }

View File

@ -1,6 +1,6 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockOre extends Block { public class BlockOre extends Block {
public BlockOre(int par1) { public BlockOre(int par1) {
@ -11,7 +11,7 @@ public class BlockOre extends Block {
/** /**
* Returns the ID of the items to drop on destruction. * Returns the ID of the items to drop on destruction.
*/ */
public int idDropped(int par1, Random par2Random, int par3) { public int idDropped(int par1, EaglercraftRandom par2Random, int par3) {
return this.blockID == Block.oreCoal.blockID ? Item.coal.itemID return this.blockID == Block.oreCoal.blockID ? Item.coal.itemID
: (this.blockID == Block.oreDiamond.blockID ? Item.diamond.itemID : (this.blockID == Block.oreDiamond.blockID ? Item.diamond.itemID
: (this.blockID == Block.oreLapis.blockID ? Item.dyePowder.itemID : (this.blockID == Block.oreLapis.blockID ? Item.dyePowder.itemID
@ -21,7 +21,7 @@ public class BlockOre extends Block {
/** /**
* Returns the quantity of items to drop on block destruction. * Returns the quantity of items to drop on block destruction.
*/ */
public int quantityDropped(Random par1Random) { public int quantityDropped(EaglercraftRandom par1Random) {
return this.blockID == Block.oreLapis.blockID ? 4 + par1Random.nextInt(5) : 1; return this.blockID == Block.oreLapis.blockID ? 4 + par1Random.nextInt(5) : 1;
} }
@ -29,7 +29,7 @@ public class BlockOre extends Block {
* Returns the usual quantity dropped by the block plus a bonus of 1 to 'i' * Returns the usual quantity dropped by the block plus a bonus of 1 to 'i'
* (inclusive). * (inclusive).
*/ */
public int quantityDroppedWithBonus(int par1, Random par2Random) { public int quantityDroppedWithBonus(int par1, EaglercraftRandom par2Random) {
if (par1 > 0 && this.blockID != this.idDropped(0, par2Random, par1)) { if (par1 > 0 && this.blockID != this.idDropped(0, par2Random, par1)) {
int var3 = par2Random.nextInt(par1 + 2) - 1; int var3 = par2Random.nextInt(par1 + 2) - 1;

View File

@ -1,7 +1,8 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.List; import java.util.List;
import java.util.Random;
import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockPistonExtension extends Block { public class BlockPistonExtension extends Block {
/** The texture for the 'head' of the piston. Sticky or normal. */ /** The texture for the 'head' of the piston. Sticky or normal. */
@ -104,7 +105,7 @@ public class BlockPistonExtension extends Block {
/** /**
* Returns the quantity of items to drop on block destruction. * Returns the quantity of items to drop on block destruction.
*/ */
public int quantityDropped(Random par1Random) { public int quantityDropped(EaglercraftRandom par1Random) {
return 0; return 0;
} }

View File

@ -1,6 +1,6 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockPistonMoving extends BlockContainer { public class BlockPistonMoving extends BlockContainer {
public BlockPistonMoving(int par1) { public BlockPistonMoving(int par1) {
@ -86,7 +86,7 @@ public class BlockPistonMoving extends BlockContainer {
/** /**
* Returns the ID of the items to drop on destruction. * Returns the ID of the items to drop on destruction.
*/ */
public int idDropped(int par1, Random par2Random, int par3) { public int idDropped(int par1, EaglercraftRandom par2Random, int par3) {
return 0; return 0;
} }

View File

@ -1,6 +1,6 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public abstract class BlockRailBase extends Block { public abstract class BlockRailBase extends Block {
/** Power related rails have this field at true. */ /** Power related rails have this field at true. */
@ -93,7 +93,7 @@ public abstract class BlockRailBase extends Block {
/** /**
* Returns the quantity of items to drop on block destruction. * Returns the quantity of items to drop on block destruction.
*/ */
public int quantityDropped(Random par1Random) { public int quantityDropped(EaglercraftRandom par1Random) {
return 1; return 1;
} }

View File

@ -1,6 +1,6 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockRedstoneLight extends Block { public class BlockRedstoneLight extends Block {
/** Whether this lamp block is the powered version. */ /** Whether this lamp block is the powered version. */
@ -31,7 +31,7 @@ public class BlockRedstoneLight extends Block {
/** /**
* Returns the ID of the items to drop on destruction. * Returns the ID of the items to drop on destruction.
*/ */
public int idDropped(int par1, Random par2Random, int par3) { public int idDropped(int par1, EaglercraftRandom par2Random, int par3) {
return Block.redstoneLampIdle.blockID; return Block.redstoneLampIdle.blockID;
} }

View File

@ -1,8 +1,6 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public abstract class BlockRedstoneLogic extends BlockDirectional { public abstract class BlockRedstoneLogic extends BlockDirectional {
/** Tells whether the repeater is powered or not */ /** Tells whether the repeater is powered or not */
@ -41,7 +39,7 @@ public abstract class BlockRedstoneLogic extends BlockDirectional {
/** /**
* Ticks the block if it's been scheduled * Ticks the block if it's been scheduled
*/ */
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) { public void updateTick(World par1World, int par2, int par3, int par4, EaglercraftRandom par5Random) {
int var6 = par1World.getBlockMetadata(par2, par3, par4); int var6 = par1World.getBlockMetadata(par2, par3, par4);
if (!this.func_94476_e(par1World, par2, par3, par4, var6)) { if (!this.func_94476_e(par1World, par2, par3, par4, var6)) {

View File

@ -1,7 +1,5 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random;
import net.lax1dude.eaglercraft.EaglercraftRandom; import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockRedstoneOre extends Block { public class BlockRedstoneOre extends Block {
@ -63,7 +61,7 @@ public class BlockRedstoneOre extends Block {
/** /**
* Ticks the block if it's been scheduled * Ticks the block if it's been scheduled
*/ */
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) { public void updateTick(World par1World, int par2, int par3, int par4, EaglercraftRandom par5Random) {
if (this.blockID == Block.oreRedstoneGlowing.blockID) { if (this.blockID == Block.oreRedstoneGlowing.blockID) {
par1World.setBlock(par2, par3, par4, Block.oreRedstone.blockID); par1World.setBlock(par2, par3, par4, Block.oreRedstone.blockID);
} }
@ -72,7 +70,7 @@ public class BlockRedstoneOre extends Block {
/** /**
* Returns the ID of the items to drop on destruction. * Returns the ID of the items to drop on destruction.
*/ */
public int idDropped(int par1, Random par2Random, int par3) { public int idDropped(int par1, EaglercraftRandom par2Random, int par3) {
return Item.redstone.itemID; return Item.redstone.itemID;
} }
@ -80,14 +78,14 @@ public class BlockRedstoneOre extends Block {
* Returns the usual quantity dropped by the block plus a bonus of 1 to 'i' * Returns the usual quantity dropped by the block plus a bonus of 1 to 'i'
* (inclusive). * (inclusive).
*/ */
public int quantityDroppedWithBonus(int par1, Random par2Random) { public int quantityDroppedWithBonus(int par1, EaglercraftRandom par2Random) {
return this.quantityDropped(par2Random) + par2Random.nextInt(par1 + 1); return this.quantityDropped(par2Random) + par2Random.nextInt(par1 + 1);
} }
/** /**
* Returns the quantity of items to drop on block destruction. * Returns the quantity of items to drop on block destruction.
*/ */
public int quantityDropped(Random par1Random) { public int quantityDropped(EaglercraftRandom par1Random) {
return 4 + par1Random.nextInt(2); return 4 + par1Random.nextInt(2);
} }
@ -107,7 +105,7 @@ public class BlockRedstoneOre extends Block {
* A randomly called display update to be able to add particles or other items * A randomly called display update to be able to add particles or other items
* for display * for display
*/ */
public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random) { public void randomDisplayTick(World par1World, int par2, int par3, int par4, EaglercraftRandom par5Random) {
if (this.glowing) { if (this.glowing) {
this.sparkle(par1World, par2, par3, par4); this.sparkle(par1World, par2, par3, par4);
} }

View File

@ -1,6 +1,6 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockRedstoneRepeater extends BlockRedstoneLogic { public class BlockRedstoneRepeater extends BlockRedstoneLogic {
/** The offsets for the two torches in redstone repeater blocks. */ /** The offsets for the two torches in redstone repeater blocks. */
@ -39,7 +39,7 @@ public class BlockRedstoneRepeater extends BlockRedstoneLogic {
/** /**
* Returns the ID of the items to drop on destruction. * Returns the ID of the items to drop on destruction.
*/ */
public int idDropped(int par1, Random par2Random, int par3) { public int idDropped(int par1, EaglercraftRandom par2Random, int par3) {
return Item.redstoneRepeater.itemID; return Item.redstoneRepeater.itemID;
} }
@ -70,7 +70,7 @@ public class BlockRedstoneRepeater extends BlockRedstoneLogic {
* A randomly called display update to be able to add particles or other items * A randomly called display update to be able to add particles or other items
* for display * for display
*/ */
public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random) { public void randomDisplayTick(World par1World, int par2, int par3, int par4, EaglercraftRandom par5Random) {
if (this.isRepeaterPowered) { if (this.isRepeaterPowered) {
int var6 = par1World.getBlockMetadata(par2, par3, par4); int var6 = par1World.getBlockMetadata(par2, par3, par4);
int var7 = getDirection(var6); int var7 = getDirection(var6);

View File

@ -4,7 +4,8 @@ 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;
import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockRedstoneTorch extends BlockTorch { public class BlockRedstoneTorch extends BlockTorch {
/** Whether the redstone torch is currently active or not. */ /** Whether the redstone torch is currently active or not. */
@ -119,7 +120,7 @@ public class BlockRedstoneTorch extends BlockTorch {
/** /**
* Ticks the block if it's been scheduled * Ticks the block if it's been scheduled
*/ */
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) { public void updateTick(World par1World, int par2, int par3, int par4, EaglercraftRandom par5Random) {
boolean var6 = this.isIndirectlyPowered(par1World, par2, par3, par4); boolean var6 = this.isIndirectlyPowered(par1World, par2, par3, par4);
List var7 = (List) redstoneUpdateInfoCache.get(par1World); List var7 = (List) redstoneUpdateInfoCache.get(par1World);
@ -174,7 +175,7 @@ public class BlockRedstoneTorch extends BlockTorch {
/** /**
* Returns the ID of the items to drop on destruction. * Returns the ID of the items to drop on destruction.
*/ */
public int idDropped(int par1, Random par2Random, int par3) { public int idDropped(int par1, EaglercraftRandom par2Random, int par3) {
return Block.torchRedstoneActive.blockID; return Block.torchRedstoneActive.blockID;
} }
@ -190,7 +191,7 @@ public class BlockRedstoneTorch extends BlockTorch {
* A randomly called display update to be able to add particles or other items * A randomly called display update to be able to add particles or other items
* for display * for display
*/ */
public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random) { public void randomDisplayTick(World par1World, int par2, int par3, int par4, EaglercraftRandom par5Random) {
if (this.torchActive) { if (this.torchActive) {
int var6 = par1World.getBlockMetadata(par2, par3, par4); int var6 = par1World.getBlockMetadata(par2, par3, par4);
double var7 = (double) ((float) par2 + 0.5F) + (double) (par5Random.nextFloat() - 0.5F) * 0.2D; double var7 = (double) ((float) par2 + 0.5F) + (double) (par5Random.nextFloat() - 0.5F) * 0.2D;

View File

@ -2,9 +2,10 @@ 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;
import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockRedstoneWire extends Block { public class BlockRedstoneWire extends Block {
/** /**
* When false, power transmission methods do not look at other redstone wires. * When false, power transmission methods do not look at other redstone wires.
@ -173,7 +174,7 @@ public class BlockRedstoneWire extends Block {
/** /**
* Returns the ID of the items to drop on destruction. * Returns the ID of the items to drop on destruction.
*/ */
public int idDropped(int par1, Random par2Random, int par3) { public int idDropped(int par1, EaglercraftRandom par2Random, int par3) {
return Item.redstone.itemID; return Item.redstone.itemID;
} }
@ -245,7 +246,7 @@ public class BlockRedstoneWire extends Block {
* A randomly called display update to be able to add particles or other items * A randomly called display update to be able to add particles or other items
* for display * for display
*/ */
public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random) { public void randomDisplayTick(World par1World, int par2, int par3, int par4, EaglercraftRandom par5Random) {
int var6 = par1World.getBlockMetadata(par2, par3, par4); int var6 = par1World.getBlockMetadata(par2, par3, par4);
if (var6 > 0) { if (var6 > 0) {

View File

@ -1,6 +1,6 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockReed extends Block { public class BlockReed extends Block {
protected BlockReed(int par1) { protected BlockReed(int par1) {
@ -13,7 +13,7 @@ public class BlockReed extends Block {
/** /**
* Ticks the block if it's been scheduled * Ticks the block if it's been scheduled
*/ */
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) { public void updateTick(World par1World, int par2, int par3, int par4, EaglercraftRandom par5Random) {
if (par1World.isAirBlock(par2, par3 + 1, par4)) { if (par1World.isAirBlock(par2, par3 + 1, par4)) {
int var6; int var6;
@ -86,7 +86,7 @@ public class BlockReed extends Block {
/** /**
* Returns the ID of the items to drop on destruction. * Returns the ID of the items to drop on destruction.
*/ */
public int idDropped(int par1, Random par2Random, int par3) { public int idDropped(int par1, EaglercraftRandom par2Random, int par3) {
return Item.reed.itemID; return Item.reed.itemID;
} }

View File

@ -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 {
/** Do blocks fall instantly to where they stop or do they fall over time */ /** Do blocks fall instantly to where they stop or do they fall over time */
public static boolean fallInstantly = false; public static boolean fallInstantly = false;

View File

@ -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 BlockSapling extends BlockFlower { public class BlockSapling extends BlockFlower {
public static final String[] WOOD_TYPES = new String[] { "oak", "spruce", "birch", "jungle" }; public static final String[] WOOD_TYPES = new String[] { "oak", "spruce", "birch", "jungle" };

View File

@ -1,6 +1,6 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockSign extends BlockContainer { public class BlockSign extends BlockContainer {
private Class signEntityClass; private Class signEntityClass;
@ -115,7 +115,7 @@ public class BlockSign extends BlockContainer {
/** /**
* Returns the ID of the items to drop on destruction. * Returns the ID of the items to drop on destruction.
*/ */
public int idDropped(int par1, Random par2Random, int par3) { public int idDropped(int par1, EaglercraftRandom par2Random, int par3) {
return Item.sign.itemID; return Item.sign.itemID;
} }

View File

@ -1,7 +1,8 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.List; import java.util.List;
import java.util.Random;
import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockSilverfish extends Block { public class BlockSilverfish extends Block {
/** Block names that can be a silverfish stone. */ /** Block names that can be a silverfish stone. */
@ -32,7 +33,7 @@ public class BlockSilverfish extends Block {
/** /**
* Returns the quantity of items to drop on block destruction. * Returns the quantity of items to drop on block destruction.
*/ */
public int quantityDropped(Random par1Random) { public int quantityDropped(EaglercraftRandom par1Random) {
return 0; return 0;
} }

View File

@ -1,6 +1,6 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockSkull extends BlockContainer { public class BlockSkull extends BlockContainer {
protected BlockSkull(int par1) { protected BlockSkull(int par1) {
@ -137,7 +137,7 @@ public class BlockSkull extends BlockContainer {
/** /**
* Returns the ID of the items to drop on destruction. * Returns the ID of the items to drop on destruction.
*/ */
public int idDropped(int par1, Random par2Random, int par3) { public int idDropped(int par1, EaglercraftRandom par2Random, int par3) {
return Item.skull.itemID; return Item.skull.itemID;
} }

View File

@ -1,6 +1,6 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockSnow extends Block { public class BlockSnow extends Block {
protected BlockSnow(int par1) { protected BlockSnow(int par1) {
@ -118,21 +118,21 @@ public class BlockSnow extends Block {
/** /**
* Returns the ID of the items to drop on destruction. * Returns the ID of the items to drop on destruction.
*/ */
public int idDropped(int par1, Random par2Random, int par3) { public int idDropped(int par1, EaglercraftRandom par2Random, int par3) {
return Item.snowball.itemID; return Item.snowball.itemID;
} }
/** /**
* Returns the quantity of items to drop on block destruction. * Returns the quantity of items to drop on block destruction.
*/ */
public int quantityDropped(Random par1Random) { public int quantityDropped(EaglercraftRandom par1Random) {
return 0; return 0;
} }
/** /**
* Ticks the block if it's been scheduled * Ticks the block if it's been scheduled
*/ */
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) { public void updateTick(World par1World, int par2, int par3, int par4, EaglercraftRandom par5Random) {
if (par1World.getSavedLightValue(EnumSkyBlock.Block, par2, par3, par4) > 11) { if (par1World.getSavedLightValue(EnumSkyBlock.Block, par2, par3, par4) > 11) {
this.dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0); this.dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0);
par1World.setBlockToAir(par2, par3, par4); par1World.setBlockToAir(par2, par3, par4);

View File

@ -1,6 +1,6 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockSnowBlock extends Block { public class BlockSnowBlock extends Block {
protected BlockSnowBlock(int par1) { protected BlockSnowBlock(int par1) {
@ -12,21 +12,21 @@ public class BlockSnowBlock extends Block {
/** /**
* Returns the ID of the items to drop on destruction. * Returns the ID of the items to drop on destruction.
*/ */
public int idDropped(int par1, Random par2Random, int par3) { public int idDropped(int par1, EaglercraftRandom par2Random, int par3) {
return Item.snowball.itemID; return Item.snowball.itemID;
} }
/** /**
* Returns the quantity of items to drop on block destruction. * Returns the quantity of items to drop on block destruction.
*/ */
public int quantityDropped(Random par1Random) { public int quantityDropped(EaglercraftRandom par1Random) {
return 4; return 4;
} }
/** /**
* Ticks the block if it's been scheduled * Ticks the block if it's been scheduled
*/ */
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) { public void updateTick(World par1World, int par2, int par3, int par4, EaglercraftRandom par5Random) {
if (par1World.getSavedLightValue(EnumSkyBlock.Block, par2, par3, par4) > 11) { if (par1World.getSavedLightValue(EnumSkyBlock.Block, par2, par3, par4) > 11) {
this.dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0); this.dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0);
par1World.setBlockToAir(par2, par3, par4); par1World.setBlockToAir(par2, par3, par4);

View File

@ -1,6 +1,6 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockStationary extends BlockFluid { public class BlockStationary extends BlockFluid {
protected BlockStationary(int par1, Material par2Material) { protected BlockStationary(int par1, Material par2Material) {
@ -41,7 +41,7 @@ public class BlockStationary extends BlockFluid {
/** /**
* Ticks the block if it's been scheduled * Ticks the block if it's been scheduled
*/ */
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) { public void updateTick(World par1World, int par2, int par3, int par4, EaglercraftRandom par5Random) {
if (this.blockMaterial == Material.lava) { if (this.blockMaterial == Material.lava) {
int var6 = par5Random.nextInt(3); int var6 = par5Random.nextInt(3);
int var7; int var7;

View File

@ -1,6 +1,6 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockStem extends BlockFlower { public class BlockStem extends BlockFlower {
/** Defines if it is a Melon or a Pumpkin that the stem is producing. */ /** Defines if it is a Melon or a Pumpkin that the stem is producing. */
@ -27,7 +27,7 @@ public class BlockStem extends BlockFlower {
/** /**
* Ticks the block if it's been scheduled * Ticks the block if it's been scheduled
*/ */
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) { public void updateTick(World par1World, int par2, int par3, int par4, EaglercraftRandom par5Random) {
super.updateTick(par1World, par2, par3, par4, par5Random); super.updateTick(par1World, par2, par3, par4, par5Random);
if (par1World.getBlockLightValue(par2, par3 + 1, par4) >= 9) { if (par1World.getBlockLightValue(par2, par3 + 1, par4) >= 9) {
@ -195,14 +195,14 @@ public class BlockStem extends BlockFlower {
/** /**
* Returns the ID of the items to drop on destruction. * Returns the ID of the items to drop on destruction.
*/ */
public int idDropped(int par1, Random par2Random, int par3) { public int idDropped(int par1, EaglercraftRandom par2Random, int par3) {
return -1; return -1;
} }
/** /**
* Returns the quantity of items to drop on block destruction. * Returns the quantity of items to drop on block destruction.
*/ */
public int quantityDropped(Random par1Random) { public int quantityDropped(EaglercraftRandom par1Random) {
return 1; return 1;
} }

View File

@ -1,7 +1,8 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.List; import java.util.List;
import java.util.Random;
import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockStep extends BlockHalfSlab { public class BlockStep extends BlockHalfSlab {
/** The list of the types of step blocks. */ /** The list of the types of step blocks. */
@ -46,7 +47,7 @@ public class BlockStep extends BlockHalfSlab {
/** /**
* Returns the ID of the items to drop on destruction. * Returns the ID of the items to drop on destruction.
*/ */
public int idDropped(int par1, Random par2Random, int par3) { public int idDropped(int par1, EaglercraftRandom par2Random, int par3) {
return Block.stoneSingleSlab.blockID; return Block.stoneSingleSlab.blockID;
} }

View File

@ -1,6 +1,6 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockStone extends Block { public class BlockStone extends Block {
public BlockStone(int par1) { public BlockStone(int par1) {
@ -11,7 +11,7 @@ public class BlockStone extends Block {
/** /**
* Returns the ID of the items to drop on destruction. * Returns the ID of the items to drop on destruction.
*/ */
public int idDropped(int par1, Random par2Random, int par3) { public int idDropped(int par1, EaglercraftRandom par2Random, int par3) {
return Block.cobblestone.blockID; return Block.cobblestone.blockID;
} }
} }

View File

@ -1,6 +1,6 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockTNT extends Block { public class BlockTNT extends Block {
private Icon field_94393_a; private Icon field_94393_a;
@ -46,7 +46,7 @@ public class BlockTNT extends Block {
/** /**
* Returns the quantity of items to drop on block destruction. * Returns the quantity of items to drop on block destruction.
*/ */
public int quantityDropped(Random par1Random) { public int quantityDropped(EaglercraftRandom par1Random) {
return 1; return 1;
} }

View File

@ -1,7 +1,8 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.List; import java.util.List;
import java.util.Random;
import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockTallGrass extends BlockFlower { public class BlockTallGrass extends BlockFlower {
private static final String[] grassTypes = new String[] { "deadbush", "tallgrass", "fern" }; private static final String[] grassTypes = new String[] { "deadbush", "tallgrass", "fern" };
@ -59,7 +60,7 @@ public class BlockTallGrass extends BlockFlower {
/** /**
* Returns the ID of the items to drop on destruction. * Returns the ID of the items to drop on destruction.
*/ */
public int idDropped(int par1, Random par2Random, int par3) { public int idDropped(int par1, EaglercraftRandom par2Random, int par3) {
return par2Random.nextInt(8) == 0 ? Item.seeds.itemID : -1; return par2Random.nextInt(8) == 0 ? Item.seeds.itemID : -1;
} }
@ -67,7 +68,7 @@ public class BlockTallGrass extends BlockFlower {
* Returns the usual quantity dropped by the block plus a bonus of 1 to 'i' * Returns the usual quantity dropped by the block plus a bonus of 1 to 'i'
* (inclusive). * (inclusive).
*/ */
public int quantityDroppedWithBonus(int par1, Random par2Random) { public int quantityDroppedWithBonus(int par1, EaglercraftRandom par2Random) {
return 1 + par2Random.nextInt(par1 * 2 + 1); return 1 + par2Random.nextInt(par1 * 2 + 1);
} }

View File

@ -2,7 +2,8 @@ package net.minecraft.src;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Random;
import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockTripWire extends Block { public class BlockTripWire extends Block {
public BlockTripWire(int par1) { public BlockTripWire(int par1) {
@ -61,7 +62,7 @@ public class BlockTripWire extends Block {
/** /**
* Returns the ID of the items to drop on destruction. * Returns the ID of the items to drop on destruction.
*/ */
public int idDropped(int par1, Random par2Random, int par3) { public int idDropped(int par1, EaglercraftRandom par2Random, int par3) {
return Item.silk.itemID; return Item.silk.itemID;
} }

View File

@ -1,6 +1,6 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockTripWireSource extends Block { public class BlockTripWireSource extends Block {
public BlockTripWireSource(int par1) { public BlockTripWireSource(int par1) {
@ -232,7 +232,7 @@ public class BlockTripWireSource extends Block {
/** /**
* Ticks the block if it's been scheduled * Ticks the block if it's been scheduled
*/ */
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) { public void updateTick(World par1World, int par2, int par3, int par4, EaglercraftRandom par5Random) {
this.func_72143_a(par1World, par2, par3, par4, this.blockID, par1World.getBlockMetadata(par2, par3, par4), true, -1, 0); this.func_72143_a(par1World, par2, par3, par4, this.blockID, par1World.getBlockMetadata(par2, par3, par4), true, -1, 0);
} }

View File

@ -1,8 +1,6 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockVine extends Block { public class BlockVine extends Block {
public BlockVine(int par1) { public BlockVine(int par1) {
@ -241,14 +239,14 @@ public class BlockVine extends Block {
/** /**
* Returns the ID of the items to drop on destruction. * Returns the ID of the items to drop on destruction.
*/ */
public int idDropped(int par1, Random par2Random, int par3) { public int idDropped(int par1, EaglercraftRandom par2Random, int par3) {
return 0; return 0;
} }
/** /**
* Returns the quantity of items to drop on block destruction. * Returns the quantity of items to drop on block destruction.
*/ */
public int quantityDropped(Random par1Random) { public int quantityDropped(EaglercraftRandom par1Random) {
return 0; return 0;
} }
} }

View File

@ -1,6 +1,6 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockWeb extends Block { public class BlockWeb extends Block {
public BlockWeb(int par1) { public BlockWeb(int par1) {
@ -51,7 +51,7 @@ public class BlockWeb extends Block {
/** /**
* Returns the ID of the items to drop on destruction. * Returns the ID of the items to drop on destruction.
*/ */
public int idDropped(int par1, Random par2Random, int par3) { public int idDropped(int par1, EaglercraftRandom par2Random, int par3) {
return Item.silk.itemID; return Item.silk.itemID;
} }

View File

@ -1,7 +1,8 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.List; import java.util.List;
import java.util.Random;
import net.lax1dude.eaglercraft.EaglercraftRandom;
public class BlockWoodSlab extends BlockHalfSlab { public class BlockWoodSlab extends BlockHalfSlab {
/** The type of tree this slab came from. */ /** The type of tree this slab came from. */
@ -23,7 +24,7 @@ public class BlockWoodSlab extends BlockHalfSlab {
/** /**
* Returns the ID of the items to drop on destruction. * Returns the ID of the items to drop on destruction.
*/ */
public int idDropped(int par1, Random par2Random, int par3) { public int idDropped(int par1, EaglercraftRandom par2Random, int par3) {
return Block.woodSingleSlab.blockID; return Block.woodSingleSlab.blockID;
} }

View File

@ -6,9 +6,8 @@ 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;
import net.lax1dude.eaglercraft.EaglercraftRandom;
public class Chunk { public class Chunk {
/** /**
@ -926,8 +925,8 @@ public class Chunk {
return this.isModified; return this.isModified;
} }
public Random getRandomWithSeed(long par1) { public EaglercraftRandom getRandomWithSeed(long par1) {
return new Random(this.worldObj.getSeed() + (long) (this.xPosition * this.xPosition * 4987142) + (long) (this.xPosition * 5947611) + (long) (this.zPosition * this.zPosition) * 4392871L + (long) (this.zPosition * 389711) ^ par1); return new EaglercraftRandom(this.worldObj.getSeed() + (long) (this.xPosition * this.xPosition * 4987142) + (long) (this.xPosition * 5947611) + (long) (this.zPosition * this.zPosition) * 4392871L + (long) (this.zPosition * 389711) ^ par1);
} }
public boolean isEmpty() { public boolean isEmpty() {

View File

@ -2,9 +2,9 @@ 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.lax1dude.eaglercraft.EaglerAdapter; import net.lax1dude.eaglercraft.EaglerAdapter;
import net.lax1dude.eaglercraft.EaglercraftRandom;
import net.lax1dude.eaglercraft.TextureLocation; import net.lax1dude.eaglercraft.TextureLocation;
import net.lax1dude.eaglercraft.adapter.Tessellator; import net.lax1dude.eaglercraft.adapter.Tessellator;
@ -15,7 +15,7 @@ public class EffectRenderer {
private RenderEngine renderer; private RenderEngine renderer;
/** RNG. */ /** RNG. */
private Random rand = new Random(); private EaglercraftRandom rand = new EaglercraftRandom();
public EffectRenderer(World par1World, RenderEngine par2RenderEngine) { public EffectRenderer(World par1World, RenderEngine par2RenderEngine) {
if (par1World != null) { if (par1World != null) {

View File

@ -1,7 +1,8 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.List; import java.util.List;
import java.util.Random;
import net.lax1dude.eaglercraft.EaglercraftRandom;
public class EmptyChunk extends Chunk { public class EmptyChunk extends Chunk {
public EmptyChunk(World par1World, int par2, int par3) { public EmptyChunk(World par1World, int par2, int par3) {
@ -179,8 +180,8 @@ public class EmptyChunk extends Chunk {
return false; return false;
} }
public Random getRandomWithSeed(long par1) { public EaglercraftRandom getRandomWithSeed(long par1) {
return new Random(this.worldObj.getSeed() + (long) (this.xPosition * this.xPosition * 4987142) + (long) (this.xPosition * 5947611) + (long) (this.zPosition * this.zPosition) * 4392871L + (long) (this.zPosition * 389711) ^ par1); return new EaglercraftRandom(this.worldObj.getSeed() + (long) (this.xPosition * this.xPosition * 4987142) + (long) (this.xPosition * 5947611) + (long) (this.zPosition * this.zPosition) * 4392871L + (long) (this.zPosition * 389711) ^ par1);
} }
public boolean isEmpty() { public boolean isEmpty() {

View File

@ -6,9 +6,8 @@ import java.util.HashSet;
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;
import net.lax1dude.eaglercraft.EaglercraftRandom;
public class Explosion { public class Explosion {
/** whether or not the explosion sets fire to blocks around it */ /** whether or not the explosion sets fire to blocks around it */
@ -17,7 +16,7 @@ public class Explosion {
/** whether or not this explosion spawns smoke particles */ /** whether or not this explosion spawns smoke particles */
public boolean isSmoking = true; public boolean isSmoking = true;
private int field_77289_h = 16; private int field_77289_h = 16;
private Random explosionRNG = new Random(); private EaglercraftRandom explosionRNG = new EaglercraftRandom();
private World worldObj; private World worldObj;
public double explosionX; public double explosionX;
public double explosionY; public double explosionY;

View File

@ -1,14 +1,13 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random;
import net.lax1dude.eaglercraft.EaglerAdapter; import net.lax1dude.eaglercraft.EaglerAdapter;
import net.lax1dude.eaglercraft.EaglercraftRandom;
import net.lax1dude.eaglercraft.TextureLocation; import net.lax1dude.eaglercraft.TextureLocation;
public class GuiEnchantment extends GuiContainer { public class GuiEnchantment extends GuiContainer {
/** The book model used on the GUI. */ /** The book model used on the GUI. */
private static ModelBook bookModel = new ModelBook(); private static ModelBook bookModel = new ModelBook();
private Random rand = new Random(); private EaglercraftRandom rand = new EaglercraftRandom();
/** ContainerEnchantment object associated with this gui */ /** ContainerEnchantment object associated with this gui */
private ContainerEnchantment containerEnchantment; private ContainerEnchantment containerEnchantment;

View File

@ -3,21 +3,18 @@ package net.minecraft.src;
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 net.lax1dude.eaglercraft.ConfigConstants; import net.lax1dude.eaglercraft.ConfigConstants;
import net.lax1dude.eaglercraft.EaglerAdapter; import net.lax1dude.eaglercraft.EaglerAdapter;
import net.lax1dude.eaglercraft.EaglerImage; import net.lax1dude.eaglercraft.EaglercraftRandom;
import net.lax1dude.eaglercraft.GuiScreenEditProfile; import net.lax1dude.eaglercraft.GuiScreenEditProfile;
import net.lax1dude.eaglercraft.GuiScreenVoiceChannel;
import net.lax1dude.eaglercraft.LocalStorageManager; import net.lax1dude.eaglercraft.LocalStorageManager;
import net.lax1dude.eaglercraft.TextureLocation; import net.lax1dude.eaglercraft.TextureLocation;
import net.lax1dude.eaglercraft.adapter.Tessellator; import net.lax1dude.eaglercraft.adapter.Tessellator;
public class GuiMainMenu extends GuiScreen { public class GuiMainMenu extends GuiScreen {
/** The RNG used by the Main Menu Screen. */ /** The RNG used by the Main Menu Screen. */
private static final Random rand = new Random(); private static final EaglercraftRandom rand = new EaglercraftRandom();
/** The splash message. */ /** The splash message. */
private String splashText = "missingno"; private String splashText = "missingno";

View File

@ -58,14 +58,14 @@ public class GuiScreen extends Gui {
* Returns a string stored in the system clipboard. * Returns a string stored in the system clipboard.
*/ */
public static String getClipboardString() { public static String getClipboardString() {
return ""; return EaglerAdapter.getClipboard();
} }
/** /**
* store a string in the system clipboard * store a string in the system clipboard
*/ */
public static void setClipboardString(String par0Str) { public static void setClipboardString(String par0Str) {
EaglerAdapter.setClipboard(par0Str);
} }
/** /**

View File

@ -2,10 +2,10 @@ 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.lax1dude.eaglercraft.EaglerAdapter; import net.lax1dude.eaglercraft.EaglerAdapter;
import net.lax1dude.eaglercraft.EaglerProfile; import net.lax1dude.eaglercraft.EaglerProfile;
import net.lax1dude.eaglercraft.EaglercraftRandom;
import net.lax1dude.eaglercraft.TextureLocation; import net.lax1dude.eaglercraft.TextureLocation;
import net.lax1dude.eaglercraft.adapter.Tessellator; import net.lax1dude.eaglercraft.adapter.Tessellator;
@ -67,7 +67,7 @@ public class GuiWinGame extends GuiScreen {
String var1 = ""; String var1 = "";
String var2 = "" + EnumChatFormatting.WHITE + EnumChatFormatting.OBFUSCATED + EnumChatFormatting.GREEN + EnumChatFormatting.AQUA; String var2 = "" + EnumChatFormatting.WHITE + EnumChatFormatting.OBFUSCATED + EnumChatFormatting.GREEN + EnumChatFormatting.AQUA;
short var3 = 274; short var3 = 274;
Random var5 = new Random(8124371L); EaglercraftRandom var5 = new EaglercraftRandom(8124371L);
int var6; int var6;
for(String str : EaglerAdapter.fileContentsLines("/title/win.txt")) { for(String str : EaglerAdapter.fileContentsLines("/title/win.txt")) {

View File

@ -1,15 +1,14 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.List; import java.util.List;
import java.util.Random;
import net.lax1dude.eaglercraft.EaglercraftRandom;
public class Item { public class Item {
private CreativeTabs tabToDisplayOn = null; private CreativeTabs tabToDisplayOn = null;
/** The RNG used by the Item subclasses. */ /** The RNG used by the Item subclasses. */
protected static Random itemRand = new Random(); protected static EaglercraftRandom itemRand = new EaglercraftRandom();
/** A 32000 elements Item array. */ /** A 32000 elements Item array. */
public static Item[] itemsList = new Item[32000]; public static Item[] itemsList = new Item[32000];

View File

@ -4,7 +4,8 @@ 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;
import net.lax1dude.eaglercraft.EaglercraftRandom;
public abstract class ModelBase { public abstract class ModelBase {
public float onGround; public float onGround;
@ -44,7 +45,7 @@ public abstract class ModelBase {
public void setLivingAnimations(EntityLiving par1EntityLiving, float par2, float par3, float par4) { public void setLivingAnimations(EntityLiving par1EntityLiving, float par2, float par3, float par4) {
} }
public ModelRenderer getRandomModelBox(Random par1Random) { public ModelRenderer getRandomModelBox(EaglercraftRandom par1Random) {
return (ModelRenderer) this.boxList.get(par1Random.nextInt(this.boxList.size())); return (ModelRenderer) this.boxList.get(par1Random.nextInt(this.boxList.size()));
} }

View File

@ -1,8 +1,7 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random;
import net.lax1dude.eaglercraft.EaglerAdapter; import net.lax1dude.eaglercraft.EaglerAdapter;
import net.lax1dude.eaglercraft.EaglercraftRandom;
public class ModelGhast extends ModelBase { public class ModelGhast extends ModelBase {
ModelRenderer body; ModelRenderer body;
@ -13,7 +12,7 @@ public class ModelGhast extends ModelBase {
this.body = new ModelRenderer(this, 0, 0); this.body = new ModelRenderer(this, 0, 0);
this.body.addBox(-8.0F, -8.0F, -8.0F, 16, 16, 16); this.body.addBox(-8.0F, -8.0F, -8.0F, 16, 16, 16);
this.body.rotationPointY += (float) (24 + var1); this.body.rotationPointY += (float) (24 + var1);
Random var2 = new Random(1660L); EaglercraftRandom var2 = new EaglercraftRandom(1660L);
for (int var3 = 0; var3 < this.tentacles.length; ++var3) { for (int var3 = 0; var3 < this.tentacles.length; ++var3) {
this.tentacles[var3] = new ModelRenderer(this, 0, 0); this.tentacles[var3] = new ModelRenderer(this, 0, 0);

View File

@ -8,10 +8,10 @@ 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;
import net.lax1dude.eaglercraft.DefaultSkinRenderer; import net.lax1dude.eaglercraft.DefaultSkinRenderer;
import net.lax1dude.eaglercraft.EaglerAdapter; import net.lax1dude.eaglercraft.EaglerAdapter;
import net.lax1dude.eaglercraft.EaglercraftRandom;
import net.lax1dude.eaglercraft.WebsocketNetworkManager; import net.lax1dude.eaglercraft.WebsocketNetworkManager;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
@ -46,7 +46,7 @@ public class NetClientHandler extends NetHandler {
private GuiScreen field_98183_l = null; private GuiScreen field_98183_l = null;
/** RNG. */ /** RNG. */
Random rand = new Random(); EaglercraftRandom rand = new EaglercraftRandom();
public NetClientHandler(Minecraft par1Minecraft, String par2Str, int par3) throws IOException { public NetClientHandler(Minecraft par1Minecraft, String par2Str, int par3) throws IOException {
this.mc = par1Minecraft; this.mc = par1Minecraft;

View File

@ -1,9 +1,9 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public class Particle { public class Particle {
private static Random rand = new Random(); private static EaglercraftRandom rand = new EaglercraftRandom();
public double posX; public double posX;
public double posY; public double posY;
public double prevPosX; public double prevPosX;

View File

@ -1,9 +1,7 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random;
import net.lax1dude.eaglercraft.EaglerAdapter; import net.lax1dude.eaglercraft.EaglerAdapter;
import net.lax1dude.eaglercraft.EaglercraftRandom;
import net.lax1dude.eaglercraft.TextureLocation; import net.lax1dude.eaglercraft.TextureLocation;
import net.lax1dude.eaglercraft.adapter.Tessellator; import net.lax1dude.eaglercraft.adapter.Tessellator;
@ -158,7 +156,7 @@ public class RenderDragon extends RenderLiving {
var5 = (var4 - 0.8F) / 0.2F; var5 = (var4 - 0.8F) / 0.2F;
} }
Random var6 = new Random(432L); EaglercraftRandom var6 = new EaglercraftRandom(432L);
EaglerAdapter.glDisable(EaglerAdapter.GL_TEXTURE_2D); EaglerAdapter.glDisable(EaglerAdapter.GL_TEXTURE_2D);
EaglerAdapter.glShadeModel(EaglerAdapter.GL_SMOOTH); EaglerAdapter.glShadeModel(EaglerAdapter.GL_SMOOTH);
EaglerAdapter.glEnable(EaglerAdapter.GL_BLEND); EaglerAdapter.glEnable(EaglerAdapter.GL_BLEND);

View File

@ -1,9 +1,9 @@
package net.minecraft.src; package net.minecraft.src;
import java.nio.FloatBuffer; import java.nio.FloatBuffer;
import java.util.Random;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.lax1dude.eaglercraft.EaglerAdapter; import net.lax1dude.eaglercraft.EaglerAdapter;
import net.lax1dude.eaglercraft.EaglercraftRandom;
import net.lax1dude.eaglercraft.TextureLocation; import net.lax1dude.eaglercraft.TextureLocation;
import net.lax1dude.eaglercraft.adapter.Tessellator; import net.lax1dude.eaglercraft.adapter.Tessellator;
@ -22,7 +22,7 @@ public class RenderEndPortal extends TileEntitySpecialRenderer {
float var11 = (float) this.tileEntityRenderer.playerZ; float var11 = (float) this.tileEntityRenderer.playerZ;
EaglerAdapter.glDisable(EaglerAdapter.GL_LIGHTING); EaglerAdapter.glDisable(EaglerAdapter.GL_LIGHTING);
EaglerAdapter.glDisable(EaglerAdapter.GL_ALPHA_TEST); EaglerAdapter.glDisable(EaglerAdapter.GL_ALPHA_TEST);
Random var12 = new Random(31100L); EaglercraftRandom var12 = new EaglercraftRandom(31100L);
float var13 = 0.75F; float var13 = 0.75F;
for (int var14 = 0; var14 < 16; ++var14) { for (int var14 = 0; var14 < 16; ++var14) {

View File

@ -1,14 +1,13 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random;
import net.lax1dude.eaglercraft.EaglerAdapter; import net.lax1dude.eaglercraft.EaglerAdapter;
import net.lax1dude.eaglercraft.EaglercraftRandom;
import net.lax1dude.eaglercraft.TextureLocation; import net.lax1dude.eaglercraft.TextureLocation;
public class RenderEnderman extends RenderLiving { public class RenderEnderman extends RenderLiving {
/** The model of the enderman */ /** The model of the enderman */
private ModelEnderman endermanModel; private ModelEnderman endermanModel;
private Random rnd = new Random(); private EaglercraftRandom rnd = new EaglercraftRandom();
public RenderEnderman() { public RenderEnderman() {
super(new ModelEnderman(), 0.5F); super(new ModelEnderman(), 0.5F);

View File

@ -1,8 +1,7 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random;
import net.lax1dude.eaglercraft.EaglerAdapter; import net.lax1dude.eaglercraft.EaglerAdapter;
import net.lax1dude.eaglercraft.EaglercraftRandom;
import net.lax1dude.eaglercraft.adapter.Tessellator; import net.lax1dude.eaglercraft.adapter.Tessellator;
public class RenderLightningBolt extends Render { public class RenderLightningBolt extends Render {
@ -20,7 +19,7 @@ public class RenderLightningBolt extends Render {
double[] var12 = new double[8]; double[] var12 = new double[8];
double var13 = 0.0D; double var13 = 0.0D;
double var15 = 0.0D; double var15 = 0.0D;
Random var17 = new Random(par1EntityLightningBolt.boltVertex); EaglercraftRandom var17 = new EaglercraftRandom(par1EntityLightningBolt.boltVertex);
for (int var18 = 7; var18 >= 0; --var18) { for (int var18 = 7; var18 >= 0; --var18) {
var11[var18] = var13; var11[var18] = var13;
@ -30,7 +29,7 @@ public class RenderLightningBolt extends Render {
} }
for (int var45 = 0; var45 < 4; ++var45) { for (int var45 = 0; var45 < 4; ++var45) {
Random var46 = new Random(par1EntityLightningBolt.boltVertex); EaglercraftRandom var46 = new EaglercraftRandom(par1EntityLightningBolt.boltVertex);
for (int var19 = 0; var19 < 3; ++var19) { for (int var19 = 0; var19 < 3; ++var19) {
int var20 = 7; int var20 = 7;

View File

@ -1,12 +1,11 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.lax1dude.eaglercraft.TextureLocation; import net.lax1dude.eaglercraft.TextureLocation;
import net.lax1dude.eaglercraft.adapter.Tessellator; import net.lax1dude.eaglercraft.adapter.Tessellator;
import net.lax1dude.eaglercraft.DefaultSkinRenderer; import net.lax1dude.eaglercraft.DefaultSkinRenderer;
import net.lax1dude.eaglercraft.EaglerAdapter; import net.lax1dude.eaglercraft.EaglerAdapter;
import net.lax1dude.eaglercraft.EaglercraftRandom;
public abstract class RenderLiving extends Render { public abstract class RenderLiving extends Render {
@ -287,7 +286,7 @@ public abstract class RenderLiving extends Render {
if (var3 > 0) { if (var3 > 0) {
EntityArrow var4 = new EntityArrow(par1EntityLiving.worldObj, par1EntityLiving.posX, par1EntityLiving.posY, par1EntityLiving.posZ); EntityArrow var4 = new EntityArrow(par1EntityLiving.worldObj, par1EntityLiving.posX, par1EntityLiving.posY, par1EntityLiving.posZ);
Random var5 = new Random((long) par1EntityLiving.entityId); EaglercraftRandom var5 = new EaglercraftRandom((long) par1EntityLiving.entityId);
RenderHelper.disableStandardItemLighting(); RenderHelper.disableStandardItemLighting();
for (int var6 = 0; var6 < var3; ++var6) { for (int var6 = 0; var6 < var3; ++var6) {

View File

@ -4,9 +4,9 @@ import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
import java.util.Random;
import net.lax1dude.eaglercraft.EaglerAdapter; import net.lax1dude.eaglercraft.EaglerAdapter;
import net.lax1dude.eaglercraft.EaglercraftRandom;
public class SoundManager { public class SoundManager {
@ -42,13 +42,13 @@ public class SoundManager {
private ArrayList<EntitySoundEvent> soundevents; private ArrayList<EntitySoundEvent> soundevents;
private ArrayList<QueuedSoundEvent> queuedsoundevents; private ArrayList<QueuedSoundEvent> queuedsoundevents;
private HashMap<String,Integer> sounddefinitions; private HashMap<String,Integer> sounddefinitions;
private Random soundrandom; private EaglercraftRandom soundrandom;
public SoundManager() { public SoundManager() {
this.soundevents = new ArrayList(); this.soundevents = new ArrayList();
this.queuedsoundevents = new ArrayList(); this.queuedsoundevents = new ArrayList();
this.sounddefinitions = null; this.sounddefinitions = null;
this.soundrandom = new Random(); this.soundrandom = new EaglercraftRandom();
} }
/** /**
@ -106,12 +106,10 @@ public class SoundManager {
double pitch = par1EntityLiving.prevRotationPitch + (par1EntityLiving.rotationPitch - par1EntityLiving.prevRotationPitch) * par2; double pitch = par1EntityLiving.prevRotationPitch + (par1EntityLiving.rotationPitch - par1EntityLiving.prevRotationPitch) * par2;
double yaw = par1EntityLiving.prevRotationYaw + (par1EntityLiving.rotationYaw - par1EntityLiving.prevRotationYaw) * par2; double yaw = par1EntityLiving.prevRotationYaw + (par1EntityLiving.rotationYaw - par1EntityLiving.prevRotationYaw) * par2;
// suck my cock
try { try {
EaglerAdapter.setListenerPos((float)x, (float)y, (float)z, (float)par1EntityLiving.motionX, (float)par1EntityLiving.motionY, (float)par1EntityLiving.motionZ, (float)pitch, (float)yaw); EaglerAdapter.setListenerPos((float)x, (float)y, (float)z, (float)par1EntityLiving.motionX, (float)par1EntityLiving.motionY, (float)par1EntityLiving.motionZ, (float)pitch, (float)yaw);
}catch(Throwable t) { }catch(Throwable t) {
System.err.println("AudioListener fucked up again"); System.err.println("AudioListener f***ed up again");
} }
} }
} }

View File

@ -1,6 +1,6 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public class TileEntityDispenser extends TileEntity implements IInventory { public class TileEntityDispenser extends TileEntity implements IInventory {
private ItemStack[] dispenserContents = new ItemStack[9]; private ItemStack[] dispenserContents = new ItemStack[9];
@ -8,7 +8,7 @@ public class TileEntityDispenser extends TileEntity implements IInventory {
/** /**
* random number generator for instance. Used in random item stack selection. * random number generator for instance. Used in random item stack selection.
*/ */
private Random dispenserRandom = new Random(); private EaglercraftRandom dispenserRandom = new EaglercraftRandom();
protected String customName; protected String customName;
/** /**

View File

@ -1,8 +1,6 @@
package net.minecraft.src; package net.minecraft.src;
import java.util.Random; import net.lax1dude.eaglercraft.EaglercraftRandom;
public class TileEntityEnchantmentTable extends TileEntity { public class TileEntityEnchantmentTable extends TileEntity {
/** Used by the render to make the book 'bounce' */ /** Used by the render to make the book 'bounce' */
@ -24,7 +22,7 @@ public class TileEntityEnchantmentTable extends TileEntity {
public float bookRotation2; public float bookRotation2;
public float bookRotationPrev; public float bookRotationPrev;
public float bookRotation; public float bookRotation;
private static Random rand = new Random(); private static EaglercraftRandom rand = new EaglercraftRandom();
private String field_94136_s; private String field_94136_s;
/** /**

View File

@ -2,7 +2,6 @@ package net.minecraft.src;
import java.util.HashSet; import java.util.HashSet;
import java.util.Iterator; import java.util.Iterator;
import java.util.Random;
import java.util.Set; import java.util.Set;
import net.lax1dude.eaglercraft.EaglercraftRandom; import net.lax1dude.eaglercraft.EaglercraftRandom;

View File

@ -1082,6 +1082,9 @@ public class EaglerAdapterImpl2 {
public static final void openLink(String url) { public static final void openLink(String url) {
win.open(url, "_blank"); win.open(url, "_blank");
} }
public static final void redirectTo(String url) {
Window.current().getLocation().setFullURL(url);
}
@JSBody(params = { "str" }, script = "window.eval(str);") @JSBody(params = { "str" }, script = "window.eval(str);")
private static native void execute(String str); private static native void execute(String str);
@ -1566,5 +1569,13 @@ public class EaglerAdapterImpl2 {
private static int remapKey(int k) { private static int remapKey(int k) {
return (k > LWJGLKeyCodes.length || k < 0) ? -1 : LWJGLKeyCodes[k]; return (k > LWJGLKeyCodes.length || k < 0) ? -1 : LWJGLKeyCodes[k];
} }
public static final String getClipboard() {
return ""; //TODO: html5 clipboard
}
public static final void setClipboard(String str) {
}
} }

View File

@ -5,7 +5,7 @@ Bukkit is a piece of shit, if you "/op LAX1DUDE", a player joining as 'laX1DUDE'
Either don't use /op and install an actual permissions plugin, or move "BitchFilerPlugin.jar" into this server's "/plugins" folder and use only lowercase letters in your /op profile names! Either don't use /op and install an actual permissions plugin, or move "BitchFilerPlugin.jar" into this server's "/plugins" folder and use only lowercase letters in your /op profile names!
Again, if you install the bitchfilter plugin, you need to /op yourself with all lowercase letters like "/op lax1dude", and then when you want to join as an op you don't type 'LAX1DUDE' you have to join as 'lax1dude' or you will be kicked by the plugin for security Again, if you install the bitchfilter plugin, you need to /op yourself with ALL LOWERCASE LETTERS like "/op lax1dude", and then when you want to join as an op you don't type 'LAX1DUDE' you have to join as 'lax1dude' or you will be kicked by the plugin for security
PLEASE PLEASE PLEASE DO NOT IGNORE THIS MESSAGE!!! PLEASE PLEASE PLEASE DO NOT IGNORE THIS MESSAGE!!!

View File

@ -0,0 +1,14 @@
DO NOT IGNORE THIS MESSAGE, USE YOUR BRAIN AND READ!
Bukkit is a piece of shit, if you "/op LAX1DUDE", a player joining as 'laX1DUDE' or 'LaX1dUdE' or 'lax1dude' will all have /op too
Either don't use /op and install an actual permissions plugin, or move "BitchFilerPlugin.jar" into this server's "/plugins" folder and use only lowercase letters in your /op profile names!
Again, if you install the bitchfilter plugin, you need to /op yourself with ALL LOWERCASE LETTERS like "/op lax1dude", and then when you want to join as an op you don't type 'LAX1DUDE' you have to join as 'lax1dude' or you will be kicked by the plugin for security
PLEASE PLEASE PLEASE DO NOT IGNORE THIS MESSAGE!!!
IF YOU IGNORE THIS AND USE /op WITH MIXED CASE THEN YOU WILL BE HACKED!!!
DO NOT MAKE THIS MISTAKE OR YOU CAN LOSE YOUR WHOLE SERVER IN MINUTES!!!

Some files were not shown because too many files have changed in this diff Show More