Generic cleanup/reformat.
By: Erik Broes <erikbroes@grum.nl>
This commit is contained in:
parent
6a7e7141f8
commit
f981a18f45
21 changed files with 55 additions and 71 deletions
|
@ -158,26 +158,16 @@ public class CraftWorld implements World {
|
||||||
public boolean generateTree(Location loc, TreeType type, BlockChangeDelegate delegate) {
|
public boolean generateTree(Location loc, TreeType type, BlockChangeDelegate delegate) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case BIG_TREE:
|
case BIG_TREE:
|
||||||
return (new WorldGenBigTree())
|
return new WorldGenBigTree().generate(delegate, rand, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ());
|
||||||
.generate(delegate, rand,
|
|
||||||
loc.getBlockX(), loc.getBlockY(), loc.getBlockZ());
|
|
||||||
case BIRCH:
|
case BIRCH:
|
||||||
return (new WorldGenForest())
|
return new WorldGenForest().generate(delegate, rand, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ());
|
||||||
.generate(delegate, rand,
|
|
||||||
loc.getBlockX(), loc.getBlockY(), loc.getBlockZ());
|
|
||||||
case REDWOOD:
|
case REDWOOD:
|
||||||
return (new WorldGenTaiga2())
|
return new WorldGenTaiga2().generate(delegate, rand, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ());
|
||||||
.generate(delegate, rand,
|
|
||||||
loc.getBlockX(), loc.getBlockY(), loc.getBlockZ());
|
|
||||||
case TALL_REDWOOD:
|
case TALL_REDWOOD:
|
||||||
return (new WorldGenTaiga1())
|
return new WorldGenTaiga1().generate(delegate, rand, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ());
|
||||||
.generate(delegate, rand,
|
|
||||||
loc.getBlockX(), loc.getBlockY(), loc.getBlockZ());
|
|
||||||
case TREE:
|
case TREE:
|
||||||
default:
|
default:
|
||||||
return (new WorldGenTrees())
|
return new WorldGenTrees().generate(delegate, rand, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ());
|
||||||
.generate(delegate, rand,
|
|
||||||
loc.getBlockX(), loc.getBlockY(), loc.getBlockZ());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -259,9 +249,7 @@ public class CraftWorld implements World {
|
||||||
|
|
||||||
for (Object o: world.b) {
|
for (Object o: world.b) {
|
||||||
if (o instanceof net.minecraft.server.Entity) {
|
if (o instanceof net.minecraft.server.Entity) {
|
||||||
net.minecraft.server.Entity mcEnt
|
net.minecraft.server.Entity mcEnt = (net.minecraft.server.Entity)o;
|
||||||
= (net.minecraft.server.Entity)o;
|
|
||||||
|
|
||||||
Entity bukkitEntity = mcEnt.getBukkitEntity();
|
Entity bukkitEntity = mcEnt.getBukkitEntity();
|
||||||
|
|
||||||
// Assuming that bukkitEntity isn't null
|
// Assuming that bukkitEntity isn't null
|
||||||
|
@ -279,9 +267,7 @@ public class CraftWorld implements World {
|
||||||
|
|
||||||
for (Object o: world.b) {
|
for (Object o: world.b) {
|
||||||
if (o instanceof net.minecraft.server.Entity) {
|
if (o instanceof net.minecraft.server.Entity) {
|
||||||
net.minecraft.server.Entity mcEnt
|
net.minecraft.server.Entity mcEnt = (net.minecraft.server.Entity)o;
|
||||||
= (net.minecraft.server.Entity)o;
|
|
||||||
|
|
||||||
Entity bukkitEntity = mcEnt.getBukkitEntity();
|
Entity bukkitEntity = mcEnt.getBukkitEntity();
|
||||||
|
|
||||||
// Assuming that bukkitEntity isn't null
|
// Assuming that bukkitEntity isn't null
|
||||||
|
|
|
@ -170,8 +170,7 @@ public class CraftBlock implements Block {
|
||||||
* @return Block at the given face
|
* @return Block at the given face
|
||||||
*/
|
*/
|
||||||
public Block getFace(final BlockFace face, final int distance) {
|
public Block getFace(final BlockFace face, final int distance) {
|
||||||
return getRelative(face.getModX() * distance, face.getModY() * distance,
|
return getRelative(face.getModX() * distance, face.getModY() * distance, face.getModZ() * distance);
|
||||||
face.getModZ() * distance);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -4,7 +4,6 @@ package org.bukkit.craftbukkit.entity;
|
||||||
import net.minecraft.server.EntityHuman;
|
import net.minecraft.server.EntityHuman;
|
||||||
import org.bukkit.entity.HumanEntity;
|
import org.bukkit.entity.HumanEntity;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.inventory.PlayerInventory;
|
|
||||||
import org.bukkit.craftbukkit.inventory.CraftInventoryPlayer;
|
import org.bukkit.craftbukkit.inventory.CraftInventoryPlayer;
|
||||||
import org.bukkit.craftbukkit.inventory.CraftItemStack;
|
import org.bukkit.craftbukkit.inventory.CraftItemStack;
|
||||||
import org.bukkit.craftbukkit.CraftServer;
|
import org.bukkit.craftbukkit.CraftServer;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue