diff --git a/src/main/java/net/lax1dude/eaglercraft/EaglerProfile.java b/src/main/java/net/lax1dude/eaglercraft/EaglerProfile.java index 8919843..5a9f7fb 100644 --- a/src/main/java/net/lax1dude/eaglercraft/EaglerProfile.java +++ b/src/main/java/net/lax1dude/eaglercraft/EaglerProfile.java @@ -1,7 +1,6 @@ package net.lax1dude.eaglercraft; import java.util.ArrayList; -import java.util.Random; import net.minecraft.client.Minecraft; import net.minecraft.src.NBTTagCompound; @@ -19,7 +18,7 @@ public class EaglerProfile { public static ArrayList skinDatas = new ArrayList(); public static ArrayList glTex = new ArrayList(); - public static final Random rand; + public static final EaglercraftRandom rand; public static int getSkinSize(int len) { for(int i = 0; i < SKIN_DATA_SIZE.length; ++i) { @@ -156,7 +155,7 @@ public class EaglerProfile { "Yeeg" }; - rand = new Random(); + rand = new EaglercraftRandom(); do { username = usernameDefaultWords[rand.nextInt(usernameDefaultWords.length)] + usernameDefaultWords[rand.nextInt(usernameDefaultWords.length)] + (10 + rand.nextInt(90)); diff --git a/src/main/java/net/lax1dude/eaglercraft/ProfileUUID.java b/src/main/java/net/lax1dude/eaglercraft/ProfileUUID.java new file mode 100644 index 0000000..8352f1d --- /dev/null +++ b/src/main/java/net/lax1dude/eaglercraft/ProfileUUID.java @@ -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; + } + +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/glemu/EffectPipeline.java b/src/main/java/net/lax1dude/eaglercraft/glemu/EffectPipeline.java index a289f07..7c61d64 100644 --- a/src/main/java/net/lax1dude/eaglercraft/glemu/EffectPipeline.java +++ b/src/main/java/net/lax1dude/eaglercraft/glemu/EffectPipeline.java @@ -4,8 +4,8 @@ import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.IntBuffer; import java.util.HashMap; -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; import net.lax1dude.eaglercraft.glemu.vector.Matrix4f; 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[] projBufferInv = new float[16]; @@ -447,7 +447,7 @@ public class EffectPipeline { _wglBindAttributeLocation(prog, 0, "a_pos"); 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++) { float x = r.nextFloat() * 2.0f - 1.0f; float y = r.nextFloat() * 2.0f - 1.0f; diff --git a/src/main/java/net/minecraft/src/BlockBed.java b/src/main/java/net/minecraft/src/BlockBed.java index 32a1e05..0ac9557 100644 --- a/src/main/java/net/minecraft/src/BlockBed.java +++ b/src/main/java/net/minecraft/src/BlockBed.java @@ -1,7 +1,6 @@ package net.minecraft.src; -import java.util.Iterator; -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockBed extends BlockDirectional { /** 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. */ - 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; } diff --git a/src/main/java/net/minecraft/src/BlockBookshelf.java b/src/main/java/net/minecraft/src/BlockBookshelf.java index 0b6900a..78bf72f 100644 --- a/src/main/java/net/minecraft/src/BlockBookshelf.java +++ b/src/main/java/net/minecraft/src/BlockBookshelf.java @@ -1,6 +1,6 @@ package net.minecraft.src; -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockBookshelf extends Block { public BlockBookshelf(int par1) { @@ -19,14 +19,14 @@ public class BlockBookshelf extends Block { /** * Returns the quantity of items to drop on block destruction. */ - public int quantityDropped(Random par1Random) { + public int quantityDropped(EaglercraftRandom par1Random) { return 3; } /** * 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; } } diff --git a/src/main/java/net/minecraft/src/BlockBrewingStand.java b/src/main/java/net/minecraft/src/BlockBrewingStand.java index afae5e8..cef611e 100644 --- a/src/main/java/net/minecraft/src/BlockBrewingStand.java +++ b/src/main/java/net/minecraft/src/BlockBrewingStand.java @@ -1,10 +1,11 @@ package net.minecraft.src; import java.util.List; -import java.util.Random; + +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockBrewingStand extends BlockContainer { - private Random rand = new Random(); + private EaglercraftRandom rand = new EaglercraftRandom(); private Icon theIcon; 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 * 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 var8 = (double) ((float) par3 + 0.7F + par5Random.nextFloat() * 0.3F); 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. */ - public int idDropped(int par1, Random par2Random, int par3) { + public int idDropped(int par1, EaglercraftRandom par2Random, int par3) { return Item.brewingStand.itemID; } diff --git a/src/main/java/net/minecraft/src/BlockButton.java b/src/main/java/net/minecraft/src/BlockButton.java index 8062dfc..98e6ee7 100644 --- a/src/main/java/net/minecraft/src/BlockButton.java +++ b/src/main/java/net/minecraft/src/BlockButton.java @@ -1,7 +1,6 @@ package net.minecraft.src; import java.util.List; -import java.util.Random; public abstract class BlockButton extends Block { /** Whether this button is sensible to arrows, used by wooden buttons. */ diff --git a/src/main/java/net/minecraft/src/BlockCactus.java b/src/main/java/net/minecraft/src/BlockCactus.java index 4c92acf..815f256 100644 --- a/src/main/java/net/minecraft/src/BlockCactus.java +++ b/src/main/java/net/minecraft/src/BlockCactus.java @@ -1,6 +1,6 @@ package net.minecraft.src; -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockCactus extends Block { private Icon cactusTopIcon; @@ -15,7 +15,7 @@ public class BlockCactus extends Block { /** * 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)) { int var6; diff --git a/src/main/java/net/minecraft/src/BlockCake.java b/src/main/java/net/minecraft/src/BlockCake.java index 76d772d..9c21d5e 100644 --- a/src/main/java/net/minecraft/src/BlockCake.java +++ b/src/main/java/net/minecraft/src/BlockCake.java @@ -1,6 +1,6 @@ package net.minecraft.src; -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockCake extends Block { private Icon cakeTopIcon; @@ -154,14 +154,14 @@ public class BlockCake extends Block { /** * Returns the quantity of items to drop on block destruction. */ - public int quantityDropped(Random par1Random) { + public int quantityDropped(EaglercraftRandom par1Random) { return 0; } /** * 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; } diff --git a/src/main/java/net/minecraft/src/BlockCauldron.java b/src/main/java/net/minecraft/src/BlockCauldron.java index e872cdd..51f83bf 100644 --- a/src/main/java/net/minecraft/src/BlockCauldron.java +++ b/src/main/java/net/minecraft/src/BlockCauldron.java @@ -1,7 +1,8 @@ package net.minecraft.src; import java.util.List; -import java.util.Random; + +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockCauldron extends Block { private Icon field_94378_a; @@ -110,7 +111,7 @@ public class BlockCauldron extends Block { /** * 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; } diff --git a/src/main/java/net/minecraft/src/BlockChest.java b/src/main/java/net/minecraft/src/BlockChest.java index 8261074..e01f93d 100644 --- a/src/main/java/net/minecraft/src/BlockChest.java +++ b/src/main/java/net/minecraft/src/BlockChest.java @@ -1,10 +1,11 @@ package net.minecraft.src; import java.util.Iterator; -import java.util.Random; + +import net.lax1dude.eaglercraft.EaglercraftRandom; 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. */ public final int isTrapped; diff --git a/src/main/java/net/minecraft/src/BlockClay.java b/src/main/java/net/minecraft/src/BlockClay.java index 4ec5626..e5bae89 100644 --- a/src/main/java/net/minecraft/src/BlockClay.java +++ b/src/main/java/net/minecraft/src/BlockClay.java @@ -1,6 +1,6 @@ package net.minecraft.src; -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockClay extends Block { public BlockClay(int par1) { @@ -11,14 +11,14 @@ public class BlockClay extends Block { /** * 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; } /** * Returns the quantity of items to drop on block destruction. */ - public int quantityDropped(Random par1Random) { + public int quantityDropped(EaglercraftRandom par1Random) { return 4; } } diff --git a/src/main/java/net/minecraft/src/BlockCocoa.java b/src/main/java/net/minecraft/src/BlockCocoa.java index c96f75e..e3689cb 100644 --- a/src/main/java/net/minecraft/src/BlockCocoa.java +++ b/src/main/java/net/minecraft/src/BlockCocoa.java @@ -1,6 +1,6 @@ package net.minecraft.src; -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockCocoa extends BlockDirectional { 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 */ - 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)) { this.dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0); par1World.setBlockToAir(par2, par3, par4); diff --git a/src/main/java/net/minecraft/src/BlockCommandBlock.java b/src/main/java/net/minecraft/src/BlockCommandBlock.java index 096777a..8f3403c 100644 --- a/src/main/java/net/minecraft/src/BlockCommandBlock.java +++ b/src/main/java/net/minecraft/src/BlockCommandBlock.java @@ -1,6 +1,6 @@ package net.minecraft.src; -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockCommandBlock extends BlockContainer { public BlockCommandBlock(int par1) { @@ -18,7 +18,7 @@ public class BlockCommandBlock extends BlockContainer { /** * 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); if (var6 != null && var6 instanceof TileEntityCommandBlock) { diff --git a/src/main/java/net/minecraft/src/BlockCrops.java b/src/main/java/net/minecraft/src/BlockCrops.java index 96a23ad..c7b4cb0 100644 --- a/src/main/java/net/minecraft/src/BlockCrops.java +++ b/src/main/java/net/minecraft/src/BlockCrops.java @@ -1,6 +1,6 @@ package net.minecraft.src; -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockCrops extends BlockFlower { private Icon[] iconArray; @@ -27,7 +27,7 @@ public class BlockCrops extends BlockFlower { /** * 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); 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. */ - 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(); } /** * Returns the quantity of items to drop on block destruction. */ - public int quantityDropped(Random par1Random) { + public int quantityDropped(EaglercraftRandom par1Random) { return 1; } diff --git a/src/main/java/net/minecraft/src/BlockDaylightDetector.java b/src/main/java/net/minecraft/src/BlockDaylightDetector.java index efcf701..adcc5e9 100644 --- a/src/main/java/net/minecraft/src/BlockDaylightDetector.java +++ b/src/main/java/net/minecraft/src/BlockDaylightDetector.java @@ -1,8 +1,6 @@ package net.minecraft.src; -import java.util.Random; - - +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockDaylightDetector extends BlockContainer { private Icon[] iconArray = new Icon[2]; @@ -34,7 +32,7 @@ public class BlockDaylightDetector extends BlockContainer { /** * 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) { } /** diff --git a/src/main/java/net/minecraft/src/BlockDeadBush.java b/src/main/java/net/minecraft/src/BlockDeadBush.java index e82e0f5..b306096 100644 --- a/src/main/java/net/minecraft/src/BlockDeadBush.java +++ b/src/main/java/net/minecraft/src/BlockDeadBush.java @@ -1,6 +1,6 @@ package net.minecraft.src; -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockDeadBush extends BlockFlower { protected BlockDeadBush(int par1) { @@ -20,7 +20,7 @@ public class BlockDeadBush extends BlockFlower { /** * 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; } } diff --git a/src/main/java/net/minecraft/src/BlockDispenser.java b/src/main/java/net/minecraft/src/BlockDispenser.java index a6de785..ca559d5 100644 --- a/src/main/java/net/minecraft/src/BlockDispenser.java +++ b/src/main/java/net/minecraft/src/BlockDispenser.java @@ -1,10 +1,10 @@ package net.minecraft.src; -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockDispenser extends BlockContainer { /** Registry for all dispense behaviors. */ - protected Random random = new Random(); + protected EaglercraftRandom random = new EaglercraftRandom(); protected Icon furnaceTopIcon; protected Icon furnaceFrontIcon; protected Icon field_96473_e; diff --git a/src/main/java/net/minecraft/src/BlockDoor.java b/src/main/java/net/minecraft/src/BlockDoor.java index ded39b1..2995fdd 100644 --- a/src/main/java/net/minecraft/src/BlockDoor.java +++ b/src/main/java/net/minecraft/src/BlockDoor.java @@ -1,6 +1,6 @@ package net.minecraft.src; -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockDoor extends Block { 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. */ - 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); } diff --git a/src/main/java/net/minecraft/src/BlockDragonEgg.java b/src/main/java/net/minecraft/src/BlockDragonEgg.java index 97f1af9..e006067 100644 --- a/src/main/java/net/minecraft/src/BlockDragonEgg.java +++ b/src/main/java/net/minecraft/src/BlockDragonEgg.java @@ -1,6 +1,6 @@ package net.minecraft.src; -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockDragonEgg extends Block { public BlockDragonEgg(int par1) { @@ -27,7 +27,7 @@ public class BlockDragonEgg extends Block { /** * 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); } diff --git a/src/main/java/net/minecraft/src/BlockEndPortal.java b/src/main/java/net/minecraft/src/BlockEndPortal.java index 912d70f..eb9ab5f 100644 --- a/src/main/java/net/minecraft/src/BlockEndPortal.java +++ b/src/main/java/net/minecraft/src/BlockEndPortal.java @@ -1,7 +1,8 @@ package net.minecraft.src; import java.util.List; -import java.util.Random; + +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockEndPortal extends BlockContainer { /** @@ -67,7 +68,7 @@ public class BlockEndPortal extends BlockContainer { /** * Returns the quantity of items to drop on block destruction. */ - public int quantityDropped(Random par1Random) { + public int quantityDropped(EaglercraftRandom par1Random) { 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 * 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 var8 = (double) ((float) par3 + 0.8F); double var10 = (double) ((float) par4 + par5Random.nextFloat()); diff --git a/src/main/java/net/minecraft/src/BlockEndPortalFrame.java b/src/main/java/net/minecraft/src/BlockEndPortalFrame.java index d38680b..1d71b88 100644 --- a/src/main/java/net/minecraft/src/BlockEndPortalFrame.java +++ b/src/main/java/net/minecraft/src/BlockEndPortalFrame.java @@ -1,7 +1,8 @@ package net.minecraft.src; import java.util.List; -import java.util.Random; + +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockEndPortalFrame extends Block { private Icon field_94400_a; @@ -86,7 +87,7 @@ public class BlockEndPortalFrame extends Block { /** * 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; } diff --git a/src/main/java/net/minecraft/src/BlockEnderChest.java b/src/main/java/net/minecraft/src/BlockEnderChest.java index 104abc9..4959680 100644 --- a/src/main/java/net/minecraft/src/BlockEnderChest.java +++ b/src/main/java/net/minecraft/src/BlockEnderChest.java @@ -1,6 +1,6 @@ package net.minecraft.src; -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockEnderChest extends BlockContainer { protected BlockEnderChest(int par1) { @@ -36,14 +36,14 @@ public class BlockEnderChest extends BlockContainer { /** * 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; } /** * Returns the quantity of items to drop on block destruction. */ - public int quantityDropped(Random par1Random) { + public int quantityDropped(EaglercraftRandom par1Random) { 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 * 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) { double var10000 = (double) ((float) par2 + par5Random.nextFloat()); double var9 = (double) ((float) par3 + par5Random.nextFloat()); diff --git a/src/main/java/net/minecraft/src/BlockFire.java b/src/main/java/net/minecraft/src/BlockFire.java index 1d4cc00..267f78d 100644 --- a/src/main/java/net/minecraft/src/BlockFire.java +++ b/src/main/java/net/minecraft/src/BlockFire.java @@ -1,6 +1,6 @@ package net.minecraft.src; -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockFire extends Block { /** 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. */ - public int quantityDropped(Random par1Random) { + public int quantityDropped(EaglercraftRandom par1Random) { return 0; } @@ -101,7 +101,7 @@ public class BlockFire extends Block { /** * 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")) { boolean var6 = par1World.getBlockId(par2, par3 - 1, par4) == Block.netherrack.blockID; @@ -189,7 +189,7 @@ public class BlockFire extends Block { 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)]; 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 * 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) { 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); } diff --git a/src/main/java/net/minecraft/src/BlockFlower.java b/src/main/java/net/minecraft/src/BlockFlower.java index 0e04493..e71d949 100644 --- a/src/main/java/net/minecraft/src/BlockFlower.java +++ b/src/main/java/net/minecraft/src/BlockFlower.java @@ -1,6 +1,6 @@ package net.minecraft.src; -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockFlower extends Block { protected BlockFlower(int par1, Material par2Material) { @@ -44,7 +44,7 @@ public class BlockFlower extends Block { /** * 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); } diff --git a/src/main/java/net/minecraft/src/BlockFlowerPot.java b/src/main/java/net/minecraft/src/BlockFlowerPot.java index 5c7cc80..623137a 100644 --- a/src/main/java/net/minecraft/src/BlockFlowerPot.java +++ b/src/main/java/net/minecraft/src/BlockFlowerPot.java @@ -1,6 +1,6 @@ package net.minecraft.src; -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockFlowerPot extends Block { public BlockFlowerPot(int par1) { @@ -130,7 +130,7 @@ public class BlockFlowerPot extends Block { /** * 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; } diff --git a/src/main/java/net/minecraft/src/BlockFlowing.java b/src/main/java/net/minecraft/src/BlockFlowing.java index 2259c58..1ac49b8 100644 --- a/src/main/java/net/minecraft/src/BlockFlowing.java +++ b/src/main/java/net/minecraft/src/BlockFlowing.java @@ -1,6 +1,6 @@ package net.minecraft.src; -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockFlowing extends BlockFluid { /** @@ -41,7 +41,7 @@ public class BlockFlowing extends BlockFluid { /** * 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); byte var7 = 1; diff --git a/src/main/java/net/minecraft/src/BlockFluid.java b/src/main/java/net/minecraft/src/BlockFluid.java index 749ddc9..67d56b3 100644 --- a/src/main/java/net/minecraft/src/BlockFluid.java +++ b/src/main/java/net/minecraft/src/BlockFluid.java @@ -1,8 +1,6 @@ package net.minecraft.src; -import java.util.Random; - - +import net.lax1dude.eaglercraft.EaglercraftRandom; public abstract class BlockFluid extends Block { private Icon[] theIcon; @@ -156,14 +154,14 @@ public abstract class BlockFluid extends Block { /** * 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; } /** * Returns the quantity of items to drop on block destruction. */ - public int quantityDropped(Random par1Random) { + public int quantityDropped(EaglercraftRandom par1Random) { 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 * 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; if (this.blockMaterial == Material.water) { diff --git a/src/main/java/net/minecraft/src/BlockFurnace.java b/src/main/java/net/minecraft/src/BlockFurnace.java index 41b68f9..b1acef7 100644 --- a/src/main/java/net/minecraft/src/BlockFurnace.java +++ b/src/main/java/net/minecraft/src/BlockFurnace.java @@ -1,13 +1,13 @@ package net.minecraft.src; -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockFurnace extends BlockContainer { /** * Is the random generator used by furnace to drop the inventory contents in * random directions. */ - private final Random furnaceRand = new Random(); + private final EaglercraftRandom furnaceRand = new EaglercraftRandom(); /** True if this is an active furnace, false if idle */ private final boolean isActive; @@ -29,7 +29,7 @@ public class BlockFurnace extends BlockContainer { /** * 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; } @@ -70,7 +70,7 @@ public class BlockFurnace extends BlockContainer { * A randomly called display update to be able to add particles or other items * 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) { int var6 = par1World.getBlockMetadata(par2, par3, par4); float var7 = (float) par2 + 0.5F; diff --git a/src/main/java/net/minecraft/src/BlockGlass.java b/src/main/java/net/minecraft/src/BlockGlass.java index 3262c85..06fbe05 100644 --- a/src/main/java/net/minecraft/src/BlockGlass.java +++ b/src/main/java/net/minecraft/src/BlockGlass.java @@ -1,6 +1,6 @@ package net.minecraft.src; -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockGlass extends BlockBreakable { 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. */ - public int quantityDropped(Random par1Random) { + public int quantityDropped(EaglercraftRandom par1Random) { return 0; } diff --git a/src/main/java/net/minecraft/src/BlockGlowStone.java b/src/main/java/net/minecraft/src/BlockGlowStone.java index a57eaa6..ec46a9f 100644 --- a/src/main/java/net/minecraft/src/BlockGlowStone.java +++ b/src/main/java/net/minecraft/src/BlockGlowStone.java @@ -1,6 +1,6 @@ package net.minecraft.src; -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockGlowStone extends Block { 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' * (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); } /** * 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); } /** * 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; } } diff --git a/src/main/java/net/minecraft/src/BlockGravel.java b/src/main/java/net/minecraft/src/BlockGravel.java index bb817ed..b8c08ba 100644 --- a/src/main/java/net/minecraft/src/BlockGravel.java +++ b/src/main/java/net/minecraft/src/BlockGravel.java @@ -1,6 +1,6 @@ package net.minecraft.src; -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockGravel extends BlockSand { public BlockGravel(int par1) { @@ -10,7 +10,7 @@ public class BlockGravel extends BlockSand { /** * 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) { par3 = 3; } diff --git a/src/main/java/net/minecraft/src/BlockHalfSlab.java b/src/main/java/net/minecraft/src/BlockHalfSlab.java index 303bdbb..86eec8b 100644 --- a/src/main/java/net/minecraft/src/BlockHalfSlab.java +++ b/src/main/java/net/minecraft/src/BlockHalfSlab.java @@ -1,7 +1,8 @@ package net.minecraft.src; import java.util.List; -import java.util.Random; + +import net.lax1dude.eaglercraft.EaglercraftRandom; public abstract class BlockHalfSlab extends Block { protected final boolean isDoubleSlab; @@ -77,7 +78,7 @@ public abstract class BlockHalfSlab extends Block { /** * 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; } diff --git a/src/main/java/net/minecraft/src/BlockHopper.java b/src/main/java/net/minecraft/src/BlockHopper.java index f5b49e6..66d3758 100644 --- a/src/main/java/net/minecraft/src/BlockHopper.java +++ b/src/main/java/net/minecraft/src/BlockHopper.java @@ -1,10 +1,11 @@ package net.minecraft.src; import java.util.List; -import java.util.Random; + +import net.lax1dude.eaglercraft.EaglercraftRandom; 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 hopperTopIcon; private Icon hopperInsideIcon; diff --git a/src/main/java/net/minecraft/src/BlockIce.java b/src/main/java/net/minecraft/src/BlockIce.java index 48e6992..ce893a7 100644 --- a/src/main/java/net/minecraft/src/BlockIce.java +++ b/src/main/java/net/minecraft/src/BlockIce.java @@ -1,6 +1,6 @@ package net.minecraft.src; -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockIce extends BlockBreakable { public BlockIce(int par1) { @@ -58,14 +58,14 @@ public class BlockIce extends BlockBreakable { /** * Returns the quantity of items to drop on block destruction. */ - public int quantityDropped(Random par1Random) { + public int quantityDropped(EaglercraftRandom par1Random) { return 0; } /** * 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.provider.isHellWorld) { par1World.setBlockToAir(par2, par3, par4); diff --git a/src/main/java/net/minecraft/src/BlockLadder.java b/src/main/java/net/minecraft/src/BlockLadder.java index 2c62a99..eb113b5 100644 --- a/src/main/java/net/minecraft/src/BlockLadder.java +++ b/src/main/java/net/minecraft/src/BlockLadder.java @@ -1,6 +1,6 @@ package net.minecraft.src; -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockLadder extends Block { protected BlockLadder(int par1) { @@ -150,7 +150,7 @@ public class BlockLadder extends Block { /** * Returns the quantity of items to drop on block destruction. */ - public int quantityDropped(Random par1Random) { + public int quantityDropped(EaglercraftRandom par1Random) { return 1; } } diff --git a/src/main/java/net/minecraft/src/BlockLeaves.java b/src/main/java/net/minecraft/src/BlockLeaves.java index 4ec383d..44d8741 100644 --- a/src/main/java/net/minecraft/src/BlockLeaves.java +++ b/src/main/java/net/minecraft/src/BlockLeaves.java @@ -1,7 +1,8 @@ package net.minecraft.src; import java.util.List; -import java.util.Random; + +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockLeaves extends BlockLeavesBase { 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 * 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) { double var6 = (double) ((float) par2 + par5Random.nextFloat()); 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. */ - public int quantityDropped(Random par1Random) { + public int quantityDropped(EaglercraftRandom par1Random) { return par1Random.nextInt(20) == 0 ? 1 : 0; } /** * 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; } diff --git a/src/main/java/net/minecraft/src/BlockLockedChest.java b/src/main/java/net/minecraft/src/BlockLockedChest.java index dc0eb37..ae1b7f8 100644 --- a/src/main/java/net/minecraft/src/BlockLockedChest.java +++ b/src/main/java/net/minecraft/src/BlockLockedChest.java @@ -1,6 +1,6 @@ package net.minecraft.src; -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockLockedChest extends Block { protected BlockLockedChest(int par1) { @@ -18,7 +18,7 @@ public class BlockLockedChest extends Block { /** * 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); } diff --git a/src/main/java/net/minecraft/src/BlockLog.java b/src/main/java/net/minecraft/src/BlockLog.java index 6dcbdf1..7e91bc0 100644 --- a/src/main/java/net/minecraft/src/BlockLog.java +++ b/src/main/java/net/minecraft/src/BlockLog.java @@ -1,7 +1,8 @@ package net.minecraft.src; import java.util.List; -import java.util.Random; + +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockLog extends Block { /** 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. */ - public int quantityDropped(Random par1Random) { + public int quantityDropped(EaglercraftRandom par1Random) { return 1; } /** * 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; } diff --git a/src/main/java/net/minecraft/src/BlockMelon.java b/src/main/java/net/minecraft/src/BlockMelon.java index db4209d..f64bd1c 100644 --- a/src/main/java/net/minecraft/src/BlockMelon.java +++ b/src/main/java/net/minecraft/src/BlockMelon.java @@ -1,6 +1,6 @@ package net.minecraft.src; -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockMelon extends Block { private Icon theIcon; @@ -21,14 +21,14 @@ public class BlockMelon extends Block { /** * 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; } /** * 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); } @@ -36,7 +36,7 @@ public class BlockMelon extends Block { * Returns the usual quantity dropped by the block plus a bonus of 1 to 'i' * (inclusive). */ - public int quantityDroppedWithBonus(int par1, Random par2Random) { + public int quantityDroppedWithBonus(int par1, EaglercraftRandom par2Random) { int var3 = this.quantityDropped(par2Random) + par2Random.nextInt(1 + par1); if (var3 > 9) { diff --git a/src/main/java/net/minecraft/src/BlockMobSpawner.java b/src/main/java/net/minecraft/src/BlockMobSpawner.java index 7b1ad36..2cb01a0 100644 --- a/src/main/java/net/minecraft/src/BlockMobSpawner.java +++ b/src/main/java/net/minecraft/src/BlockMobSpawner.java @@ -1,6 +1,6 @@ package net.minecraft.src; -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockMobSpawner extends BlockContainer { protected BlockMobSpawner(int par1) { @@ -18,14 +18,14 @@ public class BlockMobSpawner extends BlockContainer { /** * 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; } /** * Returns the quantity of items to drop on block destruction. */ - public int quantityDropped(Random par1Random) { + public int quantityDropped(EaglercraftRandom par1Random) { return 0; } diff --git a/src/main/java/net/minecraft/src/BlockMushroom.java b/src/main/java/net/minecraft/src/BlockMushroom.java index fd7f261..91d82ff 100644 --- a/src/main/java/net/minecraft/src/BlockMushroom.java +++ b/src/main/java/net/minecraft/src/BlockMushroom.java @@ -1,6 +1,6 @@ package net.minecraft.src; -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockMushroom extends BlockFlower { private final String field_94374_a; @@ -16,7 +16,7 @@ public class BlockMushroom extends BlockFlower { /** * 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) { byte var6 = 4; int var7 = 5; diff --git a/src/main/java/net/minecraft/src/BlockMushroomCap.java b/src/main/java/net/minecraft/src/BlockMushroomCap.java index 443cead..1193413 100644 --- a/src/main/java/net/minecraft/src/BlockMushroomCap.java +++ b/src/main/java/net/minecraft/src/BlockMushroomCap.java @@ -1,6 +1,6 @@ package net.minecraft.src; -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockMushroomCap extends Block { 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. */ - public int quantityDropped(Random par1Random) { + public int quantityDropped(EaglercraftRandom par1Random) { int var2 = par1Random.nextInt(10) - 7; if (var2 < 0) { @@ -46,7 +46,7 @@ public class BlockMushroomCap extends Block { /** * 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; } diff --git a/src/main/java/net/minecraft/src/BlockNetherStalk.java b/src/main/java/net/minecraft/src/BlockNetherStalk.java index 513914e..23ffb16 100644 --- a/src/main/java/net/minecraft/src/BlockNetherStalk.java +++ b/src/main/java/net/minecraft/src/BlockNetherStalk.java @@ -1,6 +1,6 @@ package net.minecraft.src; -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockNetherStalk extends BlockFlower { 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 */ - 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); 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. */ - public int idDropped(int par1, Random par2Random, int par3) { + public int idDropped(int par1, EaglercraftRandom par2Random, int par3) { return 0; } /** * Returns the quantity of items to drop on block destruction. */ - public int quantityDropped(Random par1Random) { + public int quantityDropped(EaglercraftRandom par1Random) { return 0; } diff --git a/src/main/java/net/minecraft/src/BlockObsidian.java b/src/main/java/net/minecraft/src/BlockObsidian.java index 57dc43e..2b3054e 100644 --- a/src/main/java/net/minecraft/src/BlockObsidian.java +++ b/src/main/java/net/minecraft/src/BlockObsidian.java @@ -1,6 +1,6 @@ package net.minecraft.src; -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockObsidian extends BlockStone { public BlockObsidian(int par1) { @@ -10,14 +10,14 @@ public class BlockObsidian extends BlockStone { /** * Returns the quantity of items to drop on block destruction. */ - public int quantityDropped(Random par1Random) { + public int quantityDropped(EaglercraftRandom par1Random) { return 1; } /** * 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; } } diff --git a/src/main/java/net/minecraft/src/BlockOre.java b/src/main/java/net/minecraft/src/BlockOre.java index 000b267..5bbb798 100644 --- a/src/main/java/net/minecraft/src/BlockOre.java +++ b/src/main/java/net/minecraft/src/BlockOre.java @@ -1,6 +1,6 @@ package net.minecraft.src; -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockOre extends Block { public BlockOre(int par1) { @@ -11,7 +11,7 @@ public class BlockOre extends Block { /** * 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 : (this.blockID == Block.oreDiamond.blockID ? Item.diamond.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. */ - public int quantityDropped(Random par1Random) { + public int quantityDropped(EaglercraftRandom par1Random) { 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' * (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)) { int var3 = par2Random.nextInt(par1 + 2) - 1; diff --git a/src/main/java/net/minecraft/src/BlockPistonExtension.java b/src/main/java/net/minecraft/src/BlockPistonExtension.java index bf514b0..2f02792 100644 --- a/src/main/java/net/minecraft/src/BlockPistonExtension.java +++ b/src/main/java/net/minecraft/src/BlockPistonExtension.java @@ -1,7 +1,8 @@ package net.minecraft.src; import java.util.List; -import java.util.Random; + +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockPistonExtension extends Block { /** 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. */ - public int quantityDropped(Random par1Random) { + public int quantityDropped(EaglercraftRandom par1Random) { return 0; } diff --git a/src/main/java/net/minecraft/src/BlockPistonMoving.java b/src/main/java/net/minecraft/src/BlockPistonMoving.java index 3caed66..294f251 100644 --- a/src/main/java/net/minecraft/src/BlockPistonMoving.java +++ b/src/main/java/net/minecraft/src/BlockPistonMoving.java @@ -1,6 +1,6 @@ package net.minecraft.src; -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockPistonMoving extends BlockContainer { public BlockPistonMoving(int par1) { @@ -86,7 +86,7 @@ public class BlockPistonMoving extends BlockContainer { /** * 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; } diff --git a/src/main/java/net/minecraft/src/BlockRailBase.java b/src/main/java/net/minecraft/src/BlockRailBase.java index c59f4cd..f43ad4b 100644 --- a/src/main/java/net/minecraft/src/BlockRailBase.java +++ b/src/main/java/net/minecraft/src/BlockRailBase.java @@ -1,6 +1,6 @@ package net.minecraft.src; -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; public abstract class BlockRailBase extends Block { /** 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. */ - public int quantityDropped(Random par1Random) { + public int quantityDropped(EaglercraftRandom par1Random) { return 1; } diff --git a/src/main/java/net/minecraft/src/BlockRedstoneLight.java b/src/main/java/net/minecraft/src/BlockRedstoneLight.java index fdc8348..a2c5f2c 100644 --- a/src/main/java/net/minecraft/src/BlockRedstoneLight.java +++ b/src/main/java/net/minecraft/src/BlockRedstoneLight.java @@ -1,6 +1,6 @@ package net.minecraft.src; -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockRedstoneLight extends Block { /** 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. */ - public int idDropped(int par1, Random par2Random, int par3) { + public int idDropped(int par1, EaglercraftRandom par2Random, int par3) { return Block.redstoneLampIdle.blockID; } diff --git a/src/main/java/net/minecraft/src/BlockRedstoneLogic.java b/src/main/java/net/minecraft/src/BlockRedstoneLogic.java index 9a6411a..f0a1102 100644 --- a/src/main/java/net/minecraft/src/BlockRedstoneLogic.java +++ b/src/main/java/net/minecraft/src/BlockRedstoneLogic.java @@ -1,8 +1,6 @@ package net.minecraft.src; -import java.util.Random; - - +import net.lax1dude.eaglercraft.EaglercraftRandom; public abstract class BlockRedstoneLogic extends BlockDirectional { /** 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 */ - 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); if (!this.func_94476_e(par1World, par2, par3, par4, var6)) { diff --git a/src/main/java/net/minecraft/src/BlockRedstoneOre.java b/src/main/java/net/minecraft/src/BlockRedstoneOre.java index 8745970..ab1c347 100644 --- a/src/main/java/net/minecraft/src/BlockRedstoneOre.java +++ b/src/main/java/net/minecraft/src/BlockRedstoneOre.java @@ -1,7 +1,5 @@ package net.minecraft.src; -import java.util.Random; - import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockRedstoneOre extends Block { @@ -63,7 +61,7 @@ public class BlockRedstoneOre extends Block { /** * 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) { 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. */ - public int idDropped(int par1, Random par2Random, int par3) { + public int idDropped(int par1, EaglercraftRandom par2Random, int par3) { 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' * (inclusive). */ - public int quantityDroppedWithBonus(int par1, Random par2Random) { + public int quantityDroppedWithBonus(int par1, EaglercraftRandom par2Random) { return this.quantityDropped(par2Random) + par2Random.nextInt(par1 + 1); } /** * 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); } @@ -107,7 +105,7 @@ public class BlockRedstoneOre extends Block { * A randomly called display update to be able to add particles or other items * 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) { this.sparkle(par1World, par2, par3, par4); } diff --git a/src/main/java/net/minecraft/src/BlockRedstoneRepeater.java b/src/main/java/net/minecraft/src/BlockRedstoneRepeater.java index e17d992..9b2b667 100644 --- a/src/main/java/net/minecraft/src/BlockRedstoneRepeater.java +++ b/src/main/java/net/minecraft/src/BlockRedstoneRepeater.java @@ -1,6 +1,6 @@ package net.minecraft.src; -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockRedstoneRepeater extends BlockRedstoneLogic { /** 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. */ - public int idDropped(int par1, Random par2Random, int par3) { + public int idDropped(int par1, EaglercraftRandom par2Random, int par3) { 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 * 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) { int var6 = par1World.getBlockMetadata(par2, par3, par4); int var7 = getDirection(var6); diff --git a/src/main/java/net/minecraft/src/BlockRedstoneTorch.java b/src/main/java/net/minecraft/src/BlockRedstoneTorch.java index c625067..7c00201 100644 --- a/src/main/java/net/minecraft/src/BlockRedstoneTorch.java +++ b/src/main/java/net/minecraft/src/BlockRedstoneTorch.java @@ -4,7 +4,8 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.Random; + +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockRedstoneTorch extends BlockTorch { /** 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 */ - 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); 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. */ - public int idDropped(int par1, Random par2Random, int par3) { + public int idDropped(int par1, EaglercraftRandom par2Random, int par3) { 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 * 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) { int var6 = par1World.getBlockMetadata(par2, par3, par4); double var7 = (double) ((float) par2 + 0.5F) + (double) (par5Random.nextFloat() - 0.5F) * 0.2D; diff --git a/src/main/java/net/minecraft/src/BlockRedstoneWire.java b/src/main/java/net/minecraft/src/BlockRedstoneWire.java index 2b76af7..df309cb 100644 --- a/src/main/java/net/minecraft/src/BlockRedstoneWire.java +++ b/src/main/java/net/minecraft/src/BlockRedstoneWire.java @@ -2,9 +2,10 @@ package net.minecraft.src; import java.util.ArrayList; import java.util.HashSet; -import java.util.Random; import java.util.Set; +import net.lax1dude.eaglercraft.EaglercraftRandom; + public class BlockRedstoneWire extends Block { /** * 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. */ - public int idDropped(int par1, Random par2Random, int par3) { + public int idDropped(int par1, EaglercraftRandom par2Random, int par3) { 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 * 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); if (var6 > 0) { diff --git a/src/main/java/net/minecraft/src/BlockReed.java b/src/main/java/net/minecraft/src/BlockReed.java index ac75350..58f089c 100644 --- a/src/main/java/net/minecraft/src/BlockReed.java +++ b/src/main/java/net/minecraft/src/BlockReed.java @@ -1,6 +1,6 @@ package net.minecraft.src; -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockReed extends Block { protected BlockReed(int par1) { @@ -13,7 +13,7 @@ public class BlockReed extends Block { /** * 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)) { int var6; @@ -86,7 +86,7 @@ public class BlockReed extends Block { /** * 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; } diff --git a/src/main/java/net/minecraft/src/BlockSand.java b/src/main/java/net/minecraft/src/BlockSand.java index 0a33bd6..4f4a318 100644 --- a/src/main/java/net/minecraft/src/BlockSand.java +++ b/src/main/java/net/minecraft/src/BlockSand.java @@ -1,7 +1,5 @@ package net.minecraft.src; -import java.util.Random; - public class BlockSand extends Block { /** Do blocks fall instantly to where they stop or do they fall over time */ public static boolean fallInstantly = false; diff --git a/src/main/java/net/minecraft/src/BlockSapling.java b/src/main/java/net/minecraft/src/BlockSapling.java index 0bb17a2..55ec055 100644 --- a/src/main/java/net/minecraft/src/BlockSapling.java +++ b/src/main/java/net/minecraft/src/BlockSapling.java @@ -1,7 +1,6 @@ package net.minecraft.src; import java.util.List; -import java.util.Random; public class BlockSapling extends BlockFlower { public static final String[] WOOD_TYPES = new String[] { "oak", "spruce", "birch", "jungle" }; diff --git a/src/main/java/net/minecraft/src/BlockSign.java b/src/main/java/net/minecraft/src/BlockSign.java index 458f6d5..d13ddca 100644 --- a/src/main/java/net/minecraft/src/BlockSign.java +++ b/src/main/java/net/minecraft/src/BlockSign.java @@ -1,6 +1,6 @@ package net.minecraft.src; -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockSign extends BlockContainer { private Class signEntityClass; @@ -115,7 +115,7 @@ public class BlockSign extends BlockContainer { /** * 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; } diff --git a/src/main/java/net/minecraft/src/BlockSilverfish.java b/src/main/java/net/minecraft/src/BlockSilverfish.java index 9f42406..2dbb168 100644 --- a/src/main/java/net/minecraft/src/BlockSilverfish.java +++ b/src/main/java/net/minecraft/src/BlockSilverfish.java @@ -1,7 +1,8 @@ package net.minecraft.src; import java.util.List; -import java.util.Random; + +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockSilverfish extends Block { /** 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. */ - public int quantityDropped(Random par1Random) { + public int quantityDropped(EaglercraftRandom par1Random) { return 0; } diff --git a/src/main/java/net/minecraft/src/BlockSkull.java b/src/main/java/net/minecraft/src/BlockSkull.java index 275ec7a..ebcaa6c 100644 --- a/src/main/java/net/minecraft/src/BlockSkull.java +++ b/src/main/java/net/minecraft/src/BlockSkull.java @@ -1,6 +1,6 @@ package net.minecraft.src; -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockSkull extends BlockContainer { protected BlockSkull(int par1) { @@ -137,7 +137,7 @@ public class BlockSkull extends BlockContainer { /** * 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; } diff --git a/src/main/java/net/minecraft/src/BlockSnow.java b/src/main/java/net/minecraft/src/BlockSnow.java index a8843bf..2560843 100644 --- a/src/main/java/net/minecraft/src/BlockSnow.java +++ b/src/main/java/net/minecraft/src/BlockSnow.java @@ -1,6 +1,6 @@ package net.minecraft.src; -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockSnow extends Block { protected BlockSnow(int par1) { @@ -118,21 +118,21 @@ public class BlockSnow extends Block { /** * 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; } /** * Returns the quantity of items to drop on block destruction. */ - public int quantityDropped(Random par1Random) { + public int quantityDropped(EaglercraftRandom par1Random) { return 0; } /** * 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) { this.dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0); par1World.setBlockToAir(par2, par3, par4); diff --git a/src/main/java/net/minecraft/src/BlockSnowBlock.java b/src/main/java/net/minecraft/src/BlockSnowBlock.java index 223abcb..e0e870d 100644 --- a/src/main/java/net/minecraft/src/BlockSnowBlock.java +++ b/src/main/java/net/minecraft/src/BlockSnowBlock.java @@ -1,6 +1,6 @@ package net.minecraft.src; -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockSnowBlock extends Block { protected BlockSnowBlock(int par1) { @@ -12,21 +12,21 @@ public class BlockSnowBlock extends Block { /** * 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; } /** * Returns the quantity of items to drop on block destruction. */ - public int quantityDropped(Random par1Random) { + public int quantityDropped(EaglercraftRandom par1Random) { return 4; } /** * 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) { this.dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0); par1World.setBlockToAir(par2, par3, par4); diff --git a/src/main/java/net/minecraft/src/BlockStationary.java b/src/main/java/net/minecraft/src/BlockStationary.java index 1a73d56..c38c833 100644 --- a/src/main/java/net/minecraft/src/BlockStationary.java +++ b/src/main/java/net/minecraft/src/BlockStationary.java @@ -1,6 +1,6 @@ package net.minecraft.src; -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockStationary extends BlockFluid { protected BlockStationary(int par1, Material par2Material) { @@ -41,7 +41,7 @@ public class BlockStationary extends BlockFluid { /** * 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) { int var6 = par5Random.nextInt(3); int var7; diff --git a/src/main/java/net/minecraft/src/BlockStem.java b/src/main/java/net/minecraft/src/BlockStem.java index 6240408..ff5ab73 100644 --- a/src/main/java/net/minecraft/src/BlockStem.java +++ b/src/main/java/net/minecraft/src/BlockStem.java @@ -1,6 +1,6 @@ package net.minecraft.src; -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockStem extends BlockFlower { /** 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 */ - 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); 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. */ - public int idDropped(int par1, Random par2Random, int par3) { + public int idDropped(int par1, EaglercraftRandom par2Random, int par3) { return -1; } /** * Returns the quantity of items to drop on block destruction. */ - public int quantityDropped(Random par1Random) { + public int quantityDropped(EaglercraftRandom par1Random) { return 1; } diff --git a/src/main/java/net/minecraft/src/BlockStep.java b/src/main/java/net/minecraft/src/BlockStep.java index d3ab3ec..46af51a 100644 --- a/src/main/java/net/minecraft/src/BlockStep.java +++ b/src/main/java/net/minecraft/src/BlockStep.java @@ -1,7 +1,8 @@ package net.minecraft.src; import java.util.List; -import java.util.Random; + +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockStep extends BlockHalfSlab { /** 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. */ - public int idDropped(int par1, Random par2Random, int par3) { + public int idDropped(int par1, EaglercraftRandom par2Random, int par3) { return Block.stoneSingleSlab.blockID; } diff --git a/src/main/java/net/minecraft/src/BlockStone.java b/src/main/java/net/minecraft/src/BlockStone.java index 29b7ebb..dc749ee 100644 --- a/src/main/java/net/minecraft/src/BlockStone.java +++ b/src/main/java/net/minecraft/src/BlockStone.java @@ -1,6 +1,6 @@ package net.minecraft.src; -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockStone extends Block { public BlockStone(int par1) { @@ -11,7 +11,7 @@ public class BlockStone extends Block { /** * 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; } } diff --git a/src/main/java/net/minecraft/src/BlockTNT.java b/src/main/java/net/minecraft/src/BlockTNT.java index 66a4769..45d59a0 100644 --- a/src/main/java/net/minecraft/src/BlockTNT.java +++ b/src/main/java/net/minecraft/src/BlockTNT.java @@ -1,6 +1,6 @@ package net.minecraft.src; -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockTNT extends Block { private Icon field_94393_a; @@ -46,7 +46,7 @@ public class BlockTNT extends Block { /** * Returns the quantity of items to drop on block destruction. */ - public int quantityDropped(Random par1Random) { + public int quantityDropped(EaglercraftRandom par1Random) { return 1; } diff --git a/src/main/java/net/minecraft/src/BlockTallGrass.java b/src/main/java/net/minecraft/src/BlockTallGrass.java index e470a72..8acb59b 100644 --- a/src/main/java/net/minecraft/src/BlockTallGrass.java +++ b/src/main/java/net/minecraft/src/BlockTallGrass.java @@ -1,7 +1,8 @@ package net.minecraft.src; import java.util.List; -import java.util.Random; + +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockTallGrass extends BlockFlower { 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. */ - 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; } @@ -67,7 +68,7 @@ public class BlockTallGrass extends BlockFlower { * Returns the usual quantity dropped by the block plus a bonus of 1 to 'i' * (inclusive). */ - public int quantityDroppedWithBonus(int par1, Random par2Random) { + public int quantityDroppedWithBonus(int par1, EaglercraftRandom par2Random) { return 1 + par2Random.nextInt(par1 * 2 + 1); } diff --git a/src/main/java/net/minecraft/src/BlockTripWire.java b/src/main/java/net/minecraft/src/BlockTripWire.java index a6f5c6b..9b98d23 100644 --- a/src/main/java/net/minecraft/src/BlockTripWire.java +++ b/src/main/java/net/minecraft/src/BlockTripWire.java @@ -2,7 +2,8 @@ package net.minecraft.src; import java.util.Iterator; import java.util.List; -import java.util.Random; + +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockTripWire extends Block { public BlockTripWire(int par1) { @@ -61,7 +62,7 @@ public class BlockTripWire extends Block { /** * 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; } diff --git a/src/main/java/net/minecraft/src/BlockTripWireSource.java b/src/main/java/net/minecraft/src/BlockTripWireSource.java index d66d257..5698a1c 100644 --- a/src/main/java/net/minecraft/src/BlockTripWireSource.java +++ b/src/main/java/net/minecraft/src/BlockTripWireSource.java @@ -1,6 +1,6 @@ package net.minecraft.src; -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockTripWireSource extends Block { public BlockTripWireSource(int par1) { @@ -232,7 +232,7 @@ public class BlockTripWireSource extends Block { /** * 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); } diff --git a/src/main/java/net/minecraft/src/BlockVine.java b/src/main/java/net/minecraft/src/BlockVine.java index c323f1a..73a6d32 100644 --- a/src/main/java/net/minecraft/src/BlockVine.java +++ b/src/main/java/net/minecraft/src/BlockVine.java @@ -1,8 +1,6 @@ package net.minecraft.src; -import java.util.Random; - - +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockVine extends Block { public BlockVine(int par1) { @@ -241,14 +239,14 @@ public class BlockVine extends Block { /** * 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; } /** * Returns the quantity of items to drop on block destruction. */ - public int quantityDropped(Random par1Random) { + public int quantityDropped(EaglercraftRandom par1Random) { return 0; } } diff --git a/src/main/java/net/minecraft/src/BlockWeb.java b/src/main/java/net/minecraft/src/BlockWeb.java index 1844507..d379ff7 100644 --- a/src/main/java/net/minecraft/src/BlockWeb.java +++ b/src/main/java/net/minecraft/src/BlockWeb.java @@ -1,6 +1,6 @@ package net.minecraft.src; -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockWeb extends Block { public BlockWeb(int par1) { @@ -51,7 +51,7 @@ public class BlockWeb extends Block { /** * 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; } diff --git a/src/main/java/net/minecraft/src/BlockWoodSlab.java b/src/main/java/net/minecraft/src/BlockWoodSlab.java index e42cf18..ebe1f1b 100644 --- a/src/main/java/net/minecraft/src/BlockWoodSlab.java +++ b/src/main/java/net/minecraft/src/BlockWoodSlab.java @@ -1,7 +1,8 @@ package net.minecraft.src; import java.util.List; -import java.util.Random; + +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockWoodSlab extends BlockHalfSlab { /** 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. */ - public int idDropped(int par1, Random par2Random, int par3) { + public int idDropped(int par1, EaglercraftRandom par2Random, int par3) { return Block.woodSingleSlab.blockID; } diff --git a/src/main/java/net/minecraft/src/Chunk.java b/src/main/java/net/minecraft/src/Chunk.java index 0af10be..884410b 100644 --- a/src/main/java/net/minecraft/src/Chunk.java +++ b/src/main/java/net/minecraft/src/Chunk.java @@ -6,9 +6,8 @@ import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; -import java.util.Random; - +import net.lax1dude.eaglercraft.EaglercraftRandom; public class Chunk { /** @@ -926,8 +925,8 @@ public class Chunk { return this.isModified; } - public Random 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); + public EaglercraftRandom getRandomWithSeed(long 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() { diff --git a/src/main/java/net/minecraft/src/EffectRenderer.java b/src/main/java/net/minecraft/src/EffectRenderer.java index d6af2cf..a0a67fc 100644 --- a/src/main/java/net/minecraft/src/EffectRenderer.java +++ b/src/main/java/net/minecraft/src/EffectRenderer.java @@ -2,9 +2,9 @@ package net.minecraft.src; import java.util.ArrayList; import java.util.List; -import java.util.Random; import net.lax1dude.eaglercraft.EaglerAdapter; +import net.lax1dude.eaglercraft.EaglercraftRandom; import net.lax1dude.eaglercraft.TextureLocation; import net.lax1dude.eaglercraft.adapter.Tessellator; @@ -15,7 +15,7 @@ public class EffectRenderer { private RenderEngine renderer; /** RNG. */ - private Random rand = new Random(); + private EaglercraftRandom rand = new EaglercraftRandom(); public EffectRenderer(World par1World, RenderEngine par2RenderEngine) { if (par1World != null) { diff --git a/src/main/java/net/minecraft/src/EmptyChunk.java b/src/main/java/net/minecraft/src/EmptyChunk.java index 1176069..faefd9c 100644 --- a/src/main/java/net/minecraft/src/EmptyChunk.java +++ b/src/main/java/net/minecraft/src/EmptyChunk.java @@ -1,7 +1,8 @@ package net.minecraft.src; import java.util.List; -import java.util.Random; + +import net.lax1dude.eaglercraft.EaglercraftRandom; public class EmptyChunk extends Chunk { public EmptyChunk(World par1World, int par2, int par3) { @@ -179,8 +180,8 @@ public class EmptyChunk extends Chunk { return false; } - public Random 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); + public EaglercraftRandom getRandomWithSeed(long 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() { diff --git a/src/main/java/net/minecraft/src/Explosion.java b/src/main/java/net/minecraft/src/Explosion.java index 6ac7a57..39a5ae0 100644 --- a/src/main/java/net/minecraft/src/Explosion.java +++ b/src/main/java/net/minecraft/src/Explosion.java @@ -6,9 +6,8 @@ import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; -import java.util.Random; - +import net.lax1dude.eaglercraft.EaglercraftRandom; public class Explosion { /** 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 */ public boolean isSmoking = true; private int field_77289_h = 16; - private Random explosionRNG = new Random(); + private EaglercraftRandom explosionRNG = new EaglercraftRandom(); private World worldObj; public double explosionX; public double explosionY; diff --git a/src/main/java/net/minecraft/src/GuiEnchantment.java b/src/main/java/net/minecraft/src/GuiEnchantment.java index 75d4053..51cbaef 100644 --- a/src/main/java/net/minecraft/src/GuiEnchantment.java +++ b/src/main/java/net/minecraft/src/GuiEnchantment.java @@ -1,14 +1,13 @@ package net.minecraft.src; -import java.util.Random; - import net.lax1dude.eaglercraft.EaglerAdapter; +import net.lax1dude.eaglercraft.EaglercraftRandom; import net.lax1dude.eaglercraft.TextureLocation; public class GuiEnchantment extends GuiContainer { /** The book model used on the GUI. */ private static ModelBook bookModel = new ModelBook(); - private Random rand = new Random(); + private EaglercraftRandom rand = new EaglercraftRandom(); /** ContainerEnchantment object associated with this gui */ private ContainerEnchantment containerEnchantment; diff --git a/src/main/java/net/minecraft/src/GuiMainMenu.java b/src/main/java/net/minecraft/src/GuiMainMenu.java index 3d27e2d..718928b 100644 --- a/src/main/java/net/minecraft/src/GuiMainMenu.java +++ b/src/main/java/net/minecraft/src/GuiMainMenu.java @@ -3,21 +3,18 @@ package net.minecraft.src; import java.util.ArrayList; import java.util.Calendar; import java.util.Date; -import java.util.Random; import net.lax1dude.eaglercraft.ConfigConstants; import net.lax1dude.eaglercraft.EaglerAdapter; -import net.lax1dude.eaglercraft.EaglerImage; - +import net.lax1dude.eaglercraft.EaglercraftRandom; import net.lax1dude.eaglercraft.GuiScreenEditProfile; -import net.lax1dude.eaglercraft.GuiScreenVoiceChannel; import net.lax1dude.eaglercraft.LocalStorageManager; import net.lax1dude.eaglercraft.TextureLocation; import net.lax1dude.eaglercraft.adapter.Tessellator; public class GuiMainMenu extends GuiScreen { /** 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. */ private String splashText = "missingno"; diff --git a/src/main/java/net/minecraft/src/GuiScreen.java b/src/main/java/net/minecraft/src/GuiScreen.java index 61e7a7c..396cdcc 100644 --- a/src/main/java/net/minecraft/src/GuiScreen.java +++ b/src/main/java/net/minecraft/src/GuiScreen.java @@ -58,14 +58,14 @@ public class GuiScreen extends Gui { * Returns a string stored in the system clipboard. */ public static String getClipboardString() { - return ""; + return EaglerAdapter.getClipboard(); } /** * store a string in the system clipboard */ public static void setClipboardString(String par0Str) { - + EaglerAdapter.setClipboard(par0Str); } /** diff --git a/src/main/java/net/minecraft/src/GuiWinGame.java b/src/main/java/net/minecraft/src/GuiWinGame.java index ee25683..356ea9a 100644 --- a/src/main/java/net/minecraft/src/GuiWinGame.java +++ b/src/main/java/net/minecraft/src/GuiWinGame.java @@ -2,10 +2,10 @@ package net.minecraft.src; import java.util.ArrayList; import java.util.List; -import java.util.Random; import net.lax1dude.eaglercraft.EaglerAdapter; import net.lax1dude.eaglercraft.EaglerProfile; +import net.lax1dude.eaglercraft.EaglercraftRandom; import net.lax1dude.eaglercraft.TextureLocation; import net.lax1dude.eaglercraft.adapter.Tessellator; @@ -67,7 +67,7 @@ public class GuiWinGame extends GuiScreen { String var1 = ""; String var2 = "" + EnumChatFormatting.WHITE + EnumChatFormatting.OBFUSCATED + EnumChatFormatting.GREEN + EnumChatFormatting.AQUA; short var3 = 274; - Random var5 = new Random(8124371L); + EaglercraftRandom var5 = new EaglercraftRandom(8124371L); int var6; for(String str : EaglerAdapter.fileContentsLines("/title/win.txt")) { diff --git a/src/main/java/net/minecraft/src/Item.java b/src/main/java/net/minecraft/src/Item.java index 2493fe5..4ec424f 100644 --- a/src/main/java/net/minecraft/src/Item.java +++ b/src/main/java/net/minecraft/src/Item.java @@ -1,15 +1,14 @@ package net.minecraft.src; import java.util.List; -import java.util.Random; - +import net.lax1dude.eaglercraft.EaglercraftRandom; public class Item { private CreativeTabs tabToDisplayOn = null; /** The RNG used by the Item subclasses. */ - protected static Random itemRand = new Random(); + protected static EaglercraftRandom itemRand = new EaglercraftRandom(); /** A 32000 elements Item array. */ public static Item[] itemsList = new Item[32000]; diff --git a/src/main/java/net/minecraft/src/ModelBase.java b/src/main/java/net/minecraft/src/ModelBase.java index d7c4db0..f37ee6e 100644 --- a/src/main/java/net/minecraft/src/ModelBase.java +++ b/src/main/java/net/minecraft/src/ModelBase.java @@ -4,7 +4,8 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.Random; + +import net.lax1dude.eaglercraft.EaglercraftRandom; public abstract class ModelBase { public float onGround; @@ -44,7 +45,7 @@ public abstract class ModelBase { 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())); } diff --git a/src/main/java/net/minecraft/src/ModelGhast.java b/src/main/java/net/minecraft/src/ModelGhast.java index 8342948..e36253a 100644 --- a/src/main/java/net/minecraft/src/ModelGhast.java +++ b/src/main/java/net/minecraft/src/ModelGhast.java @@ -1,8 +1,7 @@ package net.minecraft.src; -import java.util.Random; - import net.lax1dude.eaglercraft.EaglerAdapter; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class ModelGhast extends ModelBase { ModelRenderer body; @@ -13,7 +12,7 @@ public class ModelGhast extends ModelBase { this.body = new ModelRenderer(this, 0, 0); this.body.addBox(-8.0F, -8.0F, -8.0F, 16, 16, 16); 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) { this.tentacles[var3] = new ModelRenderer(this, 0, 0); diff --git a/src/main/java/net/minecraft/src/NetClientHandler.java b/src/main/java/net/minecraft/src/NetClientHandler.java index b952a67..664730e 100644 --- a/src/main/java/net/minecraft/src/NetClientHandler.java +++ b/src/main/java/net/minecraft/src/NetClientHandler.java @@ -8,10 +8,10 @@ import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; -import java.util.Random; import net.lax1dude.eaglercraft.DefaultSkinRenderer; import net.lax1dude.eaglercraft.EaglerAdapter; +import net.lax1dude.eaglercraft.EaglercraftRandom; import net.lax1dude.eaglercraft.WebsocketNetworkManager; import net.minecraft.client.Minecraft; @@ -46,7 +46,7 @@ public class NetClientHandler extends NetHandler { private GuiScreen field_98183_l = null; /** RNG. */ - Random rand = new Random(); + EaglercraftRandom rand = new EaglercraftRandom(); public NetClientHandler(Minecraft par1Minecraft, String par2Str, int par3) throws IOException { this.mc = par1Minecraft; diff --git a/src/main/java/net/minecraft/src/Particle.java b/src/main/java/net/minecraft/src/Particle.java index 2167605..e8e76a7 100644 --- a/src/main/java/net/minecraft/src/Particle.java +++ b/src/main/java/net/minecraft/src/Particle.java @@ -1,9 +1,9 @@ package net.minecraft.src; -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class Particle { - private static Random rand = new Random(); + private static EaglercraftRandom rand = new EaglercraftRandom(); public double posX; public double posY; public double prevPosX; diff --git a/src/main/java/net/minecraft/src/RenderDragon.java b/src/main/java/net/minecraft/src/RenderDragon.java index 4e578f3..f041e87 100644 --- a/src/main/java/net/minecraft/src/RenderDragon.java +++ b/src/main/java/net/minecraft/src/RenderDragon.java @@ -1,9 +1,7 @@ package net.minecraft.src; -import java.util.Random; - import net.lax1dude.eaglercraft.EaglerAdapter; - +import net.lax1dude.eaglercraft.EaglercraftRandom; import net.lax1dude.eaglercraft.TextureLocation; import net.lax1dude.eaglercraft.adapter.Tessellator; @@ -158,7 +156,7 @@ public class RenderDragon extends RenderLiving { var5 = (var4 - 0.8F) / 0.2F; } - Random var6 = new Random(432L); + EaglercraftRandom var6 = new EaglercraftRandom(432L); EaglerAdapter.glDisable(EaglerAdapter.GL_TEXTURE_2D); EaglerAdapter.glShadeModel(EaglerAdapter.GL_SMOOTH); EaglerAdapter.glEnable(EaglerAdapter.GL_BLEND); diff --git a/src/main/java/net/minecraft/src/RenderEndPortal.java b/src/main/java/net/minecraft/src/RenderEndPortal.java index a4ce09a..93f7a91 100644 --- a/src/main/java/net/minecraft/src/RenderEndPortal.java +++ b/src/main/java/net/minecraft/src/RenderEndPortal.java @@ -1,9 +1,9 @@ package net.minecraft.src; import java.nio.FloatBuffer; -import java.util.Random; import net.minecraft.client.Minecraft; import net.lax1dude.eaglercraft.EaglerAdapter; +import net.lax1dude.eaglercraft.EaglercraftRandom; import net.lax1dude.eaglercraft.TextureLocation; import net.lax1dude.eaglercraft.adapter.Tessellator; @@ -22,7 +22,7 @@ public class RenderEndPortal extends TileEntitySpecialRenderer { float var11 = (float) this.tileEntityRenderer.playerZ; EaglerAdapter.glDisable(EaglerAdapter.GL_LIGHTING); EaglerAdapter.glDisable(EaglerAdapter.GL_ALPHA_TEST); - Random var12 = new Random(31100L); + EaglercraftRandom var12 = new EaglercraftRandom(31100L); float var13 = 0.75F; for (int var14 = 0; var14 < 16; ++var14) { diff --git a/src/main/java/net/minecraft/src/RenderEnderman.java b/src/main/java/net/minecraft/src/RenderEnderman.java index 49d9d56..6ef7bd0 100644 --- a/src/main/java/net/minecraft/src/RenderEnderman.java +++ b/src/main/java/net/minecraft/src/RenderEnderman.java @@ -1,14 +1,13 @@ package net.minecraft.src; -import java.util.Random; - import net.lax1dude.eaglercraft.EaglerAdapter; +import net.lax1dude.eaglercraft.EaglercraftRandom; import net.lax1dude.eaglercraft.TextureLocation; public class RenderEnderman extends RenderLiving { /** The model of the enderman */ private ModelEnderman endermanModel; - private Random rnd = new Random(); + private EaglercraftRandom rnd = new EaglercraftRandom(); public RenderEnderman() { super(new ModelEnderman(), 0.5F); diff --git a/src/main/java/net/minecraft/src/RenderLightningBolt.java b/src/main/java/net/minecraft/src/RenderLightningBolt.java index bce4cf3..1bdfd93 100644 --- a/src/main/java/net/minecraft/src/RenderLightningBolt.java +++ b/src/main/java/net/minecraft/src/RenderLightningBolt.java @@ -1,8 +1,7 @@ package net.minecraft.src; -import java.util.Random; - import net.lax1dude.eaglercraft.EaglerAdapter; +import net.lax1dude.eaglercraft.EaglercraftRandom; import net.lax1dude.eaglercraft.adapter.Tessellator; public class RenderLightningBolt extends Render { @@ -20,7 +19,7 @@ public class RenderLightningBolt extends Render { double[] var12 = new double[8]; double var13 = 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) { var11[var18] = var13; @@ -30,7 +29,7 @@ public class RenderLightningBolt extends Render { } 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) { int var20 = 7; diff --git a/src/main/java/net/minecraft/src/RenderLiving.java b/src/main/java/net/minecraft/src/RenderLiving.java index 7e19744..36bf69b 100644 --- a/src/main/java/net/minecraft/src/RenderLiving.java +++ b/src/main/java/net/minecraft/src/RenderLiving.java @@ -1,12 +1,11 @@ package net.minecraft.src; -import java.util.Random; - import net.minecraft.client.Minecraft; import net.lax1dude.eaglercraft.TextureLocation; import net.lax1dude.eaglercraft.adapter.Tessellator; import net.lax1dude.eaglercraft.DefaultSkinRenderer; import net.lax1dude.eaglercraft.EaglerAdapter; +import net.lax1dude.eaglercraft.EaglercraftRandom; public abstract class RenderLiving extends Render { @@ -287,7 +286,7 @@ public abstract class RenderLiving extends Render { if (var3 > 0) { 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(); for (int var6 = 0; var6 < var3; ++var6) { diff --git a/src/main/java/net/minecraft/src/SoundManager.java b/src/main/java/net/minecraft/src/SoundManager.java index ad56282..6c7bcdf 100644 --- a/src/main/java/net/minecraft/src/SoundManager.java +++ b/src/main/java/net/minecraft/src/SoundManager.java @@ -4,9 +4,9 @@ import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; -import java.util.Random; import net.lax1dude.eaglercraft.EaglerAdapter; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class SoundManager { @@ -42,13 +42,13 @@ public class SoundManager { private ArrayList soundevents; private ArrayList queuedsoundevents; private HashMap sounddefinitions; - private Random soundrandom; + private EaglercraftRandom soundrandom; public SoundManager() { this.soundevents = new ArrayList(); this.queuedsoundevents = new ArrayList(); 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 yaw = par1EntityLiving.prevRotationYaw + (par1EntityLiving.rotationYaw - par1EntityLiving.prevRotationYaw) * par2; - // suck my cock - try { EaglerAdapter.setListenerPos((float)x, (float)y, (float)z, (float)par1EntityLiving.motionX, (float)par1EntityLiving.motionY, (float)par1EntityLiving.motionZ, (float)pitch, (float)yaw); }catch(Throwable t) { - System.err.println("AudioListener fucked up again"); + System.err.println("AudioListener f***ed up again"); } } } diff --git a/src/main/java/net/minecraft/src/TileEntityDispenser.java b/src/main/java/net/minecraft/src/TileEntityDispenser.java index 1dd4c8d..35ae8e8 100644 --- a/src/main/java/net/minecraft/src/TileEntityDispenser.java +++ b/src/main/java/net/minecraft/src/TileEntityDispenser.java @@ -1,6 +1,6 @@ package net.minecraft.src; -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class TileEntityDispenser extends TileEntity implements IInventory { 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. */ - private Random dispenserRandom = new Random(); + private EaglercraftRandom dispenserRandom = new EaglercraftRandom(); protected String customName; /** diff --git a/src/main/java/net/minecraft/src/TileEntityEnchantmentTable.java b/src/main/java/net/minecraft/src/TileEntityEnchantmentTable.java index 0fef6e2..4d24647 100644 --- a/src/main/java/net/minecraft/src/TileEntityEnchantmentTable.java +++ b/src/main/java/net/minecraft/src/TileEntityEnchantmentTable.java @@ -1,8 +1,6 @@ package net.minecraft.src; -import java.util.Random; - - +import net.lax1dude.eaglercraft.EaglercraftRandom; public class TileEntityEnchantmentTable extends TileEntity { /** Used by the render to make the book 'bounce' */ @@ -24,7 +22,7 @@ public class TileEntityEnchantmentTable extends TileEntity { public float bookRotation2; public float bookRotationPrev; public float bookRotation; - private static Random rand = new Random(); + private static EaglercraftRandom rand = new EaglercraftRandom(); private String field_94136_s; /** diff --git a/src/main/java/net/minecraft/src/WorldClient.java b/src/main/java/net/minecraft/src/WorldClient.java index 89fb81a..2f92228 100644 --- a/src/main/java/net/minecraft/src/WorldClient.java +++ b/src/main/java/net/minecraft/src/WorldClient.java @@ -2,7 +2,6 @@ package net.minecraft.src; import java.util.HashSet; import java.util.Iterator; -import java.util.Random; import java.util.Set; import net.lax1dude.eaglercraft.EaglercraftRandom; diff --git a/src/teavm/java/net/lax1dude/eaglercraft/adapter/EaglerAdapterImpl2.java b/src/teavm/java/net/lax1dude/eaglercraft/adapter/EaglerAdapterImpl2.java index 719b64c..7bcba2f 100644 --- a/src/teavm/java/net/lax1dude/eaglercraft/adapter/EaglerAdapterImpl2.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/adapter/EaglerAdapterImpl2.java @@ -1082,6 +1082,9 @@ public class EaglerAdapterImpl2 { public static final void openLink(String url) { win.open(url, "_blank"); } + public static final void redirectTo(String url) { + Window.current().getLocation().setFullURL(url); + } @JSBody(params = { "str" }, script = "window.eval(str);") private static native void execute(String str); @@ -1566,5 +1569,13 @@ public class EaglerAdapterImpl2 { private static int remapKey(int 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) { + + } } diff --git a/stable-download/java/bukkit_command/SECURITY-NOTICE-PLEASE-READ.txt b/stable-download/java/bukkit_command/SECURITY-NOTICE-PLEASE-READ.txt index 5f78868..22088c1 100644 --- a/stable-download/java/bukkit_command/SECURITY-NOTICE-PLEASE-READ.txt +++ b/stable-download/java/bukkit_command/SECURITY-NOTICE-PLEASE-READ.txt @@ -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! -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!!! diff --git a/stable-download/java/bukkit_command/craftbukkit-1.5.2-R1.0.jar b/stable-download/java/bukkit_command/craftbukkit-1.5.2-R1.0.jar index 5ded45d..14c9730 100644 Binary files a/stable-download/java/bukkit_command/craftbukkit-1.5.2-R1.0.jar and b/stable-download/java/bukkit_command/craftbukkit-1.5.2-R1.0.jar differ diff --git a/stable-download/java/bukkit_command/readme.txt b/stable-download/java/bukkit_command/readme.txt new file mode 100644 index 0000000..22088c1 --- /dev/null +++ b/stable-download/java/bukkit_command/readme.txt @@ -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!!! \ No newline at end of file diff --git a/stable-download/readme.txt b/stable-download/readme.txt index fd707dd..a68d4de 100644 --- a/stable-download/readme.txt +++ b/stable-download/readme.txt @@ -13,7 +13,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" that is in the "java/bukkit_server" folder into the bukkit_server's "/plugins" folder and use only lowercase letters in your /op profile names! -Again, if you install the BitchFilterPlugin, 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 BitchFilterPlugin, 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!!!