From 86a9d3440f1dff097b1cdb858a4bde9da110c74f Mon Sep 17 00:00:00 2001 From: LAX1DUDE Date: Fri, 29 Apr 2022 23:28:44 -0700 Subject: [PATCH] Replaced java.util.Random with EaglercraftRandom --- src/main/java/net/minecraft/src/Block.java | 11 ++++++----- src/main/java/net/minecraft/src/BlockBed.java | 6 ++++-- .../java/net/minecraft/src/BlockBookshelf.java | 7 ++++--- .../java/net/minecraft/src/BlockButton.java | 6 ++++-- .../java/net/minecraft/src/BlockCactus.java | 7 ++++--- src/main/java/net/minecraft/src/BlockCake.java | 8 +++++--- .../java/net/minecraft/src/BlockChest.java | 8 +++++--- src/main/java/net/minecraft/src/BlockClay.java | 8 +++++--- .../java/net/minecraft/src/BlockCrops.java | 10 ++++++---- .../java/net/minecraft/src/BlockDispenser.java | 10 ++++++---- src/main/java/net/minecraft/src/BlockDoor.java | 6 ++++-- src/main/java/net/minecraft/src/BlockFire.java | 12 +++++++----- .../java/net/minecraft/src/BlockFlower.java | 6 ++++-- .../java/net/minecraft/src/BlockFlowing.java | 6 ++++-- .../java/net/minecraft/src/BlockFluids.java | 11 ++++++----- .../java/net/minecraft/src/BlockFurnace.java | 7 ++++--- .../java/net/minecraft/src/BlockGlass.java | 6 ++++-- .../java/net/minecraft/src/BlockGrass.java | 9 +++++---- .../java/net/minecraft/src/BlockGravel.java | 7 ++++--- src/main/java/net/minecraft/src/BlockIce.java | 9 +++++---- .../java/net/minecraft/src/BlockLadder.java | 6 ++++-- .../java/net/minecraft/src/BlockLeaves.java | 10 ++++++---- .../net/minecraft/src/BlockLightStone.java | 7 ++++--- src/main/java/net/minecraft/src/BlockLog.java | 8 +++++--- .../net/minecraft/src/BlockMinecartTrack.java | 7 ++++--- .../net/minecraft/src/BlockMobSpawner.java | 8 +++++--- .../java/net/minecraft/src/BlockObsidian.java | 8 +++++--- src/main/java/net/minecraft/src/BlockOre.java | 8 +++++--- .../java/net/minecraft/src/BlockPortal.java | 9 ++++----- .../net/minecraft/src/BlockPressurePlate.java | 5 +++-- .../net/minecraft/src/BlockRedstoneOre.java | 14 ++++++++------ .../minecraft/src/BlockRedstoneRepeater.java | 10 ++++++---- .../net/minecraft/src/BlockRedstoneTorch.java | 8 +++++--- .../net/minecraft/src/BlockRedstoneWire.java | 6 ++++-- src/main/java/net/minecraft/src/BlockReed.java | 8 +++++--- src/main/java/net/minecraft/src/BlockSand.java | 6 ++++-- .../java/net/minecraft/src/BlockSapling.java | 9 +++++---- src/main/java/net/minecraft/src/BlockSign.java | 7 ++++--- src/main/java/net/minecraft/src/BlockSnow.java | 11 ++++++----- .../java/net/minecraft/src/BlockSnowBlock.java | 11 ++++++----- src/main/java/net/minecraft/src/BlockSoil.java | 9 +++++---- .../java/net/minecraft/src/BlockStairs.java | 11 ++++++----- .../net/minecraft/src/BlockStationary.java | 7 ++++--- src/main/java/net/minecraft/src/BlockStep.java | 9 +++++---- .../java/net/minecraft/src/BlockStone.java | 7 ++++--- src/main/java/net/minecraft/src/BlockTNT.java | 7 ++++--- .../java/net/minecraft/src/BlockTorch.java | 6 +++--- src/main/java/net/minecraft/src/Chunk.java | 7 ++++--- .../minecraft/src/ChunkProviderGenerate.java | 7 ++++--- .../net/minecraft/src/ChunkProviderHell.java | 9 +++++---- .../java/net/minecraft/src/EffectRenderer.java | 6 +++--- .../java/net/minecraft/src/EmptyChunk.java | 7 ++++--- src/main/java/net/minecraft/src/Entity.java | 7 ++++--- .../java/net/minecraft/src/EntityRenderer.java | 6 +++--- .../java/net/minecraft/src/EntitySheep.java | 7 ++++--- src/main/java/net/minecraft/src/Explosion.java | 6 ++++-- .../java/net/minecraft/src/GuiCreateWorld.java | 7 ++----- src/main/java/net/minecraft/src/GuiIngame.java | 6 +++--- .../java/net/minecraft/src/GuiMainMenu.java | 8 +++----- src/main/java/net/minecraft/src/Item.java | 8 ++++---- .../java/net/minecraft/src/MapGenBase.java | 9 +++++---- .../java/net/minecraft/src/MapGenCaves.java | 7 ++++--- .../net/minecraft/src/MapGenCavesHell.java | 7 ++++--- .../java/net/minecraft/src/MobSpawnerBase.java | 10 ++++++---- .../net/minecraft/src/MobSpawnerForest.java | 7 ++++--- .../minecraft/src/MobSpawnerRainforest.java | 7 ++++--- .../net/minecraft/src/MobSpawnerTaiga.java | 7 ++++--- .../java/net/minecraft/src/ModelGhast.java | 4 ++-- .../net/minecraft/src/NetClientHandler.java | 6 +++--- .../net/minecraft/src/NoiseGenerator2.java | 9 +++++---- .../minecraft/src/NoiseGeneratorOctaves.java | 6 ++++-- .../minecraft/src/NoiseGeneratorOctaves2.java | 7 ++++--- .../minecraft/src/NoiseGeneratorPerlin.java | 9 +++++---- .../java/net/minecraft/src/RenderGlobal.java | 3 ++- .../java/net/minecraft/src/RenderItem.java | 7 +++---- .../java/net/minecraft/src/RenderPainting.java | 7 +++---- .../java/net/minecraft/src/Teleporter.java | 9 +++++---- .../net/minecraft/src/TexturePortalFX.java | 6 ++++-- .../net/minecraft/src/TileEntityDispenser.java | 8 +++++--- src/main/java/net/minecraft/src/World.java | 18 ++++++++++-------- .../net/minecraft/src/WorldChunkManager.java | 10 ++++++---- .../net/minecraft/src/WorldGenBigTree.java | 8 ++++---- .../java/net/minecraft/src/WorldGenCactus.java | 7 ++++--- .../java/net/minecraft/src/WorldGenClay.java | 7 ++++--- .../net/minecraft/src/WorldGenDungeons.java | 11 ++++++----- .../java/net/minecraft/src/WorldGenFire.java | 7 ++++--- .../net/minecraft/src/WorldGenFlowers.java | 7 ++++--- .../java/net/minecraft/src/WorldGenForest.java | 7 ++++--- .../net/minecraft/src/WorldGenHellLava.java | 7 ++++--- .../java/net/minecraft/src/WorldGenLakes.java | 7 ++++--- .../net/minecraft/src/WorldGenLightStone1.java | 7 ++++--- .../net/minecraft/src/WorldGenLightStone2.java | 7 ++++--- .../net/minecraft/src/WorldGenLiquids.java | 7 ++++--- .../net/minecraft/src/WorldGenMinable.java | 7 ++++--- .../net/minecraft/src/WorldGenPumpkin.java | 7 ++++--- .../java/net/minecraft/src/WorldGenReed.java | 7 ++++--- .../java/net/minecraft/src/WorldGenTaiga1.java | 7 ++++--- .../java/net/minecraft/src/WorldGenTaiga2.java | 7 ++++--- .../java/net/minecraft/src/WorldGenTrees.java | 7 ++++--- .../java/net/minecraft/src/WorldGenerator.java | 6 ++++-- 100 files changed, 442 insertions(+), 331 deletions(-) diff --git a/src/main/java/net/minecraft/src/Block.java b/src/main/java/net/minecraft/src/Block.java index 2692131..56b6a8f 100644 --- a/src/main/java/net/minecraft/src/Block.java +++ b/src/main/java/net/minecraft/src/Block.java @@ -5,7 +5,8 @@ package net.minecraft.src; // Decompiler options: packimports(3) braces deadcode import java.util.ArrayList; -import java.util.Random; + +import net.lax1dude.eaglercraft.EaglercraftRandom; public class Block { @@ -153,10 +154,10 @@ public class Block { return true; } - public void updateTick(World world, int i, int j, int k, Random random) { + public void updateTick(World world, int i, int j, int k, EaglercraftRandom random) { } - public void randomDisplayTick(World world, int i, int j, int k, Random random) { + public void randomDisplayTick(World world, int i, int j, int k, EaglercraftRandom random) { } public void onBlockDestroyedByPlayer(World world, int i, int j, int k, int l) { @@ -175,11 +176,11 @@ public class Block { public void onBlockRemoval(World world, int i, int j, int k) { } - public int quantityDropped(Random random) { + public int quantityDropped(EaglercraftRandom random) { return 1; } - public int idDropped(int i, Random random) { + public int idDropped(int i, EaglercraftRandom random) { return blockID; } diff --git a/src/main/java/net/minecraft/src/BlockBed.java b/src/main/java/net/minecraft/src/BlockBed.java index f628891..099ca2d 100644 --- a/src/main/java/net/minecraft/src/BlockBed.java +++ b/src/main/java/net/minecraft/src/BlockBed.java @@ -1,10 +1,12 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; public class BlockBed extends Block { @@ -94,7 +96,7 @@ public class BlockBed extends Block { } } - public int idDropped(int i, Random random) { + public int idDropped(int i, EaglercraftRandom random) { if (func_22032_d(i)) { return 0; } else { diff --git a/src/main/java/net/minecraft/src/BlockBookshelf.java b/src/main/java/net/minecraft/src/BlockBookshelf.java index aba0251..45624e5 100644 --- a/src/main/java/net/minecraft/src/BlockBookshelf.java +++ b/src/main/java/net/minecraft/src/BlockBookshelf.java @@ -1,10 +1,11 @@ package net.minecraft.src; -// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. +import net.lax1dude.eaglercraft.EaglercraftRandom; + +// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; public class BlockBookshelf extends Block { @@ -20,7 +21,7 @@ public class BlockBookshelf extends Block { } } - public int quantityDropped(Random random) { + public int quantityDropped(EaglercraftRandom random) { return 0; } } diff --git a/src/main/java/net/minecraft/src/BlockButton.java b/src/main/java/net/minecraft/src/BlockButton.java index d38b61c..d1be325 100644 --- a/src/main/java/net/minecraft/src/BlockButton.java +++ b/src/main/java/net/minecraft/src/BlockButton.java @@ -1,10 +1,12 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; public class BlockButton extends Block { @@ -207,7 +209,7 @@ public class BlockButton extends Block { return true; } - public void updateTick(World world, int i, int j, int k, Random random) { + public void updateTick(World world, int i, int j, int k, EaglercraftRandom random) { if (world.multiplayerWorld) { return; } diff --git a/src/main/java/net/minecraft/src/BlockCactus.java b/src/main/java/net/minecraft/src/BlockCactus.java index 643f04d..2e16721 100644 --- a/src/main/java/net/minecraft/src/BlockCactus.java +++ b/src/main/java/net/minecraft/src/BlockCactus.java @@ -1,11 +1,12 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; - public class BlockCactus extends Block { protected BlockCactus(int i, int j) { @@ -13,7 +14,7 @@ public class BlockCactus extends Block { setTickOnLoad(true); } - public void updateTick(World world, int i, int j, int k, Random random) { + public void updateTick(World world, int i, int j, int k, EaglercraftRandom random) { if (world.isAirBlock(i, j + 1, k)) { int l; for (l = 1; world.getBlockId(i, j - l, k) == blockID; l++) { diff --git a/src/main/java/net/minecraft/src/BlockCake.java b/src/main/java/net/minecraft/src/BlockCake.java index 4037656..af818fa 100644 --- a/src/main/java/net/minecraft/src/BlockCake.java +++ b/src/main/java/net/minecraft/src/BlockCake.java @@ -1,10 +1,12 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; public class BlockCake extends Block { @@ -119,11 +121,11 @@ public class BlockCake extends Block { return world.getBlockMaterial(i, j - 1, k).isSolid(); } - public int quantityDropped(Random random) { + public int quantityDropped(EaglercraftRandom random) { return 0; } - public int idDropped(int i, Random random) { + public int idDropped(int i, EaglercraftRandom random) { return 0; } } diff --git a/src/main/java/net/minecraft/src/BlockChest.java b/src/main/java/net/minecraft/src/BlockChest.java index 6b1da3b..401dac5 100644 --- a/src/main/java/net/minecraft/src/BlockChest.java +++ b/src/main/java/net/minecraft/src/BlockChest.java @@ -1,16 +1,18 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; public class BlockChest extends BlockContainer { protected BlockChest(int i) { super(i, Material.wood); - random = new Random(); + random = new EaglercraftRandom(); blockIndexInTexture = 26; } @@ -225,5 +227,5 @@ public class BlockChest extends BlockContainer { return new TileEntityChest(); } - private Random random; + private EaglercraftRandom random; } diff --git a/src/main/java/net/minecraft/src/BlockClay.java b/src/main/java/net/minecraft/src/BlockClay.java index ab0a052..9fa0f24 100644 --- a/src/main/java/net/minecraft/src/BlockClay.java +++ b/src/main/java/net/minecraft/src/BlockClay.java @@ -1,10 +1,12 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; public class BlockClay extends Block { @@ -12,11 +14,11 @@ public class BlockClay extends Block { super(i, j, Material.clay); } - public int idDropped(int i, Random random) { + public int idDropped(int i, EaglercraftRandom random) { return Item.clay.shiftedIndex; } - public int quantityDropped(Random random) { + public int quantityDropped(EaglercraftRandom random) { return 4; } } diff --git a/src/main/java/net/minecraft/src/BlockCrops.java b/src/main/java/net/minecraft/src/BlockCrops.java index bd0dfb6..b23b4e8 100644 --- a/src/main/java/net/minecraft/src/BlockCrops.java +++ b/src/main/java/net/minecraft/src/BlockCrops.java @@ -1,10 +1,12 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; public class BlockCrops extends BlockFlower { @@ -20,7 +22,7 @@ public class BlockCrops extends BlockFlower { return i == Block.tilledField.blockID; } - public void updateTick(World world, int i, int j, int k, Random random) { + public void updateTick(World world, int i, int j, int k, EaglercraftRandom random) { super.updateTick(world, i, j, k, random); if (world.getBlockLightValue(i, j + 1, k) >= 9) { int l = world.getBlockMetadata(i, j, k); @@ -105,7 +107,7 @@ public class BlockCrops extends BlockFlower { } } - public int idDropped(int i, Random random) { + public int idDropped(int i, EaglercraftRandom random) { if (i == 7) { return Item.wheat.shiftedIndex; } else { @@ -113,7 +115,7 @@ public class BlockCrops extends BlockFlower { } } - public int quantityDropped(Random random) { + public int quantityDropped(EaglercraftRandom random) { return 1; } } diff --git a/src/main/java/net/minecraft/src/BlockDispenser.java b/src/main/java/net/minecraft/src/BlockDispenser.java index 67bc366..9835417 100644 --- a/src/main/java/net/minecraft/src/BlockDispenser.java +++ b/src/main/java/net/minecraft/src/BlockDispenser.java @@ -1,10 +1,12 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; public class BlockDispenser extends BlockContainer { @@ -17,7 +19,7 @@ public class BlockDispenser extends BlockContainer { return 4; } - public int idDropped(int i, Random random) { + public int idDropped(int i, EaglercraftRandom random) { return Block.dispenser.blockID; } @@ -86,7 +88,7 @@ public class BlockDispenser extends BlockContainer { } } - private void dispenseItem(World world, int i, int j, int k, Random random) { + private void dispenseItem(World world, int i, int j, int k, EaglercraftRandom random) { int l = world.getBlockMetadata(i, j, k); float f = 0.0F; float f1 = 0.0F; @@ -158,7 +160,7 @@ public class BlockDispenser extends BlockContainer { } } - public void updateTick(World world, int i, int j, int k, Random random) { + public void updateTick(World world, int i, int j, int k, EaglercraftRandom random) { if (world.isBlockIndirectlyGettingPowered(i, j, k) || world.isBlockIndirectlyGettingPowered(i, j + 1, k)) { dispenseItem(world, i, j, k, random); } diff --git a/src/main/java/net/minecraft/src/BlockDoor.java b/src/main/java/net/minecraft/src/BlockDoor.java index 76ada15..ab9e996 100644 --- a/src/main/java/net/minecraft/src/BlockDoor.java +++ b/src/main/java/net/minecraft/src/BlockDoor.java @@ -1,10 +1,12 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; public class BlockDoor extends Block { @@ -169,7 +171,7 @@ public class BlockDoor extends Block { } } - public int idDropped(int i, Random random) { + public int idDropped(int i, EaglercraftRandom random) { if ((i & 8) != 0) { return 0; } diff --git a/src/main/java/net/minecraft/src/BlockFire.java b/src/main/java/net/minecraft/src/BlockFire.java index 2381e96..50e1b97 100644 --- a/src/main/java/net/minecraft/src/BlockFire.java +++ b/src/main/java/net/minecraft/src/BlockFire.java @@ -1,10 +1,12 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; public class BlockFire extends Block { @@ -42,7 +44,7 @@ public class BlockFire extends Block { return 3; } - public int quantityDropped(Random random) { + public int quantityDropped(EaglercraftRandom random) { return 0; } @@ -50,7 +52,7 @@ public class BlockFire extends Block { return 10; } - public void updateTick(World world, int i, int j, int k, Random random) { + public void updateTick(World world, int i, int j, int k, EaglercraftRandom random) { boolean flag = world.getBlockId(i, j - 1, k) == Block.bloodStone.blockID; int l = world.getBlockMetadata(i, j, k); if (l < 15) { @@ -105,7 +107,7 @@ public class BlockFire extends Block { } } - private void tryToCatchBlockOnFire(World world, int i, int j, int k, int l, Random random) { + private void tryToCatchBlockOnFire(World world, int i, int j, int k, int l, EaglercraftRandom random) { int i1 = abilityToCatchFire[world.getBlockId(i, j, k)]; if (random.nextInt(l) < i1) { boolean flag = world.getBlockId(i, j, k) == Block.tnt.blockID; @@ -197,7 +199,7 @@ public class BlockFire extends Block { } } - public void randomDisplayTick(World world, int i, int j, int k, Random random) { + public void randomDisplayTick(World world, int i, int j, int k, EaglercraftRandom random) { if (random.nextInt(24) == 0) { world.playSoundEffect((float) i + 0.5F, (float) j + 0.5F, (float) k + 0.5F, "fire.fire", 1.0F + random.nextFloat(), random.nextFloat() * 0.7F + 0.3F); diff --git a/src/main/java/net/minecraft/src/BlockFlower.java b/src/main/java/net/minecraft/src/BlockFlower.java index d2b0d5e..b7b5814 100644 --- a/src/main/java/net/minecraft/src/BlockFlower.java +++ b/src/main/java/net/minecraft/src/BlockFlower.java @@ -1,10 +1,12 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; public class BlockFlower extends Block { @@ -29,7 +31,7 @@ public class BlockFlower extends Block { func_268_h(world, i, j, k); } - public void updateTick(World world, int i, int j, int k, Random random) { + public void updateTick(World world, int i, int j, int k, EaglercraftRandom random) { func_268_h(world, i, j, k); } diff --git a/src/main/java/net/minecraft/src/BlockFlowing.java b/src/main/java/net/minecraft/src/BlockFlowing.java index cfd517e..8780291 100644 --- a/src/main/java/net/minecraft/src/BlockFlowing.java +++ b/src/main/java/net/minecraft/src/BlockFlowing.java @@ -1,10 +1,12 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; public class BlockFlowing extends BlockFluids { @@ -22,7 +24,7 @@ public class BlockFlowing extends BlockFluids { world.markBlockNeedsUpdate(i, j, k); } - public void updateTick(World world, int i, int j, int k, Random random) { + public void updateTick(World world, int i, int j, int k, EaglercraftRandom random) { int l = func_290_h(world, i, j, k); byte byte0 = 1; if (blockMaterial == Material.lava && !world.worldProvider.isHellWorld) { diff --git a/src/main/java/net/minecraft/src/BlockFluids.java b/src/main/java/net/minecraft/src/BlockFluids.java index a9e8874..0f76fb2 100644 --- a/src/main/java/net/minecraft/src/BlockFluids.java +++ b/src/main/java/net/minecraft/src/BlockFluids.java @@ -4,7 +4,8 @@ package net.minecraft.src; // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; + +import net.lax1dude.eaglercraft.EaglercraftRandom; public abstract class BlockFluids extends Block { @@ -86,11 +87,11 @@ public abstract class BlockFluids extends Block { return 4; } - public int idDropped(int i, Random random) { + public int idDropped(int i, EaglercraftRandom random) { return 0; } - public int quantityDropped(Random random) { + public int quantityDropped(EaglercraftRandom random) { return 0; } @@ -185,7 +186,7 @@ public abstract class BlockFluids extends Block { return f <= f1 ? f1 : f; } - public void updateTick(World world, int i, int j, int k, Random random) { + public void updateTick(World world, int i, int j, int k, EaglercraftRandom random) { super.updateTick(world, i, j, k, random); } @@ -193,7 +194,7 @@ public abstract class BlockFluids extends Block { return blockMaterial != Material.water ? 0 : 1; } - public void randomDisplayTick(World world, int i, int j, int k, Random random) { + public void randomDisplayTick(World world, int i, int j, int k, EaglercraftRandom random) { if (blockMaterial == Material.water && random.nextInt(64) == 0) { int l = world.getBlockMetadata(i, j, k); if (l > 0 && l < 8) { diff --git a/src/main/java/net/minecraft/src/BlockFurnace.java b/src/main/java/net/minecraft/src/BlockFurnace.java index 3383f75..e6da0b5 100644 --- a/src/main/java/net/minecraft/src/BlockFurnace.java +++ b/src/main/java/net/minecraft/src/BlockFurnace.java @@ -1,10 +1,11 @@ package net.minecraft.src; // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; public class BlockFurnace extends BlockContainer { @@ -14,7 +15,7 @@ public class BlockFurnace extends BlockContainer { blockIndexInTexture = 45; } - public int idDropped(int i, Random random) { + public int idDropped(int i, EaglercraftRandom random) { return Block.stoneOvenIdle.blockID; } @@ -62,7 +63,7 @@ public class BlockFurnace extends BlockContainer { } } - public void randomDisplayTick(World world, int i, int j, int k, Random random) { + public void randomDisplayTick(World world, int i, int j, int k, EaglercraftRandom random) { if (!isActive) { return; } diff --git a/src/main/java/net/minecraft/src/BlockGlass.java b/src/main/java/net/minecraft/src/BlockGlass.java index 7695a3f..613ee5a 100644 --- a/src/main/java/net/minecraft/src/BlockGlass.java +++ b/src/main/java/net/minecraft/src/BlockGlass.java @@ -1,10 +1,12 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; public class BlockGlass extends BlockBreakable { @@ -12,7 +14,7 @@ public class BlockGlass extends BlockBreakable { super(i, j, material, flag); } - public int quantityDropped(Random random) { + public int quantityDropped(EaglercraftRandom random) { return 0; } } diff --git a/src/main/java/net/minecraft/src/BlockGrass.java b/src/main/java/net/minecraft/src/BlockGrass.java index 649d7d1..e84f48b 100644 --- a/src/main/java/net/minecraft/src/BlockGrass.java +++ b/src/main/java/net/minecraft/src/BlockGrass.java @@ -1,11 +1,12 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; - public class BlockGrass extends Block { protected BlockGrass(int i) { @@ -32,7 +33,7 @@ public class BlockGrass extends Block { return ColorizerGrass.getGrassColor(d, d1); } - public void updateTick(World world, int i, int j, int k, Random random) { + public void updateTick(World world, int i, int j, int k, EaglercraftRandom random) { if (world.multiplayerWorld) { return; } @@ -52,7 +53,7 @@ public class BlockGrass extends Block { } } - public int idDropped(int i, Random random) { + public int idDropped(int i, EaglercraftRandom random) { return Block.dirt.idDropped(0, random); } } diff --git a/src/main/java/net/minecraft/src/BlockGravel.java b/src/main/java/net/minecraft/src/BlockGravel.java index 7fb2e66..4e74e4d 100644 --- a/src/main/java/net/minecraft/src/BlockGravel.java +++ b/src/main/java/net/minecraft/src/BlockGravel.java @@ -1,18 +1,19 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; - public class BlockGravel extends BlockSand { public BlockGravel(int i, int j) { super(i, j); } - public int idDropped(int i, Random random) { + public int idDropped(int i, EaglercraftRandom random) { if (random.nextInt(10) == 0) { return Item.flint.shiftedIndex; } else { diff --git a/src/main/java/net/minecraft/src/BlockIce.java b/src/main/java/net/minecraft/src/BlockIce.java index b96153d..69f5499 100644 --- a/src/main/java/net/minecraft/src/BlockIce.java +++ b/src/main/java/net/minecraft/src/BlockIce.java @@ -1,11 +1,12 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; - public class BlockIce extends BlockBreakable { public BlockIce(int i, int j) { @@ -29,11 +30,11 @@ public class BlockIce extends BlockBreakable { } } - public int quantityDropped(Random random) { + public int quantityDropped(EaglercraftRandom random) { return 0; } - public void updateTick(World world, int i, int j, int k, Random random) { + public void updateTick(World world, int i, int j, int k, EaglercraftRandom random) { if (world.getSavedLightValue(EnumSkyBlock.Block, i, j, k) > 11 - Block.lightOpacity[blockID]) { dropBlockAsItem(world, i, j, k, world.getBlockMetadata(i, j, k)); world.setBlockWithNotify(i, j, k, Block.waterMoving.blockID); diff --git a/src/main/java/net/minecraft/src/BlockLadder.java b/src/main/java/net/minecraft/src/BlockLadder.java index 80a55f2..e989281 100644 --- a/src/main/java/net/minecraft/src/BlockLadder.java +++ b/src/main/java/net/minecraft/src/BlockLadder.java @@ -1,10 +1,12 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; public class BlockLadder extends Block { @@ -112,7 +114,7 @@ public class BlockLadder extends Block { super.onNeighborBlockChange(world, i, j, k, l); } - public int quantityDropped(Random random) { + public int quantityDropped(EaglercraftRandom random) { return 1; } } diff --git a/src/main/java/net/minecraft/src/BlockLeaves.java b/src/main/java/net/minecraft/src/BlockLeaves.java index be7ce44..bb1d87d 100644 --- a/src/main/java/net/minecraft/src/BlockLeaves.java +++ b/src/main/java/net/minecraft/src/BlockLeaves.java @@ -1,10 +1,12 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; public class BlockLeaves extends BlockLeavesBase { @@ -50,7 +52,7 @@ public class BlockLeaves extends BlockLeavesBase { } } - public void updateTick(World world, int i, int j, int k, Random random) { + public void updateTick(World world, int i, int j, int k, EaglercraftRandom random) { if (world.multiplayerWorld) { return; } @@ -132,11 +134,11 @@ public class BlockLeaves extends BlockLeavesBase { world.setBlockWithNotify(i, j, k, 0); } - public int quantityDropped(Random random) { + public int quantityDropped(EaglercraftRandom random) { return random.nextInt(16) != 0 ? 0 : 1; } - public int idDropped(int i, Random random) { + public int idDropped(int i, EaglercraftRandom random) { return Block.sapling.blockID; } diff --git a/src/main/java/net/minecraft/src/BlockLightStone.java b/src/main/java/net/minecraft/src/BlockLightStone.java index 63e0d13..aadb1f5 100644 --- a/src/main/java/net/minecraft/src/BlockLightStone.java +++ b/src/main/java/net/minecraft/src/BlockLightStone.java @@ -1,18 +1,19 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; - public class BlockLightStone extends Block { public BlockLightStone(int i, int j, Material material) { super(i, j, material); } - public int idDropped(int i, Random random) { + public int idDropped(int i, EaglercraftRandom random) { return Item.lightStoneDust.shiftedIndex; } } diff --git a/src/main/java/net/minecraft/src/BlockLog.java b/src/main/java/net/minecraft/src/BlockLog.java index d313025..7eec0aa 100644 --- a/src/main/java/net/minecraft/src/BlockLog.java +++ b/src/main/java/net/minecraft/src/BlockLog.java @@ -1,10 +1,12 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; public class BlockLog extends Block { @@ -13,11 +15,11 @@ public class BlockLog extends Block { blockIndexInTexture = 20; } - public int quantityDropped(Random random) { + public int quantityDropped(EaglercraftRandom random) { return 1; } - public int idDropped(int i, Random random) { + public int idDropped(int i, EaglercraftRandom random) { return Block.wood.blockID; } diff --git a/src/main/java/net/minecraft/src/BlockMinecartTrack.java b/src/main/java/net/minecraft/src/BlockMinecartTrack.java index cdaa5df..1a42cac 100644 --- a/src/main/java/net/minecraft/src/BlockMinecartTrack.java +++ b/src/main/java/net/minecraft/src/BlockMinecartTrack.java @@ -1,11 +1,12 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; - public class BlockMinecartTrack extends Block { protected BlockMinecartTrack(int i, int j) { @@ -51,7 +52,7 @@ public class BlockMinecartTrack extends Block { return 9; } - public int quantityDropped(Random random) { + public int quantityDropped(EaglercraftRandom random) { return 1; } diff --git a/src/main/java/net/minecraft/src/BlockMobSpawner.java b/src/main/java/net/minecraft/src/BlockMobSpawner.java index ab2423b..e18204c 100644 --- a/src/main/java/net/minecraft/src/BlockMobSpawner.java +++ b/src/main/java/net/minecraft/src/BlockMobSpawner.java @@ -1,10 +1,12 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; public class BlockMobSpawner extends BlockContainer { @@ -16,11 +18,11 @@ public class BlockMobSpawner extends BlockContainer { return new TileEntityMobSpawner(); } - public int idDropped(int i, Random random) { + public int idDropped(int i, EaglercraftRandom random) { return 0; } - public int quantityDropped(Random random) { + public int quantityDropped(EaglercraftRandom random) { return 0; } diff --git a/src/main/java/net/minecraft/src/BlockObsidian.java b/src/main/java/net/minecraft/src/BlockObsidian.java index f6c9607..2929ed5 100644 --- a/src/main/java/net/minecraft/src/BlockObsidian.java +++ b/src/main/java/net/minecraft/src/BlockObsidian.java @@ -1,10 +1,12 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; public class BlockObsidian extends BlockStone { @@ -12,11 +14,11 @@ public class BlockObsidian extends BlockStone { super(i, j); } - public int quantityDropped(Random random) { + public int quantityDropped(EaglercraftRandom random) { return 1; } - public int idDropped(int i, Random random) { + public int idDropped(int i, EaglercraftRandom random) { 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 a6cb701..9dd2605 100644 --- a/src/main/java/net/minecraft/src/BlockOre.java +++ b/src/main/java/net/minecraft/src/BlockOre.java @@ -1,10 +1,12 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; public class BlockOre extends Block { @@ -12,7 +14,7 @@ public class BlockOre extends Block { super(i, j, Material.rock); } - public int idDropped(int i, Random random) { + public int idDropped(int i, EaglercraftRandom random) { if (blockID == Block.oreCoal.blockID) { return Item.coal.shiftedIndex; } @@ -26,7 +28,7 @@ public class BlockOre extends Block { } } - public int quantityDropped(Random random) { + public int quantityDropped(EaglercraftRandom random) { if (blockID == Block.oreLapis.blockID) { return 4 + random.nextInt(5); } else { diff --git a/src/main/java/net/minecraft/src/BlockPortal.java b/src/main/java/net/minecraft/src/BlockPortal.java index c6653c4..9b3a146 100644 --- a/src/main/java/net/minecraft/src/BlockPortal.java +++ b/src/main/java/net/minecraft/src/BlockPortal.java @@ -4,8 +4,8 @@ package net.minecraft.src; // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.io.PrintStream; -import java.util.Random; + +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockPortal extends BlockBreakable { @@ -48,7 +48,6 @@ public class BlockPortal extends BlockBreakable { || world.getBlockId(i, j, k + 1) == Block.obsidian.blockID) { i1 = 1; } - System.out.println((new StringBuilder()).append(l).append(", ").append(i1).toString()); if (l == i1) { return false; } @@ -130,7 +129,7 @@ public class BlockPortal extends BlockBreakable { return true; } - public int quantityDropped(Random random) { + public int quantityDropped(EaglercraftRandom random) { return 0; } @@ -147,7 +146,7 @@ public class BlockPortal extends BlockBreakable { } } - public void randomDisplayTick(World world, int i, int j, int k, Random random) { + public void randomDisplayTick(World world, int i, int j, int k, EaglercraftRandom random) { if (random.nextInt(100) == 0) { world.playSoundEffect((double) i + 0.5D, (double) j + 0.5D, (double) k + 0.5D, "portal.portal", 1.0F, random.nextFloat() * 0.4F + 0.8F); diff --git a/src/main/java/net/minecraft/src/BlockPressurePlate.java b/src/main/java/net/minecraft/src/BlockPressurePlate.java index 19cacd1..9488cbd 100644 --- a/src/main/java/net/minecraft/src/BlockPressurePlate.java +++ b/src/main/java/net/minecraft/src/BlockPressurePlate.java @@ -5,7 +5,8 @@ package net.minecraft.src; // Decompiler options: packimports(3) braces deadcode import java.util.List; -import java.util.Random; + +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockPressurePlate extends Block { @@ -51,7 +52,7 @@ public class BlockPressurePlate extends Block { } } - public void updateTick(World world, int i, int j, int k, Random random) { + public void updateTick(World world, int i, int j, int k, EaglercraftRandom random) { if (world.multiplayerWorld) { return; } diff --git a/src/main/java/net/minecraft/src/BlockRedstoneOre.java b/src/main/java/net/minecraft/src/BlockRedstoneOre.java index 719db7d..5e8988e 100644 --- a/src/main/java/net/minecraft/src/BlockRedstoneOre.java +++ b/src/main/java/net/minecraft/src/BlockRedstoneOre.java @@ -1,10 +1,12 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; public class BlockRedstoneOre extends Block { @@ -42,28 +44,28 @@ public class BlockRedstoneOre extends Block { } } - public void updateTick(World world, int i, int j, int k, Random random) { + public void updateTick(World world, int i, int j, int k, EaglercraftRandom random) { if (blockID == Block.oreRedstoneGlowing.blockID) { world.setBlockWithNotify(i, j, k, Block.oreRedstone.blockID); } } - public int idDropped(int i, Random random) { + public int idDropped(int i, EaglercraftRandom random) { return Item.redstone.shiftedIndex; } - public int quantityDropped(Random random) { + public int quantityDropped(EaglercraftRandom random) { return 4 + random.nextInt(2); } - public void randomDisplayTick(World world, int i, int j, int k, Random random) { + public void randomDisplayTick(World world, int i, int j, int k, EaglercraftRandom random) { if (field_468_a) { func_319_i(world, i, j, k); } } private void func_319_i(World world, int i, int j, int k) { - Random random = world.rand; + EaglercraftRandom random = world.rand; double d = 0.0625D; for (int l = 0; l < 6; l++) { double d1 = (float) i + random.nextFloat(); diff --git a/src/main/java/net/minecraft/src/BlockRedstoneRepeater.java b/src/main/java/net/minecraft/src/BlockRedstoneRepeater.java index 518b64d..89d0ea6 100644 --- a/src/main/java/net/minecraft/src/BlockRedstoneRepeater.java +++ b/src/main/java/net/minecraft/src/BlockRedstoneRepeater.java @@ -1,10 +1,12 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; public class BlockRedstoneRepeater extends Block { @@ -34,7 +36,7 @@ public class BlockRedstoneRepeater extends Block { } } - public void updateTick(World world, int i, int j, int k, Random random) { + public void updateTick(World world, int i, int j, int k, EaglercraftRandom random) { int l = world.getBlockMetadata(i, j, k); boolean flag = func_22022_g(world, i, j, k, l); if (field_22025_c && !flag) { @@ -160,11 +162,11 @@ public class BlockRedstoneRepeater extends Block { return false; } - public int idDropped(int i, Random random) { + public int idDropped(int i, EaglercraftRandom random) { return Item.field_22018_aZ.shiftedIndex; } - public void randomDisplayTick(World world, int i, int j, int k, Random random) { + public void randomDisplayTick(World world, int i, int j, int k, EaglercraftRandom random) { if (!field_22025_c) { return; } diff --git a/src/main/java/net/minecraft/src/BlockRedstoneTorch.java b/src/main/java/net/minecraft/src/BlockRedstoneTorch.java index d7d236c..ad95073 100644 --- a/src/main/java/net/minecraft/src/BlockRedstoneTorch.java +++ b/src/main/java/net/minecraft/src/BlockRedstoneTorch.java @@ -6,6 +6,8 @@ package net.minecraft.src; import java.util.*; +import net.lax1dude.eaglercraft.EaglercraftRandom; + public class BlockRedstoneTorch extends BlockTorch { public int getBlockTextureFromSideAndMetadata(int i, int j) { @@ -104,7 +106,7 @@ public class BlockRedstoneTorch extends BlockTorch { return l == 2 && world.isBlockIndirectlyProvidingPowerTo(i + 1, j, k, 5); } - public void updateTick(World world, int i, int j, int k, Random random) { + public void updateTick(World world, int i, int j, int k, EaglercraftRandom random) { boolean flag = func_22026_h(world, i, j, k); for (; torchUpdates.size() > 0 && world.func_22139_r() - ((RedstoneUpdateInfo) torchUpdates.get(0)).updateTime > 100L; torchUpdates @@ -145,7 +147,7 @@ public class BlockRedstoneTorch extends BlockTorch { } } - public int idDropped(int i, Random random) { + public int idDropped(int i, EaglercraftRandom random) { return Block.torchRedstoneActive.blockID; } @@ -153,7 +155,7 @@ public class BlockRedstoneTorch extends BlockTorch { return true; } - public void randomDisplayTick(World world, int i, int j, int k, Random random) { + public void randomDisplayTick(World world, int i, int j, int k, EaglercraftRandom random) { if (!torchActive) { return; } diff --git a/src/main/java/net/minecraft/src/BlockRedstoneWire.java b/src/main/java/net/minecraft/src/BlockRedstoneWire.java index fab8678..b5b0d57 100644 --- a/src/main/java/net/minecraft/src/BlockRedstoneWire.java +++ b/src/main/java/net/minecraft/src/BlockRedstoneWire.java @@ -6,6 +6,8 @@ package net.minecraft.src; import java.util.*; +import net.lax1dude.eaglercraft.EaglercraftRandom; + public class BlockRedstoneWire extends Block { public BlockRedstoneWire(int i, int j) { @@ -259,7 +261,7 @@ public class BlockRedstoneWire extends Block { super.onNeighborBlockChange(world, i, j, k, l); } - public int idDropped(int i, Random random) { + public int idDropped(int i, EaglercraftRandom random) { return Item.redstone.shiftedIndex; } @@ -322,7 +324,7 @@ public class BlockRedstoneWire extends Block { return wiresProvidePower; } - public void randomDisplayTick(World world, int i, int j, int k, Random random) { + public void randomDisplayTick(World world, int i, int j, int k, EaglercraftRandom random) { int l = world.getBlockMetadata(i, j, k); if (l > 0) { double d = (double) i + 0.5D + ((double) random.nextFloat() - 0.5D) * 0.20000000000000001D; diff --git a/src/main/java/net/minecraft/src/BlockReed.java b/src/main/java/net/minecraft/src/BlockReed.java index a2d91ac..cf73114 100644 --- a/src/main/java/net/minecraft/src/BlockReed.java +++ b/src/main/java/net/minecraft/src/BlockReed.java @@ -1,10 +1,12 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; public class BlockReed extends Block { @@ -16,7 +18,7 @@ public class BlockReed extends Block { setTickOnLoad(true); } - public void updateTick(World world, int i, int j, int k, Random random) { + public void updateTick(World world, int i, int j, int k, EaglercraftRandom random) { if (world.isAirBlock(i, j + 1, k)) { int l; for (l = 1; world.getBlockId(i, j - l, k) == blockID; l++) { @@ -72,7 +74,7 @@ public class BlockReed extends Block { return null; } - public int idDropped(int i, Random random) { + public int idDropped(int i, EaglercraftRandom random) { return Item.reed.shiftedIndex; } diff --git a/src/main/java/net/minecraft/src/BlockSand.java b/src/main/java/net/minecraft/src/BlockSand.java index ad312eb..c58d338 100644 --- a/src/main/java/net/minecraft/src/BlockSand.java +++ b/src/main/java/net/minecraft/src/BlockSand.java @@ -1,10 +1,12 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; public class BlockSand extends Block { @@ -20,7 +22,7 @@ public class BlockSand extends Block { world.scheduleBlockUpdate(i, j, k, blockID, tickRate()); } - public void updateTick(World world, int i, int j, int k, Random random) { + public void updateTick(World world, int i, int j, int k, EaglercraftRandom random) { tryToFall(world, i, j, k); } diff --git a/src/main/java/net/minecraft/src/BlockSapling.java b/src/main/java/net/minecraft/src/BlockSapling.java index 45dc81e..d1da524 100644 --- a/src/main/java/net/minecraft/src/BlockSapling.java +++ b/src/main/java/net/minecraft/src/BlockSapling.java @@ -1,11 +1,12 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; - public class BlockSapling extends BlockFlower { protected BlockSapling(int i, int j) { @@ -14,7 +15,7 @@ public class BlockSapling extends BlockFlower { setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, f * 2.0F, 0.5F + f); } - public void updateTick(World world, int i, int j, int k, Random random) { + public void updateTick(World world, int i, int j, int k, EaglercraftRandom random) { super.updateTick(world, i, j, k, random); if (world.getBlockLightValue(i, j + 1, k) >= 9 && random.nextInt(5) == 0) { int l = world.getBlockMetadata(i, j, k); @@ -26,7 +27,7 @@ public class BlockSapling extends BlockFlower { } } - public void growTree(World world, int i, int j, int k, Random random) { + public void growTree(World world, int i, int j, int k, EaglercraftRandom random) { world.setBlock(i, j, k, 0); Object obj = new WorldGenTrees(); if (random.nextInt(10) == 0) { diff --git a/src/main/java/net/minecraft/src/BlockSign.java b/src/main/java/net/minecraft/src/BlockSign.java index 304d023..d2c09f1 100644 --- a/src/main/java/net/minecraft/src/BlockSign.java +++ b/src/main/java/net/minecraft/src/BlockSign.java @@ -1,11 +1,12 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; - public class BlockSign extends BlockContainer { protected BlockSign(int i, Class class1, boolean flag) { @@ -72,7 +73,7 @@ public class BlockSign extends BlockContainer { } } - public int idDropped(int i, Random random) { + public int idDropped(int i, EaglercraftRandom random) { return Item.sign.shiftedIndex; } diff --git a/src/main/java/net/minecraft/src/BlockSnow.java b/src/main/java/net/minecraft/src/BlockSnow.java index c3b6040..82cf581 100644 --- a/src/main/java/net/minecraft/src/BlockSnow.java +++ b/src/main/java/net/minecraft/src/BlockSnow.java @@ -1,11 +1,12 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; - public class BlockSnow extends Block { protected BlockSnow(int i, int j) { @@ -62,15 +63,15 @@ public class BlockSnow extends Block { world.setBlockWithNotify(i, j, k, 0); } - public int idDropped(int i, Random random) { + public int idDropped(int i, EaglercraftRandom random) { return Item.snowball.shiftedIndex; } - public int quantityDropped(Random random) { + public int quantityDropped(EaglercraftRandom random) { return 0; } - public void updateTick(World world, int i, int j, int k, Random random) { + public void updateTick(World world, int i, int j, int k, EaglercraftRandom random) { if (world.getSavedLightValue(EnumSkyBlock.Block, i, j, k) > 11) { dropBlockAsItem(world, i, j, k, world.getBlockMetadata(i, j, k)); world.setBlockWithNotify(i, j, k, 0); diff --git a/src/main/java/net/minecraft/src/BlockSnowBlock.java b/src/main/java/net/minecraft/src/BlockSnowBlock.java index 2167db3..cfe093b 100644 --- a/src/main/java/net/minecraft/src/BlockSnowBlock.java +++ b/src/main/java/net/minecraft/src/BlockSnowBlock.java @@ -1,11 +1,12 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; - public class BlockSnowBlock extends Block { protected BlockSnowBlock(int i, int j) { @@ -13,15 +14,15 @@ public class BlockSnowBlock extends Block { setTickOnLoad(true); } - public int idDropped(int i, Random random) { + public int idDropped(int i, EaglercraftRandom random) { return Item.snowball.shiftedIndex; } - public int quantityDropped(Random random) { + public int quantityDropped(EaglercraftRandom random) { return 4; } - public void updateTick(World world, int i, int j, int k, Random random) { + public void updateTick(World world, int i, int j, int k, EaglercraftRandom random) { if (world.getSavedLightValue(EnumSkyBlock.Block, i, j, k) > 11) { dropBlockAsItem(world, i, j, k, world.getBlockMetadata(i, j, k)); world.setBlockWithNotify(i, j, k, 0); diff --git a/src/main/java/net/minecraft/src/BlockSoil.java b/src/main/java/net/minecraft/src/BlockSoil.java index 70b8b8f..21bc3ee 100644 --- a/src/main/java/net/minecraft/src/BlockSoil.java +++ b/src/main/java/net/minecraft/src/BlockSoil.java @@ -1,11 +1,12 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; - public class BlockSoil extends Block { protected BlockSoil(int i) { @@ -39,7 +40,7 @@ public class BlockSoil extends Block { } } - public void updateTick(World world, int i, int j, int k, Random random) { + public void updateTick(World world, int i, int j, int k, EaglercraftRandom random) { if (random.nextInt(5) == 0) { if (isWaterNearby(world, i, j, k)) { world.setBlockMetadataWithNotify(i, j, k, 7); @@ -98,7 +99,7 @@ public class BlockSoil extends Block { } } - public int idDropped(int i, Random random) { + public int idDropped(int i, EaglercraftRandom random) { return Block.dirt.idDropped(0, random); } } diff --git a/src/main/java/net/minecraft/src/BlockStairs.java b/src/main/java/net/minecraft/src/BlockStairs.java index 9919beb..9286b8f 100644 --- a/src/main/java/net/minecraft/src/BlockStairs.java +++ b/src/main/java/net/minecraft/src/BlockStairs.java @@ -5,7 +5,8 @@ package net.minecraft.src; // Decompiler options: packimports(3) braces deadcode import java.util.ArrayList; -import java.util.Random; + +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockStairs extends Block { @@ -68,7 +69,7 @@ public class BlockStairs extends Block { setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); } - public void randomDisplayTick(World world, int i, int j, int k, Random random) { + public void randomDisplayTick(World world, int i, int j, int k, EaglercraftRandom random) { modelBlock.randomDisplayTick(world, i, j, k, random); } @@ -92,11 +93,11 @@ public class BlockStairs extends Block { return modelBlock.getRenderBlockPass(); } - public int idDropped(int i, Random random) { + public int idDropped(int i, EaglercraftRandom random) { return modelBlock.idDropped(i, random); } - public int quantityDropped(Random random) { + public int quantityDropped(EaglercraftRandom random) { return modelBlock.quantityDropped(random); } @@ -157,7 +158,7 @@ public class BlockStairs extends Block { modelBlock.onEntityWalking(world, i, j, k, entity); } - public void updateTick(World world, int i, int j, int k, Random random) { + public void updateTick(World world, int i, int j, int k, EaglercraftRandom random) { modelBlock.updateTick(world, i, j, k, random); } diff --git a/src/main/java/net/minecraft/src/BlockStationary.java b/src/main/java/net/minecraft/src/BlockStationary.java index 6bd797f..682d4ea 100644 --- a/src/main/java/net/minecraft/src/BlockStationary.java +++ b/src/main/java/net/minecraft/src/BlockStationary.java @@ -1,11 +1,12 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; - public class BlockStationary extends BlockFluids { protected BlockStationary(int i, Material material) { @@ -32,7 +33,7 @@ public class BlockStationary extends BlockFluids { world.field_1043_h = false; } - public void updateTick(World world, int i, int j, int k, Random random) { + public void updateTick(World world, int i, int j, int k, EaglercraftRandom random) { if (blockMaterial == Material.lava) { int l = random.nextInt(3); for (int i1 = 0; i1 < l; i1++) { diff --git a/src/main/java/net/minecraft/src/BlockStep.java b/src/main/java/net/minecraft/src/BlockStep.java index bbad700..5fa429a 100644 --- a/src/main/java/net/minecraft/src/BlockStep.java +++ b/src/main/java/net/minecraft/src/BlockStep.java @@ -1,11 +1,12 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; - public class BlockStep extends Block { public BlockStep(int i, boolean flag) { @@ -57,11 +58,11 @@ public class BlockStep extends Block { } } - public int idDropped(int i, Random random) { + public int idDropped(int i, EaglercraftRandom random) { return Block.stairSingle.blockID; } - public int quantityDropped(Random random) { + public int quantityDropped(EaglercraftRandom random) { return !blockType ? 1 : 2; } diff --git a/src/main/java/net/minecraft/src/BlockStone.java b/src/main/java/net/minecraft/src/BlockStone.java index 69b3288..fe846ae 100644 --- a/src/main/java/net/minecraft/src/BlockStone.java +++ b/src/main/java/net/minecraft/src/BlockStone.java @@ -1,18 +1,19 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; - public class BlockStone extends Block { public BlockStone(int i, int j) { super(i, j, Material.rock); } - public int idDropped(int i, Random random) { + public int idDropped(int i, EaglercraftRandom random) { 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 1ae71a5..f155ff0 100644 --- a/src/main/java/net/minecraft/src/BlockTNT.java +++ b/src/main/java/net/minecraft/src/BlockTNT.java @@ -1,11 +1,12 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; - public class BlockTNT extends Block { public BlockTNT(int i, int j) { @@ -30,7 +31,7 @@ public class BlockTNT extends Block { } } - public int quantityDropped(Random random) { + public int quantityDropped(EaglercraftRandom random) { return 0; } diff --git a/src/main/java/net/minecraft/src/BlockTorch.java b/src/main/java/net/minecraft/src/BlockTorch.java index 5cdce81..74fe8fe 100644 --- a/src/main/java/net/minecraft/src/BlockTorch.java +++ b/src/main/java/net/minecraft/src/BlockTorch.java @@ -4,7 +4,7 @@ package net.minecraft.src; // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class BlockTorch extends Block { @@ -65,7 +65,7 @@ public class BlockTorch extends Block { world.setBlockMetadataWithNotify(i, j, k, i1); } - public void updateTick(World world, int i, int j, int k, Random random) { + public void updateTick(World world, int i, int j, int k, EaglercraftRandom random) { super.updateTick(world, i, j, k, random); if (world.getBlockMetadata(i, j, k) == 0) { onBlockAdded(world, i, j, k); @@ -141,7 +141,7 @@ public class BlockTorch extends Block { return super.collisionRayTrace(world, i, j, k, vec3d, vec3d1); } - public void randomDisplayTick(World world, int i, int j, int k, Random random) { + public void randomDisplayTick(World world, int i, int j, int k, EaglercraftRandom random) { int l = world.getBlockMetadata(i, j, k); double d = (float) i + 0.5F; double d1 = (float) j + 0.7F; diff --git a/src/main/java/net/minecraft/src/Chunk.java b/src/main/java/net/minecraft/src/Chunk.java index d986343..1fee1c9 100644 --- a/src/main/java/net/minecraft/src/Chunk.java +++ b/src/main/java/net/minecraft/src/Chunk.java @@ -4,9 +4,10 @@ package net.minecraft.src; // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.io.PrintStream; import java.util.*; +import net.lax1dude.eaglercraft.EaglercraftRandom; + public class Chunk { public Chunk(World world, int i, int j) { @@ -516,8 +517,8 @@ public class Chunk { return k1; } - public Random func_997_a(long l) { - return new Random( + public EaglercraftRandom func_997_a(long l) { + return new EaglercraftRandom( worldObj.func_22138_q() + (long) (xPosition * xPosition * 0x4c1906) + (long) (xPosition * 0x5ac0db) + (long) (zPosition * zPosition) * 0x4307a7L + (long) (zPosition * 0x5f24f) ^ l); } diff --git a/src/main/java/net/minecraft/src/ChunkProviderGenerate.java b/src/main/java/net/minecraft/src/ChunkProviderGenerate.java index dccacc3..bcf57da 100644 --- a/src/main/java/net/minecraft/src/ChunkProviderGenerate.java +++ b/src/main/java/net/minecraft/src/ChunkProviderGenerate.java @@ -4,7 +4,8 @@ package net.minecraft.src; // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; + +import net.lax1dude.eaglercraft.EaglercraftRandom; public class ChunkProviderGenerate implements IChunkProvider { @@ -15,7 +16,7 @@ public class ChunkProviderGenerate implements IChunkProvider { field_902_u = new MapGenCaves(); field_914_i = new int[32][32]; worldObj = world; - rand = new Random(l); + rand = new EaglercraftRandom(l); field_912_k = new NoiseGeneratorOctaves(rand, 16); field_911_l = new NoiseGeneratorOctaves(rand, 16); field_910_m = new NoiseGeneratorOctaves(rand, 8); @@ -507,7 +508,7 @@ public class ChunkProviderGenerate implements IChunkProvider { return "RandomLevelSource"; } - private Random rand; + private EaglercraftRandom rand; private NoiseGeneratorOctaves field_912_k; private NoiseGeneratorOctaves field_911_l; private NoiseGeneratorOctaves field_910_m; diff --git a/src/main/java/net/minecraft/src/ChunkProviderHell.java b/src/main/java/net/minecraft/src/ChunkProviderHell.java index d2fbb23..89e7d61 100644 --- a/src/main/java/net/minecraft/src/ChunkProviderHell.java +++ b/src/main/java/net/minecraft/src/ChunkProviderHell.java @@ -1,11 +1,12 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; - public class ChunkProviderHell implements IChunkProvider { public ChunkProviderHell(World world, long l) { @@ -14,7 +15,7 @@ public class ChunkProviderHell implements IChunkProvider { field_4160_r = new double[256]; field_4159_s = new MapGenCavesHell(); field_4164_n = world; - hellRNG = new Random(l); + hellRNG = new EaglercraftRandom(l); field_4169_i = new NoiseGeneratorOctaves(hellRNG, 16); field_4168_j = new NoiseGeneratorOctaves(hellRNG, 16); field_4167_k = new NoiseGeneratorOctaves(hellRNG, 8); @@ -336,7 +337,7 @@ public class ChunkProviderHell implements IChunkProvider { return "HellRandomLevelSource"; } - private Random hellRNG; + private EaglercraftRandom hellRNG; private NoiseGeneratorOctaves field_4169_i; private NoiseGeneratorOctaves field_4168_j; private NoiseGeneratorOctaves field_4167_k; diff --git a/src/main/java/net/minecraft/src/EffectRenderer.java b/src/main/java/net/minecraft/src/EffectRenderer.java index ec55e8e..bf1b017 100644 --- a/src/main/java/net/minecraft/src/EffectRenderer.java +++ b/src/main/java/net/minecraft/src/EffectRenderer.java @@ -6,7 +6,7 @@ package net.minecraft.src; import java.util.*; -import net.lax1dude.eaglercraft.EaglerAdapter; +import net.lax1dude.eaglercraft.EaglercraftRandom; import net.lax1dude.eaglercraft.TextureLocation; import net.lax1dude.eaglercraft.adapter.Tessellator; @@ -18,7 +18,7 @@ public class EffectRenderer { public EffectRenderer(World world, RenderEngine renderengine) { fxLayers = new List[4]; - rand = new Random(); + rand = new EaglercraftRandom(); if (world != null) { worldObj = world; } @@ -169,5 +169,5 @@ public class EffectRenderer { protected World worldObj; private List fxLayers[]; private RenderEngine renderer; - private Random rand; + private EaglercraftRandom rand; } diff --git a/src/main/java/net/minecraft/src/EmptyChunk.java b/src/main/java/net/minecraft/src/EmptyChunk.java index ef93057..5e55963 100644 --- a/src/main/java/net/minecraft/src/EmptyChunk.java +++ b/src/main/java/net/minecraft/src/EmptyChunk.java @@ -5,7 +5,8 @@ package net.minecraft.src; // Decompiler options: packimports(3) braces deadcode import java.util.List; -import java.util.Random; + +import net.lax1dude.eaglercraft.EaglercraftRandom; public class EmptyChunk extends Chunk { @@ -122,8 +123,8 @@ public class EmptyChunk extends Chunk { return k2 + (k2 / 2) * 3; } - public Random func_997_a(long l) { - return new Random( + public EaglercraftRandom func_997_a(long l) { + return new EaglercraftRandom( worldObj.func_22138_q() + (long) (xPosition * xPosition * 0x4c1906) + (long) (xPosition * 0x5ac0db) + (long) (zPosition * zPosition) * 0x4307a7L + (long) (zPosition * 0x5f24f) ^ l); } diff --git a/src/main/java/net/minecraft/src/Entity.java b/src/main/java/net/minecraft/src/Entity.java index 71e6c54..4b7c731 100644 --- a/src/main/java/net/minecraft/src/Entity.java +++ b/src/main/java/net/minecraft/src/Entity.java @@ -5,7 +5,8 @@ package net.minecraft.src; // Decompiler options: packimports(3) braces deadcode import java.util.List; -import java.util.Random; + +import net.lax1dude.eaglercraft.EaglercraftRandom; public abstract class Entity { @@ -31,7 +32,7 @@ public abstract class Entity { noClip = false; entityCollisionReduction = 0.0F; field_9313_bc = false; - rand = new Random(); + rand = new EaglercraftRandom(); ticksExisted = 0; fireResistance = 1; fire = 0; @@ -935,7 +936,7 @@ public abstract class Entity { public boolean noClip; public float entityCollisionReduction; public boolean field_9313_bc; - protected Random rand; + protected EaglercraftRandom rand; public int ticksExisted; public int fireResistance; public int fire; diff --git a/src/main/java/net/minecraft/src/EntityRenderer.java b/src/main/java/net/minecraft/src/EntityRenderer.java index c564e28..8c67eca 100644 --- a/src/main/java/net/minecraft/src/EntityRenderer.java +++ b/src/main/java/net/minecraft/src/EntityRenderer.java @@ -6,9 +6,9 @@ package net.minecraft.src; import java.nio.FloatBuffer; 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.glemu.EffectPipelineFXAA; import net.minecraft.client.Minecraft; @@ -40,7 +40,7 @@ public class EntityRenderer { field_21154_m = 0.0D; field_21153_n = 0.0D; field_1384_l = System.currentTimeMillis(); - random = new Random(); + random = new EaglercraftRandom(); field_1394_b = 0; field_1393_c = 0; field_1392_d = GLAllocation.createDirectFloatBuffer(16); @@ -670,7 +670,7 @@ public class EntityRenderer { private double field_21154_m; private double field_21153_n; private long field_1384_l; - private Random random; + private EaglercraftRandom random; volatile int field_1394_b; volatile int field_1393_c; FloatBuffer field_1392_d; diff --git a/src/main/java/net/minecraft/src/EntitySheep.java b/src/main/java/net/minecraft/src/EntitySheep.java index efcb9db..ee165eb 100644 --- a/src/main/java/net/minecraft/src/EntitySheep.java +++ b/src/main/java/net/minecraft/src/EntitySheep.java @@ -1,11 +1,12 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; - public class EntitySheep extends EntityAnimals { public EntitySheep(World world) { @@ -80,7 +81,7 @@ public class EntitySheep extends EntityAnimals { } } - public static int func_21070_a(Random random) { + public static int func_21070_a(EaglercraftRandom random) { int i = random.nextInt(100); if (i < 5) { return 15; diff --git a/src/main/java/net/minecraft/src/Explosion.java b/src/main/java/net/minecraft/src/Explosion.java index 9a70a9d..5d778f3 100644 --- a/src/main/java/net/minecraft/src/Explosion.java +++ b/src/main/java/net/minecraft/src/Explosion.java @@ -6,11 +6,13 @@ package net.minecraft.src; import java.util.*; +import net.lax1dude.eaglercraft.EaglercraftRandom; + public class Explosion { public Explosion(World world, Entity entity, double d, double d1, double d2, float f) { field_12257_a = false; - ExplosionRNG = new Random(); + ExplosionRNG = new EaglercraftRandom(); destroyedBlockPositions = new HashSet(); worldObj = world; exploder = entity; @@ -160,7 +162,7 @@ public class Explosion { } public boolean field_12257_a; - private Random ExplosionRNG; + private EaglercraftRandom ExplosionRNG; private World worldObj; public double explosionX; public double explosionY; diff --git a/src/main/java/net/minecraft/src/GuiCreateWorld.java b/src/main/java/net/minecraft/src/GuiCreateWorld.java index 27c2a79..0fbebb4 100644 --- a/src/main/java/net/minecraft/src/GuiCreateWorld.java +++ b/src/main/java/net/minecraft/src/GuiCreateWorld.java @@ -4,11 +4,8 @@ package net.minecraft.src; // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.List; -import java.util.Random; - import net.lax1dude.eaglercraft.EaglerAdapter; -import net.minecraft.client.Minecraft; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class GuiCreateWorld extends GuiScreen { @@ -71,7 +68,7 @@ public class GuiCreateWorld extends GuiScreen { return; } field_22130_l = true; - long l = (new Random()).nextLong(); + long l = (new EaglercraftRandom()).nextLong(); String s = field_22133_i.func_22071_a(); if (!MathHelper.func_22282_a(s)) { try { diff --git a/src/main/java/net/minecraft/src/GuiIngame.java b/src/main/java/net/minecraft/src/GuiIngame.java index 9ae2f2e..20cd004 100644 --- a/src/main/java/net/minecraft/src/GuiIngame.java +++ b/src/main/java/net/minecraft/src/GuiIngame.java @@ -4,10 +4,10 @@ package net.minecraft.src; // Decompiler options: packimports(3) braces deadcode import java.util.ArrayList; -import java.util.Random; import net.lax1dude.eaglercraft.AWTColor; import net.lax1dude.eaglercraft.EaglerAdapter; +import net.lax1dude.eaglercraft.EaglercraftRandom; import net.lax1dude.eaglercraft.TextureLocation; import net.lax1dude.eaglercraft.adapter.Tessellator; import net.minecraft.client.Minecraft; @@ -22,7 +22,7 @@ public class GuiIngame extends Gui { public GuiIngame(Minecraft minecraft) { chatMessageList = new ArrayList(); - rand = new Random(); + rand = new EaglercraftRandom(); field_933_a = null; updateCounter = 0; recordPlaying = ""; @@ -384,7 +384,7 @@ public class GuiIngame extends Gui { private static RenderItem itemRenderer = new RenderItem(); private java.util.List chatMessageList; - private Random rand; + private EaglercraftRandom rand; private Minecraft mc; public String field_933_a; private int updateCounter; diff --git a/src/main/java/net/minecraft/src/GuiMainMenu.java b/src/main/java/net/minecraft/src/GuiMainMenu.java index 6f0433d..0fe5aa2 100644 --- a/src/main/java/net/minecraft/src/GuiMainMenu.java +++ b/src/main/java/net/minecraft/src/GuiMainMenu.java @@ -4,12 +4,10 @@ package net.minecraft.src; // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.io.BufferedReader; -import java.io.InputStreamReader; -import java.nio.charset.Charset; import java.util.*; import net.lax1dude.eaglercraft.EaglerAdapter; +import net.lax1dude.eaglercraft.EaglercraftRandom; import net.lax1dude.eaglercraft.TextureLocation; import net.lax1dude.eaglercraft.adapter.Tessellator; import net.lax1dude.eaglercraft.beta.GuiNoMultiplayer; @@ -215,11 +213,11 @@ public class GuiMainMenu extends GuiScreen { EaglerAdapter.glEnable(2884 /* GL_CULL_FACE */); } - static Random getRand() { + static EaglercraftRandom getRand() { return rand; } - private static final Random rand = new Random(); + private static final EaglercraftRandom rand = new EaglercraftRandom(); /* String minecraftLogo[] = { " * * * * * *** *** *** *** *** ***", diff --git a/src/main/java/net/minecraft/src/Item.java b/src/main/java/net/minecraft/src/Item.java index a176414..66c4c25 100644 --- a/src/main/java/net/minecraft/src/Item.java +++ b/src/main/java/net/minecraft/src/Item.java @@ -1,12 +1,12 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.io.PrintStream; -import java.util.Random; - public class Item { protected Item(int i) { @@ -139,7 +139,7 @@ public class Item { return containerItem != null; } - protected static Random itemRand = new Random(); + protected static EaglercraftRandom itemRand = new EaglercraftRandom(); public static Item itemsList[] = new Item[32000]; public static Item shovelSteel; public static Item pickaxeSteel; diff --git a/src/main/java/net/minecraft/src/MapGenBase.java b/src/main/java/net/minecraft/src/MapGenBase.java index f74c7fe..5b38209 100644 --- a/src/main/java/net/minecraft/src/MapGenBase.java +++ b/src/main/java/net/minecraft/src/MapGenBase.java @@ -1,16 +1,17 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; - public class MapGenBase { public MapGenBase() { field_1306_a = 8; - rand = new Random(); + rand = new EaglercraftRandom(); } public void func_867_a(IChunkProvider ichunkprovider, World world, int i, int j, byte abyte0[]) { @@ -32,5 +33,5 @@ public class MapGenBase { } protected int field_1306_a; - protected Random rand; + protected EaglercraftRandom rand; } diff --git a/src/main/java/net/minecraft/src/MapGenCaves.java b/src/main/java/net/minecraft/src/MapGenCaves.java index 6d00285..49cc65e 100644 --- a/src/main/java/net/minecraft/src/MapGenCaves.java +++ b/src/main/java/net/minecraft/src/MapGenCaves.java @@ -1,11 +1,12 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; - public class MapGenCaves extends MapGenBase { public MapGenCaves() { @@ -21,7 +22,7 @@ public class MapGenCaves extends MapGenBase { double d5 = j * 16 + 8; float f3 = 0.0F; float f4 = 0.0F; - Random random = new Random(rand.nextLong()); + EaglercraftRandom random = new EaglercraftRandom(rand.nextLong()); if (l <= 0) { int i1 = field_1306_a * 16 - 16; l = i1 - random.nextInt(i1 / 4); diff --git a/src/main/java/net/minecraft/src/MapGenCavesHell.java b/src/main/java/net/minecraft/src/MapGenCavesHell.java index bee4e44..b237bf0 100644 --- a/src/main/java/net/minecraft/src/MapGenCavesHell.java +++ b/src/main/java/net/minecraft/src/MapGenCavesHell.java @@ -1,11 +1,12 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; - public class MapGenCavesHell extends MapGenBase { public MapGenCavesHell() { @@ -21,7 +22,7 @@ public class MapGenCavesHell extends MapGenBase { double d5 = j * 16 + 8; float f3 = 0.0F; float f4 = 0.0F; - Random random = new Random(rand.nextLong()); + EaglercraftRandom random = new EaglercraftRandom(rand.nextLong()); if (l <= 0) { int i1 = field_1306_a * 16 - 16; l = i1 - random.nextInt(i1 / 4); diff --git a/src/main/java/net/minecraft/src/MobSpawnerBase.java b/src/main/java/net/minecraft/src/MobSpawnerBase.java index f41bd83..ad5e467 100644 --- a/src/main/java/net/minecraft/src/MobSpawnerBase.java +++ b/src/main/java/net/minecraft/src/MobSpawnerBase.java @@ -1,11 +1,13 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.AWTColor; +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.awt.Color; -import java.util.Random; public class MobSpawnerBase { @@ -31,7 +33,7 @@ public class MobSpawnerBase { iceDesert.topBlock = iceDesert.fillerBlock = (byte) Block.sand.blockID; } - public WorldGenerator getRandomWorldGenForTrees(Random random) { + public WorldGenerator getRandomWorldGenForTrees(EaglercraftRandom random) { if (random.nextInt(10) == 0) { return new WorldGenBigTree(); } else { @@ -110,7 +112,7 @@ public class MobSpawnerBase { if (f > 1.0F) { f = 1.0F; } - return Color.getHSBColor(0.6222222F - f * 0.05F, 0.5F + f * 0.1F, 1.0F).getRGB(); + return AWTColor.HSBtoRGB(0.6222222F - f * 0.05F, 0.5F + f * 0.1F, 1.0F); } public Class[] getEntitiesForType(EnumCreatureType enumcreaturetype) { diff --git a/src/main/java/net/minecraft/src/MobSpawnerForest.java b/src/main/java/net/minecraft/src/MobSpawnerForest.java index 63818ae..0c07157 100644 --- a/src/main/java/net/minecraft/src/MobSpawnerForest.java +++ b/src/main/java/net/minecraft/src/MobSpawnerForest.java @@ -1,17 +1,18 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; - public class MobSpawnerForest extends MobSpawnerBase { public MobSpawnerForest() { } - public WorldGenerator getRandomWorldGenForTrees(Random random) { + public WorldGenerator getRandomWorldGenForTrees(EaglercraftRandom random) { if (random.nextInt(5) == 0) { return new WorldGenForest(); } diff --git a/src/main/java/net/minecraft/src/MobSpawnerRainforest.java b/src/main/java/net/minecraft/src/MobSpawnerRainforest.java index b33b0d7..5f538ad 100644 --- a/src/main/java/net/minecraft/src/MobSpawnerRainforest.java +++ b/src/main/java/net/minecraft/src/MobSpawnerRainforest.java @@ -1,17 +1,18 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; - public class MobSpawnerRainforest extends MobSpawnerBase { public MobSpawnerRainforest() { } - public WorldGenerator getRandomWorldGenForTrees(Random random) { + public WorldGenerator getRandomWorldGenForTrees(EaglercraftRandom random) { if (random.nextInt(3) == 0) { return new WorldGenBigTree(); } else { diff --git a/src/main/java/net/minecraft/src/MobSpawnerTaiga.java b/src/main/java/net/minecraft/src/MobSpawnerTaiga.java index 3ec8baf..304b47a 100644 --- a/src/main/java/net/minecraft/src/MobSpawnerTaiga.java +++ b/src/main/java/net/minecraft/src/MobSpawnerTaiga.java @@ -1,17 +1,18 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; - public class MobSpawnerTaiga extends MobSpawnerBase { public MobSpawnerTaiga() { } - public WorldGenerator getRandomWorldGenForTrees(Random random) { + public WorldGenerator getRandomWorldGenForTrees(EaglercraftRandom random) { if (random.nextInt(3) == 0) { return new WorldGenTaiga1(); } else { diff --git a/src/main/java/net/minecraft/src/ModelGhast.java b/src/main/java/net/minecraft/src/ModelGhast.java index 16031d9..9ba72b4 100644 --- a/src/main/java/net/minecraft/src/ModelGhast.java +++ b/src/main/java/net/minecraft/src/ModelGhast.java @@ -4,7 +4,7 @@ package net.minecraft.src; // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class ModelGhast extends ModelBase { @@ -14,7 +14,7 @@ public class ModelGhast extends ModelBase { body = new ModelRenderer(0, 0); body.addBox(-8F, -8F, -8F, 16, 16, 16); body.offsetY += 24 + byte0; - Random random = new Random(1660L); + EaglercraftRandom random = new EaglercraftRandom(1660L); for (int i = 0; i < tentacles.length; i++) { tentacles[i] = new ModelRenderer(0, 0); float f = (((((float) (i % 3) - (float) ((i / 3) % 2) * 0.5F) + 0.25F) / 2.0F) * 2.0F - 1.0F) * 5F; diff --git a/src/main/java/net/minecraft/src/NetClientHandler.java b/src/main/java/net/minecraft/src/NetClientHandler.java index 93030a8..6211053 100644 --- a/src/main/java/net/minecraft/src/NetClientHandler.java +++ b/src/main/java/net/minecraft/src/NetClientHandler.java @@ -6,8 +6,8 @@ package net.minecraft.src; import java.io.*; import java.net.*; -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; import net.lax1dude.eaglercraft.compat.UnexpectedThrowable; import net.minecraft.client.Minecraft; @@ -16,7 +16,7 @@ public class NetClientHandler extends NetHandler { public NetClientHandler(Minecraft minecraft, String s, int i) { disconnected = false; field_1210_g = false; - rand = new Random(); + rand = new EaglercraftRandom(); mc = minecraft; Socket socket; try { @@ -545,5 +545,5 @@ public class NetClientHandler extends NetHandler { private Minecraft mc; private WorldClient worldClient; private boolean field_1210_g; - Random rand; + EaglercraftRandom rand; } diff --git a/src/main/java/net/minecraft/src/NoiseGenerator2.java b/src/main/java/net/minecraft/src/NoiseGenerator2.java index 3435b5a..504c2c2 100644 --- a/src/main/java/net/minecraft/src/NoiseGenerator2.java +++ b/src/main/java/net/minecraft/src/NoiseGenerator2.java @@ -1,18 +1,19 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; - public class NoiseGenerator2 { public NoiseGenerator2() { - this(new Random()); + this(new EaglercraftRandom()); } - public NoiseGenerator2(Random random) { + public NoiseGenerator2(EaglercraftRandom random) { field_4295_e = new int[512]; field_4292_a = random.nextDouble() * 256D; field_4291_b = random.nextDouble() * 256D; diff --git a/src/main/java/net/minecraft/src/NoiseGeneratorOctaves.java b/src/main/java/net/minecraft/src/NoiseGeneratorOctaves.java index 6508f11..1e80333 100644 --- a/src/main/java/net/minecraft/src/NoiseGeneratorOctaves.java +++ b/src/main/java/net/minecraft/src/NoiseGeneratorOctaves.java @@ -1,14 +1,16 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; public class NoiseGeneratorOctaves extends NoiseGenerator { - public NoiseGeneratorOctaves(Random random, int i) { + public NoiseGeneratorOctaves(EaglercraftRandom random, int i) { field_1191_b = i; generatorCollection = new NoiseGeneratorPerlin[i]; for (int j = 0; j < i; j++) { diff --git a/src/main/java/net/minecraft/src/NoiseGeneratorOctaves2.java b/src/main/java/net/minecraft/src/NoiseGeneratorOctaves2.java index 5aec39c..7ee81ec 100644 --- a/src/main/java/net/minecraft/src/NoiseGeneratorOctaves2.java +++ b/src/main/java/net/minecraft/src/NoiseGeneratorOctaves2.java @@ -1,14 +1,15 @@ package net.minecraft.src; -// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. +import net.lax1dude.eaglercraft.EaglercraftRandom; + +// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; public class NoiseGeneratorOctaves2 extends NoiseGenerator { - public NoiseGeneratorOctaves2(Random random, int i) { + public NoiseGeneratorOctaves2(EaglercraftRandom random, int i) { field_4233_b = i; field_4234_a = new NoiseGenerator2[i]; for (int j = 0; j < i; j++) { diff --git a/src/main/java/net/minecraft/src/NoiseGeneratorPerlin.java b/src/main/java/net/minecraft/src/NoiseGeneratorPerlin.java index 0d45745..6a827fe 100644 --- a/src/main/java/net/minecraft/src/NoiseGeneratorPerlin.java +++ b/src/main/java/net/minecraft/src/NoiseGeneratorPerlin.java @@ -1,18 +1,19 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; - public class NoiseGeneratorPerlin extends NoiseGenerator { public NoiseGeneratorPerlin() { - this(new Random()); + this(new EaglercraftRandom()); } - public NoiseGeneratorPerlin(Random random) { + public NoiseGeneratorPerlin(EaglercraftRandom random) { permutations = new int[512]; xCoord = random.nextDouble() * 256D; yCoord = random.nextDouble() * 256D; diff --git a/src/main/java/net/minecraft/src/RenderGlobal.java b/src/main/java/net/minecraft/src/RenderGlobal.java index 201c4c6..05960b8 100644 --- a/src/main/java/net/minecraft/src/RenderGlobal.java +++ b/src/main/java/net/minecraft/src/RenderGlobal.java @@ -8,6 +8,7 @@ import java.nio.IntBuffer; import java.util.*; import net.lax1dude.eaglercraft.EaglerAdapter; +import net.lax1dude.eaglercraft.EaglercraftRandom; import net.lax1dude.eaglercraft.TextureLocation; import net.lax1dude.eaglercraft.adapter.Tessellator; import net.minecraft.client.Minecraft; @@ -84,7 +85,7 @@ public class RenderGlobal implements IWorldAccess { } private void func_950_f() { - Random random = new Random(10842L); + EaglercraftRandom random = new EaglercraftRandom(10842L); Tessellator tessellator = Tessellator.instance; tessellator.startDrawingQuads(); for (int i = 0; i < 1500; i++) { diff --git a/src/main/java/net/minecraft/src/RenderItem.java b/src/main/java/net/minecraft/src/RenderItem.java index 7b23752..a04009e 100644 --- a/src/main/java/net/minecraft/src/RenderItem.java +++ b/src/main/java/net/minecraft/src/RenderItem.java @@ -4,9 +4,8 @@ package net.minecraft.src; // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -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; @@ -17,7 +16,7 @@ public class RenderItem extends Render { public RenderItem() { renderBlocks = new RenderBlocks(); - random = new Random(); + random = new EaglercraftRandom(); shadowSize = 0.15F; field_194_c = 0.75F; } @@ -197,7 +196,7 @@ public class RenderItem extends Render { } private RenderBlocks renderBlocks; - private Random random; + private EaglercraftRandom random; @Override protected boolean loadDownloadableImageTexture(String s, String s1) { diff --git a/src/main/java/net/minecraft/src/RenderPainting.java b/src/main/java/net/minecraft/src/RenderPainting.java index 0942461..a3ce2ca 100644 --- a/src/main/java/net/minecraft/src/RenderPainting.java +++ b/src/main/java/net/minecraft/src/RenderPainting.java @@ -4,9 +4,8 @@ package net.minecraft.src; // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -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 +14,7 @@ public class RenderPainting extends Render { private static final TextureLocation paintingTexture = new TextureLocation("/art/kz.png"); public RenderPainting() { - rand = new Random(); + rand = new EaglercraftRandom(); } public void func_158_a(EntityPainting entitypainting, double d, double d1, double d2, float f, float f1) { @@ -124,7 +123,7 @@ public class RenderPainting extends Render { func_158_a((EntityPainting) entity, d, d1, d2, f, f1); } - private Random rand; + private EaglercraftRandom rand; @Override protected boolean loadDownloadableImageTexture(String s, String s1) { diff --git a/src/main/java/net/minecraft/src/Teleporter.java b/src/main/java/net/minecraft/src/Teleporter.java index 0fd0be2..04e725f 100644 --- a/src/main/java/net/minecraft/src/Teleporter.java +++ b/src/main/java/net/minecraft/src/Teleporter.java @@ -1,16 +1,17 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.io.PrintStream; -import java.util.Random; public class Teleporter { public Teleporter() { - field_4232_a = new Random(); + field_4232_a = new EaglercraftRandom(); } public void func_4107_a(World world, Entity entity) { @@ -252,5 +253,5 @@ public class Teleporter { return true; } - private Random field_4232_a; + private EaglercraftRandom field_4232_a; } diff --git a/src/main/java/net/minecraft/src/TexturePortalFX.java b/src/main/java/net/minecraft/src/TexturePortalFX.java index ce90681..aba3467 100644 --- a/src/main/java/net/minecraft/src/TexturePortalFX.java +++ b/src/main/java/net/minecraft/src/TexturePortalFX.java @@ -1,10 +1,12 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; public class TexturePortalFX extends TextureFX { @@ -12,7 +14,7 @@ public class TexturePortalFX extends TextureFX { super(Block.portal.blockIndexInTexture); field_4227_g = 0; field_4226_h = new byte[32][1024]; - Random random = new Random(100L); + EaglercraftRandom random = new EaglercraftRandom(100L); for (int i = 0; i < 32; i++) { for (int j = 0; j < 16; j++) { for (int k = 0; k < 16; k++) { diff --git a/src/main/java/net/minecraft/src/TileEntityDispenser.java b/src/main/java/net/minecraft/src/TileEntityDispenser.java index 76dbce6..70014eb 100644 --- a/src/main/java/net/minecraft/src/TileEntityDispenser.java +++ b/src/main/java/net/minecraft/src/TileEntityDispenser.java @@ -1,16 +1,18 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; public class TileEntityDispenser extends TileEntity implements IInventory { public TileEntityDispenser() { dispenserContents = new ItemStack[9]; - dispenserRandom = new Random(); + dispenserRandom = new EaglercraftRandom(); } public int getSizeInventory() { @@ -111,5 +113,5 @@ public class TileEntityDispenser extends TileEntity implements IInventory { } private ItemStack dispenserContents[]; - private Random dispenserRandom; + private EaglercraftRandom dispenserRandom; } diff --git a/src/main/java/net/minecraft/src/World.java b/src/main/java/net/minecraft/src/World.java index d381c83..c2259ca 100644 --- a/src/main/java/net/minecraft/src/World.java +++ b/src/main/java/net/minecraft/src/World.java @@ -7,6 +7,8 @@ package net.minecraft.src; import java.io.PrintStream; import java.util.*; +import net.lax1dude.eaglercraft.EaglercraftRandom; + public class World implements IBlockAccess { public WorldChunkManager getWorldChunkManager() { @@ -24,12 +26,12 @@ public class World implements IBlockAccess { playerEntities = new ArrayList(); field_1019_F = 0xffffffL; skylightSubtracted = 0; - field_9437_g = (new Random()).nextInt(); + rand = new EaglercraftRandom(); + field_9437_g = rand.nextInt(); field_9436_h = 0x3c6ef35f; field_1043_h = false; lockTimestamp = System.currentTimeMillis(); autosavePeriod = 40; - rand = new Random(); isNewWorld = false; worldAccesses = new ArrayList(); field_9428_I = new ArrayList(); @@ -59,12 +61,12 @@ public class World implements IBlockAccess { playerEntities = new ArrayList(); field_1019_F = 0xffffffL; skylightSubtracted = 0; - field_9437_g = (new Random()).nextInt(); + rand = new EaglercraftRandom(); + field_9437_g = rand.nextInt(); field_9436_h = 0x3c6ef35f; field_1043_h = false; lockTimestamp = System.currentTimeMillis(); autosavePeriod = 40; - rand = new Random(); isNewWorld = false; worldAccesses = new ArrayList(); field_9428_I = new ArrayList(); @@ -103,12 +105,12 @@ public class World implements IBlockAccess { playerEntities = new ArrayList(); field_1019_F = 0xffffffL; skylightSubtracted = 0; - field_9437_g = (new Random()).nextInt(); + rand = new EaglercraftRandom(); + field_9437_g = rand.nextInt(); field_9436_h = 0x3c6ef35f; field_1043_h = false; lockTimestamp = System.currentTimeMillis(); autosavePeriod = 40; - rand = new Random(); isNewWorld = false; worldAccesses = new ArrayList(); field_9428_I = new ArrayList(); @@ -1556,7 +1558,7 @@ public class World implements IBlockAccess { public void randomDisplayUpdates(int i, int j, int k) { byte byte0 = 16; - Random random = new Random(); + EaglercraftRandom random = new EaglercraftRandom(); for (int l = 0; l < 1000; l++) { int i1 = (i + rand.nextInt(byte0)) - rand.nextInt(byte0); int j1 = (j + rand.nextInt(byte0)) - rand.nextInt(byte0); @@ -1980,7 +1982,7 @@ public class World implements IBlockAccess { private long lockTimestamp; protected int autosavePeriod; public int difficultySetting; - public Random rand; + public EaglercraftRandom rand; public boolean isNewWorld; public final WorldProvider worldProvider; protected List worldAccesses; diff --git a/src/main/java/net/minecraft/src/WorldChunkManager.java b/src/main/java/net/minecraft/src/WorldChunkManager.java index 1c6ea0f..61e00c7 100644 --- a/src/main/java/net/minecraft/src/WorldChunkManager.java +++ b/src/main/java/net/minecraft/src/WorldChunkManager.java @@ -1,10 +1,12 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; public class WorldChunkManager { @@ -12,9 +14,9 @@ public class WorldChunkManager { } public WorldChunkManager(World world) { - field_4194_e = new NoiseGeneratorOctaves2(new Random(world.func_22138_q() * 9871L), 4); - field_4193_f = new NoiseGeneratorOctaves2(new Random(world.func_22138_q() * 39811L), 4); - field_4192_g = new NoiseGeneratorOctaves2(new Random(world.func_22138_q() * 0x84a59L), 2); + field_4194_e = new NoiseGeneratorOctaves2(new EaglercraftRandom(world.func_22138_q() * 9871L), 4); + field_4193_f = new NoiseGeneratorOctaves2(new EaglercraftRandom(world.func_22138_q() * 39811L), 4); + field_4192_g = new NoiseGeneratorOctaves2(new EaglercraftRandom(world.func_22138_q() * 0x84a59L), 2); } public MobSpawnerBase func_4074_a(ChunkCoordIntPair chunkcoordintpair) { diff --git a/src/main/java/net/minecraft/src/WorldGenBigTree.java b/src/main/java/net/minecraft/src/WorldGenBigTree.java index e945afd..cfafa01 100644 --- a/src/main/java/net/minecraft/src/WorldGenBigTree.java +++ b/src/main/java/net/minecraft/src/WorldGenBigTree.java @@ -4,12 +4,12 @@ package net.minecraft.src; // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; +import net.lax1dude.eaglercraft.EaglercraftRandom; public class WorldGenBigTree extends WorldGenerator { public WorldGenBigTree() { - field_881_b = new Random(); + field_881_b = new EaglercraftRandom(); field_878_e = 0; field_876_g = 0.61799999999999999D; field_875_h = 1.0D; @@ -312,7 +312,7 @@ public class WorldGenBigTree extends WorldGenerator { field_872_k = d2; } - public boolean generate(World world, Random random, int i, int j, int k) { + public boolean generate(World world, EaglercraftRandom random, int i, int j, int k) { worldObj = world; long l = random.nextLong(); field_881_b.setSeed(l); @@ -334,7 +334,7 @@ public class WorldGenBigTree extends WorldGenerator { } static final byte field_882_a[] = { 2, 0, 0, 1, 2, 1 }; - Random field_881_b; + EaglercraftRandom field_881_b; World worldObj; int basePos[] = { 0, 0, 0 }; int field_878_e; diff --git a/src/main/java/net/minecraft/src/WorldGenCactus.java b/src/main/java/net/minecraft/src/WorldGenCactus.java index cca0012..04fc3e1 100644 --- a/src/main/java/net/minecraft/src/WorldGenCactus.java +++ b/src/main/java/net/minecraft/src/WorldGenCactus.java @@ -1,17 +1,18 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; - public class WorldGenCactus extends WorldGenerator { public WorldGenCactus() { } - public boolean generate(World world, Random random, int i, int j, int k) { + public boolean generate(World world, EaglercraftRandom random, int i, int j, int k) { for (int l = 0; l < 10; l++) { int i1 = (i + random.nextInt(8)) - random.nextInt(8); int j1 = (j + random.nextInt(4)) - random.nextInt(4); diff --git a/src/main/java/net/minecraft/src/WorldGenClay.java b/src/main/java/net/minecraft/src/WorldGenClay.java index ee262bd..54222bf 100644 --- a/src/main/java/net/minecraft/src/WorldGenClay.java +++ b/src/main/java/net/minecraft/src/WorldGenClay.java @@ -1,11 +1,12 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; - public class WorldGenClay extends WorldGenerator { public WorldGenClay(int i) { @@ -13,7 +14,7 @@ public class WorldGenClay extends WorldGenerator { numberOfBlocks = i; } - public boolean generate(World world, Random random, int i, int j, int k) { + public boolean generate(World world, EaglercraftRandom random, int i, int j, int k) { if (world.getBlockMaterial(i, j, k) != Material.water) { return false; } diff --git a/src/main/java/net/minecraft/src/WorldGenDungeons.java b/src/main/java/net/minecraft/src/WorldGenDungeons.java index dfc62bf..e70fa54 100644 --- a/src/main/java/net/minecraft/src/WorldGenDungeons.java +++ b/src/main/java/net/minecraft/src/WorldGenDungeons.java @@ -1,17 +1,18 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; - public class WorldGenDungeons extends WorldGenerator { public WorldGenDungeons() { } - public boolean generate(World world, Random random, int i, int j, int k) { + public boolean generate(World world, EaglercraftRandom random, int i, int j, int k) { byte byte0 = 3; int l = random.nextInt(2) + 2; int i1 = random.nextInt(2) + 2; @@ -113,7 +114,7 @@ public class WorldGenDungeons extends WorldGenerator { return true; } - private ItemStack pickCheckLootItem(Random random) { + private ItemStack pickCheckLootItem(EaglercraftRandom random) { int i = random.nextInt(11); if (i == 0) { return new ItemStack(Item.saddle); @@ -149,7 +150,7 @@ public class WorldGenDungeons extends WorldGenerator { } } - private String pickMobSpawner(Random random) { + private String pickMobSpawner(EaglercraftRandom random) { int i = random.nextInt(4); if (i == 0) { return "Skeleton"; diff --git a/src/main/java/net/minecraft/src/WorldGenFire.java b/src/main/java/net/minecraft/src/WorldGenFire.java index 6c4edac..07a0b1b 100644 --- a/src/main/java/net/minecraft/src/WorldGenFire.java +++ b/src/main/java/net/minecraft/src/WorldGenFire.java @@ -1,17 +1,18 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; - public class WorldGenFire extends WorldGenerator { public WorldGenFire() { } - public boolean generate(World world, Random random, int i, int j, int k) { + public boolean generate(World world, EaglercraftRandom random, int i, int j, int k) { for (int l = 0; l < 64; l++) { int i1 = (i + random.nextInt(8)) - random.nextInt(8); int j1 = (j + random.nextInt(4)) - random.nextInt(4); diff --git a/src/main/java/net/minecraft/src/WorldGenFlowers.java b/src/main/java/net/minecraft/src/WorldGenFlowers.java index 98175ae..eb0d80d 100644 --- a/src/main/java/net/minecraft/src/WorldGenFlowers.java +++ b/src/main/java/net/minecraft/src/WorldGenFlowers.java @@ -1,18 +1,19 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; - public class WorldGenFlowers extends WorldGenerator { public WorldGenFlowers(int i) { plantBlockId = i; } - public boolean generate(World world, Random random, int i, int j, int k) { + public boolean generate(World world, EaglercraftRandom random, int i, int j, int k) { for (int l = 0; l < 64; l++) { int i1 = (i + random.nextInt(8)) - random.nextInt(8); int j1 = (j + random.nextInt(4)) - random.nextInt(4); diff --git a/src/main/java/net/minecraft/src/WorldGenForest.java b/src/main/java/net/minecraft/src/WorldGenForest.java index 093224e..6645ebc 100644 --- a/src/main/java/net/minecraft/src/WorldGenForest.java +++ b/src/main/java/net/minecraft/src/WorldGenForest.java @@ -1,17 +1,18 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; - public class WorldGenForest extends WorldGenerator { public WorldGenForest() { } - public boolean generate(World world, Random random, int i, int j, int k) { + public boolean generate(World world, EaglercraftRandom random, int i, int j, int k) { int l = random.nextInt(3) + 5; boolean flag = true; if (j < 1 || j + l + 1 > 128) { diff --git a/src/main/java/net/minecraft/src/WorldGenHellLava.java b/src/main/java/net/minecraft/src/WorldGenHellLava.java index dfbecec..7c2025e 100644 --- a/src/main/java/net/minecraft/src/WorldGenHellLava.java +++ b/src/main/java/net/minecraft/src/WorldGenHellLava.java @@ -1,18 +1,19 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; - public class WorldGenHellLava extends WorldGenerator { public WorldGenHellLava(int i) { field_4158_a = i; } - public boolean generate(World world, Random random, int i, int j, int k) { + public boolean generate(World world, EaglercraftRandom random, int i, int j, int k) { if (world.getBlockId(i, j + 1, k) != Block.bloodStone.blockID) { return false; } diff --git a/src/main/java/net/minecraft/src/WorldGenLakes.java b/src/main/java/net/minecraft/src/WorldGenLakes.java index 9ede348..e053c8b 100644 --- a/src/main/java/net/minecraft/src/WorldGenLakes.java +++ b/src/main/java/net/minecraft/src/WorldGenLakes.java @@ -1,18 +1,19 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; - public class WorldGenLakes extends WorldGenerator { public WorldGenLakes(int i) { field_15235_a = i; } - public boolean generate(World world, Random random, int i, int j, int k) { + public boolean generate(World world, EaglercraftRandom random, int i, int j, int k) { i -= 8; for (k -= 8; j > 0 && world.isAirBlock(i, j, k); j--) { } diff --git a/src/main/java/net/minecraft/src/WorldGenLightStone1.java b/src/main/java/net/minecraft/src/WorldGenLightStone1.java index 5902e4c..b5eca6c 100644 --- a/src/main/java/net/minecraft/src/WorldGenLightStone1.java +++ b/src/main/java/net/minecraft/src/WorldGenLightStone1.java @@ -1,17 +1,18 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; - public class WorldGenLightStone1 extends WorldGenerator { public WorldGenLightStone1() { } - public boolean generate(World world, Random random, int i, int j, int k) { + public boolean generate(World world, EaglercraftRandom random, int i, int j, int k) { if (!world.isAirBlock(i, j, k)) { return false; } diff --git a/src/main/java/net/minecraft/src/WorldGenLightStone2.java b/src/main/java/net/minecraft/src/WorldGenLightStone2.java index 7dc25ca..76233b3 100644 --- a/src/main/java/net/minecraft/src/WorldGenLightStone2.java +++ b/src/main/java/net/minecraft/src/WorldGenLightStone2.java @@ -1,17 +1,18 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; - public class WorldGenLightStone2 extends WorldGenerator { public WorldGenLightStone2() { } - public boolean generate(World world, Random random, int i, int j, int k) { + public boolean generate(World world, EaglercraftRandom random, int i, int j, int k) { if (!world.isAirBlock(i, j, k)) { return false; } diff --git a/src/main/java/net/minecraft/src/WorldGenLiquids.java b/src/main/java/net/minecraft/src/WorldGenLiquids.java index a23595a..ecac833 100644 --- a/src/main/java/net/minecraft/src/WorldGenLiquids.java +++ b/src/main/java/net/minecraft/src/WorldGenLiquids.java @@ -1,18 +1,19 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; - public class WorldGenLiquids extends WorldGenerator { public WorldGenLiquids(int i) { liquidBlockId = i; } - public boolean generate(World world, Random random, int i, int j, int k) { + public boolean generate(World world, EaglercraftRandom random, int i, int j, int k) { if (world.getBlockId(i, j + 1, k) != Block.stone.blockID) { return false; } diff --git a/src/main/java/net/minecraft/src/WorldGenMinable.java b/src/main/java/net/minecraft/src/WorldGenMinable.java index 1655298..da5fc32 100644 --- a/src/main/java/net/minecraft/src/WorldGenMinable.java +++ b/src/main/java/net/minecraft/src/WorldGenMinable.java @@ -1,11 +1,12 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; - public class WorldGenMinable extends WorldGenerator { public WorldGenMinable(int i, int j) { @@ -13,7 +14,7 @@ public class WorldGenMinable extends WorldGenerator { numberOfBlocks = j; } - public boolean generate(World world, Random random, int i, int j, int k) { + public boolean generate(World world, EaglercraftRandom random, int i, int j, int k) { float f = random.nextFloat() * 3.141593F; double d = (float) (i + 8) + (MathHelper.sin(f) * (float) numberOfBlocks) / 8F; double d1 = (float) (i + 8) - (MathHelper.sin(f) * (float) numberOfBlocks) / 8F; diff --git a/src/main/java/net/minecraft/src/WorldGenPumpkin.java b/src/main/java/net/minecraft/src/WorldGenPumpkin.java index da341f1..361ddba 100644 --- a/src/main/java/net/minecraft/src/WorldGenPumpkin.java +++ b/src/main/java/net/minecraft/src/WorldGenPumpkin.java @@ -1,17 +1,18 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; - public class WorldGenPumpkin extends WorldGenerator { public WorldGenPumpkin() { } - public boolean generate(World world, Random random, int i, int j, int k) { + public boolean generate(World world, EaglercraftRandom random, int i, int j, int k) { for (int l = 0; l < 64; l++) { int i1 = (i + random.nextInt(8)) - random.nextInt(8); int j1 = (j + random.nextInt(4)) - random.nextInt(4); diff --git a/src/main/java/net/minecraft/src/WorldGenReed.java b/src/main/java/net/minecraft/src/WorldGenReed.java index 7fb645f..9472673 100644 --- a/src/main/java/net/minecraft/src/WorldGenReed.java +++ b/src/main/java/net/minecraft/src/WorldGenReed.java @@ -1,17 +1,18 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; - public class WorldGenReed extends WorldGenerator { public WorldGenReed() { } - public boolean generate(World world, Random random, int i, int j, int k) { + public boolean generate(World world, EaglercraftRandom random, int i, int j, int k) { for (int l = 0; l < 20; l++) { int i1 = (i + random.nextInt(4)) - random.nextInt(4); int j1 = j; diff --git a/src/main/java/net/minecraft/src/WorldGenTaiga1.java b/src/main/java/net/minecraft/src/WorldGenTaiga1.java index cc294d3..27537bb 100644 --- a/src/main/java/net/minecraft/src/WorldGenTaiga1.java +++ b/src/main/java/net/minecraft/src/WorldGenTaiga1.java @@ -1,17 +1,18 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; - public class WorldGenTaiga1 extends WorldGenerator { public WorldGenTaiga1() { } - public boolean generate(World world, Random random, int i, int j, int k) { + public boolean generate(World world, EaglercraftRandom random, int i, int j, int k) { int l = random.nextInt(5) + 7; int i1 = l - random.nextInt(2) - 3; int j1 = l - i1; diff --git a/src/main/java/net/minecraft/src/WorldGenTaiga2.java b/src/main/java/net/minecraft/src/WorldGenTaiga2.java index fe24caf..fe2cfa1 100644 --- a/src/main/java/net/minecraft/src/WorldGenTaiga2.java +++ b/src/main/java/net/minecraft/src/WorldGenTaiga2.java @@ -1,17 +1,18 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; - public class WorldGenTaiga2 extends WorldGenerator { public WorldGenTaiga2() { } - public boolean generate(World world, Random random, int i, int j, int k) { + public boolean generate(World world, EaglercraftRandom random, int i, int j, int k) { int l = random.nextInt(4) + 6; int i1 = 1 + random.nextInt(2); int j1 = l - i1; diff --git a/src/main/java/net/minecraft/src/WorldGenTrees.java b/src/main/java/net/minecraft/src/WorldGenTrees.java index eca12ce..dac60c4 100644 --- a/src/main/java/net/minecraft/src/WorldGenTrees.java +++ b/src/main/java/net/minecraft/src/WorldGenTrees.java @@ -1,17 +1,18 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; - public class WorldGenTrees extends WorldGenerator { public WorldGenTrees() { } - public boolean generate(World world, Random random, int i, int j, int k) { + public boolean generate(World world, EaglercraftRandom random, int i, int j, int k) { int l = random.nextInt(3) + 4; boolean flag = true; if (j < 1 || j + l + 1 > 128) { diff --git a/src/main/java/net/minecraft/src/WorldGenerator.java b/src/main/java/net/minecraft/src/WorldGenerator.java index 8672369..990badb 100644 --- a/src/main/java/net/minecraft/src/WorldGenerator.java +++ b/src/main/java/net/minecraft/src/WorldGenerator.java @@ -1,17 +1,19 @@ package net.minecraft.src; + +import net.lax1dude.eaglercraft.EaglercraftRandom; + // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) braces deadcode -import java.util.Random; public abstract class WorldGenerator { public WorldGenerator() { } - public abstract boolean generate(World world, Random random, int i, int j, int k); + public abstract boolean generate(World world, EaglercraftRandom random, int i, int j, int k); public void func_517_a(double d, double d1, double d2) { }