Update for R2

This commit is contained in:
Olof Larsson 2013-03-22 17:31:16 +01:00
parent 90f2c1059b
commit 4c70897d87
9 changed files with 31 additions and 32 deletions

View File

@ -5,12 +5,12 @@ import java.util.Map;
import java.util.Map.Entry;
import java.util.AbstractMap.SimpleEntry;
import net.minecraft.server.v1_5_R1.BiomeBase;
import net.minecraft.server.v1_5_R1.Chunk;
import net.minecraft.server.v1_5_R1.WorldServer;
import net.minecraft.server.v1_5_R2.BiomeBase;
import net.minecraft.server.v1_5_R2.Chunk;
import net.minecraft.server.v1_5_R2.WorldServer;
import org.bukkit.World;
import org.bukkit.craftbukkit.v1_5_R1.CraftWorld;
import org.bukkit.craftbukkit.v1_5_R2.CraftWorld;
public class BiomeUtil
{

View File

@ -6,7 +6,7 @@ import java.util.Map;
import org.bukkit.Bukkit;
import org.bukkit.command.Command;
import org.bukkit.command.SimpleCommandMap;
import org.bukkit.craftbukkit.v1_5_R1.CraftServer;
import org.bukkit.craftbukkit.v1_5_R2.CraftServer;
public class BukkitCommandUtil
{

View File

@ -141,7 +141,8 @@ public class InventoryUtil
return ret;
}
// NOTE: This method may not be compatible with player inventories
// NOTE: This method does not handle the armor part of player inventories.
// That is expected behavior for now.
public static Inventory cloneInventory(Inventory inventory)
{
if (inventory == null) return null;

View File

@ -1,11 +1,24 @@
package com.massivecraft.mcore.util;
import net.minecraft.server.v1_5_R1.WorldServer;
import net.minecraft.server.v1_5_R2.WorldServer;
import org.bukkit.World;
import org.bukkit.block.Block;
import org.bukkit.craftbukkit.v1_5_R1.CraftWorld;
import org.bukkit.craftbukkit.v1_5_R2.CraftWorld;
/**
* Find the method by going through CraftBlock.setTypeId()
* The method should look something like this:
*
* public void A(int i, int j, int k) {
if (!this.worldProvider.f) {
this.c(EnumSkyBlock.SKY, i, j, k);
}
this.c(EnumSkyBlock.BLOCK, i, j, k);
}
*
*/
public class LightUtil
{
// -------------------------------------------- //
@ -23,6 +36,6 @@ public class LightUtil
{
CraftWorld cworld = (CraftWorld)world;
WorldServer worldServer = cworld.getHandle();
worldServer.z(x, y, z);
worldServer.A(x, y, z);
}
}

View File

@ -18,7 +18,7 @@ import java.util.Set;
import java.util.SortedSet;
import java.util.TreeSet;
import net.minecraft.server.v1_5_R1.DedicatedServer;
import net.minecraft.server.v1_5_R2.DedicatedServer;
import org.bukkit.Bukkit;
import org.bukkit.Location;
@ -26,7 +26,7 @@ import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.block.BlockFace;
import org.bukkit.command.CommandSender;
import org.bukkit.craftbukkit.v1_5_R1.CraftServer;
import org.bukkit.craftbukkit.v1_5_R2.CraftServer;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.entity.Projectile;

View File

@ -7,11 +7,11 @@ import java.util.TreeSet;
import java.util.Map.Entry;
import java.util.concurrent.ConcurrentSkipListMap;
import net.minecraft.server.v1_5_R1.EntityPlayer;
import net.minecraft.server.v1_5_R1.Packet8UpdateHealth;
import net.minecraft.server.v1_5_R2.EntityPlayer;
import net.minecraft.server.v1_5_R2.Packet8UpdateHealth;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_5_R1.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_5_R2.entity.CraftPlayer;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;

View File

@ -8,7 +8,7 @@ import java.util.Map;
import java.util.Map.Entry;
import java.util.TreeMap;
import net.minecraft.server.v1_5_R1.MinecraftServer;
import net.minecraft.server.v1_5_R2.MinecraftServer;
import org.bukkit.Bukkit;
import org.bukkit.GameMode;
@ -17,7 +17,7 @@ import org.bukkit.command.BlockCommandSender;
import org.bukkit.command.CommandSender;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.command.RemoteConsoleCommandSender;
import org.bukkit.craftbukkit.v1_5_R1.CraftServer;
import org.bukkit.craftbukkit.v1_5_R2.CraftServer;
import org.bukkit.entity.Player;
import com.massivecraft.mcore.MCore;

View File

@ -25,7 +25,7 @@ public class TextWrapper
private static final char COLOR_CHAR = '\u00A7';
private static final int CHAT_WINDOW_WIDTH = 320;
private static final int CHAT_STRING_LENGTH = 119;
private static final String allowedChars = net.minecraft.server.v1_5_R1.SharedConstants.allowedCharacters;
private static final String allowedChars = net.minecraft.server.v1_5_R2.SharedConstants.allowedCharacters;
public static int getCharPixelWidth(char ch)
{

View File

@ -1,15 +0,0 @@
package com.massivecraft.mcore.util;
import org.bukkit.craftbukkit.v1_5_R1.entity.CraftThrownPotion;
import org.bukkit.entity.ThrownPotion;
// PR to add this feature to the API:
// https://github.com/Bukkit/Bukkit/pull/737
public class ThrownPotionUtil
{
public static int getPotionValue(ThrownPotion potion)
{
CraftThrownPotion cpotion = (CraftThrownPotion)potion;
return cpotion.getHandle().getPotionValue();
}
}