Update mc-dev etc.
Dieser Commit ist enthalten in:
Ursprung
80da3f0c9b
Commit
eb2ab6b421
2
Bukkit
2
Bukkit
@ -1 +1 @@
|
||||
Subproject commit b9846e5de470c50930477f2f51c07592e1fb7548
|
||||
Subproject commit 16b340dd387880586b0d659f9b62482af1f28306
|
@ -1,11 +1,11 @@
|
||||
From cae4b96d116f9c53871d20ac352c65cd8c73054f Mon Sep 17 00:00:00 2001
|
||||
From 2bb359a6e5b56a5e53f765efa8aea93c2db727fb Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Sun, 2 Jun 2013 10:36:24 +1000
|
||||
Subject: [PATCH] POM Changes
|
||||
|
||||
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index 1092756..805fbbb 100644
|
||||
index a83e578..e1f4e61 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -1,43 +1,23 @@
|
||||
@ -23,7 +23,7 @@ index 1092756..805fbbb 100644
|
||||
+
|
||||
+ <groupId>org.spigotmc</groupId>
|
||||
+ <artifactId>spigot-api</artifactId>
|
||||
<version>1.6.4-R2.1-SNAPSHOT</version>
|
||||
<version>1.7.2-R0.1-SNAPSHOT</version>
|
||||
- <name>Bukkit</name>
|
||||
- <url>http://www.bukkit.org</url>
|
||||
+ <name>Spigot-API</name>
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 988f599494f4659053e0467e356e37c688f558ce
|
||||
Subproject commit 7e1ac0a77129b169704c1e222ff2deb3ab6cd2d2
|
@ -1,12 +1,12 @@
|
||||
From 5b899e58bba86e41281992f8eed8b9a93f5405a6 Mon Sep 17 00:00:00 2001
|
||||
From 5df0962615a66779058f3ca87ea05ac17be54059 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Tue, 2 Jul 2013 13:13:29 +1000
|
||||
Date: Sun, 1 Dec 2013 15:10:48 +1100
|
||||
Subject: [PATCH] mc-dev imports
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockBrewingStand.java b/src/main/java/net/minecraft/server/BlockBrewingStand.java
|
||||
new file mode 100644
|
||||
index 0000000..270b2cb
|
||||
index 0000000..3287d77
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/minecraft/server/BlockBrewingStand.java
|
||||
@@ -0,0 +1,109 @@
|
||||
@ -19,23 +19,23 @@ index 0000000..270b2cb
|
||||
+
|
||||
+ private Random a = new Random();
|
||||
+
|
||||
+ public BlockBrewingStand(int i) {
|
||||
+ super(i, Material.ORE);
|
||||
+ public BlockBrewingStand() {
|
||||
+ super(Material.ORE);
|
||||
+ }
|
||||
+
|
||||
+ public boolean c() {
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ public int d() {
|
||||
+ public int b() {
|
||||
+ return 25;
|
||||
+ }
|
||||
+
|
||||
+ public TileEntity b(World world) {
|
||||
+ public TileEntity a(World world, int i) {
|
||||
+ return new TileEntityBrewingStand();
|
||||
+ }
|
||||
+
|
||||
+ public boolean b() {
|
||||
+ public boolean d() {
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
@ -70,14 +70,14 @@ index 0000000..270b2cb
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ public void remove(World world, int i, int j, int k, int l, int i1) {
|
||||
+ public void remove(World world, int i, int j, int k, Block block, int l) {
|
||||
+ TileEntity tileentity = world.getTileEntity(i, j, k);
|
||||
+
|
||||
+ if (tileentity instanceof TileEntityBrewingStand) {
|
||||
+ TileEntityBrewingStand tileentitybrewingstand = (TileEntityBrewingStand) tileentity;
|
||||
+
|
||||
+ for (int j1 = 0; j1 < tileentitybrewingstand.getSize(); ++j1) {
|
||||
+ ItemStack itemstack = tileentitybrewingstand.getItem(j1);
|
||||
+ for (int i1 = 0; i1 < tileentitybrewingstand.getSize(); ++i1) {
|
||||
+ ItemStack itemstack = tileentitybrewingstand.getItem(i1);
|
||||
+
|
||||
+ if (itemstack != null) {
|
||||
+ float f = this.a.nextFloat() * 0.8F + 0.1F;
|
||||
@ -85,14 +85,14 @@ index 0000000..270b2cb
|
||||
+ float f2 = this.a.nextFloat() * 0.8F + 0.1F;
|
||||
+
|
||||
+ while (itemstack.count > 0) {
|
||||
+ int k1 = this.a.nextInt(21) + 10;
|
||||
+ int j1 = this.a.nextInt(21) + 10;
|
||||
+
|
||||
+ if (k1 > itemstack.count) {
|
||||
+ k1 = itemstack.count;
|
||||
+ if (j1 > itemstack.count) {
|
||||
+ j1 = itemstack.count;
|
||||
+ }
|
||||
+
|
||||
+ itemstack.count -= k1;
|
||||
+ EntityItem entityitem = new EntityItem(world, (double) ((float) i + f), (double) ((float) j + f1), (double) ((float) k + f2), new ItemStack(itemstack.id, k1, itemstack.getData()));
|
||||
+ itemstack.count -= j1;
|
||||
+ EntityItem entityitem = new EntityItem(world, (double) ((float) i + f), (double) ((float) j + f1), (double) ((float) k + f2), new ItemStack(itemstack.getItem(), j1, itemstack.getData()));
|
||||
+ float f3 = 0.05F;
|
||||
+
|
||||
+ entityitem.motX = (double) ((float) this.a.nextGaussian() * f3);
|
||||
@ -104,24 +104,24 @@ index 0000000..270b2cb
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ super.remove(world, i, j, k, l, i1);
|
||||
+ super.remove(world, i, j, k, block, l);
|
||||
+ }
|
||||
+
|
||||
+ public int getDropType(int i, Random random, int j) {
|
||||
+ return Item.BREWING_STAND.id;
|
||||
+ public Item getDropType(int i, Random random, int j) {
|
||||
+ return Items.BREWING_STAND;
|
||||
+ }
|
||||
+
|
||||
+ public boolean q_() {
|
||||
+ public boolean M() {
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ public int b_(World world, int i, int j, int k, int l) {
|
||||
+ public int g(World world, int i, int j, int k, int l) {
|
||||
+ return Container.b((IInventory) world.getTileEntity(i, j, k));
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockTNT.java b/src/main/java/net/minecraft/server/BlockTNT.java
|
||||
new file mode 100644
|
||||
index 0000000..9acd4f2
|
||||
index 0000000..6d5090b
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/minecraft/server/BlockTNT.java
|
||||
@@ -0,0 +1,80 @@
|
||||
@ -131,8 +131,8 @@ index 0000000..9acd4f2
|
||||
+
|
||||
+public class BlockTNT extends Block {
|
||||
+
|
||||
+ public BlockTNT(int i) {
|
||||
+ super(i, Material.TNT);
|
||||
+ public BlockTNT() {
|
||||
+ super(Material.TNT);
|
||||
+ this.a(CreativeModeTab.d);
|
||||
+ }
|
||||
+
|
||||
@ -144,7 +144,7 @@ index 0000000..9acd4f2
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ public void doPhysics(World world, int i, int j, int k, int l) {
|
||||
+ public void doPhysics(World world, int i, int j, int k, Block block) {
|
||||
+ if (world.isBlockIndirectlyPowered(i, j, k)) {
|
||||
+ this.postBreak(world, i, j, k, 1);
|
||||
+ world.setAir(i, j, k);
|
||||
@ -174,16 +174,16 @@ index 0000000..9acd4f2
|
||||
+ EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(world, (double) ((float) i + 0.5F), (double) ((float) j + 0.5F), (double) ((float) k + 0.5F), entityliving);
|
||||
+
|
||||
+ world.addEntity(entitytntprimed);
|
||||
+ world.makeSound(entitytntprimed, "random.fuse", 1.0F, 1.0F);
|
||||
+ world.makeSound(entitytntprimed, "game.tnt.primed", 1.0F, 1.0F);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ public boolean interact(World world, int i, int j, int k, EntityHuman entityhuman, int l, float f, float f1, float f2) {
|
||||
+ if (entityhuman.by() != null && entityhuman.by().id == Item.FLINT_AND_STEEL.id) {
|
||||
+ if (entityhuman.bD() != null && entityhuman.bD().getItem() == Items.FLINT_AND_STEEL) {
|
||||
+ this.a(world, i, j, k, 1, entityhuman);
|
||||
+ world.setAir(i, j, k);
|
||||
+ entityhuman.by().damage(1, entityhuman);
|
||||
+ entityhuman.bD().damage(1, entityhuman);
|
||||
+ return true;
|
||||
+ } else {
|
||||
+ return super.interact(world, i, j, k, entityhuman, l, f, f1, f2);
|
||||
@ -205,110 +205,31 @@ index 0000000..9acd4f2
|
||||
+ return false;
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/LocaleLanguage.java b/src/main/java/net/minecraft/server/LocaleLanguage.java
|
||||
new file mode 100644
|
||||
index 0000000..aa937fb
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/minecraft/server/LocaleLanguage.java
|
||||
@@ -0,0 +1,73 @@
|
||||
+package net.minecraft.server;
|
||||
+
|
||||
+import com.google.common.base.Splitter;
|
||||
+import com.google.common.collect.Iterables;
|
||||
+import com.google.common.collect.Maps;
|
||||
+import java.io.IOException;
|
||||
+import java.io.InputStream;
|
||||
+import java.util.IllegalFormatException;
|
||||
+import java.util.Iterator;
|
||||
+import java.util.Map;
|
||||
+import java.util.regex.Pattern;
|
||||
+import org.apache.commons.io.Charsets;
|
||||
+import org.apache.commons.io.IOUtils;
|
||||
+
|
||||
+public class LocaleLanguage {
|
||||
+
|
||||
+ private static final Pattern a = Pattern.compile("%(\\d+\\$)?[\\d\\.]*[df]");
|
||||
+ private static final Splitter b = Splitter.on('=').limit(2);
|
||||
+ private static LocaleLanguage c = new LocaleLanguage();
|
||||
+ private Map d = Maps.newHashMap();
|
||||
+
|
||||
+ public LocaleLanguage() {
|
||||
+ try {
|
||||
+ InputStream inputstream = LocaleLanguage.class.getResourceAsStream("/assets/minecraft/lang/en_US.lang");
|
||||
+ Iterator iterator = IOUtils.readLines(inputstream, Charsets.UTF_8).iterator();
|
||||
+
|
||||
+ while (iterator.hasNext()) {
|
||||
+ String s = (String) iterator.next();
|
||||
+
|
||||
+ if (!s.isEmpty() && s.charAt(0) != 35) {
|
||||
+ String[] astring = (String[]) Iterables.toArray(b.split(s), String.class);
|
||||
+
|
||||
+ if (astring != null && astring.length == 2) {
|
||||
+ String s1 = astring[0];
|
||||
+ String s2 = a.matcher(astring[1]).replaceAll("%$1s");
|
||||
+
|
||||
+ this.d.put(s1, s2);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ } catch (IOException ioexception) {
|
||||
+ ;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ static LocaleLanguage a() {
|
||||
+ return c;
|
||||
+ }
|
||||
+
|
||||
+ public synchronized String a(String s) {
|
||||
+ return this.c(s);
|
||||
+ }
|
||||
+
|
||||
+ public synchronized String a(String s, Object... aobject) {
|
||||
+ String s1 = this.c(s);
|
||||
+
|
||||
+ try {
|
||||
+ return String.format(s1, aobject);
|
||||
+ } catch (IllegalFormatException illegalformatexception) {
|
||||
+ return "Format error: " + s1;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ private String c(String s) {
|
||||
+ String s1 = (String) this.d.get(s);
|
||||
+
|
||||
+ return s1 == null ? s : s1;
|
||||
+ }
|
||||
+
|
||||
+ public synchronized boolean b(String s) {
|
||||
+ return this.d.containsKey(s);
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/NextTickListEntry.java b/src/main/java/net/minecraft/server/NextTickListEntry.java
|
||||
new file mode 100644
|
||||
index 0000000..acf8838
|
||||
index 0000000..06934a1
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/minecraft/server/NextTickListEntry.java
|
||||
@@ -0,0 +1,56 @@
|
||||
@@ -0,0 +1,60 @@
|
||||
+package net.minecraft.server;
|
||||
+
|
||||
+public class NextTickListEntry implements Comparable {
|
||||
+
|
||||
+ private static long g;
|
||||
+ private static long f;
|
||||
+ private final Block g;
|
||||
+ public int a;
|
||||
+ public int b;
|
||||
+ public int c;
|
||||
+ public int d;
|
||||
+ public long e;
|
||||
+ public int f;
|
||||
+ public long d;
|
||||
+ public int e;
|
||||
+ private long h;
|
||||
+
|
||||
+ public NextTickListEntry(int i, int j, int k, int l) {
|
||||
+ this.h = (long) (g++);
|
||||
+ public NextTickListEntry(int i, int j, int k, Block block) {
|
||||
+ this.h = (long) (f++);
|
||||
+ this.a = i;
|
||||
+ this.b = j;
|
||||
+ this.c = k;
|
||||
+ this.d = l;
|
||||
+ this.g = block;
|
||||
+ }
|
||||
+
|
||||
+ public boolean equals(Object object) {
|
||||
@ -317,7 +238,7 @@ index 0000000..acf8838
|
||||
+ } else {
|
||||
+ NextTickListEntry nextticklistentry = (NextTickListEntry) object;
|
||||
+
|
||||
+ return this.a == nextticklistentry.a && this.b == nextticklistentry.b && this.c == nextticklistentry.c && Block.b(this.d, nextticklistentry.d);
|
||||
+ return this.a == nextticklistentry.a && this.b == nextticklistentry.b && this.c == nextticklistentry.c && Block.a(this.g, nextticklistentry.g);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
@ -326,20 +247,24 @@ index 0000000..acf8838
|
||||
+ }
|
||||
+
|
||||
+ public NextTickListEntry a(long i) {
|
||||
+ this.e = i;
|
||||
+ this.d = i;
|
||||
+ return this;
|
||||
+ }
|
||||
+
|
||||
+ public void a(int i) {
|
||||
+ this.f = i;
|
||||
+ this.e = i;
|
||||
+ }
|
||||
+
|
||||
+ public int compareTo(NextTickListEntry nextticklistentry) {
|
||||
+ return this.e < nextticklistentry.e ? -1 : (this.e > nextticklistentry.e ? 1 : (this.f != nextticklistentry.f ? this.f - nextticklistentry.f : (this.h < nextticklistentry.h ? -1 : (this.h > nextticklistentry.h ? 1 : 0))));
|
||||
+ return this.d < nextticklistentry.d ? -1 : (this.d > nextticklistentry.d ? 1 : (this.e != nextticklistentry.e ? this.e - nextticklistentry.e : (this.h < nextticklistentry.h ? -1 : (this.h > nextticklistentry.h ? 1 : 0))));
|
||||
+ }
|
||||
+
|
||||
+ public String toString() {
|
||||
+ return this.d + ": (" + this.a + ", " + this.b + ", " + this.c + "), " + this.e + ", " + this.f + ", " + this.h;
|
||||
+ return Block.b(this.g) + ": (" + this.a + ", " + this.b + ", " + this.c + "), " + this.d + ", " + this.e + ", " + this.h;
|
||||
+ }
|
||||
+
|
||||
+ public Block a() {
|
||||
+ return this.g;
|
||||
+ }
|
||||
+
|
||||
+ public int compareTo(Object object) {
|
||||
@ -394,7 +319,7 @@ index 0000000..5d75a54
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/OldChunkLoader.java b/src/main/java/net/minecraft/server/OldChunkLoader.java
|
||||
new file mode 100644
|
||||
index 0000000..53c1cb5
|
||||
index 0000000..fcb9912
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/minecraft/server/OldChunkLoader.java
|
||||
@@ -0,0 +1,120 @@
|
||||
@ -413,9 +338,9 @@ index 0000000..53c1cb5
|
||||
+ oldchunk.d = new OldNibbleArray(nbttagcompound.getByteArray("BlockLight"), 7);
|
||||
+ oldchunk.c = nbttagcompound.getByteArray("HeightMap");
|
||||
+ oldchunk.b = nbttagcompound.getBoolean("TerrainPopulated");
|
||||
+ oldchunk.h = nbttagcompound.getList("Entities");
|
||||
+ oldchunk.i = nbttagcompound.getList("TileEntities");
|
||||
+ oldchunk.j = nbttagcompound.getList("TileTicks");
|
||||
+ oldchunk.h = nbttagcompound.getList("Entities", 10);
|
||||
+ oldchunk.i = nbttagcompound.getList("TileEntities", 10);
|
||||
+ oldchunk.j = nbttagcompound.getList("TileTicks", 10);
|
||||
+
|
||||
+ try {
|
||||
+ oldchunk.a = nbttagcompound.getLong("LastUpdate");
|
||||
@ -438,7 +363,7 @@ index 0000000..53c1cb5
|
||||
+
|
||||
+ nbttagcompound.setIntArray("HeightMap", aint);
|
||||
+ nbttagcompound.setBoolean("TerrainPopulated", oldchunk.b);
|
||||
+ NBTTagList nbttaglist = new NBTTagList("Sections");
|
||||
+ NBTTagList nbttaglist = new NBTTagList();
|
||||
+
|
||||
+ int j;
|
||||
+
|
||||
@ -518,314 +443,6 @@ index 0000000..53c1cb5
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/Packet254GetInfo.java b/src/main/java/net/minecraft/server/Packet254GetInfo.java
|
||||
new file mode 100644
|
||||
index 0000000..9afa795
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/minecraft/server/Packet254GetInfo.java
|
||||
@@ -0,0 +1,53 @@
|
||||
+package net.minecraft.server;
|
||||
+
|
||||
+import java.io.DataInput;
|
||||
+import java.io.DataOutput;
|
||||
+
|
||||
+public class Packet254GetInfo extends Packet {
|
||||
+
|
||||
+ private static final int d = (new Packet250CustomPayload()).n();
|
||||
+ public int a;
|
||||
+ public String b;
|
||||
+ public int c;
|
||||
+
|
||||
+ public Packet254GetInfo() {}
|
||||
+
|
||||
+ public void a(DataInput datainput) throws java.io.IOException { // Spigot - throws
|
||||
+ try {
|
||||
+ datainput.readByte();
|
||||
+ datainput.readByte();
|
||||
+ a(datainput, 255);
|
||||
+ datainput.readShort();
|
||||
+ this.a = datainput.readByte();
|
||||
+ if (this.a >= 73) {
|
||||
+ this.b = a(datainput, 255);
|
||||
+ this.c = datainput.readInt();
|
||||
+ }
|
||||
+ } catch (Throwable throwable) {
|
||||
+ this.a = 0;
|
||||
+ this.b = "";
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ public void a(DataOutput dataoutput) throws java.io.IOException { // Spigot - throws
|
||||
+ dataoutput.writeByte(1);
|
||||
+ dataoutput.writeByte(d);
|
||||
+ Packet.a("MC|PingHost", dataoutput);
|
||||
+ dataoutput.writeShort(3 + 2 * this.b.length() + 4);
|
||||
+ dataoutput.writeByte(this.a);
|
||||
+ Packet.a(this.b, dataoutput);
|
||||
+ dataoutput.writeInt(this.c);
|
||||
+ }
|
||||
+
|
||||
+ public void handle(Connection connection) {
|
||||
+ connection.a(this);
|
||||
+ }
|
||||
+
|
||||
+ public int a() {
|
||||
+ return 3 + this.b.length() * 2 + 4;
|
||||
+ }
|
||||
+
|
||||
+ public boolean d() {
|
||||
+ return this.a == 0;
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/Packet51MapChunk.java b/src/main/java/net/minecraft/server/Packet51MapChunk.java
|
||||
new file mode 100644
|
||||
index 0000000..4e67e27
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/minecraft/server/Packet51MapChunk.java
|
||||
@@ -0,0 +1,186 @@
|
||||
+package net.minecraft.server;
|
||||
+
|
||||
+import java.io.DataInput;
|
||||
+import java.io.DataOutput;
|
||||
+import java.io.IOException;
|
||||
+import java.util.zip.DataFormatException;
|
||||
+import java.util.zip.Deflater;
|
||||
+import java.util.zip.Inflater;
|
||||
+
|
||||
+public class Packet51MapChunk extends Packet {
|
||||
+
|
||||
+ public int a;
|
||||
+ public int b;
|
||||
+ public int c;
|
||||
+ public int d;
|
||||
+ private byte[] buffer;
|
||||
+ private byte[] inflatedBuffer;
|
||||
+ public boolean e;
|
||||
+ private int size;
|
||||
+ private static byte[] buildBuffer = new byte[196864];
|
||||
+
|
||||
+ public Packet51MapChunk() {
|
||||
+ this.lowPriority = true;
|
||||
+ }
|
||||
+
|
||||
+ public Packet51MapChunk(Chunk chunk, boolean flag, int i) {
|
||||
+ this.lowPriority = true;
|
||||
+ this.a = chunk.x;
|
||||
+ this.b = chunk.z;
|
||||
+ this.e = flag;
|
||||
+ ChunkMap chunkmap = a(chunk, flag, i);
|
||||
+ Deflater deflater = new Deflater(-1);
|
||||
+
|
||||
+ this.d = chunkmap.c;
|
||||
+ this.c = chunkmap.b;
|
||||
+
|
||||
+ try {
|
||||
+ this.inflatedBuffer = chunkmap.a;
|
||||
+ deflater.setInput(chunkmap.a, 0, chunkmap.a.length);
|
||||
+ deflater.finish();
|
||||
+ this.buffer = new byte[chunkmap.a.length];
|
||||
+ this.size = deflater.deflate(this.buffer);
|
||||
+ } finally {
|
||||
+ deflater.end();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ public void a(DataInput datainput) throws java.io.IOException { // Spigot - throws
|
||||
+ this.a = datainput.readInt();
|
||||
+ this.b = datainput.readInt();
|
||||
+ this.e = datainput.readBoolean();
|
||||
+ this.c = datainput.readShort();
|
||||
+ this.d = datainput.readShort();
|
||||
+ this.size = datainput.readInt();
|
||||
+ if (buildBuffer.length < this.size) {
|
||||
+ buildBuffer = new byte[this.size];
|
||||
+ }
|
||||
+
|
||||
+ datainput.readFully(buildBuffer, 0, this.size);
|
||||
+ int i = 0;
|
||||
+
|
||||
+ int j;
|
||||
+
|
||||
+ for (j = 0; j < 16; ++j) {
|
||||
+ i += this.c >> j & 1;
|
||||
+ }
|
||||
+
|
||||
+ j = 12288 * i;
|
||||
+ if (this.e) {
|
||||
+ j += 256;
|
||||
+ }
|
||||
+
|
||||
+ this.inflatedBuffer = new byte[j];
|
||||
+ Inflater inflater = new Inflater();
|
||||
+
|
||||
+ inflater.setInput(buildBuffer, 0, this.size);
|
||||
+
|
||||
+ try {
|
||||
+ inflater.inflate(this.inflatedBuffer);
|
||||
+ } catch (DataFormatException dataformatexception) {
|
||||
+ throw new IOException("Bad compressed data format");
|
||||
+ } finally {
|
||||
+ inflater.end();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ public void a(DataOutput dataoutput) throws java.io.IOException { // Spigot - throws
|
||||
+ dataoutput.writeInt(this.a);
|
||||
+ dataoutput.writeInt(this.b);
|
||||
+ dataoutput.writeBoolean(this.e);
|
||||
+ dataoutput.writeShort((short) (this.c & '\uffff'));
|
||||
+ dataoutput.writeShort((short) (this.d & '\uffff'));
|
||||
+ dataoutput.writeInt(this.size);
|
||||
+ dataoutput.write(this.buffer, 0, this.size);
|
||||
+ }
|
||||
+
|
||||
+ public void handle(Connection connection) {
|
||||
+ connection.a(this);
|
||||
+ }
|
||||
+
|
||||
+ public int a() {
|
||||
+ return 17 + this.size;
|
||||
+ }
|
||||
+
|
||||
+ public static ChunkMap a(Chunk chunk, boolean flag, int i) {
|
||||
+ int j = 0;
|
||||
+ ChunkSection[] achunksection = chunk.i();
|
||||
+ int k = 0;
|
||||
+ ChunkMap chunkmap = new ChunkMap();
|
||||
+ byte[] abyte = buildBuffer;
|
||||
+
|
||||
+ if (flag) {
|
||||
+ chunk.seenByPlayer = true;
|
||||
+ }
|
||||
+
|
||||
+ int l;
|
||||
+
|
||||
+ for (l = 0; l < achunksection.length; ++l) {
|
||||
+ if (achunksection[l] != null && (!flag || !achunksection[l].isEmpty()) && (i & 1 << l) != 0) {
|
||||
+ chunkmap.b |= 1 << l;
|
||||
+ if (achunksection[l].getExtendedIdArray() != null) {
|
||||
+ chunkmap.c |= 1 << l;
|
||||
+ ++k;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ for (l = 0; l < achunksection.length; ++l) {
|
||||
+ if (achunksection[l] != null && (!flag || !achunksection[l].isEmpty()) && (i & 1 << l) != 0) {
|
||||
+ byte[] abyte1 = achunksection[l].getIdArray();
|
||||
+
|
||||
+ System.arraycopy(abyte1, 0, abyte, j, abyte1.length);
|
||||
+ j += abyte1.length;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ NibbleArray nibblearray;
|
||||
+
|
||||
+ for (l = 0; l < achunksection.length; ++l) {
|
||||
+ if (achunksection[l] != null && (!flag || !achunksection[l].isEmpty()) && (i & 1 << l) != 0) {
|
||||
+ nibblearray = achunksection[l].getDataArray();
|
||||
+ System.arraycopy(nibblearray.a, 0, abyte, j, nibblearray.a.length);
|
||||
+ j += nibblearray.a.length;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ for (l = 0; l < achunksection.length; ++l) {
|
||||
+ if (achunksection[l] != null && (!flag || !achunksection[l].isEmpty()) && (i & 1 << l) != 0) {
|
||||
+ nibblearray = achunksection[l].getEmittedLightArray();
|
||||
+ System.arraycopy(nibblearray.a, 0, abyte, j, nibblearray.a.length);
|
||||
+ j += nibblearray.a.length;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (!chunk.world.worldProvider.g) {
|
||||
+ for (l = 0; l < achunksection.length; ++l) {
|
||||
+ if (achunksection[l] != null && (!flag || !achunksection[l].isEmpty()) && (i & 1 << l) != 0) {
|
||||
+ nibblearray = achunksection[l].getSkyLightArray();
|
||||
+ System.arraycopy(nibblearray.a, 0, abyte, j, nibblearray.a.length);
|
||||
+ j += nibblearray.a.length;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (k > 0) {
|
||||
+ for (l = 0; l < achunksection.length; ++l) {
|
||||
+ if (achunksection[l] != null && (!flag || !achunksection[l].isEmpty()) && achunksection[l].getExtendedIdArray() != null && (i & 1 << l) != 0) {
|
||||
+ nibblearray = achunksection[l].getExtendedIdArray();
|
||||
+ System.arraycopy(nibblearray.a, 0, abyte, j, nibblearray.a.length);
|
||||
+ j += nibblearray.a.length;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (flag) {
|
||||
+ byte[] abyte2 = chunk.m();
|
||||
+
|
||||
+ System.arraycopy(abyte2, 0, abyte, j, abyte2.length);
|
||||
+ j += abyte2.length;
|
||||
+ }
|
||||
+
|
||||
+ chunkmap.a = new byte[j];
|
||||
+ System.arraycopy(abyte, 0, chunkmap.a, 0, j);
|
||||
+ return chunkmap;
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/Packet63WorldParticles.java b/src/main/java/net/minecraft/server/Packet63WorldParticles.java
|
||||
new file mode 100644
|
||||
index 0000000..f036c53
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/minecraft/server/Packet63WorldParticles.java
|
||||
@@ -0,0 +1,51 @@
|
||||
+package net.minecraft.server;
|
||||
+
|
||||
+import java.io.DataInput;
|
||||
+import java.io.DataOutput;
|
||||
+
|
||||
+public class Packet63WorldParticles extends Packet {
|
||||
+
|
||||
+ private String a;
|
||||
+ private float b;
|
||||
+ private float c;
|
||||
+ private float d;
|
||||
+ private float e;
|
||||
+ private float f;
|
||||
+ private float g;
|
||||
+ private float h;
|
||||
+ private int i;
|
||||
+
|
||||
+ public Packet63WorldParticles() {}
|
||||
+
|
||||
+ public void a(DataInput datainput) throws java.io.IOException { // Spigot - throws
|
||||
+ this.a = a(datainput, 64);
|
||||
+ this.b = datainput.readFloat();
|
||||
+ this.c = datainput.readFloat();
|
||||
+ this.d = datainput.readFloat();
|
||||
+ this.e = datainput.readFloat();
|
||||
+ this.f = datainput.readFloat();
|
||||
+ this.g = datainput.readFloat();
|
||||
+ this.h = datainput.readFloat();
|
||||
+ this.i = datainput.readInt();
|
||||
+ }
|
||||
+
|
||||
+ public void a(DataOutput dataoutput) throws java.io.IOException { // Spigot - throws
|
||||
+ a(this.a, dataoutput);
|
||||
+ dataoutput.writeFloat(this.b);
|
||||
+ dataoutput.writeFloat(this.c);
|
||||
+ dataoutput.writeFloat(this.d);
|
||||
+ dataoutput.writeFloat(this.e);
|
||||
+ dataoutput.writeFloat(this.f);
|
||||
+ dataoutput.writeFloat(this.g);
|
||||
+ dataoutput.writeFloat(this.h);
|
||||
+ dataoutput.writeInt(this.i);
|
||||
+ }
|
||||
+
|
||||
+ public void handle(Connection connection) {
|
||||
+ connection.a(this);
|
||||
+ }
|
||||
+
|
||||
+ public int a() {
|
||||
+ return 64;
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java
|
||||
new file mode 100644
|
||||
index 0000000..900ed68
|
||||
@ -901,10 +518,10 @@ index 0000000..900ed68
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/StructureGenerator.java b/src/main/java/net/minecraft/server/StructureGenerator.java
|
||||
new file mode 100644
|
||||
index 0000000..ab4dc19
|
||||
index 0000000..1eb87ae
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/minecraft/server/StructureGenerator.java
|
||||
@@ -0,0 +1,216 @@
|
||||
@@ -0,0 +1,217 @@
|
||||
+package net.minecraft.server;
|
||||
+
|
||||
+import java.util.HashMap;
|
||||
@ -916,14 +533,14 @@ index 0000000..ab4dc19
|
||||
+
|
||||
+public abstract class StructureGenerator extends WorldGenBase {
|
||||
+
|
||||
+ private WorldGenFeature e;
|
||||
+ private PersistentStructure e;
|
||||
+ protected Map d = new HashMap();
|
||||
+
|
||||
+ public StructureGenerator() {}
|
||||
+
|
||||
+ public abstract String a();
|
||||
+
|
||||
+ protected final void a(World world, int i, int j, int k, int l, byte[] abyte) {
|
||||
+ protected final void a(World world, int i, int j, int k, int l, Block[] ablock) {
|
||||
+ this.a(world);
|
||||
+ if (!this.d.containsKey(Long.valueOf(ChunkCoordIntPair.a(i, j)))) {
|
||||
+ this.b.nextInt();
|
||||
@ -1022,7 +639,7 @@ index 0000000..ab4dc19
|
||||
+ long k1 = (long) (k >> 4) * i1;
|
||||
+
|
||||
+ this.b.setSeed(j1 ^ k1 ^ world.getSeed());
|
||||
+ this.a(world, i >> 4, k >> 4, 0, 0, (byte[]) null);
|
||||
+ this.a(world, i >> 4, k >> 4, 0, 0, (Block[]) null);
|
||||
+ double d0 = Double.MAX_VALUE;
|
||||
+ ChunkPosition chunkposition = null;
|
||||
+ Iterator iterator = this.d.values().iterator();
|
||||
@ -1054,7 +671,7 @@ index 0000000..ab4dc19
|
||||
+ if (chunkposition != null) {
|
||||
+ return chunkposition;
|
||||
+ } else {
|
||||
+ List list = this.p_();
|
||||
+ List list = this.o_();
|
||||
+
|
||||
+ if (list != null) {
|
||||
+ ChunkPosition chunkposition2 = null;
|
||||
@ -1079,22 +696,23 @@ index 0000000..ab4dc19
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ protected List p_() {
|
||||
+ protected List o_() {
|
||||
+ return null;
|
||||
+ }
|
||||
+
|
||||
+ private void a(World world) {
|
||||
+ if (this.e == null) {
|
||||
+ this.e = (WorldGenFeature) world.a(WorldGenFeature.class, this.a());
|
||||
+ this.e = (PersistentStructure) world.a(PersistentStructure.class, this.a());
|
||||
+ if (this.e == null) {
|
||||
+ this.e = new WorldGenFeature(this.a());
|
||||
+ world.a(this.a(), (WorldMapBase) this.e);
|
||||
+ this.e = new PersistentStructure(this.a());
|
||||
+ world.a(this.a(), (PersistentBase) this.e);
|
||||
+ } else {
|
||||
+ NBTTagCompound nbttagcompound = this.e.a();
|
||||
+ Iterator iterator = nbttagcompound.c().iterator();
|
||||
+
|
||||
+ while (iterator.hasNext()) {
|
||||
+ NBTBase nbtbase = (NBTBase) iterator.next();
|
||||
+ String s = (String) iterator.next();
|
||||
+ NBTBase nbtbase = nbttagcompound.get(s);
|
||||
+
|
||||
+ if (nbtbase.getTypeId() == 10) {
|
||||
+ NBTTagCompound nbttagcompound1 = (NBTTagCompound) nbtbase;
|
||||
@ -1122,5 +740,5 @@ index 0000000..ab4dc19
|
||||
+ protected abstract StructureStart b(int i, int j);
|
||||
+}
|
||||
--
|
||||
1.8.1.2
|
||||
1.8.3.2
|
||||
|
||||
|
@ -1,13 +1,22 @@
|
||||
From 4feddcc91c933967b5ea82389c2593641f28e20f Mon Sep 17 00:00:00 2001
|
||||
From 099b9e465573806de2997da7fb11ba1d6c44bb82 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Tue, 11 Jun 2013 12:56:02 +1000
|
||||
Subject: [PATCH] Better Chunk Tick Selection
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 9357eb9..f0a8024 100644
|
||||
index 9357eb9..9a2da15 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -61,7 +61,7 @@ public abstract class World implements IBlockAccess {
|
||||
public Scoreboard scoreboard = new Scoreboard(); // CraftBukkit - protected -> public
|
||||
public boolean isStatic;
|
||||
// CraftBukkit start - public, longhashset
|
||||
- protected LongHashSet chunkTickList = new LongHashSet();
|
||||
+ // protected LongHashSet chunkTickList = new LongHashSet(); // Spigot
|
||||
private int L;
|
||||
public boolean allowMonsters;
|
||||
public boolean allowAnimals;
|
||||
@@ -74,6 +74,30 @@ public abstract class World implements IBlockAccess {
|
||||
private boolean N;
|
||||
int[] I;
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 1daa2b921a3a38f046c2281993f1b676ecac515a Mon Sep 17 00:00:00 2001
|
||||
From 21428931e905c898c8272765539255bcb802c19e Mon Sep 17 00:00:00 2001
|
||||
From: Mike Primm <mike@primmhome.com>
|
||||
Date: Sun, 13 Jan 2013 03:49:07 -0800
|
||||
Subject: [PATCH] Compressed Nibble Arrays
|
||||
@ -252,7 +252,7 @@ index 5d75a54..c9bc20c 100644
|
||||
int j1 = i1 >> 1;
|
||||
int k1 = i1 & 1;
|
||||
diff --git a/src/main/java/net/minecraft/server/OldChunkLoader.java b/src/main/java/net/minecraft/server/OldChunkLoader.java
|
||||
index 53c1cb5..9a9e20f 100644
|
||||
index fcb9912..6ee28cc 100644
|
||||
--- a/src/main/java/net/minecraft/server/OldChunkLoader.java
|
||||
+++ b/src/main/java/net/minecraft/server/OldChunkLoader.java
|
||||
@@ -94,9 +94,11 @@ public class OldChunkLoader {
|
||||
@ -270,65 +270,6 @@ index 53c1cb5..9a9e20f 100644
|
||||
nbttaglist.add(nbttagcompound1);
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/Packet51MapChunk.java b/src/main/java/net/minecraft/server/Packet51MapChunk.java
|
||||
index 4e67e27..fa10397 100644
|
||||
--- a/src/main/java/net/minecraft/server/Packet51MapChunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Packet51MapChunk.java
|
||||
@@ -139,16 +139,22 @@ public class Packet51MapChunk extends Packet {
|
||||
for (l = 0; l < achunksection.length; ++l) {
|
||||
if (achunksection[l] != null && (!flag || !achunksection[l].isEmpty()) && (i & 1 << l) != 0) {
|
||||
nibblearray = achunksection[l].getDataArray();
|
||||
- System.arraycopy(nibblearray.a, 0, abyte, j, nibblearray.a.length);
|
||||
- j += nibblearray.a.length;
|
||||
+ // Spigot start
|
||||
+ // System.arraycopy(nibblearray.a, 0, abyte, j, nibblearray.a.length);
|
||||
+ // j += nibblearray.a.length;
|
||||
+ j = nibblearray.copyToByteArray(abyte, j);
|
||||
+ // Spigot end
|
||||
}
|
||||
}
|
||||
|
||||
for (l = 0; l < achunksection.length; ++l) {
|
||||
if (achunksection[l] != null && (!flag || !achunksection[l].isEmpty()) && (i & 1 << l) != 0) {
|
||||
nibblearray = achunksection[l].getEmittedLightArray();
|
||||
- System.arraycopy(nibblearray.a, 0, abyte, j, nibblearray.a.length);
|
||||
- j += nibblearray.a.length;
|
||||
+ // Spigot start
|
||||
+ // System.arraycopy(nibblearray.a, 0, abyte, j, nibblearray.a.length);
|
||||
+ // j += nibblearray.a.length;
|
||||
+ j = nibblearray.copyToByteArray(abyte, j);
|
||||
+ // Spigot end
|
||||
}
|
||||
}
|
||||
|
||||
@@ -156,8 +162,11 @@ public class Packet51MapChunk extends Packet {
|
||||
for (l = 0; l < achunksection.length; ++l) {
|
||||
if (achunksection[l] != null && (!flag || !achunksection[l].isEmpty()) && (i & 1 << l) != 0) {
|
||||
nibblearray = achunksection[l].getSkyLightArray();
|
||||
- System.arraycopy(nibblearray.a, 0, abyte, j, nibblearray.a.length);
|
||||
- j += nibblearray.a.length;
|
||||
+ // Spigot start
|
||||
+ // System.arraycopy(nibblearray.a, 0, abyte, j, nibblearray.a.length);
|
||||
+ // j += nibblearray.a.length;
|
||||
+ j = nibblearray.copyToByteArray(abyte, j);
|
||||
+ // Spigot end
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -166,8 +175,11 @@ public class Packet51MapChunk extends Packet {
|
||||
for (l = 0; l < achunksection.length; ++l) {
|
||||
if (achunksection[l] != null && (!flag || !achunksection[l].isEmpty()) && achunksection[l].getExtendedIdArray() != null && (i & 1 << l) != 0) {
|
||||
nibblearray = achunksection[l].getExtendedIdArray();
|
||||
- System.arraycopy(nibblearray.a, 0, abyte, j, nibblearray.a.length);
|
||||
- j += nibblearray.a.length;
|
||||
+ // Spigot start
|
||||
+ //System.arraycopy(nibblearray.a, 0, abyte, j, nibblearray.a.length);
|
||||
+ //j += nibblearray.a.length;
|
||||
+ j = nibblearray.copyToByteArray(abyte, j);
|
||||
+ // Spigot end
|
||||
}
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
|
||||
index b2c6ef4..55f5225 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 29223bf84a6cc1301032e98df9c76f170b78f99e Mon Sep 17 00:00:00 2001
|
||||
From 9ab09589f7ca0433a1c6aac5b6f6cc847e82995d Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Thu, 16 May 2013 18:51:05 +1000
|
||||
Subject: [PATCH] Orebfuscator
|
||||
@ -36,18 +36,6 @@ index 39e5b5b..d2587c1 100644
|
||||
if (flag) {
|
||||
double d0 = (double) ((float) i + this.world.random.nextFloat());
|
||||
double d1 = (double) ((float) j + this.world.random.nextFloat());
|
||||
diff --git a/src/main/java/net/minecraft/server/Packet51MapChunk.java b/src/main/java/net/minecraft/server/Packet51MapChunk.java
|
||||
index fa10397..91d7feb 100644
|
||||
--- a/src/main/java/net/minecraft/server/Packet51MapChunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Packet51MapChunk.java
|
||||
@@ -33,6 +33,7 @@ public class Packet51MapChunk extends Packet {
|
||||
|
||||
this.d = chunkmap.c;
|
||||
this.c = chunkmap.b;
|
||||
+ chunk.world.spigotConfig.antiXrayInstance.obfuscateSync(chunk.x, chunk.z, i, chunkmap.a, chunk.world); // Spigot
|
||||
|
||||
try {
|
||||
this.inflatedBuffer = chunkmap.a;
|
||||
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunkBulk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunkBulk.java
|
||||
index 3eac231..c3cfdc7 100644
|
||||
--- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunkBulk.java
|
||||
@ -115,7 +103,7 @@ index 3028404..e24d4b5 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index b1f294d..2e03b42 100644
|
||||
index b276a3d..57511c8 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -464,6 +464,7 @@ public abstract class World implements IBlockAccess {
|
||||
|
@ -1,23 +1,10 @@
|
||||
From d6e3678b8c413d9ffb2cedc75aecb609d81d3dc8 Mon Sep 17 00:00:00 2001
|
||||
From aafc4ddbcafdae73c8e3eb9caf5740f324d48b62 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Tue, 2 Jul 2013 09:07:54 +1000
|
||||
Subject: [PATCH] Lower Chunk Compression
|
||||
|
||||
Use a chunk compression level of 4 - this provides an optimal balance between speed and compression.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Packet51MapChunk.java b/src/main/java/net/minecraft/server/Packet51MapChunk.java
|
||||
index 91d7feb..29baf6d 100644
|
||||
--- a/src/main/java/net/minecraft/server/Packet51MapChunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Packet51MapChunk.java
|
||||
@@ -29,7 +29,7 @@ public class Packet51MapChunk extends Packet {
|
||||
this.b = chunk.z;
|
||||
this.e = flag;
|
||||
ChunkMap chunkmap = a(chunk, flag, i);
|
||||
- Deflater deflater = new Deflater(-1);
|
||||
+ Deflater deflater = new Deflater(4); // Spigot 4 -> -1
|
||||
|
||||
this.d = chunkmap.c;
|
||||
this.c = chunkmap.b;
|
||||
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunkBulk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunkBulk.java
|
||||
index c3cfdc7..8e1c4cb 100644
|
||||
--- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunkBulk.java
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 2df0995cba9ed8b162392ebe8bb8719b8cab7864 Mon Sep 17 00:00:00 2001
|
||||
From 019b3e2bd9fce74bce6fec040c7f85073d5842a2 Mon Sep 17 00:00:00 2001
|
||||
From: BlackHole <black-hole@live.com>
|
||||
Date: Tue, 16 Jul 2013 22:34:50 +0200
|
||||
Subject: [PATCH] Call EntityChangeBlockEvent for Fire Arrows hitting TNT
|
||||
@ -6,17 +6,17 @@ Subject: [PATCH] Call EntityChangeBlockEvent for Fire Arrows hitting TNT
|
||||
Adds BUKKIT-4355
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockTNT.java b/src/main/java/net/minecraft/server/BlockTNT.java
|
||||
index 9acd4f2..312b4c8 100644
|
||||
index 6d5090b..819bef9 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockTNT.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockTNT.java
|
||||
@@ -54,7 +54,7 @@ public class BlockTNT extends Block {
|
||||
|
||||
public boolean interact(World world, int i, int j, int k, EntityHuman entityhuman, int l, float f, float f1, float f2) {
|
||||
if (entityhuman.by() != null && entityhuman.by().id == Item.FLINT_AND_STEEL.id) {
|
||||
if (entityhuman.bD() != null && entityhuman.bD().getItem() == Items.FLINT_AND_STEEL) {
|
||||
- this.a(world, i, j, k, 1, entityhuman);
|
||||
+ this.a(world, i, j, k, 1, (EntityLiving) entityhuman); // Spigot - Fix decompile error!
|
||||
world.setAir(i, j, k);
|
||||
entityhuman.by().damage(1, entityhuman);
|
||||
entityhuman.bD().damage(1, entityhuman);
|
||||
return true;
|
||||
@@ -68,6 +68,11 @@ public class BlockTNT extends Block {
|
||||
EntityArrow entityarrow = (EntityArrow) entity;
|
||||
|
@ -1,30 +1,29 @@
|
||||
From b8c36f916c18da6c3446eb6298bfa9cdc15e8b4d Mon Sep 17 00:00:00 2001
|
||||
From 35c24fa363d24102afd5b9ebb087ebba6e1e845a Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Sat, 21 Sep 2013 12:33:09 +1000
|
||||
Subject: [PATCH] Allow Disabling of 1.6.3 Structure Saving
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/StructureGenerator.java b/src/main/java/net/minecraft/server/StructureGenerator.java
|
||||
index ab4dc19..cb8ff49 100644
|
||||
index 1eb87ae..b3c8101 100644
|
||||
--- a/src/main/java/net/minecraft/server/StructureGenerator.java
|
||||
+++ b/src/main/java/net/minecraft/server/StructureGenerator.java
|
||||
@@ -178,7 +178,15 @@ public abstract class StructureGenerator extends WorldGenBase {
|
||||
|
||||
private void a(World world) {
|
||||
if (this.e == null) {
|
||||
- this.e = (WorldGenFeature) world.a(WorldGenFeature.class, this.a());
|
||||
+ // Spigot Start
|
||||
+ if ( world.spigotConfig.saveStructureInfo )
|
||||
+ {
|
||||
+ this.e = (WorldGenFeature) world.a( WorldGenFeature.class, this.a() );
|
||||
this.e = (PersistentStructure) world.a(PersistentStructure.class, this.a());
|
||||
+ } else
|
||||
+ {
|
||||
+ this.e = new WorldGenFeature( this.a() );
|
||||
+ this.e = new PersistentStructure( this.a() );
|
||||
+ }
|
||||
+ // Spigot End
|
||||
if (this.e == null) {
|
||||
this.e = new WorldGenFeature(this.a());
|
||||
world.a(this.a(), (WorldMapBase) this.e);
|
||||
this.e = new PersistentStructure(this.a());
|
||||
world.a(this.a(), (PersistentBase) this.e);
|
||||
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
index 2caafa2..a34670e 100644
|
||||
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren