Upstream merge

This commit is contained in:
Thinkofdeath 2014-12-12 09:47:02 +00:00
parent b023457499
commit dc776bee32
2 changed files with 333 additions and 343 deletions

View file

@ -1,4 +1,4 @@
From 5d54186471e9e6ed231545bf77a35e765e31f8d0 Mon Sep 17 00:00:00 2001 From 016edbfbb12fd965d3bcee0a943d2d7849dc150c Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au> From: md_5 <md_5@live.com.au>
Date: Sun, 1 Dec 2013 15:10:48 +1100 Date: Sun, 1 Dec 2013 15:10:48 +1100
Subject: [PATCH] mc-dev imports Subject: [PATCH] mc-dev imports
@ -141,343 +141,333 @@ index 0000000..b1c6ad3
+ } + }
+} +}
diff --git a/src/main/java/net/minecraft/server/BiomeDecorator.java b/src/main/java/net/minecraft/server/BiomeDecorator.java diff --git a/src/main/java/net/minecraft/server/BiomeDecorator.java b/src/main/java/net/minecraft/server/BiomeDecorator.java
deleted file mode 100644 new file mode 100644
index e216a0c..0000000 index 0000000..3705410
--- a/src/main/java/net/minecraft/server/BiomeDecorator.java --- /dev/null
+++ /dev/null +++ b/src/main/java/net/minecraft/server/BiomeDecorator.java
@@ -1,332 +0,0 @@ @@ -0,0 +1,322 @@
-package net.minecraft.server; +package net.minecraft.server;
- +
-import java.util.Random; +import java.util.Random;
- +
-public class BiomeDecorator { +public class BiomeDecorator {
- +
- protected World a; + protected World a;
- protected Random b; + protected Random b;
- protected BlockPosition c; + protected BlockPosition c;
- protected CustomWorldSettingsFinal d; + protected CustomWorldSettingsFinal d;
- protected WorldGenerator e = new WorldGenClay(4); + protected WorldGenerator e = new WorldGenClay(4);
- protected WorldGenerator f; + protected WorldGenerator f;
- protected WorldGenerator g; + protected WorldGenerator g;
- protected WorldGenerator h; + protected WorldGenerator h;
- protected WorldGenerator i; + protected WorldGenerator i;
- protected WorldGenerator j; + protected WorldGenerator j;
- protected WorldGenerator k; + protected WorldGenerator k;
- protected WorldGenerator l; + protected WorldGenerator l;
- protected WorldGenerator m; + protected WorldGenerator m;
- protected WorldGenerator n; + protected WorldGenerator n;
- protected WorldGenerator o; + protected WorldGenerator o;
- protected WorldGenerator p; + protected WorldGenerator p;
- protected WorldGenerator q; + protected WorldGenerator q;
- protected WorldGenerator r; + protected WorldGenerator r;
- protected WorldGenFlowers s; + protected WorldGenFlowers s;
- protected WorldGenerator t; + protected WorldGenerator t;
- protected WorldGenerator u; + protected WorldGenerator u;
- protected WorldGenerator v; + protected WorldGenerator v;
- protected WorldGenerator w; + protected WorldGenerator w;
- protected WorldGenerator x; + protected WorldGenerator x;
- protected WorldGenerator y; + protected WorldGenerator y;
- protected int z; + protected int z;
- protected int A; + protected int A;
- protected int B; + protected int B;
- protected int C; + protected int C;
- protected int D; + protected int D;
- protected int E; + protected int E;
- protected int F; + protected int F;
- protected int G; + protected int G;
- protected int H; + protected int H;
- protected int I; + protected int I;
- protected int J; + protected int J;
- protected int K; + protected int K;
- public boolean L; + public boolean L;
- +
- public BiomeDecorator() { + public BiomeDecorator() {
- this.f = new WorldGenSand(Blocks.SAND, 7); + this.f = new WorldGenSand(Blocks.SAND, 7);
- this.g = new WorldGenSand(Blocks.GRAVEL, 6); + this.g = new WorldGenSand(Blocks.GRAVEL, 6);
- this.s = new WorldGenFlowers(Blocks.YELLOW_FLOWER, EnumFlowerVarient.DANDELION); + this.s = new WorldGenFlowers(Blocks.YELLOW_FLOWER, EnumFlowerVarient.DANDELION);
- this.t = new WorldGenMushrooms(Blocks.BROWN_MUSHROOM); + this.t = new WorldGenMushrooms(Blocks.BROWN_MUSHROOM);
- this.u = new WorldGenMushrooms(Blocks.RED_MUSHROOM); + this.u = new WorldGenMushrooms(Blocks.RED_MUSHROOM);
- this.v = new WorldGenHugeMushroom(); + this.v = new WorldGenHugeMushroom();
- this.w = new WorldGenReed(); + this.w = new WorldGenReed();
- this.x = new WorldGenCactus(); + this.x = new WorldGenCactus();
- this.y = new WorldGenWaterLily(); + this.y = new WorldGenWaterLily();
- this.B = 2; + this.B = 2;
- this.C = 1; + this.C = 1;
- this.H = 1; + this.H = 1;
- this.I = 3; + this.I = 3;
- this.J = 1; + this.J = 1;
- this.L = true; + this.L = true;
- } + }
- +
- public void a(World world, Random random, BiomeBase biomebase, BlockPosition blockposition) { + public void a(World world, Random random, BiomeBase biomebase, BlockPosition blockposition) {
- if (this.a != null) { + if (this.a != null) {
- throw new RuntimeException("Already decorating"); + throw new RuntimeException("Already decorating");
- } else { + } else {
- this.a = world; + this.a = world;
- String s = world.getWorldData().getGeneratorOptions(); + String s = world.getWorldData().getGeneratorOptions();
- +
- if (s != null) { + if (s != null) {
- this.d = CustomWorldSettings.a(s).b(); + this.d = CustomWorldSettings.a(s).b();
- } else { + } else {
- this.d = CustomWorldSettings.a("").b(); + this.d = CustomWorldSettings.a("").b();
- } + }
- +
- this.b = random; + this.b = random;
- this.c = blockposition; + this.c = blockposition;
- this.h = new WorldGenMinable(Blocks.DIRT.getBlockData(), this.d.I); + this.h = new WorldGenMinable(Blocks.DIRT.getBlockData(), this.d.I);
- this.i = new WorldGenMinable(Blocks.GRAVEL.getBlockData(), this.d.M); + this.i = new WorldGenMinable(Blocks.GRAVEL.getBlockData(), this.d.M);
- this.j = new WorldGenMinable(Blocks.STONE.getBlockData().set(BlockStone.VARIANT, EnumStoneVariant.GRANITE), this.d.Q); + this.j = new WorldGenMinable(Blocks.STONE.getBlockData().set(BlockStone.VARIANT, EnumStoneVariant.GRANITE), this.d.Q);
- this.k = new WorldGenMinable(Blocks.STONE.getBlockData().set(BlockStone.VARIANT, EnumStoneVariant.DIORITE), this.d.U); + this.k = new WorldGenMinable(Blocks.STONE.getBlockData().set(BlockStone.VARIANT, EnumStoneVariant.DIORITE), this.d.U);
- this.l = new WorldGenMinable(Blocks.STONE.getBlockData().set(BlockStone.VARIANT, EnumStoneVariant.ANDESITE), this.d.Y); + this.l = new WorldGenMinable(Blocks.STONE.getBlockData().set(BlockStone.VARIANT, EnumStoneVariant.ANDESITE), this.d.Y);
- this.m = new WorldGenMinable(Blocks.COAL_ORE.getBlockData(), this.d.ac); + this.m = new WorldGenMinable(Blocks.COAL_ORE.getBlockData(), this.d.ac);
- this.n = new WorldGenMinable(Blocks.IRON_ORE.getBlockData(), this.d.ag); + this.n = new WorldGenMinable(Blocks.IRON_ORE.getBlockData(), this.d.ag);
- this.o = new WorldGenMinable(Blocks.GOLD_ORE.getBlockData(), this.d.ak); + this.o = new WorldGenMinable(Blocks.GOLD_ORE.getBlockData(), this.d.ak);
- this.p = new WorldGenMinable(Blocks.REDSTONE_ORE.getBlockData(), this.d.ao); + this.p = new WorldGenMinable(Blocks.REDSTONE_ORE.getBlockData(), this.d.ao);
- this.q = new WorldGenMinable(Blocks.DIAMOND_ORE.getBlockData(), this.d.as); + this.q = new WorldGenMinable(Blocks.DIAMOND_ORE.getBlockData(), this.d.as);
- this.r = new WorldGenMinable(Blocks.LAPIS_ORE.getBlockData(), this.d.aw); + this.r = new WorldGenMinable(Blocks.LAPIS_ORE.getBlockData(), this.d.aw);
- this.a(biomebase); + this.a(biomebase);
- this.a = null; + this.a = null;
- this.b = null; + this.b = null;
- } + }
- } + }
- +
- protected void a(BiomeBase biomebase) { + protected void a(BiomeBase biomebase) {
- this.a(); + this.a();
- +
- int i; + int i;
- int j; + int j;
- int k; + int k;
- +
- for (i = 0; i < this.I; ++i) { + for (i = 0; i < this.I; ++i) {
- j = this.b.nextInt(16) + 8; + j = this.b.nextInt(16) + 8;
- k = this.b.nextInt(16) + 8; + k = this.b.nextInt(16) + 8;
- this.f.generate(this.a, this.b, this.a.r(this.c.a(j, 0, k))); + this.f.generate(this.a, this.b, this.a.r(this.c.a(j, 0, k)));
- } + }
- +
- for (i = 0; i < this.J; ++i) { + for (i = 0; i < this.J; ++i) {
- j = this.b.nextInt(16) + 8; + j = this.b.nextInt(16) + 8;
- k = this.b.nextInt(16) + 8; + k = this.b.nextInt(16) + 8;
- this.e.generate(this.a, this.b, this.a.r(this.c.a(j, 0, k))); + this.e.generate(this.a, this.b, this.a.r(this.c.a(j, 0, k)));
- } + }
- +
- for (i = 0; i < this.H; ++i) { + for (i = 0; i < this.H; ++i) {
- j = this.b.nextInt(16) + 8; + j = this.b.nextInt(16) + 8;
- k = this.b.nextInt(16) + 8; + k = this.b.nextInt(16) + 8;
- this.g.generate(this.a, this.b, this.a.r(this.c.a(j, 0, k))); + this.g.generate(this.a, this.b, this.a.r(this.c.a(j, 0, k)));
- } + }
- +
- i = this.A; + i = this.A;
- if (this.b.nextInt(10) == 0) { + if (this.b.nextInt(10) == 0) {
- ++i; + ++i;
- } + }
- +
- int l; + int l;
- BlockPosition blockposition; + BlockPosition blockposition;
- +
- for (j = 0; j < i; ++j) { + for (j = 0; j < i; ++j) {
- k = this.b.nextInt(16) + 8; + k = this.b.nextInt(16) + 8;
- l = this.b.nextInt(16) + 8; + l = this.b.nextInt(16) + 8;
- WorldGenTreeAbstract worldgentreeabstract = biomebase.a(this.b); + WorldGenTreeAbstract worldgentreeabstract = biomebase.a(this.b);
- +
- worldgentreeabstract.e(); + worldgentreeabstract.e();
- blockposition = this.getHighestBlockYAt(this.c.a(k, 0, l)); // CraftBukkit - Prevent crash + blockposition = this.a.getHighestBlockYAt(this.c.a(k, 0, l));
- if (worldgentreeabstract.generate(this.a, this.b, blockposition)) { + if (worldgentreeabstract.generate(this.a, this.b, blockposition)) {
- worldgentreeabstract.a(this.a, this.b, blockposition); + worldgentreeabstract.a(this.a, this.b, blockposition);
- } + }
- } + }
- +
- for (j = 0; j < this.K; ++j) { + for (j = 0; j < this.K; ++j) {
- k = this.b.nextInt(16) + 8; + k = this.b.nextInt(16) + 8;
- l = this.b.nextInt(16) + 8; + l = this.b.nextInt(16) + 8;
- this.v.generate(this.a, this.b, this.getHighestBlockYAt(this.c.a(k, 0, l ))); // CraftBukkit - Prevent crash + this.v.generate(this.a, this.b, this.a.getHighestBlockYAt(this.c.a(k, 0, l)));
- } + }
- +
- int i1; + int i1;
- +
- for (j = 0; j < this.B; ++j) { + for (j = 0; j < this.B; ++j) {
- k = this.b.nextInt(16) + 8; + k = this.b.nextInt(16) + 8;
- l = this.b.nextInt(16) + 8; + l = this.b.nextInt(16) + 8;
- i1 = this.b.nextInt(this.getHighestBlockYAt(this.c.a(k, 0, l)).getY() + 32); // CraftBukkit - Prevent crash + i1 = this.b.nextInt(this.a.getHighestBlockYAt(this.c.a(k, 0, l)).getY() + 32);
- blockposition = this.c.a(k, i1, l); + blockposition = this.c.a(k, i1, l);
- EnumFlowerVarient enumflowervarient = biomebase.a(this.b, blockposition); + EnumFlowerVarient enumflowervarient = biomebase.a(this.b, blockposition);
- BlockFlowers blockflowers = enumflowervarient.a().a(); + BlockFlowers blockflowers = enumflowervarient.a().a();
- +
- if (blockflowers.getMaterial() != Material.AIR) { + if (blockflowers.getMaterial() != Material.AIR) {
- this.s.a(blockflowers, enumflowervarient); + this.s.a(blockflowers, enumflowervarient);
- this.s.generate(this.a, this.b, blockposition); + this.s.generate(this.a, this.b, blockposition);
- } + }
- } + }
- +
- for (j = 0; j < this.C; ++j) { + for (j = 0; j < this.C; ++j) {
- k = this.b.nextInt(16) + 8; + k = this.b.nextInt(16) + 8;
- l = this.b.nextInt(16) + 8; + l = this.b.nextInt(16) + 8;
- i1 = this.b.nextInt(this.getHighestBlockYAt(this.c.a(k, 0, l)).getY() * 2); // CraftBukkit - Prevent crash + i1 = this.b.nextInt(this.a.getHighestBlockYAt(this.c.a(k, 0, l)).getY() * 2);
- biomebase.b(this.b).generate(this.a, this.b, this.c.a(k, i1, l)); + biomebase.b(this.b).generate(this.a, this.b, this.c.a(k, i1, l));
- } + }
- +
- for (j = 0; j < this.D; ++j) { + for (j = 0; j < this.D; ++j) {
- k = this.b.nextInt(16) + 8; + k = this.b.nextInt(16) + 8;
- l = this.b.nextInt(16) + 8; + l = this.b.nextInt(16) + 8;
- i1 = this.b.nextInt(this.getHighestBlockYAt(this.c.a(k, 0, l)).getY() * 2); // CraftBukkit - Prevent crash + i1 = this.b.nextInt(this.a.getHighestBlockYAt(this.c.a(k, 0, l)).getY() * 2);
- (new WorldGenDeadBush()).generate(this.a, this.b, this.c.a(k, i1, l)); + (new WorldGenDeadBush()).generate(this.a, this.b, this.c.a(k, i1, l));
- } + }
- +
- j = 0; + j = 0;
- +
- while (j < this.z) { + while (j < this.z) {
- k = this.b.nextInt(16) + 8; + k = this.b.nextInt(16) + 8;
- l = this.b.nextInt(16) + 8; + l = this.b.nextInt(16) + 8;
- i1 = this.b.nextInt(this.getHighestBlockYAt(this.c.a(k, 0, l)).getY() * 2); // CraftBukkit - Prevent crash + i1 = this.b.nextInt(this.a.getHighestBlockYAt(this.c.a(k, 0, l)).getY() * 2);
- blockposition = this.c.a(k, i1, l); + blockposition = this.c.a(k, i1, l);
- +
- while (true) { + while (true) {
- if (blockposition.getY() > 0) { + if (blockposition.getY() > 0) {
- BlockPosition blockposition1 = blockposition.down(); + BlockPosition blockposition1 = blockposition.down();
- +
- if (this.a.isEmpty(blockposition1)) { + if (this.a.isEmpty(blockposition1)) {
- blockposition = blockposition1; + blockposition = blockposition1;
- continue; + continue;
- } + }
- } + }
- +
- this.y.generate(this.a, this.b, blockposition); + this.y.generate(this.a, this.b, blockposition);
- ++j; + ++j;
- break; + break;
- } + }
- } + }
- +
- for (j = 0; j < this.E; ++j) { + for (j = 0; j < this.E; ++j) {
- if (this.b.nextInt(4) == 0) { + if (this.b.nextInt(4) == 0) {
- k = this.b.nextInt(16) + 8; + k = this.b.nextInt(16) + 8;
- l = this.b.nextInt(16) + 8; + l = this.b.nextInt(16) + 8;
- BlockPosition blockposition2 = this.getHighestBlockYAt(this.c.a(k, 0, l)); // CraftBukkit - Prevent crash + BlockPosition blockposition2 = this.a.getHighestBlockYAt(this.c.a(k, 0, l));
- +
- this.t.generate(this.a, this.b, blockposition2); + this.t.generate(this.a, this.b, blockposition2);
- } + }
- +
- if (this.b.nextInt(8) == 0) { + if (this.b.nextInt(8) == 0) {
- k = this.b.nextInt(16) + 8; + k = this.b.nextInt(16) + 8;
- l = this.b.nextInt(16) + 8; + l = this.b.nextInt(16) + 8;
- i1 = this.b.nextInt(this.getHighestBlockYAt(this.c.a(k, 0, l)).getY() * 2); // CraftBukkit - Prevent crash + i1 = this.b.nextInt(this.a.getHighestBlockYAt(this.c.a(k, 0, l)).getY() * 2);
- blockposition = this.c.a(k, i1, l); + blockposition = this.c.a(k, i1, l);
- this.u.generate(this.a, this.b, blockposition); + this.u.generate(this.a, this.b, blockposition);
- } + }
- } + }
- +
- if (this.b.nextInt(4) == 0) { + if (this.b.nextInt(4) == 0) {
- j = this.b.nextInt(16) + 8; + j = this.b.nextInt(16) + 8;
- k = this.b.nextInt(16) + 8; + k = this.b.nextInt(16) + 8;
- l = this.b.nextInt(this.getHighestBlockYAt(this.c.a(j, 0, k)).getY() * 2); // CraftBukkit - Prevent crash + l = this.b.nextInt(this.a.getHighestBlockYAt(this.c.a(j, 0, k)).getY() * 2);
- this.t.generate(this.a, this.b, this.c.a(j, l, k)); + this.t.generate(this.a, this.b, this.c.a(j, l, k));
- } + }
- +
- if (this.b.nextInt(8) == 0) { + if (this.b.nextInt(8) == 0) {
- j = this.b.nextInt(16) + 8; + j = this.b.nextInt(16) + 8;
- k = this.b.nextInt(16) + 8; + k = this.b.nextInt(16) + 8;
- l = this.b.nextInt(this.getHighestBlockYAt(this.c.a(j, 0, k)).getY() * 2); // CraftBukkit - Prevent crash + l = this.b.nextInt(this.a.getHighestBlockYAt(this.c.a(j, 0, k)).getY() * 2);
- this.u.generate(this.a, this.b, this.c.a(j, l, k)); + this.u.generate(this.a, this.b, this.c.a(j, l, k));
- } + }
- +
- for (j = 0; j < this.F; ++j) { + for (j = 0; j < this.F; ++j) {
- k = this.b.nextInt(16) + 8; + k = this.b.nextInt(16) + 8;
- l = this.b.nextInt(16) + 8; + l = this.b.nextInt(16) + 8;
- i1 = this.b.nextInt(this.getHighestBlockYAt(this.c.a(k, 0, l)).getY() * 2); // CraftBukkit - Prevent crash + i1 = this.b.nextInt(this.a.getHighestBlockYAt(this.c.a(k, 0, l)).getY() * 2);
- this.w.generate(this.a, this.b, this.c.a(k, i1, l)); + this.w.generate(this.a, this.b, this.c.a(k, i1, l));
- } + }
- +
- for (j = 0; j < 10; ++j) { + for (j = 0; j < 10; ++j) {
- k = this.b.nextInt(16) + 8; + k = this.b.nextInt(16) + 8;
- l = this.b.nextInt(16) + 8; + l = this.b.nextInt(16) + 8;
- i1 = this.b.nextInt(this.getHighestBlockYAt(this.c.a(k, 0, l)).getY() * 2); // CraftBukkit - Prevent crash + i1 = this.b.nextInt(this.a.getHighestBlockYAt(this.c.a(k, 0, l)).getY() * 2);
- this.w.generate(this.a, this.b, this.c.a(k, i1, l)); + this.w.generate(this.a, this.b, this.c.a(k, i1, l));
- } + }
- +
- if (this.b.nextInt(32) == 0) { + if (this.b.nextInt(32) == 0) {
- j = this.b.nextInt(16) + 8; + j = this.b.nextInt(16) + 8;
- k = this.b.nextInt(16) + 8; + k = this.b.nextInt(16) + 8;
- l = this.b.nextInt(this.getHighestBlockYAt(this.c.a(j, 0, k)).getY() * 2); // CraftBukkit - Prevent crash + l = this.b.nextInt(this.a.getHighestBlockYAt(this.c.a(j, 0, k)).getY() * 2);
- (new WorldGenPumpkin()).generate(this.a, this.b, this.c.a(j, l, k)); + (new WorldGenPumpkin()).generate(this.a, this.b, this.c.a(j, l, k));
- } + }
- +
- for (j = 0; j < this.G; ++j) { + for (j = 0; j < this.G; ++j) {
- k = this.b.nextInt(16) + 8; + k = this.b.nextInt(16) + 8;
- l = this.b.nextInt(16) + 8; + l = this.b.nextInt(16) + 8;
- i1 = this.b.nextInt(this.getHighestBlockYAt(this.c.a(k, 0, l)).getY() * 2); // CraftBukkit - Prevent crash + i1 = this.b.nextInt(this.a.getHighestBlockYAt(this.c.a(k, 0, l)).getY() * 2);
- this.x.generate(this.a, this.b, this.c.a(k, i1, l)); + this.x.generate(this.a, this.b, this.c.a(k, i1, l));
- } + }
- +
- if (this.L) { + if (this.L) {
- BlockPosition blockposition3; + BlockPosition blockposition3;
- +
- for (j = 0; j < 50; ++j) { + for (j = 0; j < 50; ++j) {
- blockposition3 = this.c.a(this.b.nextInt(16) + 8, this.b.nextInt(this.b.nextInt(248) + 8), this.b.nextInt(16) + 8); + blockposition3 = this.c.a(this.b.nextInt(16) + 8, this.b.nextInt(this.b.nextInt(248) + 8), this.b.nextInt(16) + 8);
- (new WorldGenLiquids(Blocks.FLOWING_WATER)).generate(this.a, this.b, blockposition3); + (new WorldGenLiquids(Blocks.FLOWING_WATER)).generate(this.a, this.b, blockposition3);
- } + }
- +
- for (j = 0; j < 20; ++j) { + for (j = 0; j < 20; ++j) {
- blockposition3 = this.c.a(this.b.nextInt(16) + 8, this.b.nextInt(this.b.nextInt(this.b.nextInt(240) + 8) + 8), this.b.nextInt(16) + 8); + blockposition3 = this.c.a(this.b.nextInt(16) + 8, this.b.nextInt(this.b.nextInt(this.b.nextInt(240) + 8) + 8), this.b.nextInt(16) + 8);
- (new WorldGenLiquids(Blocks.FLOWING_LAVA)).generate(this.a, this.b, blockposition3); + (new WorldGenLiquids(Blocks.FLOWING_LAVA)).generate(this.a, this.b, blockposition3);
- } + }
- } + }
- +
- } + }
- +
- // CraftBukkit start - The heightMap can be wrong calculated and return Y = 0 which will crash the Server + protected void a(int i, WorldGenerator worldgenerator, int j, int k) {
- private BlockPosition getHighestBlockYAt( BlockPosition blockPosition ) { + int l;
- BlockPosition returnBlockPosition = this.a.getHighestBlockYAt( blockPosition ); +
- if ( returnBlockPosition.getY() == 0 ) { + if (k < j) {
- returnBlockPosition = returnBlockPosition.up( 1 ); + l = j;
- } + j = k;
- return returnBlockPosition; + k = l;
- } + } else if (k == j) {
- // CraftBukkit end + if (j < 255) {
- + ++k;
- protected void a(int i, WorldGenerator worldgenerator, int j, int k) { + } else {
- int l; + --j;
- + }
- if (k < j) { + }
- l = j; +
- j = k; + for (l = 0; l < i; ++l) {
- k = l; + BlockPosition blockposition = this.c.a(this.b.nextInt(16), this.b.nextInt(k - j) + j, this.b.nextInt(16));
- } else if (k == j) { +
- if (j < 255) { + worldgenerator.generate(this.a, this.b, blockposition);
- ++k; + }
- } else { +
- --j; + }
- } +
- } + protected void b(int i, WorldGenerator worldgenerator, int j, int k) {
- + for (int l = 0; l < i; ++l) {
- for (l = 0; l < i; ++l) { + BlockPosition blockposition = this.c.a(this.b.nextInt(16), this.b.nextInt(k) + this.b.nextInt(k) + j - k, this.b.nextInt(16));
- BlockPosition blockposition = this.c.a(this.b.nextInt(16), this.b.nextInt(k - j) + j, this.b.nextInt(16)); +
- + worldgenerator.generate(this.a, this.b, blockposition);
- worldgenerator.generate(this.a, this.b, blockposition); + }
- } +
- + }
- } +
- + protected void a() {
- protected void b(int i, WorldGenerator worldgenerator, int j, int k) { + this.a(this.d.J, this.h, this.d.K, this.d.L);
- for (int l = 0; l < i; ++l) { + this.a(this.d.N, this.i, this.d.O, this.d.P);
- BlockPosition blockposition = this.c.a(this.b.nextInt(16), this.b.nextInt(k) + this.b.nextInt(k) + j - k, this.b.nextInt(16)); + this.a(this.d.V, this.k, this.d.W, this.d.X);
- + this.a(this.d.R, this.j, this.d.S, this.d.T);
- worldgenerator.generate(this.a, this.b, blockposition); + this.a(this.d.Z, this.l, this.d.aa, this.d.ab);
- } + this.a(this.d.ad, this.m, this.d.ae, this.d.af);
- + this.a(this.d.ah, this.n, this.d.ai, this.d.aj);
- } + this.a(this.d.al, this.o, this.d.am, this.d.an);
- + this.a(this.d.ap, this.p, this.d.aq, this.d.ar);
- protected void a() { + this.a(this.d.at, this.q, this.d.au, this.d.av);
- this.a(this.d.J, this.h, this.d.K, this.d.L); + this.b(this.d.ax, this.r, this.d.ay, this.d.az);
- this.a(this.d.N, this.i, this.d.O, this.d.P); + }
- this.a(this.d.V, this.k, this.d.W, this.d.X); +}
- this.a(this.d.R, this.j, this.d.S, this.d.T);
- this.a(this.d.Z, this.l, this.d.aa, this.d.ab);
- this.a(this.d.ad, this.m, this.d.ae, this.d.af);
- this.a(this.d.ah, this.n, this.d.ai, this.d.aj);
- this.a(this.d.al, this.o, this.d.am, this.d.an);
- this.a(this.d.ap, this.p, this.d.aq, this.d.ar);
- this.a(this.d.at, this.q, this.d.au, this.d.av);
- this.b(this.d.ax, this.r, this.d.ay, this.d.az);
- }
-}
diff --git a/src/main/java/net/minecraft/server/BlockAnvil.java b/src/main/java/net/minecraft/server/BlockAnvil.java diff --git a/src/main/java/net/minecraft/server/BlockAnvil.java b/src/main/java/net/minecraft/server/BlockAnvil.java
new file mode 100644 new file mode 100644
index 0000000..8c9ed4c index 0000000..8c9ed4c

View file

@ -1,4 +1,4 @@
From 9b37e747a5dde90d8c22fea0242c11554b18594c Mon Sep 17 00:00:00 2001 From ef07b1f5de9476274a7a491bd59ac0a21948fd24 Mon Sep 17 00:00:00 2001
From: Thinkofdeath <thinkofdeath@spigotmc.org> From: Thinkofdeath <thinkofdeath@spigotmc.org>
Date: Wed, 2 Jul 2014 23:35:51 +0100 Date: Wed, 2 Jul 2014 23:35:51 +0100
Subject: [PATCH] Better item validation Subject: [PATCH] Better item validation
@ -64,7 +64,7 @@ index 8b7dc17..5227007 100644
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java
index debca31..a385eee 100644 index 0c69a3e..6843fac 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java
@@ -20,6 +20,10 @@ import net.minecraft.server.ChatSerializer; @@ -20,6 +20,10 @@ import net.minecraft.server.ChatSerializer;
@ -92,9 +92,9 @@ index debca31..a385eee 100644
} }
boolean resolved = false; boolean resolved = false;
@@ -80,7 +84,7 @@ class CraftMetaBook extends CraftMetaItem implements BookMeta { @@ -84,7 +88,7 @@ class CraftMetaBook extends CraftMetaItem implements BookMeta {
if (resolved) { // Ignore and treat as an old book
page = CraftChatMessage.fromComponent(ChatSerializer.a(page)); }
} }
- pageArray[i] = page; - pageArray[i] = page;
+ pageArray[i] = limit( page, 2048 ); // Spigot + pageArray[i] = limit( page, 2048 ); // Spigot