Update CraftBukkit to Minecraft 1.7.2
This commit is contained in:
@@ -2,7 +2,7 @@ package net.minecraft.server;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import org.bukkit.BlockChangeDelegate; // CraftBukkit
|
||||
import org.bukkit.craftbukkit.CraftBlockChangeDelegate; // CraftBukkit
|
||||
|
||||
public abstract class WorldGenerator {
|
||||
|
||||
@@ -21,21 +21,20 @@ public abstract class WorldGenerator {
|
||||
public void a(double d0, double d1, double d2) {}
|
||||
|
||||
// CraftBukkit - change signature
|
||||
protected void setType(BlockChangeDelegate world, int i, int j, int k, int l) {
|
||||
this.setTypeAndData(world, i, j, k, l, 0);
|
||||
protected void setType(CraftBlockChangeDelegate world, int i, int j, int k, Block block) {
|
||||
this.setTypeAndData(world, i, j, k, block, 0);
|
||||
}
|
||||
|
||||
// CraftBukkit - change signature
|
||||
protected void setTypeAndData(BlockChangeDelegate world, int i, int j, int k, int l, int i1) {
|
||||
protected void setTypeAndData(CraftBlockChangeDelegate world, int i, int j, int k, Block block, int l) {
|
||||
if (this.a) {
|
||||
// CraftBukkit - BlockChangeDelegate doesn't have the 6th parameter
|
||||
world.setTypeIdAndData(i, j, k, l, i1);
|
||||
world.setTypeAndData(i, j, k, block, l, 3);
|
||||
} else {
|
||||
// CraftBukkit start - Layering violation :(
|
||||
if (world instanceof World) {
|
||||
((World) world).setTypeIdAndData(i, j, k, l, i1, 2);
|
||||
if (world.getDelegate() instanceof World) {
|
||||
((World) world.getDelegate()).setTypeAndData(i, j, k, block, l, 2);
|
||||
} else {
|
||||
world.setRawTypeIdAndData(i, j, k, l, i1);
|
||||
world.setTypeAndData(i, j, k, block, l, 2);
|
||||
}
|
||||
// CraftBukkit end
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user