Updated to Minecraft 1.1

By: Erik Broes <erikbroes@grum.nl>
This commit is contained in:
CraftBukkit/Spigot 2012-01-12 23:10:13 +01:00
parent f8ed5eb56f
commit ef2f82b9d2
4 changed files with 18 additions and 2 deletions

View File

@ -52,7 +52,7 @@
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>minecraft-server</artifactId>
<version>1.0.1_01</version>
<version>1.1</version>
<type>jar</type>
<scope>compile</scope>
</dependency>

View File

@ -55,6 +55,7 @@ import net.minecraft.server.WorldMap;
import net.minecraft.server.WorldMapCollection;
import net.minecraft.server.WorldNBTStorage;
import net.minecraft.server.WorldSettings;
import net.minecraft.server.WorldType;
import org.bukkit.*;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.configuration.file.YamlConfiguration;
@ -512,6 +513,7 @@ public final class CraftServer implements Server {
ChunkGenerator generator = creator.generator();
File folder = new File(name);
World world = getWorld(name);
WorldType type = WorldType.a(creator.type().getName());
if (world != null) {
return world;
@ -533,7 +535,7 @@ public final class CraftServer implements Server {
int dimension = 10 + console.worlds.size();
boolean hardcore = false;
WorldServer internal = new WorldServer(console, new ServerNBTManager(getWorldContainer(), name, true), name, dimension, new WorldSettings(creator.seed(), getDefaultGameMode().getValue(), true, hardcore), creator.environment(), generator);
WorldServer internal = new WorldServer(console, new ServerNBTManager(getWorldContainer(), name, true), name, dimension, new WorldSettings(creator.seed(), getDefaultGameMode().getValue(), true, hardcore, type), creator.environment(), generator);
if (!(worlds.containsKey(name.toLowerCase()))) {
return null;

View File

@ -43,6 +43,8 @@ public class CraftEnchantment extends Enchantment {
return EnchantmentTarget.TOOL;
case WEAPON:
return EnchantmentTarget.WEAPON;
case BOW:
return EnchantmentTarget.BOW;
default:
return null;
}
@ -90,6 +92,14 @@ public class CraftEnchantment extends Enchantment {
return "DURABILITY";
case 35:
return "LOOT_BONUS_BLOCKS";
case 48:
return "ARROW_DAMAGE";
case 49:
return "ARROW_KNOCKBACK";
case 50:
return "ARROW_FIRE";
case 51:
return "ARROW_INFINITE";
default:
return "UNKNOWN_ENCHANT_" + target.id;
}

View File

@ -21,6 +21,10 @@ public class LongHashset extends LongHash {
}
}
public int size() {
return count;
}
public void add(int msw, int lsw) {
add(toLong(msw, lsw));
}