Updated to 1.6.4
This commit is contained in:
parent
3622808e09
commit
85cc6e5b2b
@ -13,7 +13,7 @@ import mineplex.core.itemstack.ItemStackFactory;
|
|||||||
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.inventory.CraftItemStack;
|
import org.bukkit.craftbukkit.v1_6_R3.inventory.CraftItemStack;
|
||||||
import org.bukkit.enchantments.Enchantment;
|
import org.bukkit.enchantments.Enchantment;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
@ -2,12 +2,12 @@ package me.chiss.Core.MemoryFix;
|
|||||||
|
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
|
||||||
import net.minecraft.server.v1_6_R2.IInventory;
|
import net.minecraft.server.v1_6_R3.IInventory;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.CraftWorld;
|
import org.bukkit.craftbukkit.v1_6_R3.CraftWorld;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftPlayer;
|
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftPlayer;
|
||||||
import org.bukkit.entity.HumanEntity;
|
import org.bukkit.entity.HumanEntity;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
|
@ -4,8 +4,8 @@ import java.util.HashSet;
|
|||||||
|
|
||||||
import org.bukkit.Chunk;
|
import org.bukkit.Chunk;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.CraftChunk;
|
import org.bukkit.craftbukkit.v1_6_R3.CraftChunk;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.CraftWorld;
|
import org.bukkit.craftbukkit.v1_6_R3.CraftWorld;
|
||||||
|
|
||||||
public class BlockRegenerateData
|
public class BlockRegenerateData
|
||||||
{
|
{
|
||||||
@ -46,7 +46,7 @@ public class BlockRegenerateData
|
|||||||
//if (_loc.getBlock().getType() == Material.CHEST)
|
//if (_loc.getBlock().getType() == Material.CHEST)
|
||||||
// return;
|
// return;
|
||||||
|
|
||||||
net.minecraft.server.v1_6_R2.Chunk c = ((CraftChunk)_loc.getChunk()).getHandle();
|
net.minecraft.server.v1_6_R3.Chunk c = ((CraftChunk)_loc.getChunk()).getHandle();
|
||||||
|
|
||||||
c.a(_loc.getBlockX() & 0xF, _loc.getBlockY(), _loc.getBlockZ() & 0xF, _id, _data);
|
c.a(_loc.getBlockX() & 0xF, _loc.getBlockY(), _loc.getBlockZ() & 0xF, _id, _data);
|
||||||
((CraftWorld)_loc.getChunk().getWorld()).getHandle().notify(_loc.getBlockX(), _loc.getBlockY(), _loc.getBlockZ());
|
((CraftWorld)_loc.getChunk().getWorld()).getHandle().notify(_loc.getBlockX(), _loc.getBlockY(), _loc.getBlockZ());
|
||||||
|
@ -5,7 +5,7 @@ import java.util.HashSet;
|
|||||||
|
|
||||||
import org.bukkit.Chunk;
|
import org.bukkit.Chunk;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.CraftChunk;
|
import org.bukkit.craftbukkit.v1_6_R3.CraftChunk;
|
||||||
|
|
||||||
public class BlockRegenerateSet
|
public class BlockRegenerateSet
|
||||||
{
|
{
|
||||||
@ -61,7 +61,7 @@ public class BlockRegenerateSet
|
|||||||
{
|
{
|
||||||
for (Chunk chunk : _chunks)
|
for (Chunk chunk : _chunks)
|
||||||
{
|
{
|
||||||
net.minecraft.server.v1_6_R2.Chunk c = ((CraftChunk)chunk).getHandle();
|
net.minecraft.server.v1_6_R3.Chunk c = ((CraftChunk)chunk).getHandle();
|
||||||
c.initLighting();
|
c.initLighting();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ import mineplex.core.updater.UpdateType;
|
|||||||
import mineplex.core.common.util.UtilMath;
|
import mineplex.core.common.util.UtilMath;
|
||||||
import mineplex.core.common.util.UtilServer;
|
import mineplex.core.common.util.UtilServer;
|
||||||
|
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftPlayer;
|
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftPlayer;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.block.Action;
|
import org.bukkit.event.block.Action;
|
||||||
|
@ -11,24 +11,24 @@ import mineplex.core.fakeEntity.FakeEntityManager;
|
|||||||
import mineplex.core.fakeEntity.FakePlayer;
|
import mineplex.core.fakeEntity.FakePlayer;
|
||||||
import mineplex.core.updater.event.UpdateEvent;
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
import mineplex.core.updater.UpdateType;
|
import mineplex.core.updater.UpdateType;
|
||||||
import net.minecraft.server.v1_6_R2.EntityInsentient;
|
import net.minecraft.server.v1_6_R3.EntityInsentient;
|
||||||
import net.minecraft.server.v1_6_R2.EntityLiving;
|
import net.minecraft.server.v1_6_R3.EntityLiving;
|
||||||
import net.minecraft.server.v1_6_R2.EntityPlayer;
|
import net.minecraft.server.v1_6_R3.EntityPlayer;
|
||||||
import net.minecraft.server.v1_6_R2.MathHelper;
|
import net.minecraft.server.v1_6_R3.MathHelper;
|
||||||
import net.minecraft.server.v1_6_R2.Packet28EntityVelocity;
|
import net.minecraft.server.v1_6_R3.Packet28EntityVelocity;
|
||||||
import net.minecraft.server.v1_6_R2.Packet31RelEntityMove;
|
import net.minecraft.server.v1_6_R3.Packet31RelEntityMove;
|
||||||
import net.minecraft.server.v1_6_R2.Packet34EntityTeleport;
|
import net.minecraft.server.v1_6_R3.Packet34EntityTeleport;
|
||||||
import net.minecraft.server.v1_6_R2.PathfinderGoalSelector;
|
import net.minecraft.server.v1_6_R3.PathfinderGoalSelector;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Effect;
|
import org.bukkit.Effect;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.CraftWorld;
|
import org.bukkit.craftbukkit.v1_6_R3.CraftWorld;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftAgeable;
|
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftAgeable;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftLivingEntity;
|
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftLivingEntity;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftPlayer;
|
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftPlayer;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
import org.bukkit.entity.Item;
|
import org.bukkit.entity.Item;
|
||||||
|
@ -7,8 +7,8 @@ import org.bukkit.util.Vector;
|
|||||||
|
|
||||||
import mineplex.core.common.util.UtilAlg;
|
import mineplex.core.common.util.UtilAlg;
|
||||||
import mineplex.core.fakeEntity.FakeEntity;
|
import mineplex.core.fakeEntity.FakeEntity;
|
||||||
import net.minecraft.server.v1_6_R2.EntityPlayer;
|
import net.minecraft.server.v1_6_R3.EntityPlayer;
|
||||||
import net.minecraft.server.v1_6_R2.Packet28EntityVelocity;
|
import net.minecraft.server.v1_6_R3.Packet28EntityVelocity;
|
||||||
|
|
||||||
public class UpdateThread extends Thread
|
public class UpdateThread extends Thread
|
||||||
{
|
{
|
||||||
|
@ -12,7 +12,7 @@ import mineplex.minecraft.game.core.classcombat.item.IItemFactory;
|
|||||||
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.Sound;
|
import org.bukkit.Sound;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.inventory.CraftInventory;
|
import org.bukkit.craftbukkit.v1_6_R3.inventory.CraftInventory;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
import org.bukkit.event.inventory.InventoryClickEvent;
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
package me.chiss.Core.Shop.page;
|
package me.chiss.Core.Shop.page;
|
||||||
|
|
||||||
import mineplex.core.account.CoreClient;
|
import mineplex.core.account.CoreClient;
|
||||||
import net.minecraft.server.v1_6_R2.Item;
|
import net.minecraft.server.v1_6_R3.Item;
|
||||||
|
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftPlayer;
|
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftPlayer;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.inventory.CraftInventoryCustom;
|
import org.bukkit.craftbukkit.v1_6_R3.inventory.CraftInventoryCustom;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.inventory.CraftItemStack;
|
import org.bukkit.craftbukkit.v1_6_R3.inventory.CraftItemStack;
|
||||||
|
|
||||||
public class PageBase<PageType extends IPage<PageType>> extends CraftInventoryCustom implements IPage<PageType>
|
public class PageBase<PageType extends IPage<PageType>> extends CraftInventoryCustom implements IPage<PageType>
|
||||||
{
|
{
|
||||||
|
@ -12,7 +12,7 @@ import mineplex.core.account.CoreClient;
|
|||||||
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.Sound;
|
import org.bukkit.Sound;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftPlayer;
|
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftPlayer;
|
||||||
|
|
||||||
public abstract class ShopPageBase extends PageBase<IShopPage> implements IShopPage
|
public abstract class ShopPageBase extends PageBase<IShopPage> implements IShopPage
|
||||||
{
|
{
|
||||||
|
@ -6,7 +6,7 @@ import java.util.Map.Entry;
|
|||||||
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.Sound;
|
import org.bukkit.Sound;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftPlayer;
|
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftPlayer;
|
||||||
import org.bukkit.inventory.PlayerInventory;
|
import org.bukkit.inventory.PlayerInventory;
|
||||||
|
|
||||||
import mineplex.core.account.CoreClient;
|
import mineplex.core.account.CoreClient;
|
||||||
|
@ -18,7 +18,7 @@ import mineplex.minecraft.shop.item.ItemPackage;
|
|||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.Sound;
|
import org.bukkit.Sound;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.inventory.CraftInventoryCustom;
|
import org.bukkit.craftbukkit.v1_6_R3.inventory.CraftInventoryCustom;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
public class ConfirmationPage extends CraftInventoryCustom implements IShopPage, Runnable
|
public class ConfirmationPage extends CraftInventoryCustom implements IShopPage, Runnable
|
||||||
|
@ -11,7 +11,7 @@ import me.chiss.Core.Class.IPvpClass;
|
|||||||
import me.chiss.Core.ClientData.IClientClass;
|
import me.chiss.Core.ClientData.IClientClass;
|
||||||
import mineplex.core.account.CoreClient;
|
import mineplex.core.account.CoreClient;
|
||||||
import mineplex.minecraft.shop.item.ISalesPackage;
|
import mineplex.minecraft.shop.item.ISalesPackage;
|
||||||
import net.minecraft.server.v1_6_R2.IInventory;
|
import net.minecraft.server.v1_6_R3.IInventory;
|
||||||
|
|
||||||
public class ArmorPackage implements ISalesPackage
|
public class ArmorPackage implements ISalesPackage
|
||||||
{
|
{
|
||||||
|
@ -13,7 +13,7 @@ import mineplex.minecraft.game.core.classcombat.Class.IPvpClass.ClassType;
|
|||||||
import mineplex.minecraft.shop.item.ISalesPackage;
|
import mineplex.minecraft.shop.item.ISalesPackage;
|
||||||
import me.chiss.Core.ClientData.IClientClass;
|
import me.chiss.Core.ClientData.IClientClass;
|
||||||
import mineplex.core.account.CoreClient;
|
import mineplex.core.account.CoreClient;
|
||||||
import net.minecraft.server.v1_6_R2.IInventory;
|
import net.minecraft.server.v1_6_R3.IInventory;
|
||||||
|
|
||||||
public class DefaultClassPackage implements ISalesPackage
|
public class DefaultClassPackage implements ISalesPackage
|
||||||
{
|
{
|
||||||
|
@ -5,7 +5,7 @@ import java.util.List;
|
|||||||
import me.chiss.Core.ClientData.IClientClass;
|
import me.chiss.Core.ClientData.IClientClass;
|
||||||
import mineplex.core.account.CoreClient;
|
import mineplex.core.account.CoreClient;
|
||||||
import mineplex.minecraft.shop.item.ISalesPackage;
|
import mineplex.minecraft.shop.item.ISalesPackage;
|
||||||
import net.minecraft.server.v1_6_R2.IInventory;
|
import net.minecraft.server.v1_6_R3.IInventory;
|
||||||
|
|
||||||
public class DonationPackage implements ISalesPackage
|
public class DonationPackage implements ISalesPackage
|
||||||
{
|
{
|
||||||
|
@ -4,7 +4,7 @@ import java.util.List;
|
|||||||
|
|
||||||
import me.chiss.Core.ClientData.IClientClass;
|
import me.chiss.Core.ClientData.IClientClass;
|
||||||
import mineplex.core.account.CoreClient;
|
import mineplex.core.account.CoreClient;
|
||||||
import net.minecraft.server.v1_6_R2.IInventory;
|
import net.minecraft.server.v1_6_R3.IInventory;
|
||||||
|
|
||||||
public interface ISalesPackage
|
public interface ISalesPackage
|
||||||
{
|
{
|
||||||
|
@ -8,10 +8,10 @@ import me.chiss.Core.ClientData.IClientClass;
|
|||||||
import me.chiss.Core.Shop.salespackage.ShopItem;
|
import me.chiss.Core.Shop.salespackage.ShopItem;
|
||||||
import me.chiss.Core.Utility.InventoryUtil;
|
import me.chiss.Core.Utility.InventoryUtil;
|
||||||
import mineplex.core.account.CoreClient;
|
import mineplex.core.account.CoreClient;
|
||||||
import net.minecraft.server.v1_6_R2.IInventory;
|
import net.minecraft.server.v1_6_R3.IInventory;
|
||||||
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.inventory.CraftInventory;
|
import org.bukkit.craftbukkit.v1_6_R3.inventory.CraftInventory;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
public class ItemPackage implements ISalesPackage
|
public class ItemPackage implements ISalesPackage
|
||||||
|
@ -10,10 +10,10 @@ import me.chiss.Core.Utility.InventoryUtil;
|
|||||||
import mineplex.core.account.CoreClient;
|
import mineplex.core.account.CoreClient;
|
||||||
import mineplex.core.itemstack.ItemStackFactory;
|
import mineplex.core.itemstack.ItemStackFactory;
|
||||||
import mineplex.minecraft.shop.item.ISalesPackage;
|
import mineplex.minecraft.shop.item.ISalesPackage;
|
||||||
import net.minecraft.server.v1_6_R2.IInventory;
|
import net.minecraft.server.v1_6_R3.IInventory;
|
||||||
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.inventory.CraftInventory;
|
import org.bukkit.craftbukkit.v1_6_R3.inventory.CraftInventory;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
public class PvpItemPackage implements ISalesPackage
|
public class PvpItemPackage implements ISalesPackage
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package me.chiss.Core.Shop.salespackage;
|
package me.chiss.Core.Shop.salespackage;
|
||||||
|
|
||||||
import net.minecraft.server.v1_6_R2.NBTTagList;
|
import net.minecraft.server.v1_6_R3.NBTTagList;
|
||||||
import net.minecraft.server.v1_6_R2.NBTTagString;
|
import net.minecraft.server.v1_6_R3.NBTTagString;
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
package me.chiss.Core.Shop.salespackage;
|
package me.chiss.Core.Shop.salespackage;
|
||||||
|
|
||||||
import net.minecraft.server.v1_6_R2.NBTTagList;
|
import net.minecraft.server.v1_6_R3.NBTTagList;
|
||||||
import net.minecraft.server.v1_6_R2.NBTTagString;
|
import net.minecraft.server.v1_6_R3.NBTTagString;
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.inventory.CraftItemStack;
|
import org.bukkit.craftbukkit.v1_6_R3.inventory.CraftItemStack;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
public class ShopItem extends CraftItemStack
|
public class ShopItem extends CraftItemStack
|
||||||
@ -98,8 +98,8 @@ public class ShopItem extends CraftItemStack
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
net.minecraft.server.v1_6_R2.ItemStack original = ((CraftItemStack)this).getHandle();
|
net.minecraft.server.v1_6_R3.ItemStack original = ((CraftItemStack)this).getHandle();
|
||||||
net.minecraft.server.v1_6_R2.ItemStack comparison = ((CraftItemStack)obj).getHandle();
|
net.minecraft.server.v1_6_R3.ItemStack comparison = ((CraftItemStack)obj).getHandle();
|
||||||
|
|
||||||
return original.tag == null || original.tag.equals(comparison.tag);
|
return original.tag == null || original.tag.equals(comparison.tag);
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ import org.bukkit.Material;
|
|||||||
import me.chiss.Core.ClientData.IClientClass;
|
import me.chiss.Core.ClientData.IClientClass;
|
||||||
import mineplex.core.account.CoreClient;
|
import mineplex.core.account.CoreClient;
|
||||||
import mineplex.minecraft.game.core.classcombat.Skill.ISkill;
|
import mineplex.minecraft.game.core.classcombat.Skill.ISkill;
|
||||||
import net.minecraft.server.v1_6_R2.IInventory;
|
import net.minecraft.server.v1_6_R3.IInventory;
|
||||||
|
|
||||||
public class SkillPackage implements ISalesPackage
|
public class SkillPackage implements ISalesPackage
|
||||||
{
|
{
|
||||||
|
@ -2,7 +2,7 @@ package me.chiss.Core.Utility;
|
|||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.inventory.CraftInventory;
|
import org.bukkit.craftbukkit.v1_6_R3.inventory.CraftInventory;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
public class InventoryUtil
|
public class InventoryUtil
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -29,7 +29,7 @@ public class LobbyBalancer implements Listener, Runnable
|
|||||||
loadLobbyServers();
|
loadLobbyServers();
|
||||||
|
|
||||||
_plugin.getProxy().getPluginManager().registerListener(_plugin, this);
|
_plugin.getProxy().getPluginManager().registerListener(_plugin, this);
|
||||||
_plugin.getProxy().getScheduler().schedule(_plugin, this, 4L, 4L, TimeUnit.SECONDS);
|
_plugin.getProxy().getScheduler().schedule(_plugin, this, 2L, 2L, TimeUnit.SECONDS);
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
@ -57,22 +57,22 @@ public class LobbyBalancer implements Listener, Runnable
|
|||||||
|
|
||||||
if (bestServer == null)
|
if (bestServer == null)
|
||||||
{
|
{
|
||||||
bestServer = entry.getKey();
|
if (entry.getValue() < 80)
|
||||||
|
{
|
||||||
|
bestServer = entry.getKey();
|
||||||
|
}
|
||||||
|
|
||||||
leastPlayerServer = entry;
|
leastPlayerServer = entry;
|
||||||
}
|
}
|
||||||
else if (entry.getValue() > _lobbyServers.get(bestServer) && entry.getValue() < 80)
|
else if (entry.getValue() > _lobbyServers.get(bestServer) && entry.getValue() < 80)
|
||||||
bestServer = entry.getKey();
|
bestServer = entry.getKey();
|
||||||
|
|
||||||
if (entry.getValue() < leastPlayerServer.getValue())
|
if (entry.getValue() < leastPlayerServer.getValue())
|
||||||
{
|
|
||||||
leastPlayerServer = entry;
|
leastPlayerServer = entry;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_lobbyServers.containsKey(bestServer) && _lobbyServers.get(bestServer) > 80)
|
if (_lobbyServers.containsKey(bestServer) && _lobbyServers.get(bestServer) > 80)
|
||||||
{
|
|
||||||
bestServer = leastPlayerServer.getKey();
|
bestServer = leastPlayerServer.getKey();
|
||||||
}
|
|
||||||
|
|
||||||
_bestServer = bestServer;
|
_bestServer = bestServer;
|
||||||
}
|
}
|
||||||
@ -88,15 +88,19 @@ public class LobbyBalancer implements Listener, Runnable
|
|||||||
{
|
{
|
||||||
InetSocketAddress socketAddress = new InetSocketAddress(serverStatusData.Address, serverStatusData.Port);
|
InetSocketAddress socketAddress = new InetSocketAddress(serverStatusData.Address, serverStatusData.Port);
|
||||||
_plugin.getProxy().getServers().put(serverStatusData.Name, _plugin.getProxy().constructServerInfo(serverStatusData.Name, socketAddress, "LobbyBalancer", false));
|
_plugin.getProxy().getServers().put(serverStatusData.Name, _plugin.getProxy().constructServerInfo(serverStatusData.Name, socketAddress, "LobbyBalancer", false));
|
||||||
}
|
|
||||||
|
|
||||||
for (String key : _plugin.getProxy().getServers().keySet())
|
if (serverStatusData.Name.toUpperCase().contains("LOBBY"))
|
||||||
{
|
|
||||||
if (key.toUpperCase().contains("LOBBY"))
|
|
||||||
{
|
{
|
||||||
_lobbyServers.put(key, 0);
|
if (serverStatusData.Motd.contains("Restarting"))
|
||||||
|
{
|
||||||
|
_lobbyServers.put(serverStatusData.Name, 999);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_lobbyServers.put(serverStatusData.Name, serverStatusData.Players);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -66,8 +66,10 @@ public class LobbyBalancerRepository
|
|||||||
ServerStatusData serverStatusData = new ServerStatusData();
|
ServerStatusData serverStatusData = new ServerStatusData();
|
||||||
|
|
||||||
serverStatusData.Name = resultSet.getString(1);
|
serverStatusData.Name = resultSet.getString(1);
|
||||||
serverStatusData.Address = resultSet.getString(2).split(":")[0];
|
|
||||||
serverStatusData.Port = Integer.parseInt(resultSet.getString(2).split(":")[1]);
|
String addressPortString = resultSet.getString(2);
|
||||||
|
serverStatusData.Address = addressPortString.split(":")[0];
|
||||||
|
serverStatusData.Port = Integer.parseInt(addressPortString.split(":")[1]);
|
||||||
serverStatusData.Motd = resultSet.getString(3);
|
serverStatusData.Motd = resultSet.getString(3);
|
||||||
serverStatusData.Players = resultSet.getInt(4);
|
serverStatusData.Players = resultSet.getInt(4);
|
||||||
serverStatusData.MaxPlayers = resultSet.getInt(5);
|
serverStatusData.MaxPlayers = resultSet.getInt(5);
|
||||||
|
@ -2,7 +2,7 @@ package mineplex.core.common.util;
|
|||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.inventory.CraftInventory;
|
import org.bukkit.craftbukkit.v1_6_R3.inventory.CraftInventory;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
public class InventoryUtil
|
public class InventoryUtil
|
||||||
|
@ -9,22 +9,22 @@ import java.util.HashMap;
|
|||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import net.minecraft.server.v1_6_R2.Block;
|
import net.minecraft.server.v1_6_R3.Block;
|
||||||
import net.minecraft.server.v1_6_R2.ChunkCoordIntPair;
|
import net.minecraft.server.v1_6_R3.ChunkCoordIntPair;
|
||||||
import net.minecraft.server.v1_6_R2.ChunkSection;
|
import net.minecraft.server.v1_6_R3.ChunkSection;
|
||||||
import net.minecraft.server.v1_6_R2.IContainer;
|
import net.minecraft.server.v1_6_R3.IContainer;
|
||||||
import net.minecraft.server.v1_6_R2.MinecraftServer;
|
import net.minecraft.server.v1_6_R3.MinecraftServer;
|
||||||
import net.minecraft.server.v1_6_R2.RegionFile;
|
import net.minecraft.server.v1_6_R3.RegionFile;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Chunk;
|
import org.bukkit.Chunk;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.CraftChunk;
|
import org.bukkit.craftbukkit.v1_6_R3.CraftChunk;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_6_R3.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.CraftWorld;
|
import org.bukkit.craftbukkit.v1_6_R3.CraftWorld;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftPlayer;
|
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftPlayer;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.world.WorldUnloadEvent;
|
import org.bukkit.event.world.WorldUnloadEvent;
|
||||||
@ -35,7 +35,7 @@ public class MapUtil
|
|||||||
{
|
{
|
||||||
public static void ReplaceOreInChunk(Chunk chunk, Material replacee, Material replacer)
|
public static void ReplaceOreInChunk(Chunk chunk, Material replacee, Material replacer)
|
||||||
{
|
{
|
||||||
net.minecraft.server.v1_6_R2.Chunk c = ((CraftChunk)chunk).getHandle();
|
net.minecraft.server.v1_6_R3.Chunk c = ((CraftChunk)chunk).getHandle();
|
||||||
|
|
||||||
for(int x = 0; x < 16; x++)
|
for(int x = 0; x < 16; x++)
|
||||||
{
|
{
|
||||||
@ -81,7 +81,7 @@ public class MapUtil
|
|||||||
public static void QuickChangeBlockAt(World world, int x, int y, int z, int id, int data)
|
public static void QuickChangeBlockAt(World world, int x, int y, int z, int id, int data)
|
||||||
{
|
{
|
||||||
Chunk chunk = world.getChunkAt(x >> 4, z >> 4);
|
Chunk chunk = world.getChunkAt(x >> 4, z >> 4);
|
||||||
net.minecraft.server.v1_6_R2.Chunk c = ((CraftChunk)chunk).getHandle();
|
net.minecraft.server.v1_6_R3.Chunk c = ((CraftChunk)chunk).getHandle();
|
||||||
|
|
||||||
c.a(x & 0xF, y, z & 0xF, id, data);
|
c.a(x & 0xF, y, z & 0xF, id, data);
|
||||||
((CraftWorld)world).getHandle().notify(x, y, z);
|
((CraftWorld)world).getHandle().notify(x, y, z);
|
||||||
@ -126,9 +126,9 @@ public class MapUtil
|
|||||||
return totalHeight / count;
|
return totalHeight / count;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void ResendChunksForNearbyPlayers(Collection<net.minecraft.server.v1_6_R2.Chunk> chunks)
|
public static void ResendChunksForNearbyPlayers(Collection<net.minecraft.server.v1_6_R3.Chunk> chunks)
|
||||||
{
|
{
|
||||||
for (net.minecraft.server.v1_6_R2.Chunk c : chunks)
|
for (net.minecraft.server.v1_6_R3.Chunk c : chunks)
|
||||||
{
|
{
|
||||||
|
|
||||||
for (Player player : Bukkit.getOnlinePlayers())
|
for (Player player : Bukkit.getOnlinePlayers())
|
||||||
@ -145,14 +145,14 @@ public class MapUtil
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static net.minecraft.server.v1_6_R2.Chunk ChunkBlockChange(Location location, int id, byte data)
|
public static net.minecraft.server.v1_6_R3.Chunk ChunkBlockChange(Location location, int id, byte data)
|
||||||
{
|
{
|
||||||
return ChunkBlockChange(location.getWorld(), location.getBlockX(), location.getBlockY(), location.getBlockZ(), id, data);
|
return ChunkBlockChange(location.getWorld(), location.getBlockX(), location.getBlockY(), location.getBlockZ(), id, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static net.minecraft.server.v1_6_R2.Chunk ChunkBlockChange(World world, int x, int y, int z, int id, byte data)
|
public static net.minecraft.server.v1_6_R3.Chunk ChunkBlockChange(World world, int x, int y, int z, int id, byte data)
|
||||||
{
|
{
|
||||||
net.minecraft.server.v1_6_R2.Chunk c = ((CraftChunk)world.getChunkAt(x >> 4, z >> 4)).getHandle();
|
net.minecraft.server.v1_6_R3.Chunk c = ((CraftChunk)world.getChunkAt(x >> 4, z >> 4)).getHandle();
|
||||||
|
|
||||||
x = x & 0xF;
|
x = x & 0xF;
|
||||||
z = z & 0xF;
|
z = z & 0xF;
|
||||||
@ -180,7 +180,7 @@ public class MapUtil
|
|||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void SendChunkForPlayer(net.minecraft.server.v1_6_R2.Chunk chunk, Player player)
|
public static void SendChunkForPlayer(net.minecraft.server.v1_6_R3.Chunk chunk, Player player)
|
||||||
{
|
{
|
||||||
SendChunkForPlayer(chunk.x, chunk.z, player);
|
SendChunkForPlayer(chunk.x, chunk.z, player);
|
||||||
}
|
}
|
||||||
@ -205,11 +205,11 @@ public class MapUtil
|
|||||||
|
|
||||||
Bukkit.getPluginManager().callEvent(new WorldUnloadEvent(((CraftWorld)world).getHandle().getWorld()));
|
Bukkit.getPluginManager().callEvent(new WorldUnloadEvent(((CraftWorld)world).getHandle().getWorld()));
|
||||||
|
|
||||||
Iterator<net.minecraft.server.v1_6_R2.Chunk> chunkIterator = ((CraftWorld)world).getHandle().chunkProviderServer.chunks.values().iterator();
|
Iterator<net.minecraft.server.v1_6_R3.Chunk> chunkIterator = ((CraftWorld)world).getHandle().chunkProviderServer.chunks.values().iterator();
|
||||||
|
|
||||||
while (chunkIterator.hasNext())
|
while (chunkIterator.hasNext())
|
||||||
{
|
{
|
||||||
net.minecraft.server.v1_6_R2.Chunk chunk = chunkIterator.next();
|
net.minecraft.server.v1_6_R3.Chunk chunk = chunkIterator.next();
|
||||||
chunk.removeEntities();
|
chunk.removeEntities();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -263,10 +263,10 @@ public class MapUtil
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Field a = net.minecraft.server.v1_6_R2.RegionFileCache.class.getDeclaredField("a");
|
Field a = net.minecraft.server.v1_6_R3.RegionFileCache.class.getDeclaredField("a");
|
||||||
a.setAccessible(true);
|
a.setAccessible(true);
|
||||||
regionfiles = (HashMap) a.get(null);
|
regionfiles = (HashMap) a.get(null);
|
||||||
rafField = net.minecraft.server.v1_6_R2.RegionFile.class.getDeclaredField("c");
|
rafField = net.minecraft.server.v1_6_R3.RegionFile.class.getDeclaredField("c");
|
||||||
rafField.setAccessible(true);
|
rafField.setAccessible(true);
|
||||||
}
|
}
|
||||||
catch (Throwable t)
|
catch (Throwable t)
|
||||||
|
@ -4,26 +4,26 @@ import java.lang.reflect.Field;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
|
|
||||||
import net.minecraft.server.v1_6_R2.EntityCreature;
|
import net.minecraft.server.v1_6_R3.EntityCreature;
|
||||||
import net.minecraft.server.v1_6_R2.EntityHuman;
|
import net.minecraft.server.v1_6_R3.EntityHuman;
|
||||||
import net.minecraft.server.v1_6_R2.EntityInsentient;
|
import net.minecraft.server.v1_6_R3.EntityInsentient;
|
||||||
import net.minecraft.server.v1_6_R2.PathfinderGoalLookAtPlayer;
|
import net.minecraft.server.v1_6_R3.PathfinderGoalLookAtPlayer;
|
||||||
import net.minecraft.server.v1_6_R2.PathfinderGoalMoveTowardsRestriction;
|
import net.minecraft.server.v1_6_R3.PathfinderGoalMoveTowardsRestriction;
|
||||||
import net.minecraft.server.v1_6_R2.PathfinderGoalRandomLookaround;
|
import net.minecraft.server.v1_6_R3.PathfinderGoalRandomLookaround;
|
||||||
import net.minecraft.server.v1_6_R2.PathfinderGoalSelector;
|
import net.minecraft.server.v1_6_R3.PathfinderGoalSelector;
|
||||||
|
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Sound;
|
import org.bukkit.Sound;
|
||||||
import org.bukkit.block.BlockFace;
|
import org.bukkit.block.BlockFace;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftEntity;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftCreature;
|
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftCreature;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.CraftWorld;
|
import org.bukkit.craftbukkit.v1_6_R3.CraftWorld;
|
||||||
|
|
||||||
public class UtilEnt
|
public class UtilEnt
|
||||||
{
|
{
|
||||||
|
@ -3,7 +3,7 @@ package mineplex.core.common.util;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
|
||||||
import net.minecraft.server.v1_6_R2.Chunk;
|
import net.minecraft.server.v1_6_R3.Chunk;
|
||||||
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
|
@ -2,22 +2,22 @@ package mineplex.core.common.util;
|
|||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
import net.minecraft.server.v1_6_R2.ConvertProgressUpdater;
|
import net.minecraft.server.v1_6_R3.ConvertProgressUpdater;
|
||||||
import net.minecraft.server.v1_6_R2.Convertable;
|
import net.minecraft.server.v1_6_R3.Convertable;
|
||||||
import net.minecraft.server.v1_6_R2.EntityTracker;
|
import net.minecraft.server.v1_6_R3.EntityTracker;
|
||||||
import net.minecraft.server.v1_6_R2.EnumGamemode;
|
import net.minecraft.server.v1_6_R3.EnumGamemode;
|
||||||
import net.minecraft.server.v1_6_R2.IWorldAccess;
|
import net.minecraft.server.v1_6_R3.IWorldAccess;
|
||||||
import net.minecraft.server.v1_6_R2.ServerNBTManager;
|
import net.minecraft.server.v1_6_R3.ServerNBTManager;
|
||||||
import net.minecraft.server.v1_6_R2.WorldLoaderServer;
|
import net.minecraft.server.v1_6_R3.WorldLoaderServer;
|
||||||
import net.minecraft.server.v1_6_R2.WorldManager;
|
import net.minecraft.server.v1_6_R3.WorldManager;
|
||||||
import net.minecraft.server.v1_6_R2.WorldServer;
|
import net.minecraft.server.v1_6_R3.WorldServer;
|
||||||
import net.minecraft.server.v1_6_R2.WorldSettings;
|
import net.minecraft.server.v1_6_R3.WorldSettings;
|
||||||
import net.minecraft.server.v1_6_R2.WorldType;
|
import net.minecraft.server.v1_6_R3.WorldType;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.WorldCreator;
|
import org.bukkit.WorldCreator;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_6_R3.CraftServer;
|
||||||
import org.bukkit.event.world.WorldInitEvent;
|
import org.bukkit.event.world.WorldInitEvent;
|
||||||
import org.bukkit.event.world.WorldLoadEvent;
|
import org.bukkit.event.world.WorldLoadEvent;
|
||||||
import org.bukkit.generator.ChunkGenerator;
|
import org.bukkit.generator.ChunkGenerator;
|
||||||
|
@ -2,7 +2,7 @@ package mineplex.core.antistack;
|
|||||||
|
|
||||||
import mineplex.core.MiniPlugin;
|
import mineplex.core.MiniPlugin;
|
||||||
|
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.inventory.CraftItemStack;
|
import org.bukkit.craftbukkit.v1_6_R3.inventory.CraftItemStack;
|
||||||
import org.bukkit.entity.Item;
|
import org.bukkit.entity.Item;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
|
@ -4,7 +4,7 @@ import java.util.HashMap;
|
|||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftLivingEntity;
|
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftLivingEntity;
|
||||||
import org.bukkit.entity.Ageable;
|
import org.bukkit.entity.Ageable;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
|
@ -7,24 +7,24 @@ import java.util.Iterator;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
import net.minecraft.server.v1_6_R2.ChunkAddEntityEvent;
|
import net.minecraft.server.v1_6_R3.ChunkAddEntityEvent;
|
||||||
import net.minecraft.server.v1_6_R2.EntityPlayer;
|
import net.minecraft.server.v1_6_R3.EntityPlayer;
|
||||||
import net.minecraft.server.v1_6_R2.Packet;
|
import net.minecraft.server.v1_6_R3.Packet;
|
||||||
import net.minecraft.server.v1_6_R2.Packet20NamedEntitySpawn;
|
import net.minecraft.server.v1_6_R3.Packet20NamedEntitySpawn;
|
||||||
import net.minecraft.server.v1_6_R2.Packet24MobSpawn;
|
import net.minecraft.server.v1_6_R3.Packet24MobSpawn;
|
||||||
import net.minecraft.server.v1_6_R2.Packet28EntityVelocity;
|
import net.minecraft.server.v1_6_R3.Packet28EntityVelocity;
|
||||||
import net.minecraft.server.v1_6_R2.Packet29DestroyEntity;
|
import net.minecraft.server.v1_6_R3.Packet29DestroyEntity;
|
||||||
import net.minecraft.server.v1_6_R2.Packet31RelEntityMove;
|
import net.minecraft.server.v1_6_R3.Packet31RelEntityMove;
|
||||||
import net.minecraft.server.v1_6_R2.Packet33RelEntityMoveLook;
|
import net.minecraft.server.v1_6_R3.Packet33RelEntityMoveLook;
|
||||||
import net.minecraft.server.v1_6_R2.Packet34EntityTeleport;
|
import net.minecraft.server.v1_6_R3.Packet34EntityTeleport;
|
||||||
import net.minecraft.server.v1_6_R2.Packet40EntityMetadata;
|
import net.minecraft.server.v1_6_R3.Packet40EntityMetadata;
|
||||||
import net.minecraft.server.v1_6_R2.Packet44UpdateAttributes;
|
import net.minecraft.server.v1_6_R3.Packet44UpdateAttributes;
|
||||||
import net.minecraft.server.v1_6_R2.Packet5EntityEquipment;
|
import net.minecraft.server.v1_6_R3.Packet5EntityEquipment;
|
||||||
import net.minecraft.server.v1_6_R2.Packet62NamedSoundEffect;
|
import net.minecraft.server.v1_6_R3.Packet62NamedSoundEffect;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftLivingEntity;
|
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftLivingEntity;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftPlayer;
|
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftPlayer;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
package mineplex.core.disguise.disguises;
|
package mineplex.core.disguise.disguises;
|
||||||
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftEntity;
|
||||||
|
|
||||||
import net.minecraft.server.v1_6_R2.DataWatcher;
|
import net.minecraft.server.v1_6_R3.DataWatcher;
|
||||||
import net.minecraft.server.v1_6_R2.Entity;
|
import net.minecraft.server.v1_6_R3.Entity;
|
||||||
import net.minecraft.server.v1_6_R2.Packet;
|
import net.minecraft.server.v1_6_R3.Packet;
|
||||||
import net.minecraft.server.v1_6_R2.Packet40EntityMetadata;
|
import net.minecraft.server.v1_6_R3.Packet40EntityMetadata;
|
||||||
|
|
||||||
public abstract class DisguiseBase
|
public abstract class DisguiseBase
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package mineplex.core.disguise.disguises;
|
package mineplex.core.disguise.disguises;
|
||||||
|
|
||||||
import net.minecraft.server.v1_6_R2.Packet;
|
import net.minecraft.server.v1_6_R3.Packet;
|
||||||
|
|
||||||
public class DisguiseBat extends DisguiseAmbient
|
public class DisguiseBat extends DisguiseAmbient
|
||||||
{
|
{
|
||||||
|
@ -2,9 +2,9 @@ package mineplex.core.disguise.disguises;
|
|||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
import net.minecraft.server.v1_6_R2.MathHelper;
|
import net.minecraft.server.v1_6_R3.MathHelper;
|
||||||
import net.minecraft.server.v1_6_R2.Packet;
|
import net.minecraft.server.v1_6_R3.Packet;
|
||||||
import net.minecraft.server.v1_6_R2.Packet23VehicleSpawn;
|
import net.minecraft.server.v1_6_R3.Packet23VehicleSpawn;
|
||||||
|
|
||||||
public class DisguiseBlock extends DisguiseBase
|
public class DisguiseBlock extends DisguiseBase
|
||||||
{
|
{
|
||||||
|
@ -2,10 +2,10 @@ package mineplex.core.disguise.disguises;
|
|||||||
|
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
|
|
||||||
import net.minecraft.server.v1_6_R2.EnumEntitySize;
|
import net.minecraft.server.v1_6_R3.EnumEntitySize;
|
||||||
import net.minecraft.server.v1_6_R2.MathHelper;
|
import net.minecraft.server.v1_6_R3.MathHelper;
|
||||||
import net.minecraft.server.v1_6_R2.Packet;
|
import net.minecraft.server.v1_6_R3.Packet;
|
||||||
import net.minecraft.server.v1_6_R2.Packet24MobSpawn;
|
import net.minecraft.server.v1_6_R3.Packet24MobSpawn;
|
||||||
|
|
||||||
public abstract class DisguiseCreature extends DisguiseInsentient
|
public abstract class DisguiseCreature extends DisguiseInsentient
|
||||||
{
|
{
|
||||||
|
@ -2,9 +2,9 @@ package mineplex.core.disguise.disguises;
|
|||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
import net.minecraft.server.v1_6_R2.MobEffect;
|
import net.minecraft.server.v1_6_R3.MobEffect;
|
||||||
import net.minecraft.server.v1_6_R2.MobEffectList;
|
import net.minecraft.server.v1_6_R3.MobEffectList;
|
||||||
import net.minecraft.server.v1_6_R2.PotionBrewer;
|
import net.minecraft.server.v1_6_R3.PotionBrewer;
|
||||||
|
|
||||||
public class DisguiseEnderman extends DisguiseMonster
|
public class DisguiseEnderman extends DisguiseMonster
|
||||||
{
|
{
|
||||||
|
@ -3,8 +3,8 @@ package mineplex.core.disguise.disguises;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import net.minecraft.server.v1_6_R2.Packet;
|
import net.minecraft.server.v1_6_R3.Packet;
|
||||||
import net.minecraft.server.v1_6_R2.Packet5EntityEquipment;
|
import net.minecraft.server.v1_6_R3.Packet5EntityEquipment;
|
||||||
|
|
||||||
public abstract class DisguiseInsentient extends DisguiseLiving
|
public abstract class DisguiseInsentient extends DisguiseLiving
|
||||||
{
|
{
|
||||||
@ -56,11 +56,11 @@ public abstract class DisguiseInsentient extends DisguiseLiving
|
|||||||
public List<Packet> getArmorPackets()
|
public List<Packet> getArmorPackets()
|
||||||
{
|
{
|
||||||
List<Packet5EntityEquipment> p5 = new ArrayList<Packet5EntityEquipment>();
|
List<Packet5EntityEquipment> p5 = new ArrayList<Packet5EntityEquipment>();
|
||||||
net.minecraft.server.v1_6_R2.ItemStack[] armorContents = Entity.getEquipment();
|
net.minecraft.server.v1_6_R3.ItemStack[] armorContents = Entity.getEquipment();
|
||||||
|
|
||||||
for (short i=0; i < armorContents.length; i++)
|
for (short i=0; i < armorContents.length; i++)
|
||||||
{
|
{
|
||||||
net.minecraft.server.v1_6_R2.ItemStack armorSlot = armorContents[i];
|
net.minecraft.server.v1_6_R3.ItemStack armorSlot = armorContents[i];
|
||||||
|
|
||||||
if (armorSlot != null)
|
if (armorSlot != null)
|
||||||
{
|
{
|
||||||
|
@ -2,9 +2,9 @@ package mineplex.core.disguise.disguises;
|
|||||||
|
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
|
|
||||||
import net.minecraft.server.v1_6_R2.MathHelper;
|
import net.minecraft.server.v1_6_R3.MathHelper;
|
||||||
import net.minecraft.server.v1_6_R2.Packet;
|
import net.minecraft.server.v1_6_R3.Packet;
|
||||||
import net.minecraft.server.v1_6_R2.Packet20NamedEntitySpawn;
|
import net.minecraft.server.v1_6_R3.Packet20NamedEntitySpawn;
|
||||||
|
|
||||||
public class DisguisePlayer extends DisguiseHuman
|
public class DisguisePlayer extends DisguiseHuman
|
||||||
{
|
{
|
||||||
|
@ -2,10 +2,10 @@ package mineplex.core.disguise.disguises;
|
|||||||
|
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
|
|
||||||
import net.minecraft.server.v1_6_R2.EnumEntitySize;
|
import net.minecraft.server.v1_6_R3.EnumEntitySize;
|
||||||
import net.minecraft.server.v1_6_R2.MathHelper;
|
import net.minecraft.server.v1_6_R3.MathHelper;
|
||||||
import net.minecraft.server.v1_6_R2.Packet;
|
import net.minecraft.server.v1_6_R3.Packet;
|
||||||
import net.minecraft.server.v1_6_R2.Packet24MobSpawn;
|
import net.minecraft.server.v1_6_R3.Packet24MobSpawn;
|
||||||
|
|
||||||
public class DisguiseSlime extends DisguiseInsentient
|
public class DisguiseSlime extends DisguiseInsentient
|
||||||
{
|
{
|
||||||
|
@ -2,15 +2,15 @@ package mineplex.core.fakeEntity;
|
|||||||
|
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
|
|
||||||
import net.minecraft.server.v1_6_R2.BlockCloth;
|
import net.minecraft.server.v1_6_R3.BlockCloth;
|
||||||
import net.minecraft.server.v1_6_R2.DataWatcher;
|
import net.minecraft.server.v1_6_R3.DataWatcher;
|
||||||
import net.minecraft.server.v1_6_R2.EnumEntitySize;
|
import net.minecraft.server.v1_6_R3.EnumEntitySize;
|
||||||
import net.minecraft.server.v1_6_R2.MathHelper;
|
import net.minecraft.server.v1_6_R3.MathHelper;
|
||||||
import net.minecraft.server.v1_6_R2.Packet;
|
import net.minecraft.server.v1_6_R3.Packet;
|
||||||
import net.minecraft.server.v1_6_R2.Packet24MobSpawn;
|
import net.minecraft.server.v1_6_R3.Packet24MobSpawn;
|
||||||
import net.minecraft.server.v1_6_R2.Packet29DestroyEntity;
|
import net.minecraft.server.v1_6_R3.Packet29DestroyEntity;
|
||||||
import net.minecraft.server.v1_6_R2.Packet39AttachEntity;
|
import net.minecraft.server.v1_6_R3.Packet39AttachEntity;
|
||||||
import net.minecraft.server.v1_6_R2.Packet40EntityMetadata;
|
import net.minecraft.server.v1_6_R3.Packet40EntityMetadata;
|
||||||
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
|
@ -3,9 +3,9 @@ package mineplex.core.fakeEntity;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import net.minecraft.server.v1_6_R2.Packet;
|
import net.minecraft.server.v1_6_R3.Packet;
|
||||||
|
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftPlayer;
|
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftPlayer;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package mineplex.core.fakeEntity;
|
package mineplex.core.fakeEntity;
|
||||||
|
|
||||||
import net.minecraft.server.v1_6_R2.EnumEntitySize;
|
import net.minecraft.server.v1_6_R3.EnumEntitySize;
|
||||||
import net.minecraft.server.v1_6_R2.MathHelper;
|
import net.minecraft.server.v1_6_R3.MathHelper;
|
||||||
import net.minecraft.server.v1_6_R2.Packet;
|
import net.minecraft.server.v1_6_R3.Packet;
|
||||||
import net.minecraft.server.v1_6_R2.Packet23VehicleSpawn;
|
import net.minecraft.server.v1_6_R3.Packet23VehicleSpawn;
|
||||||
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
package mineplex.core.fakeEntity;
|
package mineplex.core.fakeEntity;
|
||||||
|
|
||||||
import net.minecraft.server.v1_6_R2.DataWatcher;
|
import net.minecraft.server.v1_6_R3.DataWatcher;
|
||||||
import net.minecraft.server.v1_6_R2.ItemStack;
|
import net.minecraft.server.v1_6_R3.ItemStack;
|
||||||
import net.minecraft.server.v1_6_R2.MathHelper;
|
import net.minecraft.server.v1_6_R3.MathHelper;
|
||||||
import net.minecraft.server.v1_6_R2.Packet;
|
import net.minecraft.server.v1_6_R3.Packet;
|
||||||
import net.minecraft.server.v1_6_R2.Packet23VehicleSpawn;
|
import net.minecraft.server.v1_6_R3.Packet23VehicleSpawn;
|
||||||
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.inventory.CraftItemStack;
|
import org.bukkit.craftbukkit.v1_6_R3.inventory.CraftItemStack;
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
|
|
||||||
public class FakeItemDrop extends FakeEntity
|
public class FakeItemDrop extends FakeEntity
|
||||||
@ -75,7 +75,7 @@ public class FakeItemDrop extends FakeEntity
|
|||||||
dataWatcher.a(1, Short.valueOf((short)300));
|
dataWatcher.a(1, Short.valueOf((short)300));
|
||||||
dataWatcher.a(8, Integer.valueOf(0));
|
dataWatcher.a(8, Integer.valueOf(0));
|
||||||
dataWatcher.a(9, Byte.valueOf((byte) 0));
|
dataWatcher.a(9, Byte.valueOf((byte) 0));
|
||||||
dataWatcher.a(10, new net.minecraft.server.v1_6_R2.ItemStack(_itemStack.getItem(), _itemStack.count));
|
dataWatcher.a(10, new net.minecraft.server.v1_6_R3.ItemStack(_itemStack.getItem(), _itemStack.count));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetItemStack(org.bukkit.inventory.ItemStack itemStack)
|
public void SetItemStack(org.bukkit.inventory.ItemStack itemStack)
|
||||||
|
@ -2,10 +2,10 @@ package mineplex.core.fakeEntity;
|
|||||||
|
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
|
|
||||||
import net.minecraft.server.v1_6_R2.DataWatcher;
|
import net.minecraft.server.v1_6_R3.DataWatcher;
|
||||||
import net.minecraft.server.v1_6_R2.MathHelper;
|
import net.minecraft.server.v1_6_R3.MathHelper;
|
||||||
import net.minecraft.server.v1_6_R2.Packet;
|
import net.minecraft.server.v1_6_R3.Packet;
|
||||||
import net.minecraft.server.v1_6_R2.Packet20NamedEntitySpawn;
|
import net.minecraft.server.v1_6_R3.Packet20NamedEntitySpawn;
|
||||||
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
|
@ -16,7 +16,7 @@ import mineplex.core.common.util.UtilTime;
|
|||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.inventory.CraftItemStack;
|
import org.bukkit.craftbukkit.v1_6_R3.inventory.CraftItemStack;
|
||||||
import org.bukkit.enchantments.Enchantment;
|
import org.bukkit.enchantments.Enchantment;
|
||||||
import org.bukkit.entity.Monster;
|
import org.bukkit.entity.Monster;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
@ -5,7 +5,7 @@ import mineplex.core.common.util.UtilMath;
|
|||||||
import mineplex.core.updater.UpdateType;
|
import mineplex.core.updater.UpdateType;
|
||||||
import mineplex.core.updater.event.UpdateEvent;
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
|
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftPlayer;
|
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftPlayer;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package mineplex.core.npc;
|
package mineplex.core.npc;
|
||||||
|
|
||||||
import net.minecraft.server.v1_6_R2.EntityCreature;
|
import net.minecraft.server.v1_6_R3.EntityCreature;
|
||||||
|
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftCreature;
|
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftCreature;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
|
|
||||||
public class NpcEntry
|
public class NpcEntry
|
||||||
|
@ -11,15 +11,15 @@ import java.util.HashSet;
|
|||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import net.minecraft.server.v1_6_R2.EntityAgeable;
|
import net.minecraft.server.v1_6_R3.EntityAgeable;
|
||||||
import net.minecraft.server.v1_6_R2.EntityInsentient;
|
import net.minecraft.server.v1_6_R3.EntityInsentient;
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.World.Environment;
|
import org.bukkit.World.Environment;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftAgeable;
|
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftAgeable;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftCreature;
|
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftCreature;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftLivingEntity;
|
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftLivingEntity;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
|
@ -2,7 +2,7 @@ package mineplex.core.packethandler;
|
|||||||
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import net.minecraft.server.v1_6_R2.Packet;
|
import net.minecraft.server.v1_6_R3.Packet;
|
||||||
|
|
||||||
public interface IPacketRunnable
|
public interface IPacketRunnable
|
||||||
{
|
{
|
||||||
|
@ -3,12 +3,12 @@ package mineplex.core.packethandler;
|
|||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import net.minecraft.server.v1_6_R2.Packet;
|
import net.minecraft.server.v1_6_R3.Packet;
|
||||||
import net.minecraft.server.v1_6_R2.Packet28EntityVelocity;
|
import net.minecraft.server.v1_6_R3.Packet28EntityVelocity;
|
||||||
import net.minecraft.server.v1_6_R2.Packet31RelEntityMove;
|
import net.minecraft.server.v1_6_R3.Packet31RelEntityMove;
|
||||||
import net.minecraft.server.v1_6_R2.Packet33RelEntityMoveLook;
|
import net.minecraft.server.v1_6_R3.Packet33RelEntityMoveLook;
|
||||||
import net.minecraft.server.v1_6_R2.Packet34EntityTeleport;
|
import net.minecraft.server.v1_6_R3.Packet34EntityTeleport;
|
||||||
import net.minecraft.server.v1_6_R2.Packet40EntityMetadata;
|
import net.minecraft.server.v1_6_R3.Packet40EntityMetadata;
|
||||||
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
@ -9,10 +9,10 @@ import java.util.logging.Level;
|
|||||||
|
|
||||||
import mineplex.core.MiniPlugin;
|
import mineplex.core.MiniPlugin;
|
||||||
import mineplex.core.common.util.NautHashMap;
|
import mineplex.core.common.util.NautHashMap;
|
||||||
import net.minecraft.server.v1_6_R2.NetworkManager;
|
import net.minecraft.server.v1_6_R3.NetworkManager;
|
||||||
import net.minecraft.server.v1_6_R2.Packet;
|
import net.minecraft.server.v1_6_R3.Packet;
|
||||||
|
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftPlayer;
|
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftPlayer;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
|
@ -20,17 +20,17 @@ import mineplex.core.common.util.NautHashMap;
|
|||||||
import mineplex.core.common.util.UtilInv;
|
import mineplex.core.common.util.UtilInv;
|
||||||
import mineplex.core.donation.DonationManager;
|
import mineplex.core.donation.DonationManager;
|
||||||
import mineplex.core.itemstack.ItemStackFactory;
|
import mineplex.core.itemstack.ItemStackFactory;
|
||||||
import net.minecraft.server.v1_6_R2.EntityCreature;
|
import net.minecraft.server.v1_6_R3.EntityCreature;
|
||||||
import net.minecraft.server.v1_6_R2.EntityHuman;
|
import net.minecraft.server.v1_6_R3.EntityHuman;
|
||||||
import net.minecraft.server.v1_6_R2.EntityInsentient;
|
import net.minecraft.server.v1_6_R3.EntityInsentient;
|
||||||
import net.minecraft.server.v1_6_R2.EntityPlayer;
|
import net.minecraft.server.v1_6_R3.EntityPlayer;
|
||||||
import net.minecraft.server.v1_6_R2.Item;
|
import net.minecraft.server.v1_6_R3.Item;
|
||||||
import net.minecraft.server.v1_6_R2.Navigation;
|
import net.minecraft.server.v1_6_R3.Navigation;
|
||||||
import net.minecraft.server.v1_6_R2.Packet100OpenWindow;
|
import net.minecraft.server.v1_6_R3.Packet100OpenWindow;
|
||||||
import net.minecraft.server.v1_6_R2.Packet103SetSlot;
|
import net.minecraft.server.v1_6_R3.Packet103SetSlot;
|
||||||
import net.minecraft.server.v1_6_R2.PathfinderGoalLookAtPlayer;
|
import net.minecraft.server.v1_6_R3.PathfinderGoalLookAtPlayer;
|
||||||
import net.minecraft.server.v1_6_R2.PathfinderGoalRandomLookaround;
|
import net.minecraft.server.v1_6_R3.PathfinderGoalRandomLookaround;
|
||||||
import net.minecraft.server.v1_6_R2.PathfinderGoalSelector;
|
import net.minecraft.server.v1_6_R3.PathfinderGoalSelector;
|
||||||
|
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
@ -39,9 +39,9 @@ import org.bukkit.Location;
|
|||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.craftbukkit.libs.com.google.gson.Gson;
|
import org.bukkit.craftbukkit.libs.com.google.gson.Gson;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.CraftWorld;
|
import org.bukkit.craftbukkit.v1_6_R3.CraftWorld;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftCreature;
|
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftCreature;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftPlayer;
|
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftPlayer;
|
||||||
import org.bukkit.entity.Ageable;
|
import org.bukkit.entity.Ageable;
|
||||||
import org.bukkit.entity.Creature;
|
import org.bukkit.entity.Creature;
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
@ -188,7 +188,7 @@ public class PetManager extends MiniClientPlugin<PetClient>
|
|||||||
entityPlayer.activeContainer = new AnvilContainer(entityPlayer.inventory, petTagPage.getInventory());
|
entityPlayer.activeContainer = new AnvilContainer(entityPlayer.inventory, petTagPage.getInventory());
|
||||||
entityPlayer.activeContainer.windowId = containerCounter;
|
entityPlayer.activeContainer.windowId = containerCounter;
|
||||||
entityPlayer.activeContainer.addSlotListener(entityPlayer);
|
entityPlayer.activeContainer.addSlotListener(entityPlayer);
|
||||||
entityPlayer.playerConnection.sendPacket(new Packet103SetSlot(containerCounter, 0, new net.minecraft.server.v1_6_R2.ItemStack(Item.NAME_TAG)));
|
entityPlayer.playerConnection.sendPacket(new Packet103SetSlot(containerCounter, 0, new net.minecraft.server.v1_6_R3.ItemStack(Item.NAME_TAG)));
|
||||||
|
|
||||||
_petShop.SetCurrentPageForPlayer(event.getPlayer(), petTagPage);
|
_petShop.SetCurrentPageForPlayer(event.getPlayer(), petTagPage);
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
|
@ -10,8 +10,8 @@ import mineplex.core.pet.PetManager;
|
|||||||
import mineplex.core.pet.PetShop;
|
import mineplex.core.pet.PetShop;
|
||||||
import mineplex.core.pet.repository.token.PetChangeToken;
|
import mineplex.core.pet.repository.token.PetChangeToken;
|
||||||
import mineplex.core.shop.page.ShopPageBase;
|
import mineplex.core.shop.page.ShopPageBase;
|
||||||
import net.minecraft.server.v1_6_R2.Item;
|
import net.minecraft.server.v1_6_R3.Item;
|
||||||
import net.minecraft.server.v1_6_R2.ItemStack;
|
import net.minecraft.server.v1_6_R3.ItemStack;
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
|
@ -10,7 +10,7 @@ import org.bukkit.GameMode;
|
|||||||
import org.bukkit.Sound;
|
import org.bukkit.Sound;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.block.BlockFace;
|
import org.bukkit.block.BlockFace;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.CraftWorld;
|
import org.bukkit.craftbukkit.v1_6_R3.CraftWorld;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@ -92,9 +92,9 @@ public class ProjectileUser
|
|||||||
{
|
{
|
||||||
for (Object entity : ((CraftWorld)_thrown.getWorld()).getHandle().entityList)
|
for (Object entity : ((CraftWorld)_thrown.getWorld()).getHandle().entityList)
|
||||||
{
|
{
|
||||||
if (entity instanceof net.minecraft.server.v1_6_R2.Entity)
|
if (entity instanceof net.minecraft.server.v1_6_R3.Entity)
|
||||||
{
|
{
|
||||||
Entity bukkitEntity = ((net.minecraft.server.v1_6_R2.Entity) entity).getBukkitEntity();
|
Entity bukkitEntity = ((net.minecraft.server.v1_6_R3.Entity) entity).getBukkitEntity();
|
||||||
|
|
||||||
if (bukkitEntity instanceof LivingEntity)
|
if (bukkitEntity instanceof LivingEntity)
|
||||||
{
|
{
|
||||||
|
@ -23,7 +23,7 @@ import mineplex.core.shop.item.ShopItem;
|
|||||||
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.inventory.CraftInventoryCustom;
|
import org.bukkit.craftbukkit.v1_6_R3.inventory.CraftInventoryCustom;
|
||||||
import org.bukkit.enchantments.Enchantment;
|
import org.bukkit.enchantments.Enchantment;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
|
@ -5,7 +5,7 @@ import java.util.List;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import mineplex.core.account.CoreClient;
|
import mineplex.core.account.CoreClient;
|
||||||
import net.minecraft.server.v1_6_R2.IInventory;
|
import net.minecraft.server.v1_6_R3.IInventory;
|
||||||
|
|
||||||
public interface ISalesPackage
|
public interface ISalesPackage
|
||||||
{
|
{
|
||||||
|
@ -5,10 +5,10 @@ import java.util.List;
|
|||||||
|
|
||||||
import mineplex.core.account.CoreClient;
|
import mineplex.core.account.CoreClient;
|
||||||
import mineplex.core.common.util.InventoryUtil;
|
import mineplex.core.common.util.InventoryUtil;
|
||||||
import net.minecraft.server.v1_6_R2.IInventory;
|
import net.minecraft.server.v1_6_R3.IInventory;
|
||||||
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.inventory.CraftInventory;
|
import org.bukkit.craftbukkit.v1_6_R3.inventory.CraftInventory;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
package mineplex.core.shop.item;
|
package mineplex.core.shop.item;
|
||||||
|
|
||||||
import net.minecraft.server.v1_6_R2.NBTTagList;
|
import net.minecraft.server.v1_6_R3.NBTTagList;
|
||||||
import net.minecraft.server.v1_6_R2.NBTTagString;
|
import net.minecraft.server.v1_6_R3.NBTTagString;
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.inventory.CraftItemStack;
|
import org.bukkit.craftbukkit.v1_6_R3.inventory.CraftItemStack;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
public class ShopItem extends CraftItemStack
|
public class ShopItem extends CraftItemStack
|
||||||
@ -100,8 +100,8 @@ public class ShopItem extends CraftItemStack
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
net.minecraft.server.v1_6_R2.ItemStack original = ((CraftItemStack)this).getHandle();
|
net.minecraft.server.v1_6_R3.ItemStack original = ((CraftItemStack)this).getHandle();
|
||||||
net.minecraft.server.v1_6_R2.ItemStack comparison = ((CraftItemStack)obj).getHandle();
|
net.minecraft.server.v1_6_R3.ItemStack comparison = ((CraftItemStack)obj).getHandle();
|
||||||
|
|
||||||
return original.tag == null || original.tag.equals(comparison.tag);
|
return original.tag == null || original.tag.equals(comparison.tag);
|
||||||
}
|
}
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
package mineplex.core.shop.page;
|
package mineplex.core.shop.page;
|
||||||
|
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.inventory.CraftInventory;
|
import org.bukkit.craftbukkit.v1_6_R3.inventory.CraftInventory;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.inventory.CraftInventoryDoubleChest;
|
import org.bukkit.craftbukkit.v1_6_R3.inventory.CraftInventoryDoubleChest;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.inventory.CraftInventoryPlayer;
|
import org.bukkit.craftbukkit.v1_6_R3.inventory.CraftInventoryPlayer;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.inventory.CraftInventoryView;
|
import org.bukkit.craftbukkit.v1_6_R3.inventory.CraftInventoryView;
|
||||||
|
|
||||||
import net.minecraft.server.v1_6_R2.Container;
|
import net.minecraft.server.v1_6_R3.Container;
|
||||||
import net.minecraft.server.v1_6_R2.EntityHuman;
|
import net.minecraft.server.v1_6_R3.EntityHuman;
|
||||||
import net.minecraft.server.v1_6_R2.IInventory;
|
import net.minecraft.server.v1_6_R3.IInventory;
|
||||||
import net.minecraft.server.v1_6_R2.InventoryLargeChest;
|
import net.minecraft.server.v1_6_R3.InventoryLargeChest;
|
||||||
import net.minecraft.server.v1_6_R2.PlayerInventory;
|
import net.minecraft.server.v1_6_R3.PlayerInventory;
|
||||||
import net.minecraft.server.v1_6_R2.Slot;
|
import net.minecraft.server.v1_6_R3.Slot;
|
||||||
|
|
||||||
public class AnvilContainer extends Container
|
public class AnvilContainer extends Container
|
||||||
{
|
{
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package mineplex.core.shop.page;
|
package mineplex.core.shop.page;
|
||||||
|
|
||||||
import org.bukkit.Sound;
|
import org.bukkit.Sound;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftPlayer;
|
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftPlayer;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.inventory.CraftInventoryCustom;
|
import org.bukkit.craftbukkit.v1_6_R3.inventory.CraftInventoryCustom;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
import org.bukkit.event.inventory.InventoryClickEvent;
|
||||||
|
@ -106,7 +106,7 @@ public class ServerStatusManager extends MiniPlugin
|
|||||||
{
|
{
|
||||||
public void run()
|
public void run()
|
||||||
{
|
{
|
||||||
_repository.updatePlayerCountInDatabase(listPingEvent.getMotd(), Bukkit.getOnlinePlayers().length, (int)_lagMeter.getTicksPerSecond());
|
_repository.updatePlayerCountInDatabase(listPingEvent.getMotd(), Bukkit.getOnlinePlayers().length, listPingEvent.getMaxPlayers(), (int)_lagMeter.getTicksPerSecond());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -87,7 +87,7 @@ public class ServerStatusRepository
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Update stoof
|
// Update stoof
|
||||||
updatePlayerCountInDatabase("Configuring server.", 0, 20);
|
updatePlayerCountInDatabase("Configuring server.", 0, _maxPlayers, 20);
|
||||||
}
|
}
|
||||||
catch (Exception exception)
|
catch (Exception exception)
|
||||||
{
|
{
|
||||||
@ -109,7 +109,7 @@ public class ServerStatusRepository
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean updatePlayerCountInDatabase(String motd, int players, int tps)
|
public boolean updatePlayerCountInDatabase(String motd, int players, int maxPlayers, int tps)
|
||||||
{
|
{
|
||||||
Connection connection = null;
|
Connection connection = null;
|
||||||
|
|
||||||
@ -123,7 +123,7 @@ public class ServerStatusRepository
|
|||||||
preparedStatement.setString(2, _serverGroup);
|
preparedStatement.setString(2, _serverGroup);
|
||||||
preparedStatement.setString(3, motd);
|
preparedStatement.setString(3, motd);
|
||||||
preparedStatement.setInt(4, players);
|
preparedStatement.setInt(4, players);
|
||||||
preparedStatement.setInt(5, _maxPlayers);
|
preparedStatement.setInt(5, maxPlayers);
|
||||||
preparedStatement.setInt(6, tps);
|
preparedStatement.setInt(6, tps);
|
||||||
preparedStatement.setInt(7, (int) ((Runtime.getRuntime().maxMemory() - Runtime.getRuntime().freeMemory()) / 1048576));
|
preparedStatement.setInt(7, (int) ((Runtime.getRuntime().maxMemory() - Runtime.getRuntime().freeMemory()) / 1048576));
|
||||||
preparedStatement.setInt(8, (int) (Runtime.getRuntime().maxMemory() / 1048576));
|
preparedStatement.setInt(8, (int) (Runtime.getRuntime().maxMemory() / 1048576));
|
||||||
|
@ -13,7 +13,7 @@ import org.bukkit.Bukkit;
|
|||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftPlayer;
|
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftPlayer;
|
||||||
import org.bukkit.entity.Egg;
|
import org.bukkit.entity.Egg;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
|
@ -55,7 +55,7 @@ public class ItemFactory extends MiniPlugin implements IItemFactory
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_itemMaxDurability = net.minecraft.server.v1_6_R2.Item.class.getDeclaredField("durability");
|
_itemMaxDurability = net.minecraft.server.v1_6_R3.Item.class.getDeclaredField("durability");
|
||||||
_itemMaxDurability.setAccessible(true);
|
_itemMaxDurability.setAccessible(true);
|
||||||
}
|
}
|
||||||
catch (SecurityException e)
|
catch (SecurityException e)
|
||||||
@ -195,7 +195,7 @@ public class ItemFactory extends MiniPlugin implements IItemFactory
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_itemMaxDurability.setInt(net.minecraft.server.v1_6_R2.Item.byId[newItem.GetType().getId()], 56);
|
_itemMaxDurability.setInt(net.minecraft.server.v1_6_R3.Item.byId[newItem.GetType().getId()], 56);
|
||||||
}
|
}
|
||||||
catch (IllegalArgumentException e)
|
catch (IllegalArgumentException e)
|
||||||
{
|
{
|
||||||
|
@ -2,7 +2,7 @@ package mineplex.minecraft.game.classcombat.item;
|
|||||||
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftPlayer;
|
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftPlayer;
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
|
@ -7,7 +7,7 @@ import org.bukkit.Effect;
|
|||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.Sound;
|
import org.bukkit.Sound;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftPlayer;
|
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftPlayer;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
@ -7,7 +7,7 @@ import org.bukkit.Effect;
|
|||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.Sound;
|
import org.bukkit.Sound;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftPlayer;
|
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftPlayer;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
@ -4,7 +4,7 @@ import org.bukkit.Effect;
|
|||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.Sound;
|
import org.bukkit.Sound;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftPlayer;
|
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftPlayer;
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.player.PlayerInteractEvent;
|
import org.bukkit.event.player.PlayerInteractEvent;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package mineplex.minecraft.game.classcombat.shop;
|
package mineplex.minecraft.game.classcombat.shop;
|
||||||
|
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftPlayer;
|
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftPlayer;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
|
@ -3,9 +3,9 @@ package mineplex.minecraft.game.core.combat;
|
|||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
|
||||||
import net.minecraft.server.v1_6_R2.ItemStack;
|
import net.minecraft.server.v1_6_R3.ItemStack;
|
||||||
|
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.inventory.CraftItemStack;
|
import org.bukkit.craftbukkit.v1_6_R3.inventory.CraftItemStack;
|
||||||
import org.bukkit.entity.Arrow;
|
import org.bukkit.entity.Arrow;
|
||||||
import org.bukkit.entity.Fireball;
|
import org.bukkit.entity.Fireball;
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
|
@ -19,7 +19,7 @@ import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
|||||||
import org.bukkit.event.entity.EntityTargetEvent;
|
import org.bukkit.event.entity.EntityTargetEvent;
|
||||||
import org.bukkit.potion.PotionEffectType;
|
import org.bukkit.potion.PotionEffectType;
|
||||||
|
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftPlayer;
|
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftPlayer;
|
||||||
|
|
||||||
public class ConditionEffect implements Listener
|
public class ConditionEffect implements Listener
|
||||||
{
|
{
|
||||||
|
@ -17,15 +17,15 @@ import mineplex.core.disguise.DisguiseManager;
|
|||||||
import mineplex.core.npc.NpcManager;
|
import mineplex.core.npc.NpcManager;
|
||||||
import mineplex.minecraft.game.core.combat.CombatManager;
|
import mineplex.minecraft.game.core.combat.CombatManager;
|
||||||
import mineplex.minecraft.game.core.damage.compatibility.NpcProtectListener;
|
import mineplex.minecraft.game.core.damage.compatibility.NpcProtectListener;
|
||||||
import net.minecraft.server.v1_6_R2.DamageSource;
|
import net.minecraft.server.v1_6_R3.DamageSource;
|
||||||
import net.minecraft.server.v1_6_R2.EntityHuman;
|
import net.minecraft.server.v1_6_R3.EntityHuman;
|
||||||
import net.minecraft.server.v1_6_R2.EntityLiving;
|
import net.minecraft.server.v1_6_R3.EntityLiving;
|
||||||
|
|
||||||
import org.bukkit.EntityEffect;
|
import org.bukkit.EntityEffect;
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.Sound;
|
import org.bukkit.Sound;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftLivingEntity;
|
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftLivingEntity;
|
||||||
import org.bukkit.entity.Fish;
|
import org.bukkit.entity.Fish;
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@ -449,7 +449,7 @@ public class DamageManager extends MiniPlugin
|
|||||||
{
|
{
|
||||||
if (!ignoreArmor)
|
if (!ignoreArmor)
|
||||||
{
|
{
|
||||||
int j = 25 - entityLiving.aP();
|
int j = 25 - entityLiving.aQ();
|
||||||
float k = damage * (float)j;
|
float k = damage * (float)j;
|
||||||
|
|
||||||
_k.invoke(entityLiving, damage);
|
_k.invoke(entityLiving, damage);
|
||||||
|
@ -27,7 +27,7 @@ import org.bukkit.event.player.PlayerPickupItemEvent;
|
|||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
import org.bukkit.potion.PotionEffectType;
|
import org.bukkit.potion.PotionEffectType;
|
||||||
|
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftPlayer;
|
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftPlayer;
|
||||||
|
|
||||||
public class Fire extends MiniPlugin
|
public class Fire extends MiniPlugin
|
||||||
{
|
{
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
<classpathentry kind="src" path="src"/>
|
<classpathentry kind="src" path="src"/>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||||
<classpathentry kind="var" path="REPO_DIR/Plugins/Libraries/jline-2.6.jar"/>
|
<classpathentry kind="var" path="REPO_DIR/Plugins/Libraries/jline-2.6.jar"/>
|
||||||
<classpathentry kind="var" path="REPO_DIR/Plugins/Libraries/craftbukkit_official.jar" sourcepath="/REPO_DIR/GitHubLibraries/CraftBukkit/src"/>
|
<classpathentry kind="var" path="REPO_DIR/Plugins/Libraries/craftbukkit_official.jar"/>
|
||||||
<classpathentry kind="output" path="bin"/>
|
<classpathentry kind="output" path="bin"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
package net.minecraft.server.v1_6_R2;
|
package net.minecraft.server.v1_6_R3;
|
||||||
|
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
|
import net.minecraft.server.v1_6_R3.PendingConnection;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.util.Waitable;
|
|
||||||
|
import org.bukkit.craftbukkit.v1_6_R3.CraftServer;
|
||||||
|
import org.bukkit.craftbukkit.v1_6_R3.util.Waitable;
|
||||||
import org.bukkit.event.player.AsyncPlayerPreLoginEvent;
|
import org.bukkit.event.player.AsyncPlayerPreLoginEvent;
|
||||||
import org.bukkit.event.player.PlayerPreLoginEvent;
|
import org.bukkit.event.player.PlayerPreLoginEvent;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package net.minecraft.server.v1_6_R2;
|
package net.minecraft.server.v1_6_R3;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
@ -8,6 +8,26 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
|
import net.minecraft.server.v1_6_R3.AxisAlignedBB;
|
||||||
|
import net.minecraft.server.v1_6_R3.BiomeBase;
|
||||||
|
import net.minecraft.server.v1_6_R3.Block;
|
||||||
|
import net.minecraft.server.v1_6_R3.BlockContainer;
|
||||||
|
import net.minecraft.server.v1_6_R3.ChunkCoordIntPair;
|
||||||
|
import net.minecraft.server.v1_6_R3.ChunkPosition;
|
||||||
|
import net.minecraft.server.v1_6_R3.ChunkSection;
|
||||||
|
import net.minecraft.server.v1_6_R3.EmptyChunk;
|
||||||
|
import net.minecraft.server.v1_6_R3.Entity;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityPlayer;
|
||||||
|
import net.minecraft.server.v1_6_R3.EnumSkyBlock;
|
||||||
|
import net.minecraft.server.v1_6_R3.IChunkProvider;
|
||||||
|
import net.minecraft.server.v1_6_R3.IContainer;
|
||||||
|
import net.minecraft.server.v1_6_R3.IEntitySelector;
|
||||||
|
import net.minecraft.server.v1_6_R3.Material;
|
||||||
|
import net.minecraft.server.v1_6_R3.MathHelper;
|
||||||
|
import net.minecraft.server.v1_6_R3.TileEntity;
|
||||||
|
import net.minecraft.server.v1_6_R3.World;
|
||||||
|
import net.minecraft.server.v1_6_R3.WorldChunkManager;
|
||||||
|
|
||||||
import org.bukkit.Bukkit; // CraftBukkit
|
import org.bukkit.Bukkit; // CraftBukkit
|
||||||
|
|
||||||
public class Chunk {
|
public class Chunk {
|
||||||
@ -48,7 +68,7 @@ public class Chunk {
|
|||||||
this.heightMap = new int[256];
|
this.heightMap = new int[256];
|
||||||
|
|
||||||
for (int k = 0; k < this.entitySlices.length; ++k) {
|
for (int k = 0; k < this.entitySlices.length; ++k) {
|
||||||
this.entitySlices[k] = new org.bukkit.craftbukkit.v1_6_R2.util.UnsafeList(); // CraftBukkit - ArrayList -> UnsafeList
|
this.entitySlices[k] = new org.bukkit.craftbukkit.v1_6_R3.util.UnsafeList(); // CraftBukkit - ArrayList -> UnsafeList
|
||||||
}
|
}
|
||||||
|
|
||||||
Arrays.fill(this.b, -999);
|
Arrays.fill(this.b, -999);
|
||||||
@ -56,7 +76,7 @@ public class Chunk {
|
|||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
if (!(this instanceof EmptyChunk)) {
|
if (!(this instanceof EmptyChunk)) {
|
||||||
this.bukkitChunk = new org.bukkit.craftbukkit.v1_6_R2.CraftChunk(this);
|
this.bukkitChunk = new org.bukkit.craftbukkit.v1_6_R3.CraftChunk(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -661,7 +681,7 @@ public class Chunk {
|
|||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
Entity entity = (Entity) iterator.next();
|
Entity entity = (Entity) iterator.next();
|
||||||
|
|
||||||
entity.Q();
|
entity.R();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.world.a(this.entitySlices[i]);
|
this.world.a(this.entitySlices[i]);
|
||||||
@ -722,7 +742,7 @@ public class Chunk {
|
|||||||
|
|
||||||
if (entity1 != entity && entity1.boundingBox.b(axisalignedbb) && (ientityselector == null || ientityselector.a(entity1))) {
|
if (entity1 != entity && entity1.boundingBox.b(axisalignedbb) && (ientityselector == null || ientityselector.a(entity1))) {
|
||||||
list.add(entity1);
|
list.add(entity1);
|
||||||
Entity[] aentity = entity1.an();
|
Entity[] aentity = entity1.ao();
|
||||||
|
|
||||||
if (aentity != null) {
|
if (aentity != null) {
|
||||||
for (int i1 = 0; i1 < aentity.length; ++i1) {
|
for (int i1 = 0; i1 < aentity.length; ++i1) {
|
@ -1,4 +1,4 @@
|
|||||||
package net.minecraft.server.v1_6_R2;
|
package net.minecraft.server.v1_6_R3;
|
||||||
|
|
||||||
import org.bukkit.event.Cancellable;
|
import org.bukkit.event.Cancellable;
|
||||||
import org.bukkit.event.Event;
|
import org.bukkit.event.Event;
|
@ -1,4 +1,4 @@
|
|||||||
package net.minecraft.server.v1_6_R2;
|
package net.minecraft.server.v1_6_R3;
|
||||||
|
|
||||||
import org.bukkit.event.Cancellable;
|
import org.bukkit.event.Cancellable;
|
||||||
import org.bukkit.event.Event;
|
import org.bukkit.event.Event;
|
@ -1,4 +1,4 @@
|
|||||||
package net.minecraft.server.v1_6_R2;
|
package net.minecraft.server.v1_6_R3;
|
||||||
|
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -6,11 +6,27 @@ import java.util.List;
|
|||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
|
import net.minecraft.server.v1_6_R3.BlockSand;
|
||||||
|
import net.minecraft.server.v1_6_R3.Chunk;
|
||||||
|
import net.minecraft.server.v1_6_R3.ChunkCoordinates;
|
||||||
|
import net.minecraft.server.v1_6_R3.ChunkPosition;
|
||||||
|
import net.minecraft.server.v1_6_R3.ChunkRegionLoader;
|
||||||
|
import net.minecraft.server.v1_6_R3.CrashReport;
|
||||||
|
import net.minecraft.server.v1_6_R3.CrashReportSystemDetails;
|
||||||
|
import net.minecraft.server.v1_6_R3.EmptyChunk;
|
||||||
|
import net.minecraft.server.v1_6_R3.EnumCreatureType;
|
||||||
|
import net.minecraft.server.v1_6_R3.IChunkLoader;
|
||||||
|
import net.minecraft.server.v1_6_R3.IChunkProvider;
|
||||||
|
import net.minecraft.server.v1_6_R3.IProgressUpdate;
|
||||||
|
import net.minecraft.server.v1_6_R3.ReportedException;
|
||||||
|
import net.minecraft.server.v1_6_R3.World;
|
||||||
|
import net.minecraft.server.v1_6_R3.WorldServer;
|
||||||
|
|
||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.chunkio.ChunkIOExecutor;
|
import org.bukkit.craftbukkit.v1_6_R3.chunkio.ChunkIOExecutor;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.util.LongHash;
|
import org.bukkit.craftbukkit.v1_6_R3.util.LongHash;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.util.LongHashSet;
|
import org.bukkit.craftbukkit.v1_6_R3.util.LongHashSet;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.util.LongObjectHashMap;
|
import org.bukkit.craftbukkit.v1_6_R3.util.LongObjectHashMap;
|
||||||
import org.bukkit.event.world.ChunkUnloadEvent;
|
import org.bukkit.event.world.ChunkUnloadEvent;
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
@ -1,9 +1,14 @@
|
|||||||
package net.minecraft.server.v1_6_R2;
|
package net.minecraft.server.v1_6_R3;
|
||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftHumanEntity;
|
import net.minecraft.server.v1_6_R3.ContainerAnvil;
|
||||||
|
import net.minecraft.server.v1_6_R3.IInventory;
|
||||||
|
import net.minecraft.server.v1_6_R3.InventorySubcontainer;
|
||||||
|
import net.minecraft.server.v1_6_R3.ItemStack;
|
||||||
|
|
||||||
|
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftHumanEntity;
|
||||||
import org.bukkit.entity.HumanEntity;
|
import org.bukkit.entity.HumanEntity;
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
@ -1,10 +1,47 @@
|
|||||||
package net.minecraft.server.v1_6_R2;
|
package net.minecraft.server.v1_6_R3;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import java.util.concurrent.Callable;
|
import java.util.concurrent.Callable;
|
||||||
|
|
||||||
|
import net.minecraft.server.v1_6_R3.AxisAlignedBB;
|
||||||
|
import net.minecraft.server.v1_6_R3.Block;
|
||||||
|
import net.minecraft.server.v1_6_R3.BlockFluids;
|
||||||
|
import net.minecraft.server.v1_6_R3.CrashReport;
|
||||||
|
import net.minecraft.server.v1_6_R3.CrashReportEntityName;
|
||||||
|
import net.minecraft.server.v1_6_R3.CrashReportEntityType;
|
||||||
|
import net.minecraft.server.v1_6_R3.CrashReportSystemDetails;
|
||||||
|
import net.minecraft.server.v1_6_R3.DamageSource;
|
||||||
|
import net.minecraft.server.v1_6_R3.DataWatcher;
|
||||||
|
import net.minecraft.server.v1_6_R3.Direction;
|
||||||
|
import net.minecraft.server.v1_6_R3.EnchantmentProtection;
|
||||||
|
import net.minecraft.server.v1_6_R3.Entity;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityHuman;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityInsentient;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityItem;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityLightning;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityLiving;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityPlayer;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityTameableAnimal;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityTypes;
|
||||||
|
import net.minecraft.server.v1_6_R3.EnumEntitySize;
|
||||||
|
import net.minecraft.server.v1_6_R3.Explosion;
|
||||||
|
import net.minecraft.server.v1_6_R3.ItemStack;
|
||||||
|
import net.minecraft.server.v1_6_R3.LocaleI18n;
|
||||||
|
import net.minecraft.server.v1_6_R3.Material;
|
||||||
|
import net.minecraft.server.v1_6_R3.MathHelper;
|
||||||
|
import net.minecraft.server.v1_6_R3.MinecraftServer;
|
||||||
|
import net.minecraft.server.v1_6_R3.NBTTagCompound;
|
||||||
|
import net.minecraft.server.v1_6_R3.NBTTagDouble;
|
||||||
|
import net.minecraft.server.v1_6_R3.NBTTagFloat;
|
||||||
|
import net.minecraft.server.v1_6_R3.NBTTagList;
|
||||||
|
import net.minecraft.server.v1_6_R3.ReportedException;
|
||||||
|
import net.minecraft.server.v1_6_R3.StepSound;
|
||||||
|
import net.minecraft.server.v1_6_R3.Vec3D;
|
||||||
|
import net.minecraft.server.v1_6_R3.World;
|
||||||
|
import net.minecraft.server.v1_6_R3.WorldServer;
|
||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
@ -19,9 +56,9 @@ import org.bukkit.event.painting.PaintingBreakByEntityEvent;
|
|||||||
import org.bukkit.event.vehicle.VehicleBlockCollisionEvent;
|
import org.bukkit.event.vehicle.VehicleBlockCollisionEvent;
|
||||||
import org.bukkit.event.vehicle.VehicleEnterEvent;
|
import org.bukkit.event.vehicle.VehicleEnterEvent;
|
||||||
import org.bukkit.event.vehicle.VehicleExitEvent;
|
import org.bukkit.event.vehicle.VehicleExitEvent;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.CraftWorld;
|
import org.bukkit.craftbukkit.v1_6_R3.CraftWorld;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftPlayer;
|
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftPlayer;
|
||||||
import org.bukkit.event.entity.EntityCombustEvent;
|
import org.bukkit.event.entity.EntityCombustEvent;
|
||||||
import org.bukkit.event.entity.EntityDamageByBlockEvent;
|
import org.bukkit.event.entity.EntityDamageByBlockEvent;
|
||||||
import org.bukkit.event.entity.EntityDamageEvent;
|
import org.bukkit.event.entity.EntityDamageEvent;
|
||||||
@ -227,10 +264,10 @@ public abstract class Entity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void l_() {
|
public void l_() {
|
||||||
this.x();
|
this.y();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void x() {
|
public void y() {
|
||||||
this.world.methodProfiler.a("entityBaseTick");
|
this.world.methodProfiler.a("entityBaseTick");
|
||||||
if (this.vehicle != null && this.vehicle.dead) {
|
if (this.vehicle != null && this.vehicle.dead) {
|
||||||
this.vehicle = null;
|
this.vehicle = null;
|
||||||
@ -248,12 +285,12 @@ public abstract class Entity {
|
|||||||
this.world.methodProfiler.a("portal");
|
this.world.methodProfiler.a("portal");
|
||||||
MinecraftServer minecraftserver = ((WorldServer) this.world).getMinecraftServer();
|
MinecraftServer minecraftserver = ((WorldServer) this.world).getMinecraftServer();
|
||||||
|
|
||||||
i = this.y();
|
i = this.z();
|
||||||
if (this.ap) {
|
if (this.ap) {
|
||||||
if (true || minecraftserver.getAllowNether()) { // CraftBukkit
|
if (true || minecraftserver.getAllowNether()) { // CraftBukkit
|
||||||
if (this.vehicle == null && this.aq++ >= i) {
|
if (this.vehicle == null && this.aq++ >= i) {
|
||||||
this.aq = i;
|
this.aq = i;
|
||||||
this.portalCooldown = this.ab();
|
this.portalCooldown = this.ac();
|
||||||
byte b0;
|
byte b0;
|
||||||
|
|
||||||
if (this.world.worldProvider.dimension == -1) {
|
if (this.world.worldProvider.dimension == -1) {
|
||||||
@ -284,7 +321,7 @@ public abstract class Entity {
|
|||||||
this.world.methodProfiler.b();
|
this.world.methodProfiler.b();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.isSprinting() && !this.G()) {
|
if (this.isSprinting() && !this.H()) {
|
||||||
int j = MathHelper.floor(this.locX);
|
int j = MathHelper.floor(this.locX);
|
||||||
|
|
||||||
i = MathHelper.floor(this.locY - 0.20000000298023224D - (double) this.height);
|
i = MathHelper.floor(this.locY - 0.20000000298023224D - (double) this.height);
|
||||||
@ -296,7 +333,7 @@ public abstract class Entity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.H();
|
this.I();
|
||||||
if (this.world.isStatic) {
|
if (this.world.isStatic) {
|
||||||
this.fireTicks = 0;
|
this.fireTicks = 0;
|
||||||
} else if (this.fireTicks > 0) {
|
} else if (this.fireTicks > 0) {
|
||||||
@ -314,13 +351,13 @@ public abstract class Entity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.I()) {
|
if (this.J()) {
|
||||||
this.z();
|
this.A();
|
||||||
this.fallDistance *= 0.5F;
|
this.fallDistance *= 0.5F;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.locY < -64.0D) {
|
if (this.locY < -64.0D) {
|
||||||
this.B();
|
this.C();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.world.isStatic) {
|
if (!this.world.isStatic) {
|
||||||
@ -331,11 +368,11 @@ public abstract class Entity {
|
|||||||
this.world.methodProfiler.b();
|
this.world.methodProfiler.b();
|
||||||
}
|
}
|
||||||
|
|
||||||
public int y() {
|
public int z() {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void z() {
|
protected void A() {
|
||||||
if (!this.fireProof) {
|
if (!this.fireProof) {
|
||||||
// CraftBukkit start - Fallen in lava TODO: this event spams!
|
// CraftBukkit start - Fallen in lava TODO: this event spams!
|
||||||
if (this instanceof EntityLiving) {
|
if (this instanceof EntityLiving) {
|
||||||
@ -387,7 +424,7 @@ public abstract class Entity {
|
|||||||
this.fireTicks = 0;
|
this.fireTicks = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void B() {
|
protected void C() {
|
||||||
this.die();
|
this.die();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -658,7 +695,7 @@ public abstract class Entity {
|
|||||||
this.S = (float) ((double) this.S + (double) MathHelper.sqrt(d10 * d10 + d11 * d11 + d12 * d12) * 0.6D);
|
this.S = (float) ((double) this.S + (double) MathHelper.sqrt(d10 * d10 + d11 * d11 + d12 * d12) * 0.6D);
|
||||||
if (this.S > (float) this.c && j1 > 0) {
|
if (this.S > (float) this.c && j1 > 0) {
|
||||||
this.c = (int) this.S + 1;
|
this.c = (int) this.S + 1;
|
||||||
if (this.G()) {
|
if (this.H()) {
|
||||||
float f = MathHelper.sqrt(this.motX * this.motX * 0.20000000298023224D + this.motY * this.motY + this.motZ * this.motZ * 0.20000000298023224D) * 0.35F;
|
float f = MathHelper.sqrt(this.motX * this.motX * 0.20000000298023224D + this.motY * this.motY + this.motZ * this.motZ * 0.20000000298023224D) * 0.35F;
|
||||||
|
|
||||||
if (f > 1.0F) {
|
if (f > 1.0F) {
|
||||||
@ -674,7 +711,7 @@ public abstract class Entity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
this.C();
|
this.D();
|
||||||
} catch (Throwable throwable) {
|
} catch (Throwable throwable) {
|
||||||
CrashReport crashreport = CrashReport.a(throwable, "Checking entity tile collision");
|
CrashReport crashreport = CrashReport.a(throwable, "Checking entity tile collision");
|
||||||
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being checked for collision");
|
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being checked for collision");
|
||||||
@ -683,7 +720,7 @@ public abstract class Entity {
|
|||||||
throw new ReportedException(crashreport);
|
throw new ReportedException(crashreport);
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean flag2 = this.F();
|
boolean flag2 = this.G();
|
||||||
|
|
||||||
if (this.world.e(this.boundingBox.shrink(0.001D, 0.001D, 0.001D))) {
|
if (this.world.e(this.boundingBox.shrink(0.001D, 0.001D, 0.001D))) {
|
||||||
this.burn(1);
|
this.burn(1);
|
||||||
@ -715,7 +752,7 @@ public abstract class Entity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void C() {
|
protected void D() {
|
||||||
int i = MathHelper.floor(this.boundingBox.a + 0.001D);
|
int i = MathHelper.floor(this.boundingBox.a + 0.001D);
|
||||||
int j = MathHelper.floor(this.boundingBox.b + 0.001D);
|
int j = MathHelper.floor(this.boundingBox.b + 0.001D);
|
||||||
int k = MathHelper.floor(this.boundingBox.c + 0.001D);
|
int k = MathHelper.floor(this.boundingBox.c + 0.001D);
|
||||||
@ -776,7 +813,7 @@ public abstract class Entity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public AxisAlignedBB D() {
|
public AxisAlignedBB E() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -796,15 +833,15 @@ public abstract class Entity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean F() {
|
|
||||||
return this.inWater || this.world.F(MathHelper.floor(this.locX), MathHelper.floor(this.locY), MathHelper.floor(this.locZ)) || this.world.F(MathHelper.floor(this.locX), MathHelper.floor(this.locY + (double) this.length), MathHelper.floor(this.locZ));
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean G() {
|
public boolean G() {
|
||||||
return this.inWater;
|
return this.inWater || this.world.isRainingAt(MathHelper.floor(this.locX), MathHelper.floor(this.locY), MathHelper.floor(this.locZ)) || this.world.isRainingAt(MathHelper.floor(this.locX), MathHelper.floor(this.locY + (double) this.length), MathHelper.floor(this.locZ));
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean H() {
|
public boolean H() {
|
||||||
|
return this.inWater;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean I() {
|
||||||
if (this.world.a(this.boundingBox.grow(0.0D, -0.4000000059604645D, 0.0D).shrink(0.001D, 0.001D, 0.001D), Material.WATER, this)) {
|
if (this.world.a(this.boundingBox.grow(0.0D, -0.4000000059604645D, 0.0D).shrink(0.001D, 0.001D, 0.001D), Material.WATER, this)) {
|
||||||
if (!this.inWater && !this.justCreated) {
|
if (!this.inWater && !this.justCreated) {
|
||||||
float f = MathHelper.sqrt(this.motX * this.motX * 0.20000000298023224D + this.motY * this.motY + this.motZ * this.motZ * 0.20000000298023224D) * 0.2F;
|
float f = MathHelper.sqrt(this.motX * this.motX * 0.20000000298023224D + this.motY * this.motY + this.motZ * this.motZ * 0.20000000298023224D) * 0.2F;
|
||||||
@ -864,7 +901,7 @@ public abstract class Entity {
|
|||||||
return 0.0F;
|
return 0.0F;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean I() {
|
public boolean J() {
|
||||||
return this.world.a(this.boundingBox.grow(-0.10000000149011612D, -0.4000000059604645D, -0.10000000149011612D), Material.LAVA);
|
return this.world.a(this.boundingBox.grow(-0.10000000149011612D, -0.4000000059604645D, -0.10000000149011612D), Material.LAVA);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1013,7 +1050,7 @@ public abstract class Entity {
|
|||||||
this.an = true;
|
this.an = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void J() {
|
protected void K() {
|
||||||
this.velocityChanged = true;
|
this.velocityChanged = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1021,23 +1058,23 @@ public abstract class Entity {
|
|||||||
if (this.isInvulnerable()) {
|
if (this.isInvulnerable()) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
this.J();
|
this.K();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean K() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean L() {
|
public boolean L() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean M() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public void b(Entity entity, int i) {}
|
public void b(Entity entity, int i) {}
|
||||||
|
|
||||||
public boolean c(NBTTagCompound nbttagcompound) {
|
public boolean c(NBTTagCompound nbttagcompound) {
|
||||||
String s = this.P();
|
String s = this.Q();
|
||||||
|
|
||||||
if (!this.dead && s != null) {
|
if (!this.dead && s != null) {
|
||||||
nbttagcompound.setString("id", s);
|
nbttagcompound.setString("id", s);
|
||||||
@ -1049,7 +1086,7 @@ public abstract class Entity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean d(NBTTagCompound nbttagcompound) {
|
public boolean d(NBTTagCompound nbttagcompound) {
|
||||||
String s = this.P();
|
String s = this.Q();
|
||||||
|
|
||||||
if (!this.dead && s != null && this.passenger == null) {
|
if (!this.dead && s != null && this.passenger == null) {
|
||||||
nbttagcompound.setString("id", s);
|
nbttagcompound.setString("id", s);
|
||||||
@ -1150,7 +1187,7 @@ public abstract class Entity {
|
|||||||
this.setPosition(this.locX, this.locY, this.locZ);
|
this.setPosition(this.locX, this.locY, this.locZ);
|
||||||
this.b(this.yaw, this.pitch);
|
this.b(this.yaw, this.pitch);
|
||||||
this.a(nbttagcompound);
|
this.a(nbttagcompound);
|
||||||
if (this.O()) {
|
if (this.P()) {
|
||||||
this.setPosition(this.locX, this.locY, this.locZ);
|
this.setPosition(this.locX, this.locY, this.locZ);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1199,7 +1236,7 @@ public abstract class Entity {
|
|||||||
|
|
||||||
if (bworld == null) {
|
if (bworld == null) {
|
||||||
EntityPlayer entityPlayer = (EntityPlayer) this;
|
EntityPlayer entityPlayer = (EntityPlayer) this;
|
||||||
bworld = ((org.bukkit.craftbukkit.v1_6_R2.CraftServer) server).getServer().getWorldServer(entityPlayer.dimension).getWorld();
|
bworld = ((org.bukkit.craftbukkit.v1_6_R3.CraftServer) server).getServer().getWorldServer(entityPlayer.dimension).getWorld();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.spawnIn(bworld == null ? null : ((CraftWorld) bworld).getHandle());
|
this.spawnIn(bworld == null ? null : ((CraftWorld) bworld).getHandle());
|
||||||
@ -1214,11 +1251,11 @@ public abstract class Entity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean O() {
|
protected boolean P() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected final String P() {
|
protected final String Q() {
|
||||||
return EntityTypes.b(this);
|
return EntityTypes.b(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1226,7 +1263,7 @@ public abstract class Entity {
|
|||||||
|
|
||||||
protected abstract void b(NBTTagCompound nbttagcompound);
|
protected abstract void b(NBTTagCompound nbttagcompound);
|
||||||
|
|
||||||
public void Q() {}
|
public void R() {}
|
||||||
|
|
||||||
protected NBTTagList a(double... adouble) {
|
protected NBTTagList a(double... adouble) {
|
||||||
NBTTagList nbttaglist = new NBTTagList();
|
NBTTagList nbttaglist = new NBTTagList();
|
||||||
@ -1305,7 +1342,7 @@ public abstract class Entity {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void U() {
|
public void V() {
|
||||||
if (this.vehicle.dead) {
|
if (this.vehicle.dead) {
|
||||||
this.vehicle = null;
|
this.vehicle = null;
|
||||||
} else {
|
} else {
|
||||||
@ -1314,7 +1351,7 @@ public abstract class Entity {
|
|||||||
this.motZ = 0.0D;
|
this.motZ = 0.0D;
|
||||||
this.l_();
|
this.l_();
|
||||||
if (this.vehicle != null) {
|
if (this.vehicle != null) {
|
||||||
this.vehicle.V();
|
this.vehicle.W();
|
||||||
this.g += (double) (this.vehicle.yaw - this.vehicle.lastYaw);
|
this.g += (double) (this.vehicle.yaw - this.vehicle.lastYaw);
|
||||||
|
|
||||||
for (this.f += (double) (this.vehicle.pitch - this.vehicle.lastPitch); this.g >= 180.0D; this.g -= 360.0D) {
|
for (this.f += (double) (this.vehicle.pitch - this.vehicle.lastPitch); this.g >= 180.0D; this.g -= 360.0D) {
|
||||||
@ -1359,17 +1396,17 @@ public abstract class Entity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void V() {
|
public void W() {
|
||||||
if (this.passenger != null) {
|
if (this.passenger != null) {
|
||||||
this.passenger.setPosition(this.locX, this.locY + this.X() + this.passenger.W(), this.locZ);
|
this.passenger.setPosition(this.locX, this.locY + this.Y() + this.passenger.X(), this.locZ);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public double W() {
|
public double X() {
|
||||||
return (double) this.height;
|
return (double) this.height;
|
||||||
}
|
}
|
||||||
|
|
||||||
public double X() {
|
public double Y() {
|
||||||
return (double) this.length * 0.75D;
|
return (double) this.length * 0.75D;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1458,17 +1495,17 @@ public abstract class Entity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public float Y() {
|
public float Z() {
|
||||||
return 0.1F;
|
return 0.1F;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Vec3D Z() {
|
public Vec3D aa() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void aa() {
|
public void ab() {
|
||||||
if (this.portalCooldown > 0) {
|
if (this.portalCooldown > 0) {
|
||||||
this.portalCooldown = this.ab();
|
this.portalCooldown = this.ac();
|
||||||
} else {
|
} else {
|
||||||
double d0 = this.lastX - this.locX;
|
double d0 = this.lastX - this.locX;
|
||||||
double d1 = this.lastZ - this.locZ;
|
double d1 = this.lastZ - this.locZ;
|
||||||
@ -1481,7 +1518,7 @@ public abstract class Entity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public int ab() {
|
public int ac() {
|
||||||
return 900;
|
return 900;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1495,7 +1532,7 @@ public abstract class Entity {
|
|||||||
return !this.fireProof && (this.fireTicks > 0 || this.f(0));
|
return !this.fireProof && (this.fireTicks > 0 || this.f(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean af() {
|
public boolean ag() {
|
||||||
return this.vehicle != null;
|
return this.vehicle != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1564,7 +1601,7 @@ public abstract class Entity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EntityDamageEvent event = org.bukkit.craftbukkit.v1_6_R2.event.CraftEventFactory.callEntityDamageEvent(entitylightning, this, EntityDamageEvent.DamageCause.LIGHTNING, 5D);
|
EntityDamageEvent event = org.bukkit.craftbukkit.v1_6_R3.event.CraftEventFactory.callEntityDamageEvent(entitylightning, this, EntityDamageEvent.DamageCause.LIGHTNING, 5D);
|
||||||
if (event.isCancelled()) {
|
if (event.isCancelled()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1662,7 +1699,7 @@ public abstract class Entity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void al() {
|
public void am() {
|
||||||
this.K = true;
|
this.K = true;
|
||||||
this.fallDistance = 0.0F;
|
this.fallDistance = 0.0F;
|
||||||
}
|
}
|
||||||
@ -1677,7 +1714,7 @@ public abstract class Entity {
|
|||||||
return LocaleI18n.get("entity." + s + ".name");
|
return LocaleI18n.get("entity." + s + ".name");
|
||||||
}
|
}
|
||||||
|
|
||||||
public Entity[] an() {
|
public Entity[] ao() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1689,7 +1726,7 @@ public abstract class Entity {
|
|||||||
return 0.0F;
|
return 0.0F;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean ap() {
|
public boolean aq() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1738,7 +1775,7 @@ public abstract class Entity {
|
|||||||
Location exit = exitWorld != null ? minecraftserver.getPlayerList().calculateTarget(enter, minecraftserver.getWorldServer(i)) : null;
|
Location exit = exitWorld != null ? minecraftserver.getPlayerList().calculateTarget(enter, minecraftserver.getWorldServer(i)) : null;
|
||||||
boolean useTravelAgent = exitWorld != null && !(this.dimension == 1 && exitWorld.dimension == 1); // don't use agent for custom worlds or return from THE_END
|
boolean useTravelAgent = exitWorld != null && !(this.dimension == 1 && exitWorld.dimension == 1); // don't use agent for custom worlds or return from THE_END
|
||||||
|
|
||||||
TravelAgent agent = exit != null ? (TravelAgent) ((CraftWorld) exit.getWorld()).getHandle().t() : org.bukkit.craftbukkit.v1_6_R2.CraftTravelAgent.DEFAULT; // return arbitrary TA to compensate for implementation dependent plugins
|
TravelAgent agent = exit != null ? (TravelAgent) ((CraftWorld) exit.getWorld()).getHandle().t() : org.bukkit.craftbukkit.v1_6_R3.CraftTravelAgent.DEFAULT; // return arbitrary TA to compensate for implementation dependent plugins
|
||||||
EntityPortalEvent event = new EntityPortalEvent(this.getBukkitEntity(), enter, exit, agent);
|
EntityPortalEvent event = new EntityPortalEvent(this.getBukkitEntity(), enter, exit, agent);
|
||||||
event.useTravelAgent(useTravelAgent);
|
event.useTravelAgent(useTravelAgent);
|
||||||
event.getEntity().getServer().getPluginManager().callEvent(event);
|
event.getEntity().getServer().getPluginManager().callEvent(event);
|
||||||
@ -1811,15 +1848,15 @@ public abstract class Entity {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int ar() {
|
public int as() {
|
||||||
return 3;
|
return 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int as() {
|
public int at() {
|
||||||
return this.as;
|
return this.as;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean at() {
|
public boolean au() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1836,7 +1873,7 @@ public abstract class Entity {
|
|||||||
return this.uniqueID;
|
return this.uniqueID;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean aw() {
|
public boolean ax() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -1,4 +1,14 @@
|
|||||||
package net.minecraft.server.v1_6_R2;
|
package net.minecraft.server.v1_6_R3;
|
||||||
|
|
||||||
|
import net.minecraft.server.v1_6_R3.DamageSource;
|
||||||
|
import net.minecraft.server.v1_6_R3.Entity;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityHuman;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityMonster;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntitySmallFireball;
|
||||||
|
import net.minecraft.server.v1_6_R3.GenericAttributes;
|
||||||
|
import net.minecraft.server.v1_6_R3.Item;
|
||||||
|
import net.minecraft.server.v1_6_R3.MathHelper;
|
||||||
|
import net.minecraft.server.v1_6_R3.World;
|
||||||
|
|
||||||
public class EntityBlaze extends EntityMonster {
|
public class EntityBlaze extends EntityMonster {
|
||||||
|
|
||||||
@ -12,8 +22,8 @@ public class EntityBlaze extends EntityMonster {
|
|||||||
this.b = 10;
|
this.b = 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void ay() {
|
protected void az() {
|
||||||
super.ay();
|
super.az();
|
||||||
this.getAttributeInstance(GenericAttributes.e).setValue(6.0D);
|
this.getAttributeInstance(GenericAttributes.e).setValue(6.0D);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -26,11 +36,11 @@ public class EntityBlaze extends EntityMonster {
|
|||||||
return "mob.blaze.breathe";
|
return "mob.blaze.breathe";
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String aN() {
|
protected String aO() {
|
||||||
return "mob.blaze.hit";
|
return "mob.blaze.hit";
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String aO() {
|
protected String aP() {
|
||||||
return "mob.blaze.death";
|
return "mob.blaze.death";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -40,7 +50,7 @@ public class EntityBlaze extends EntityMonster {
|
|||||||
|
|
||||||
public void c() {
|
public void c() {
|
||||||
if (!this.world.isStatic) {
|
if (!this.world.isStatic) {
|
||||||
if (this.F()) {
|
if (this.G()) {
|
||||||
this.damageEntity(DamageSource.DROWN, 1.0F);
|
this.damageEntity(DamageSource.DROWN, 1.0F);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -134,7 +144,7 @@ public class EntityBlaze extends EntityMonster {
|
|||||||
loot.add(new org.bukkit.inventory.ItemStack(Item.BLAZE_ROD.id, j));
|
loot.add(new org.bukkit.inventory.ItemStack(Item.BLAZE_ROD.id, j));
|
||||||
}
|
}
|
||||||
|
|
||||||
org.bukkit.craftbukkit.v1_6_R2.event.CraftEventFactory.callEntityDeathEvent(this, loot);
|
org.bukkit.craftbukkit.v1_6_R3.event.CraftEventFactory.callEntityDeathEvent(this, loot);
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,10 +1,27 @@
|
|||||||
package net.minecraft.server.v1_6_R2;
|
package net.minecraft.server.v1_6_R3;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
import net.minecraft.server.v1_6_R3.AttributeInstance;
|
||||||
|
import net.minecraft.server.v1_6_R3.AttributeModifier;
|
||||||
|
import net.minecraft.server.v1_6_R3.Block;
|
||||||
|
import net.minecraft.server.v1_6_R3.DamageSource;
|
||||||
|
import net.minecraft.server.v1_6_R3.Entity;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityDamageSource;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityDamageSourceIndirect;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityHuman;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityMonster;
|
||||||
|
import net.minecraft.server.v1_6_R3.GenericAttributes;
|
||||||
|
import net.minecraft.server.v1_6_R3.Item;
|
||||||
|
import net.minecraft.server.v1_6_R3.ItemStack;
|
||||||
|
import net.minecraft.server.v1_6_R3.MathHelper;
|
||||||
|
import net.minecraft.server.v1_6_R3.NBTTagCompound;
|
||||||
|
import net.minecraft.server.v1_6_R3.Vec3D;
|
||||||
|
import net.minecraft.server.v1_6_R3.World;
|
||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.event.CraftEventFactory;
|
import org.bukkit.craftbukkit.v1_6_R3.event.CraftEventFactory;
|
||||||
import org.bukkit.event.entity.EntityTeleportEvent;
|
import org.bukkit.event.entity.EntityTeleportEvent;
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
@ -24,8 +41,8 @@ public class EntityEnderman extends EntityMonster {
|
|||||||
this.Y = 1.0F;
|
this.Y = 1.0F;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void ay() {
|
protected void az() {
|
||||||
super.ay();
|
super.az();
|
||||||
this.getAttributeInstance(GenericAttributes.a).setValue(40.0D);
|
this.getAttributeInstance(GenericAttributes.a).setValue(40.0D);
|
||||||
this.getAttributeInstance(GenericAttributes.d).setValue(0.30000001192092896D);
|
this.getAttributeInstance(GenericAttributes.d).setValue(0.30000001192092896D);
|
||||||
this.getAttributeInstance(GenericAttributes.e).setValue(7.0D);
|
this.getAttributeInstance(GenericAttributes.e).setValue(7.0D);
|
||||||
@ -94,7 +111,7 @@ public class EntityEnderman extends EntityMonster {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void c() {
|
public void c() {
|
||||||
if (this.F()) {
|
if (this.G()) {
|
||||||
this.damageEntity(DamageSource.DROWN, 1.0F);
|
this.damageEntity(DamageSource.DROWN, 1.0F);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -164,7 +181,7 @@ public class EntityEnderman extends EntityMonster {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.F() || this.isBurning()) {
|
if (this.G() || this.isBurning()) {
|
||||||
this.target = null;
|
this.target = null;
|
||||||
this.a(false);
|
this.a(false);
|
||||||
this.bv = false;
|
this.bv = false;
|
||||||
@ -293,11 +310,11 @@ public class EntityEnderman extends EntityMonster {
|
|||||||
return this.bX() ? "mob.endermen.scream" : "mob.endermen.idle";
|
return this.bX() ? "mob.endermen.scream" : "mob.endermen.idle";
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String aN() {
|
protected String aO() {
|
||||||
return "mob.endermen.hit";
|
return "mob.endermen.hit";
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String aO() {
|
protected String aP() {
|
||||||
return "mob.endermen.death";
|
return "mob.endermen.death";
|
||||||
}
|
}
|
||||||
|
|
@ -1,13 +1,76 @@
|
|||||||
package net.minecraft.server.v1_6_R2;
|
package net.minecraft.server.v1_6_R3;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import net.minecraft.server.v1_6_R3.AchievementList;
|
||||||
|
import net.minecraft.server.v1_6_R3.AttributeInstance;
|
||||||
|
import net.minecraft.server.v1_6_R3.AxisAlignedBB;
|
||||||
|
import net.minecraft.server.v1_6_R3.Block;
|
||||||
|
import net.minecraft.server.v1_6_R3.BlockBed;
|
||||||
|
import net.minecraft.server.v1_6_R3.ChunkCoordinates;
|
||||||
|
import net.minecraft.server.v1_6_R3.Container;
|
||||||
|
import net.minecraft.server.v1_6_R3.ContainerPlayer;
|
||||||
|
import net.minecraft.server.v1_6_R3.DamageSource;
|
||||||
|
import net.minecraft.server.v1_6_R3.EnchantmentManager;
|
||||||
|
import net.minecraft.server.v1_6_R3.EnchantmentThorns;
|
||||||
|
import net.minecraft.server.v1_6_R3.Entity;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityArrow;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityBoat;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityComplexPart;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityFishingHook;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityHorse;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityHuman;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityItem;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityLiving;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityMinecartAbstract;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityMinecartHopper;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityMonster;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityPig;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityPlayer;
|
||||||
|
import net.minecraft.server.v1_6_R3.EnumAnimation;
|
||||||
|
import net.minecraft.server.v1_6_R3.EnumBedResult;
|
||||||
|
import net.minecraft.server.v1_6_R3.EnumGamemode;
|
||||||
|
import net.minecraft.server.v1_6_R3.FoodMetaData;
|
||||||
|
import net.minecraft.server.v1_6_R3.GenericAttributes;
|
||||||
|
import net.minecraft.server.v1_6_R3.IChunkProvider;
|
||||||
|
import net.minecraft.server.v1_6_R3.ICommandListener;
|
||||||
|
import net.minecraft.server.v1_6_R3.IComplex;
|
||||||
|
import net.minecraft.server.v1_6_R3.IInventory;
|
||||||
|
import net.minecraft.server.v1_6_R3.IMerchant;
|
||||||
|
import net.minecraft.server.v1_6_R3.IMonster;
|
||||||
|
import net.minecraft.server.v1_6_R3.IScoreboardCriteria;
|
||||||
|
import net.minecraft.server.v1_6_R3.InventoryEnderChest;
|
||||||
|
import net.minecraft.server.v1_6_R3.Item;
|
||||||
|
import net.minecraft.server.v1_6_R3.ItemStack;
|
||||||
|
import net.minecraft.server.v1_6_R3.Material;
|
||||||
|
import net.minecraft.server.v1_6_R3.MathHelper;
|
||||||
|
import net.minecraft.server.v1_6_R3.MobEffectList;
|
||||||
|
import net.minecraft.server.v1_6_R3.NBTTagCompound;
|
||||||
|
import net.minecraft.server.v1_6_R3.NBTTagList;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet103SetSlot;
|
||||||
|
import net.minecraft.server.v1_6_R3.PlayerAbilities;
|
||||||
|
import net.minecraft.server.v1_6_R3.PlayerInventory;
|
||||||
|
import net.minecraft.server.v1_6_R3.Scoreboard;
|
||||||
|
import net.minecraft.server.v1_6_R3.ScoreboardScore;
|
||||||
|
import net.minecraft.server.v1_6_R3.ScoreboardTeam;
|
||||||
|
import net.minecraft.server.v1_6_R3.ScoreboardTeamBase;
|
||||||
|
import net.minecraft.server.v1_6_R3.Statistic;
|
||||||
|
import net.minecraft.server.v1_6_R3.StatisticList;
|
||||||
|
import net.minecraft.server.v1_6_R3.TileEntity;
|
||||||
|
import net.minecraft.server.v1_6_R3.TileEntityBeacon;
|
||||||
|
import net.minecraft.server.v1_6_R3.TileEntityBrewingStand;
|
||||||
|
import net.minecraft.server.v1_6_R3.TileEntityDispenser;
|
||||||
|
import net.minecraft.server.v1_6_R3.TileEntityFurnace;
|
||||||
|
import net.minecraft.server.v1_6_R3.TileEntityHopper;
|
||||||
|
import net.minecraft.server.v1_6_R3.Vec3D;
|
||||||
|
import net.minecraft.server.v1_6_R3.World;
|
||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftHumanEntity;
|
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftHumanEntity;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftItem;
|
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftItem;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.inventory.CraftItemStack;
|
import org.bukkit.craftbukkit.v1_6_R3.inventory.CraftItemStack;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.entity.EntityCombustByEntityEvent;
|
import org.bukkit.event.entity.EntityCombustByEntityEvent;
|
||||||
import org.bukkit.event.player.PlayerBedEnterEvent;
|
import org.bukkit.event.player.PlayerBedEnterEvent;
|
||||||
@ -77,9 +140,9 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
|||||||
this.maxFireTicks = 20;
|
this.maxFireTicks = 20;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void ay() {
|
protected void az() {
|
||||||
super.ay();
|
super.az();
|
||||||
this.aW().b(GenericAttributes.e).setValue(1.0D);
|
this.aX().b(GenericAttributes.e).setValue(1.0D);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void a() {
|
protected void a() {
|
||||||
@ -89,19 +152,19 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
|||||||
this.datawatcher.a(18, Integer.valueOf(0));
|
this.datawatcher.a(18, Integer.valueOf(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean bq() {
|
public boolean br() {
|
||||||
return this.f != null;
|
return this.f != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void bs() {
|
public void bt() {
|
||||||
if (this.f != null) {
|
if (this.f != null) {
|
||||||
this.f.b(this.world, this, this.g);
|
this.f.b(this.world, this, this.g);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.bt();
|
this.bu();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void bt() {
|
public void bu() {
|
||||||
this.f = null;
|
this.f = null;
|
||||||
this.g = 0;
|
this.g = 0;
|
||||||
if (!this.world.isStatic) {
|
if (!this.world.isStatic) {
|
||||||
@ -110,7 +173,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isBlocking() {
|
public boolean isBlocking() {
|
||||||
return this.bq() && Item.byId[this.f.id].c_(this.f) == EnumAnimation.BLOCK;
|
return this.br() && Item.byId[this.f.id].c_(this.f) == EnumAnimation.BLOCK;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void l_() {
|
public void l_() {
|
||||||
@ -126,7 +189,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
|||||||
this.n();
|
this.n();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.bt();
|
this.bu();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -209,11 +272,11 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public int y() {
|
public int z() {
|
||||||
return this.abilities.isInvulnerable ? 0 : 80;
|
return this.abilities.isInvulnerable ? 0 : 80;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int ab() {
|
public int ac() {
|
||||||
return 10;
|
return 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -283,11 +346,11 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.bt();
|
this.bu();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean bb() {
|
protected boolean bc() {
|
||||||
return this.getHealth() <= 0.0F || this.isSleeping();
|
return this.getHealth() <= 0.0F || this.isSleeping();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -326,7 +389,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void U() {
|
public void V() {
|
||||||
if (!this.world.isStatic && this.isSneaking()) {
|
if (!this.world.isStatic && this.isSneaking()) {
|
||||||
this.mount((Entity) null);
|
this.mount((Entity) null);
|
||||||
this.setSneaking(false);
|
this.setSneaking(false);
|
||||||
@ -337,7 +400,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
|||||||
float f = this.yaw;
|
float f = this.yaw;
|
||||||
float f1 = this.pitch;
|
float f1 = this.pitch;
|
||||||
|
|
||||||
super.U();
|
super.V();
|
||||||
this.bs = this.bt;
|
this.bs = this.bt;
|
||||||
this.bt = 0.0F;
|
this.bt = 0.0F;
|
||||||
this.k(this.locX - d0, this.locY - d1, this.locZ - d2);
|
this.k(this.locX - d0, this.locY - d1, this.locZ - d2);
|
||||||
@ -349,9 +412,9 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void bk() {
|
protected void bl() {
|
||||||
super.bh();
|
super.bl();
|
||||||
this.aV();
|
this.aW();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void c() {
|
public void c() {
|
||||||
@ -382,7 +445,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
|||||||
this.i((float) attributeinstance.getValue());
|
this.i((float) attributeinstance.getValue());
|
||||||
float f = MathHelper.sqrt(this.motX * this.motX + this.motZ * this.motZ);
|
float f = MathHelper.sqrt(this.motX * this.motX + this.motZ * this.motZ);
|
||||||
// CraftBukkit - Math -> TrigMath
|
// CraftBukkit - Math -> TrigMath
|
||||||
float f1 = (float) org.bukkit.craftbukkit.v1_6_R2.TrigMath.atan(-this.motY * 0.20000000298023224D) * 15.0F;
|
float f1 = (float) org.bukkit.craftbukkit.v1_6_R3.TrigMath.atan(-this.motY * 0.20000000298023224D) * 15.0F;
|
||||||
|
|
||||||
if (f > 0.1F) {
|
if (f > 0.1F) {
|
||||||
f = 0.1F;
|
f = 0.1F;
|
||||||
@ -746,11 +809,11 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
|||||||
this.inventory.a(f);
|
this.inventory.a(f);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int aP() {
|
public int aQ() {
|
||||||
return this.inventory.l();
|
return this.inventory.l();
|
||||||
}
|
}
|
||||||
|
|
||||||
public float bw() {
|
public float bx() {
|
||||||
int i = 0;
|
int i = 0;
|
||||||
ItemStack[] aitemstack = this.inventory.armor;
|
ItemStack[] aitemstack = this.inventory.armor;
|
||||||
int j = aitemstack.length;
|
int j = aitemstack.length;
|
||||||
@ -776,14 +839,14 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
|||||||
f = this.c(damagesource, f);
|
f = this.c(damagesource, f);
|
||||||
float f1 = f;
|
float f1 = f;
|
||||||
|
|
||||||
f = Math.max(f - this.bm(), 0.0F);
|
f = Math.max(f - this.bn(), 0.0F);
|
||||||
this.m(this.bm() - (f1 - f));
|
this.m(this.bn() - (f1 - f));
|
||||||
if (f != 0.0F) {
|
if (f != 0.0F) {
|
||||||
this.a(damagesource.f());
|
this.a(damagesource.f());
|
||||||
float f2 = this.getHealth();
|
float f2 = this.getHealth();
|
||||||
|
|
||||||
this.setHealth(this.getHealth() - f);
|
this.setHealth(this.getHealth() - f);
|
||||||
this.aQ().a(damagesource, f2, f);
|
this.aR().a(damagesource, f2, f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -803,7 +866,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
|||||||
public void c(ItemStack itemstack) {}
|
public void c(ItemStack itemstack) {}
|
||||||
|
|
||||||
public boolean p(Entity entity) {
|
public boolean p(Entity entity) {
|
||||||
ItemStack itemstack = this.bx();
|
ItemStack itemstack = this.by();
|
||||||
ItemStack itemstack1 = itemstack != null ? itemstack.cloneItemStack() : null;
|
ItemStack itemstack1 = itemstack != null ? itemstack.cloneItemStack() : null;
|
||||||
|
|
||||||
if (!entity.c(this)) {
|
if (!entity.c(this)) {
|
||||||
@ -815,7 +878,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
|||||||
if (itemstack.a(this, (EntityLiving) entity)) {
|
if (itemstack.a(this, (EntityLiving) entity)) {
|
||||||
// CraftBukkit - bypass infinite items; <= 0 -> == 0
|
// CraftBukkit - bypass infinite items; <= 0 -> == 0
|
||||||
if (itemstack.count == 0 && !this.abilities.canInstantlyBuild) {
|
if (itemstack.count == 0 && !this.abilities.canInstantlyBuild) {
|
||||||
this.by();
|
this.bz();
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -824,9 +887,9 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
if (itemstack != null && itemstack == this.bx()) {
|
if (itemstack != null && itemstack == this.by()) {
|
||||||
if (itemstack.count <= 0 && !this.abilities.canInstantlyBuild) {
|
if (itemstack.count <= 0 && !this.abilities.canInstantlyBuild) {
|
||||||
this.by();
|
this.bz();
|
||||||
} else if (itemstack.count < itemstack1.count && this.abilities.canInstantlyBuild) {
|
} else if (itemstack.count < itemstack1.count && this.abilities.canInstantlyBuild) {
|
||||||
itemstack.count = itemstack1.count;
|
itemstack.count = itemstack1.count;
|
||||||
}
|
}
|
||||||
@ -836,20 +899,20 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public ItemStack bx() {
|
public ItemStack by() {
|
||||||
return this.inventory.getItemInHand();
|
return this.inventory.getItemInHand();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void by() {
|
public void bz() {
|
||||||
this.inventory.setItem(this.inventory.itemInHandIndex, (ItemStack) null);
|
this.inventory.setItem(this.inventory.itemInHandIndex, (ItemStack) null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public double W() {
|
public double X() {
|
||||||
return (double) (this.height - 0.5F);
|
return (double) (this.height - 0.5F);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void attack(Entity entity) {
|
public void attack(Entity entity) {
|
||||||
if (entity.ap()) {
|
if (entity.aq()) {
|
||||||
if (!entity.i(this)) {
|
if (!entity.i(this)) {
|
||||||
float f = (float) this.getAttributeInstance(GenericAttributes.e).getValue();
|
float f = (float) this.getAttributeInstance(GenericAttributes.e).getValue();
|
||||||
int i = 0;
|
int i = 0;
|
||||||
@ -865,7 +928,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (f > 0.0F || f1 > 0.0F) {
|
if (f > 0.0F || f1 > 0.0F) {
|
||||||
boolean flag = this.fallDistance > 0.0F && !this.onGround && !this.e() && !this.G() && !this.hasEffect(MobEffectList.BLINDNESS) && this.vehicle == null && entity instanceof EntityLiving;
|
boolean flag = this.fallDistance > 0.0F && !this.onGround && !this.e() && !this.H() && !this.hasEffect(MobEffectList.BLINDNESS) && this.vehicle == null && entity instanceof EntityLiving;
|
||||||
|
|
||||||
if (flag && f > 0.0F) {
|
if (flag && f > 0.0F) {
|
||||||
f *= 1.5F;
|
f *= 1.5F;
|
||||||
@ -917,7 +980,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ItemStack itemstack = this.bx();
|
ItemStack itemstack = this.by();
|
||||||
Object object = entity;
|
Object object = entity;
|
||||||
|
|
||||||
if (entity instanceof EntityComplexPart) {
|
if (entity instanceof EntityComplexPart) {
|
||||||
@ -932,7 +995,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
|||||||
itemstack.a((EntityLiving) object, this);
|
itemstack.a((EntityLiving) object, this);
|
||||||
// CraftBukkit - bypass infinite items; <= 0 -> == 0
|
// CraftBukkit - bypass infinite items; <= 0 -> == 0
|
||||||
if (itemstack.count == 0) {
|
if (itemstack.count == 0) {
|
||||||
this.by();
|
this.bz();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1001,7 +1064,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.af()) {
|
if (this.ag()) {
|
||||||
this.mount((Entity) null);
|
this.mount((Entity) null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1201,8 +1264,8 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
|||||||
|
|
||||||
public void a(Statistic statistic, int i) {}
|
public void a(Statistic statistic, int i) {}
|
||||||
|
|
||||||
protected void bd() {
|
protected void be() {
|
||||||
super.bd();
|
super.be();
|
||||||
this.a(StatisticList.u, 1);
|
this.a(StatisticList.u, 1);
|
||||||
if (this.isSprinting()) {
|
if (this.isSprinting()) {
|
||||||
this.a(0.8F);
|
this.a(0.8F);
|
||||||
@ -1231,7 +1294,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
|||||||
this.checkMovement(this.locX - d0, this.locY - d1, this.locZ - d2);
|
this.checkMovement(this.locX - d0, this.locY - d1, this.locZ - d2);
|
||||||
}
|
}
|
||||||
|
|
||||||
public float bf() {
|
public float bg() {
|
||||||
return (float) this.getAttributeInstance(GenericAttributes.d).getValue();
|
return (float) this.getAttributeInstance(GenericAttributes.d).getValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1245,7 +1308,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
|||||||
this.a(StatisticList.q, i);
|
this.a(StatisticList.q, i);
|
||||||
this.a(0.015F * (float) i * 0.01F);
|
this.a(0.015F * (float) i * 0.01F);
|
||||||
}
|
}
|
||||||
} else if (this.G()) {
|
} else if (this.H()) {
|
||||||
i = Math.round(MathHelper.sqrt(d0 * d0 + d2 * d2) * 100.0F);
|
i = Math.round(MathHelper.sqrt(d0 * d0 + d2 * d2) * 100.0F);
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
this.a(StatisticList.m, i);
|
this.a(StatisticList.m, i);
|
||||||
@ -1311,9 +1374,9 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void al() {
|
public void am() {
|
||||||
if (!this.abilities.isFlying) {
|
if (!this.abilities.isFlying) {
|
||||||
super.al();
|
super.am();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1373,7 +1436,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
|||||||
return (flag || this.foodData.c()) && !this.abilities.isInvulnerable;
|
return (flag || this.foodData.c()) && !this.abilities.isInvulnerable;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean bI() {
|
public boolean bJ() {
|
||||||
return this.getHealth() > 0.0F && this.getHealth() < this.getMaxHealth(); // CraftBukkit - this.getMaxHealth() -> this.maxHealth
|
return this.getHealth() > 0.0F && this.getHealth() < this.getMaxHealth(); // CraftBukkit - this.getMaxHealth() -> this.maxHealth
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1400,8 +1463,8 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.bx() != null) {
|
if (this.by() != null) {
|
||||||
ItemStack itemstack = this.bx();
|
ItemStack itemstack = this.by();
|
||||||
|
|
||||||
if (itemstack.b(block) || itemstack.a(block) > 1.0F) {
|
if (itemstack.b(block) || itemstack.a(block) > 1.0F) {
|
||||||
return true;
|
return true;
|
||||||
@ -1480,7 +1543,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
|||||||
return i == 0 ? this.inventory.getItemInHand() : this.inventory.armor[i - 1];
|
return i == 0 ? this.inventory.getItemInHand() : this.inventory.armor[i - 1];
|
||||||
}
|
}
|
||||||
|
|
||||||
public ItemStack aY() {
|
public ItemStack aZ() {
|
||||||
return this.inventory.getItemInHand();
|
return this.inventory.getItemInHand();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1492,7 +1555,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
|||||||
return this.inventory.armor;
|
return this.inventory.armor;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean av() {
|
public boolean ax() {
|
||||||
return !this.abilities.isFlying;
|
return !this.abilities.isFlying;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1517,7 +1580,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
|||||||
this.getDataWatcher().watch(17, Float.valueOf(f));
|
this.getDataWatcher().watch(17, Float.valueOf(f));
|
||||||
}
|
}
|
||||||
|
|
||||||
public float bm() {
|
public float bn() {
|
||||||
return this.getDataWatcher().getFloat(17);
|
return this.getDataWatcher().getFloat(17);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,11 +1,47 @@
|
|||||||
package net.minecraft.server.v1_6_R2;
|
package net.minecraft.server.v1_6_R3;
|
||||||
|
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
import net.minecraft.server.v1_6_R3.AttributeModifier;
|
||||||
|
import net.minecraft.server.v1_6_R3.Block;
|
||||||
|
import net.minecraft.server.v1_6_R3.ControllerJump;
|
||||||
|
import net.minecraft.server.v1_6_R3.ControllerLook;
|
||||||
|
import net.minecraft.server.v1_6_R3.ControllerMove;
|
||||||
|
import net.minecraft.server.v1_6_R3.EnchantmentManager;
|
||||||
|
import net.minecraft.server.v1_6_R3.Entity;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityAIBodyControl;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityCreeper;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityGhast;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityHanging;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityHuman;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityItem;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityLeash;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityLiving;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityPlayer;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntitySenses;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityTameableAnimal;
|
||||||
|
import net.minecraft.server.v1_6_R3.GenericAttributes;
|
||||||
|
import net.minecraft.server.v1_6_R3.GroupDataEntity;
|
||||||
|
import net.minecraft.server.v1_6_R3.IMonster;
|
||||||
|
import net.minecraft.server.v1_6_R3.Item;
|
||||||
|
import net.minecraft.server.v1_6_R3.ItemArmor;
|
||||||
|
import net.minecraft.server.v1_6_R3.ItemStack;
|
||||||
|
import net.minecraft.server.v1_6_R3.ItemSword;
|
||||||
|
import net.minecraft.server.v1_6_R3.MathHelper;
|
||||||
|
import net.minecraft.server.v1_6_R3.NBTTagCompound;
|
||||||
|
import net.minecraft.server.v1_6_R3.NBTTagFloat;
|
||||||
|
import net.minecraft.server.v1_6_R3.NBTTagList;
|
||||||
|
import net.minecraft.server.v1_6_R3.Navigation;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet39AttachEntity;
|
||||||
|
import net.minecraft.server.v1_6_R3.PathfinderGoalSelector;
|
||||||
|
import net.minecraft.server.v1_6_R3.World;
|
||||||
|
import net.minecraft.server.v1_6_R3.WorldServer;
|
||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.event.CraftEventFactory;
|
import org.bukkit.craftbukkit.v1_6_R3.event.CraftEventFactory;
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
public abstract class EntityInsentient extends EntityLiving {
|
public abstract class EntityInsentient extends EntityLiving {
|
||||||
@ -50,9 +86,9 @@ public abstract class EntityInsentient extends EntityLiving {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void ay() {
|
protected void az() {
|
||||||
super.ay();
|
super.az();
|
||||||
this.aW().b(GenericAttributes.b).setValue(16.0D);
|
this.aX().b(GenericAttributes.b).setValue(16.0D);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ControllerLook getControllerLook() {
|
public ControllerLook getControllerLook() {
|
||||||
@ -103,12 +139,12 @@ public abstract class EntityInsentient extends EntityLiving {
|
|||||||
String s = this.r();
|
String s = this.r();
|
||||||
|
|
||||||
if (s != null) {
|
if (s != null) {
|
||||||
this.makeSound(s, this.aZ(), this.ba());
|
this.makeSound(s, this.ba(), this.bb());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void x() {
|
public void y() {
|
||||||
super.x();
|
super.y();
|
||||||
this.world.methodProfiler.a("mobBaseTick");
|
this.world.methodProfiler.a("mobBaseTick");
|
||||||
if (this.isAlive() && this.random.nextInt(1000) < this.a_++) {
|
if (this.isAlive() && this.random.nextInt(1000) < this.a_++) {
|
||||||
this.a_ = -this.o();
|
this.a_ = -this.o();
|
||||||
@ -154,7 +190,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected float f(float f, float f1) {
|
protected float f(float f, float f1) {
|
||||||
if (this.be()) {
|
if (this.bf()) {
|
||||||
this.bn.a();
|
this.bn.a();
|
||||||
return f1;
|
return f1;
|
||||||
} else {
|
} else {
|
||||||
@ -194,7 +230,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
|||||||
if (k < 5) {
|
if (k < 5) {
|
||||||
ItemStack itemstack = this.l(k <= 0 ? 1 : 0);
|
ItemStack itemstack = this.l(k <= 0 ? 1 : 0);
|
||||||
if (itemstack != null) {
|
if (itemstack != null) {
|
||||||
loot.add(org.bukkit.craftbukkit.v1_6_R2.inventory.CraftItemStack.asCraftMirror(itemstack));
|
loot.add(org.bukkit.craftbukkit.v1_6_R3.inventory.CraftItemStack.asCraftMirror(itemstack));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -371,7 +407,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
|||||||
this.world.methodProfiler.b();
|
this.world.methodProfiler.b();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean be() {
|
protected boolean bf() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -379,7 +415,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void bo() {
|
protected void u() {
|
||||||
if (this.persistent) {
|
if (this.persistent) {
|
||||||
this.aV = 0;
|
this.aV = 0;
|
||||||
} else {
|
} else {
|
||||||
@ -404,10 +440,10 @@ public abstract class EntityInsentient extends EntityLiving {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void bh() {
|
protected void bi() {
|
||||||
++this.aV;
|
++this.aV;
|
||||||
this.world.methodProfiler.a("checkDespawn");
|
this.world.methodProfiler.a("checkDespawn");
|
||||||
this.bo();
|
this.u();
|
||||||
this.world.methodProfiler.b();
|
this.world.methodProfiler.b();
|
||||||
this.world.methodProfiler.a("sensing");
|
this.world.methodProfiler.a("sensing");
|
||||||
this.bq.a();
|
this.bq.a();
|
||||||
@ -422,7 +458,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
|||||||
this.navigation.f();
|
this.navigation.f();
|
||||||
this.world.methodProfiler.b();
|
this.world.methodProfiler.b();
|
||||||
this.world.methodProfiler.a("mob tick");
|
this.world.methodProfiler.a("mob tick");
|
||||||
this.bj();
|
this.bk();
|
||||||
this.world.methodProfiler.b();
|
this.world.methodProfiler.b();
|
||||||
this.world.methodProfiler.a("controls");
|
this.world.methodProfiler.a("controls");
|
||||||
this.world.methodProfiler.a("move");
|
this.world.methodProfiler.a("move");
|
||||||
@ -435,11 +471,11 @@ public abstract class EntityInsentient extends EntityLiving {
|
|||||||
this.world.methodProfiler.b();
|
this.world.methodProfiler.b();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void bk() {
|
protected void bl() {
|
||||||
super.bk();
|
super.bl();
|
||||||
this.be = 0.0F;
|
this.be = 0.0F;
|
||||||
this.bf = 0.0F;
|
this.bf = 0.0F;
|
||||||
this.bo();
|
this.u();
|
||||||
float f = 8.0F;
|
float f = 8.0F;
|
||||||
|
|
||||||
if (this.random.nextFloat() < 0.02F) {
|
if (this.random.nextFloat() < 0.02F) {
|
||||||
@ -467,8 +503,8 @@ public abstract class EntityInsentient extends EntityLiving {
|
|||||||
this.pitch = this.f;
|
this.pitch = this.f;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean flag = this.G();
|
boolean flag = this.H();
|
||||||
boolean flag1 = this.I();
|
boolean flag1 = this.J();
|
||||||
|
|
||||||
if (flag || flag1) {
|
if (flag || flag1) {
|
||||||
this.bd = this.random.nextFloat() < 0.8F;
|
this.bd = this.random.nextFloat() < 0.8F;
|
||||||
@ -522,7 +558,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
|||||||
return 4;
|
return 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int ar() {
|
public int as() {
|
||||||
if (this.getGoalTarget() == null) {
|
if (this.getGoalTarget() == null) {
|
||||||
return 3;
|
return 3;
|
||||||
} else {
|
} else {
|
||||||
@ -537,7 +573,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public ItemStack aY() {
|
public ItemStack aZ() {
|
||||||
return this.equipment[0];
|
return this.equipment[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -704,8 +740,8 @@ public abstract class EntityInsentient extends EntityLiving {
|
|||||||
protected void bx() {
|
protected void bx() {
|
||||||
float f = this.world.b(this.locX, this.locY, this.locZ);
|
float f = this.world.b(this.locX, this.locY, this.locZ);
|
||||||
|
|
||||||
if (this.aY() != null && this.random.nextFloat() < 0.25F * f) {
|
if (this.aZ() != null && this.random.nextFloat() < 0.25F * f) {
|
||||||
EnchantmentManager.a(this.random, this.aY(), (int) (5.0F + f * (float) this.random.nextInt(18)));
|
EnchantmentManager.a(this.random, this.aZ(), (int) (5.0F + f * (float) this.random.nextInt(18)));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < 4; ++i) {
|
for (int i = 0; i < 4; ++i) {
|
||||||
@ -771,21 +807,39 @@ public abstract class EntityInsentient extends EntityLiving {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public final boolean c(EntityHuman entityhuman) {
|
public final boolean c(EntityHuman entityhuman) {
|
||||||
if (this.bH() && this.bI() == entityhuman) {
|
if (this.bH() && this.getLeashHolder() == entityhuman) {
|
||||||
this.a(true, !entityhuman.abilities.canInstantlyBuild);
|
// CraftBukkit start
|
||||||
|
if (CraftEventFactory.callPlayerUnleashEntityEvent(this, entityhuman).isCancelled()) {
|
||||||
|
((EntityPlayer)entityhuman).playerConnection.sendPacket(new Packet39AttachEntity(1, this, this.getLeashHolder()));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// CraftBukkit end
|
||||||
|
this.unleash(true, !entityhuman.abilities.canInstantlyBuild);
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
ItemStack itemstack = entityhuman.inventory.getItemInHand();
|
ItemStack itemstack = entityhuman.inventory.getItemInHand();
|
||||||
|
|
||||||
if (itemstack != null && itemstack.id == Item.LEASH.id && this.bG()) {
|
if (itemstack != null && itemstack.id == Item.LEASH.id && this.bG()) {
|
||||||
if (!(this instanceof EntityTameableAnimal) || !((EntityTameableAnimal) this).isTamed()) {
|
if (!(this instanceof EntityTameableAnimal) || !((EntityTameableAnimal) this).isTamed()) {
|
||||||
this.b(entityhuman, true);
|
// CraftBukkit start
|
||||||
|
if (CraftEventFactory.callPlayerLeashEntityEvent(this, entityhuman, entityhuman).isCancelled()) {
|
||||||
|
((EntityPlayer)entityhuman).playerConnection.sendPacket(new Packet39AttachEntity(1, this, this.getLeashHolder()));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// CraftBukkit end
|
||||||
|
this.setLeashHolder(entityhuman, true);
|
||||||
--itemstack.count;
|
--itemstack.count;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entityhuman.getName().equalsIgnoreCase(((EntityTameableAnimal) this).getOwnerName())) {
|
if (entityhuman.getName().equalsIgnoreCase(((EntityTameableAnimal) this).getOwnerName())) {
|
||||||
this.b(entityhuman, true);
|
// CraftBukkit start
|
||||||
|
if (CraftEventFactory.callPlayerLeashEntityEvent(this, entityhuman, entityhuman).isCancelled()) {
|
||||||
|
((EntityPlayer)entityhuman).playerConnection.sendPacket(new Packet39AttachEntity(1, this, this.getLeashHolder()));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// CraftBukkit end
|
||||||
|
this.setLeashHolder(entityhuman, true);
|
||||||
--itemstack.count;
|
--itemstack.count;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -806,12 +860,12 @@ public abstract class EntityInsentient extends EntityLiving {
|
|||||||
|
|
||||||
if (this.bv) {
|
if (this.bv) {
|
||||||
if (this.bw == null || this.bw.dead) {
|
if (this.bw == null || this.bw.dead) {
|
||||||
this.a(true, true);
|
this.unleash(true, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(boolean flag, boolean flag1) {
|
public void unleash(boolean flag, boolean flag1) {
|
||||||
if (this.bv) {
|
if (this.bv) {
|
||||||
this.bv = false;
|
this.bv = false;
|
||||||
this.bw = null;
|
this.bw = null;
|
||||||
@ -833,11 +887,11 @@ public abstract class EntityInsentient extends EntityLiving {
|
|||||||
return this.bv;
|
return this.bv;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Entity bI() {
|
public Entity getLeashHolder() {
|
||||||
return this.bw;
|
return this.bw;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void b(Entity entity, boolean flag) {
|
public void setLeashHolder(Entity entity, boolean flag) {
|
||||||
this.bv = true;
|
this.bv = true;
|
||||||
this.bw = entity;
|
this.bw = entity;
|
||||||
if (!this.world.isStatic && flag && this.world instanceof WorldServer) {
|
if (!this.world.isStatic && flag && this.world instanceof WorldServer) {
|
||||||
@ -872,7 +926,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
|||||||
|
|
||||||
this.bw = entityleash;
|
this.bw = entityleash;
|
||||||
} else {
|
} else {
|
||||||
this.a(false, true);
|
this.unleash(false, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package net.minecraft.server.v1_6_R2;
|
package net.minecraft.server.v1_6_R3;
|
||||||
|
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.DataOutputStream;
|
import java.io.DataOutputStream;
|
||||||
@ -10,13 +10,100 @@ import java.util.Iterator;
|
|||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import net.minecraft.server.v1_6_R3.AchievementList;
|
||||||
|
import net.minecraft.server.v1_6_R3.ChatMessage;
|
||||||
|
import net.minecraft.server.v1_6_R3.Chunk;
|
||||||
|
import net.minecraft.server.v1_6_R3.ChunkCoordIntPair;
|
||||||
|
import net.minecraft.server.v1_6_R3.ChunkCoordinates;
|
||||||
|
import net.minecraft.server.v1_6_R3.CombatTracker;
|
||||||
|
import net.minecraft.server.v1_6_R3.Container;
|
||||||
|
import net.minecraft.server.v1_6_R3.ContainerAnvil;
|
||||||
|
import net.minecraft.server.v1_6_R3.ContainerBeacon;
|
||||||
|
import net.minecraft.server.v1_6_R3.ContainerBrewingStand;
|
||||||
|
import net.minecraft.server.v1_6_R3.ContainerChest;
|
||||||
|
import net.minecraft.server.v1_6_R3.ContainerDispenser;
|
||||||
|
import net.minecraft.server.v1_6_R3.ContainerEnchantTable;
|
||||||
|
import net.minecraft.server.v1_6_R3.ContainerFurnace;
|
||||||
|
import net.minecraft.server.v1_6_R3.ContainerHopper;
|
||||||
|
import net.minecraft.server.v1_6_R3.ContainerHorse;
|
||||||
|
import net.minecraft.server.v1_6_R3.ContainerMerchant;
|
||||||
|
import net.minecraft.server.v1_6_R3.ContainerWorkbench;
|
||||||
|
import net.minecraft.server.v1_6_R3.CrashReport;
|
||||||
|
import net.minecraft.server.v1_6_R3.CrashReportSystemDetails;
|
||||||
|
import net.minecraft.server.v1_6_R3.DamageSource;
|
||||||
|
import net.minecraft.server.v1_6_R3.Entity;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityArrow;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityDamageSource;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityHorse;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityHuman;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityLiving;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityMinecartHopper;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityPlayer;
|
||||||
|
import net.minecraft.server.v1_6_R3.EnumAnimation;
|
||||||
|
import net.minecraft.server.v1_6_R3.EnumBedResult;
|
||||||
|
import net.minecraft.server.v1_6_R3.EnumGamemode;
|
||||||
|
import net.minecraft.server.v1_6_R3.FoodMetaData;
|
||||||
|
import net.minecraft.server.v1_6_R3.ICrafting;
|
||||||
|
import net.minecraft.server.v1_6_R3.IInventory;
|
||||||
|
import net.minecraft.server.v1_6_R3.IMerchant;
|
||||||
|
import net.minecraft.server.v1_6_R3.IScoreboardCriteria;
|
||||||
|
import net.minecraft.server.v1_6_R3.InventoryMerchant;
|
||||||
|
import net.minecraft.server.v1_6_R3.Item;
|
||||||
|
import net.minecraft.server.v1_6_R3.ItemStack;
|
||||||
|
import net.minecraft.server.v1_6_R3.ItemWorldMapBase;
|
||||||
|
import net.minecraft.server.v1_6_R3.MathHelper;
|
||||||
|
import net.minecraft.server.v1_6_R3.MerchantRecipeList;
|
||||||
|
import net.minecraft.server.v1_6_R3.MinecraftServer;
|
||||||
|
import net.minecraft.server.v1_6_R3.MobEffect;
|
||||||
|
import net.minecraft.server.v1_6_R3.NBTTagCompound;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet100OpenWindow;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet101CloseWindow;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet103SetSlot;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet104WindowItems;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet105CraftProgressBar;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet133OpenTileEntity;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet17EntityLocationAction;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet18ArmAnimation;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet200Statistic;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet202Abilities;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet204LocaleAndViewDistance;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet250CustomPayload;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet29DestroyEntity;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet38EntityStatus;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet39AttachEntity;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet3Chat;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet41MobEffect;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet42RemoveMobEffect;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet43SetExperience;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet56MapChunkBulk;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet70Bed;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet8UpdateHealth;
|
||||||
|
import net.minecraft.server.v1_6_R3.PlayerConnection;
|
||||||
|
import net.minecraft.server.v1_6_R3.PlayerInteractManager;
|
||||||
|
import net.minecraft.server.v1_6_R3.ReportedException;
|
||||||
|
import net.minecraft.server.v1_6_R3.ScoreboardScore;
|
||||||
|
import net.minecraft.server.v1_6_R3.SlotResult;
|
||||||
|
import net.minecraft.server.v1_6_R3.Statistic;
|
||||||
|
import net.minecraft.server.v1_6_R3.StatisticList;
|
||||||
|
import net.minecraft.server.v1_6_R3.TileEntity;
|
||||||
|
import net.minecraft.server.v1_6_R3.TileEntityBeacon;
|
||||||
|
import net.minecraft.server.v1_6_R3.TileEntityBrewingStand;
|
||||||
|
import net.minecraft.server.v1_6_R3.TileEntityDispenser;
|
||||||
|
import net.minecraft.server.v1_6_R3.TileEntityDropper;
|
||||||
|
import net.minecraft.server.v1_6_R3.TileEntityFurnace;
|
||||||
|
import net.minecraft.server.v1_6_R3.TileEntityHopper;
|
||||||
|
import net.minecraft.server.v1_6_R3.TileEntitySign;
|
||||||
|
import net.minecraft.server.v1_6_R3.World;
|
||||||
|
import net.minecraft.server.v1_6_R3.WorldServer;
|
||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.WeatherType;
|
import org.bukkit.WeatherType;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.CraftWorld;
|
import org.bukkit.craftbukkit.v1_6_R3.CraftWorld;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftPlayer;
|
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftPlayer;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.event.CraftEventFactory;
|
import org.bukkit.craftbukkit.v1_6_R3.event.CraftEventFactory;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.inventory.CraftItemStack;
|
import org.bukkit.craftbukkit.v1_6_R3.inventory.CraftItemStack;
|
||||||
import org.bukkit.event.inventory.InventoryType;
|
import org.bukkit.event.inventory.InventoryType;
|
||||||
import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
|
import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
@ -40,6 +127,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
|||||||
private int bU;
|
private int bU;
|
||||||
private int bV;
|
private int bV;
|
||||||
private boolean bW = true;
|
private boolean bW = true;
|
||||||
|
private long bX = 0L;
|
||||||
private int containerCounter;
|
private int containerCounter;
|
||||||
public boolean h;
|
public boolean h;
|
||||||
public int ping;
|
public int ping;
|
||||||
@ -161,10 +249,9 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
|||||||
this.activeContainer = this.defaultContainer;
|
this.activeContainer = this.defaultContainer;
|
||||||
}
|
}
|
||||||
|
|
||||||
// CraftBukkit start - Check inventory status every tick
|
// CraftBukkit start
|
||||||
if (!this.activeContainer.a(this)) { // Should be stillValid
|
if (this.noDamageTicks > 0) {
|
||||||
this.closeInventory();
|
--this.noDamageTicks;
|
||||||
this.activeContainer = this.defaultContainer;
|
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
@ -218,6 +305,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
|||||||
this.p().getTracker().a(this, chunk);
|
this.p().getTracker().a(this, chunk);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.bX > 0L && this.server.ar() > 0 && MinecraftServer.aq() - this.bX > (long) (this.server.ar() * 1000 * 60)) {
|
||||||
|
this.playerConnection.disconnect("You have been idle for too long!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -245,8 +336,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
|||||||
this.bR = this.foodData.e() == 0.0F;
|
this.bR = this.foodData.e() == 0.0F;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.getHealth() + this.bm() != this.bO) {
|
if (this.getHealth() + this.bn() != this.bO) {
|
||||||
this.bO = this.getHealth() + this.bm();
|
this.bO = this.getHealth() + this.bn();
|
||||||
// CraftBukkit - Update ALL the scores!
|
// CraftBukkit - Update ALL the scores!
|
||||||
this.world.getServer().getScoreboardManager().updateAllScoresForList(IScoreboardCriteria.f, this.getLocalizedName(), com.google.common.collect.ImmutableList.of(this));
|
this.world.getServer().getScoreboardManager().updateAllScoresForList(IScoreboardCriteria.f, this.getLocalizedName(), com.google.common.collect.ImmutableList.of(this));
|
||||||
}
|
}
|
||||||
@ -303,7 +394,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ChatMessage chatmessage = this.aQ().b();
|
ChatMessage chatmessage = this.aR().b();
|
||||||
|
|
||||||
String deathmessage = chatmessage.toString();
|
String deathmessage = chatmessage.toString();
|
||||||
org.bukkit.event.entity.PlayerDeathEvent event = CraftEventFactory.callPlayerDeathEvent(this, loot, deathmessage);
|
org.bukkit.event.entity.PlayerDeathEvent event = CraftEventFactory.callPlayerDeathEvent(this, loot, deathmessage);
|
||||||
@ -342,7 +433,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
|||||||
scoreboardscore.incrementScore();
|
scoreboardscore.incrementScore();
|
||||||
}
|
}
|
||||||
|
|
||||||
EntityLiving entityliving = this.aR();
|
EntityLiving entityliving = this.aS();
|
||||||
|
|
||||||
if (entityliving != null) {
|
if (entityliving != null) {
|
||||||
entityliving.b(this, this.bb);
|
entityliving.b(this, this.bb);
|
||||||
@ -886,6 +977,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
|||||||
return new ChunkCoordinates(MathHelper.floor(this.locX), MathHelper.floor(this.locY + 0.5D), MathHelper.floor(this.locZ));
|
return new ChunkCoordinates(MathHelper.floor(this.locX), MathHelper.floor(this.locY + 0.5D), MathHelper.floor(this.locZ));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void u() {
|
||||||
|
this.bx = MinecraftServer.aq();
|
||||||
|
}
|
||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
public long timeOffset = 0;
|
public long timeOffset = 0;
|
||||||
public boolean relativeTime = true;
|
public boolean relativeTime = true;
|
@ -1,8 +1,23 @@
|
|||||||
package net.minecraft.server.v1_6_R2;
|
package net.minecraft.server.v1_6_R3;
|
||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftEntity;
|
import net.minecraft.server.v1_6_R3.BiomeBase;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.event.CraftEventFactory;
|
import net.minecraft.server.v1_6_R3.Chunk;
|
||||||
|
import net.minecraft.server.v1_6_R3.DamageSource;
|
||||||
|
import net.minecraft.server.v1_6_R3.Entity;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityHuman;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityInsentient;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntitySlime;
|
||||||
|
import net.minecraft.server.v1_6_R3.GenericAttributes;
|
||||||
|
import net.minecraft.server.v1_6_R3.IMonster;
|
||||||
|
import net.minecraft.server.v1_6_R3.Item;
|
||||||
|
import net.minecraft.server.v1_6_R3.MathHelper;
|
||||||
|
import net.minecraft.server.v1_6_R3.NBTTagCompound;
|
||||||
|
import net.minecraft.server.v1_6_R3.World;
|
||||||
|
import net.minecraft.server.v1_6_R3.WorldType;
|
||||||
|
|
||||||
|
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftEntity;
|
||||||
|
import org.bukkit.craftbukkit.v1_6_R3.event.CraftEventFactory;
|
||||||
import org.bukkit.event.entity.EntityTargetEvent;
|
import org.bukkit.event.entity.EntityTargetEvent;
|
||||||
import org.bukkit.event.entity.SlimeSplitEvent;
|
import org.bukkit.event.entity.SlimeSplitEvent;
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
@ -86,7 +101,7 @@ public class EntitySlime extends EntityInsentient implements IMonster {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this.bQ()) {
|
if (this.bQ()) {
|
||||||
this.makeSound(this.bP(), this.aZ(), ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F) / 0.8F);
|
this.makeSound(this.bP(), this.ba(), ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F) / 0.8F);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.h = -0.5F;
|
this.h = -0.5F;
|
||||||
@ -101,8 +116,8 @@ public class EntitySlime extends EntityInsentient implements IMonster {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void bk() {
|
protected void bl() {
|
||||||
this.bo();
|
this.u();
|
||||||
|
|
||||||
if (Vegetated)
|
if (Vegetated)
|
||||||
return;
|
return;
|
||||||
@ -136,7 +151,7 @@ public class EntitySlime extends EntityInsentient implements IMonster {
|
|||||||
|
|
||||||
this.bd = true;
|
this.bd = true;
|
||||||
if (this.bS()) {
|
if (this.bS()) {
|
||||||
this.makeSound(this.bP(), this.aZ(), ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F) * 0.8F);
|
this.makeSound(this.bP(), this.ba(), ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F) * 0.8F);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.be = 1.0F - this.random.nextFloat() * 2.0F;
|
this.be = 1.0F - this.random.nextFloat() * 2.0F;
|
||||||
@ -211,11 +226,11 @@ public class EntitySlime extends EntityInsentient implements IMonster {
|
|||||||
return this.getSize();
|
return this.getSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String aN() {
|
protected String aO() {
|
||||||
return "mob.slime." + (this.getSize() > 1 ? "big" : "small");
|
return "mob.slime." + (this.getSize() > 1 ? "big" : "small");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String aO() {
|
protected String aP() {
|
||||||
return "mob.slime." + (this.getSize() > 1 ? "big" : "small");
|
return "mob.slime." + (this.getSize() > 1 ? "big" : "small");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -245,7 +260,7 @@ public class EntitySlime extends EntityInsentient implements IMonster {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected float aZ() {
|
protected float ba() {
|
||||||
return 0.4F * (float) this.getSize();
|
return 0.4F * (float) this.getSize();
|
||||||
}
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package net.minecraft.server.v1_6_R2;
|
package net.minecraft.server.v1_6_R3;
|
||||||
|
|
||||||
import java.io.DataInput;
|
import java.io.DataInput;
|
||||||
import java.io.DataOutput;
|
import java.io.DataOutput;
|
||||||
@ -10,7 +10,99 @@ import java.util.HashSet;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.inventory.CraftItemStack; // CraftBukkit
|
import net.minecraft.server.v1_6_R3.Connection;
|
||||||
|
import net.minecraft.server.v1_6_R3.IConsoleLogManager;
|
||||||
|
import net.minecraft.server.v1_6_R3.IntHashMap;
|
||||||
|
import net.minecraft.server.v1_6_R3.ItemStack;
|
||||||
|
import net.minecraft.server.v1_6_R3.MinecraftServer;
|
||||||
|
import net.minecraft.server.v1_6_R3.NBTCompressedStreamTools;
|
||||||
|
import net.minecraft.server.v1_6_R3.NBTTagCompound;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet0KeepAlive;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet100OpenWindow;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet101CloseWindow;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet102WindowClick;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet103SetSlot;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet104WindowItems;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet105CraftProgressBar;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet106Transaction;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet107SetCreativeSlot;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet108ButtonClick;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet10Flying;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet11PlayerPosition;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet12PlayerLook;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet130UpdateSign;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet131ItemData;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet132TileEntityData;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet133OpenTileEntity;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet13PlayerLookMove;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet14BlockDig;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet15Place;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet16BlockItemSwitch;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet17EntityLocationAction;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet18ArmAnimation;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet19EntityAction;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet1Login;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet200Statistic;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet201PlayerInfo;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet202Abilities;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet203TabComplete;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet204LocaleAndViewDistance;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet205ClientCommand;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet206SetScoreboardObjective;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet207SetScoreboardScore;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet208SetScoreboardDisplayObjective;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet209SetScoreboardTeam;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet20NamedEntitySpawn;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet22Collect;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet23VehicleSpawn;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet24MobSpawn;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet250CustomPayload;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet252KeyResponse;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet253KeyRequest;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet254GetInfo;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet255KickDisconnect;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet25EntityPainting;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet26AddExpOrb;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet27PlayerInput;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet28EntityVelocity;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet29DestroyEntity;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet2Handshake;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet30Entity;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet31RelEntityMove;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet32EntityLook;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet33RelEntityMoveLook;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet34EntityTeleport;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet35EntityHeadRotation;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet38EntityStatus;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet39AttachEntity;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet3Chat;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet40EntityMetadata;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet41MobEffect;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet42RemoveMobEffect;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet43SetExperience;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet44UpdateAttributes;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet4UpdateTime;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet51MapChunk;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet52MultiBlockChange;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet53BlockChange;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet54PlayNoteBlock;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet55BlockBreakAnimation;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet56MapChunkBulk;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet5EntityEquipment;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet60Explosion;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet61WorldEvent;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet62NamedSoundEffect;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet63WorldParticles;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet6SpawnPosition;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet70Bed;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet71Weather;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet7UseEntity;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet8UpdateHealth;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet9Respawn;
|
||||||
|
import net.minecraft.server.v1_6_R3.PacketCounter;
|
||||||
|
|
||||||
|
import org.bukkit.craftbukkit.v1_6_R3.inventory.CraftItemStack; // CraftBukkit
|
||||||
|
|
||||||
public abstract class Packet {
|
public abstract class Packet {
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package net.minecraft.server.v1_6_R2;
|
package net.minecraft.server.v1_6_R3;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
@ -11,6 +11,24 @@ import java.util.List;
|
|||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import javax.crypto.SecretKey;
|
import javax.crypto.SecretKey;
|
||||||
|
|
||||||
|
import net.minecraft.server.v1_6_R3.Connection;
|
||||||
|
import net.minecraft.server.v1_6_R3.DedicatedServerConnection;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityPlayer;
|
||||||
|
import net.minecraft.server.v1_6_R3.INetworkManager;
|
||||||
|
import net.minecraft.server.v1_6_R3.MinecraftServer;
|
||||||
|
import net.minecraft.server.v1_6_R3.NetworkManager;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet1Login;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet205ClientCommand;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet252KeyResponse;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet253KeyRequest;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet254GetInfo;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet255KickDisconnect;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet2Handshake;
|
||||||
|
import net.minecraft.server.v1_6_R3.PendingConnection;
|
||||||
|
import net.minecraft.server.v1_6_R3.PlayerList;
|
||||||
|
import net.minecraft.server.v1_6_R3.StripColor;
|
||||||
|
|
||||||
public class PendingConnection extends Connection {
|
public class PendingConnection extends Connection {
|
||||||
|
|
||||||
private static Random random = new Random();
|
private static Random random = new Random();
|
||||||
@ -62,29 +80,26 @@ public class PendingConnection extends Connection {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void a(Packet2Handshake packet2handshake) {
|
public void a(Packet2Handshake packet2handshake) {
|
||||||
// CraftBukkit start
|
|
||||||
if (this.g != null) {
|
if (this.g != null) {
|
||||||
this.disconnect("Invalid username " + this.g);
|
this.disconnect("Quit repeating yourself!");
|
||||||
}
|
|
||||||
this.hostname = packet2handshake.c == null ? "" : packet2handshake.c + ':' + packet2handshake.d;
|
|
||||||
// CraftBukkit end
|
|
||||||
this.g = packet2handshake.f();
|
|
||||||
if (!this.g.equals(StripColor.a(this.g))) {
|
|
||||||
this.disconnect("Invalid username!");
|
|
||||||
} else {
|
} else {
|
||||||
PublicKey publickey = this.server.H().getPublic();
|
this.g = packet2handshake.f();
|
||||||
|
if (!this.g.equals(StripColor.a(this.g))) {
|
||||||
if (packet2handshake.d() != 74) {
|
this.disconnect("Invalid username!");
|
||||||
if (packet2handshake.d() > 74) {
|
|
||||||
this.disconnect("Outdated server!");
|
|
||||||
} else {
|
|
||||||
this.disconnect("Outdated client!");
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
this.loginKey = this.server.getOnlineMode() ? Long.toString(random.nextLong(), 16) : "-";
|
PublicKey publickey = this.server.H().getPublic();
|
||||||
this.d = new byte[4];
|
if (packet2handshake.d() != 78) {
|
||||||
random.nextBytes(this.d);
|
if (packet2handshake.d() > 78) {
|
||||||
this.networkManager.queue(new Packet253KeyRequest(this.loginKey, publickey, this.d));
|
this.disconnect("Outdated server!");
|
||||||
|
} else {
|
||||||
|
this.disconnect("Outdated client!");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.loginKey = this.server.getOnlineMode() ? Long.toString(random.nextLong(), 16) : "-";
|
||||||
|
this.d = new byte[4];
|
||||||
|
random.nextBytes(this.d);
|
||||||
|
this.networkManager.queue(new Packet253KeyRequest(this.loginKey, publickey, this.d));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -144,12 +159,12 @@ public class PendingConnection extends Connection {
|
|||||||
PlayerList playerlist = this.server.getPlayerList();
|
PlayerList playerlist = this.server.getPlayerList();
|
||||||
String s = null;
|
String s = null;
|
||||||
// CraftBukkit
|
// CraftBukkit
|
||||||
org.bukkit.event.server.ServerListPingEvent pingEvent = org.bukkit.craftbukkit.v1_6_R2.event.CraftEventFactory.callServerListPingEvent(this.server.server, getSocket().getInetAddress(), this.server.getMotd(), playerlist.getPlayerCount(), playerlist.getMaxPlayers());
|
org.bukkit.event.server.ServerListPingEvent pingEvent = org.bukkit.craftbukkit.v1_6_R3.event.CraftEventFactory.callServerListPingEvent(this.server.server, getSocket().getInetAddress(), this.server.getMotd(), playerlist.getPlayerCount(), playerlist.getMaxPlayers());
|
||||||
if (packet254getinfo.d()) {
|
if (packet254getinfo.d()) {
|
||||||
// CraftBukkit
|
// CraftBukkit
|
||||||
s = pingEvent.getMotd() + "\u00A7" + playerlist.getPlayerCount() + "\u00A7" + pingEvent.getMaxPlayers();
|
s = pingEvent.getMotd() + "\u00A7" + playerlist.getPlayerCount() + "\u00A7" + pingEvent.getMaxPlayers();
|
||||||
} else {
|
} else {
|
||||||
List list = Arrays.asList(new Serializable[] { Integer.valueOf(1), Integer.valueOf(74), this.server.getVersion(), pingEvent.getMotd(), Integer.valueOf(playerlist.getPlayerCount()), pingEvent.getMaxPlayers()});
|
List list = Arrays.asList(new Serializable[] { Integer.valueOf(1), Integer.valueOf(78), this.server.getVersion(), pingEvent.getMotd(), Integer.valueOf(playerlist.getPlayerCount()), pingEvent.getMaxPlayers()});
|
||||||
|
|
||||||
Object object;
|
Object object;
|
||||||
|
|
@ -1,8 +1,19 @@
|
|||||||
package net.minecraft.server.v1_6_R2;
|
package net.minecraft.server.v1_6_R3;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import net.minecraft.server.v1_6_R3.Chunk;
|
||||||
|
import net.minecraft.server.v1_6_R3.ChunkCoordIntPair;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityPlayer;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet51MapChunk;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet52MultiBlockChange;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet53BlockChange;
|
||||||
|
import net.minecraft.server.v1_6_R3.PlayerChunk;
|
||||||
|
import net.minecraft.server.v1_6_R3.PlayerChunkMap;
|
||||||
|
import net.minecraft.server.v1_6_R3.TileEntity;
|
||||||
|
|
||||||
class PlayerChunk {
|
class PlayerChunk {
|
||||||
|
|
||||||
private final List b;
|
private final List b;
|
@ -1,4 +1,4 @@
|
|||||||
package net.minecraft.server.v1_6_R2;
|
package net.minecraft.server.v1_6_R3;
|
||||||
|
|
||||||
import java.io.ByteArrayInputStream;
|
import java.io.ByteArrayInputStream;
|
||||||
import java.io.DataInput;
|
import java.io.DataInput;
|
||||||
@ -9,6 +9,81 @@ import java.util.Iterator;
|
|||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import java.util.concurrent.Callable;
|
import java.util.concurrent.Callable;
|
||||||
|
|
||||||
|
import net.minecraft.server.v1_6_R3.AxisAlignedBB;
|
||||||
|
import net.minecraft.server.v1_6_R3.BanEntry;
|
||||||
|
import net.minecraft.server.v1_6_R3.Block;
|
||||||
|
import net.minecraft.server.v1_6_R3.ChatMessage;
|
||||||
|
import net.minecraft.server.v1_6_R3.Connection;
|
||||||
|
import net.minecraft.server.v1_6_R3.Container;
|
||||||
|
import net.minecraft.server.v1_6_R3.ContainerAnvil;
|
||||||
|
import net.minecraft.server.v1_6_R3.ContainerBeacon;
|
||||||
|
import net.minecraft.server.v1_6_R3.ContainerMerchant;
|
||||||
|
import net.minecraft.server.v1_6_R3.CrashReport;
|
||||||
|
import net.minecraft.server.v1_6_R3.CrashReportConnectionPacketClass;
|
||||||
|
import net.minecraft.server.v1_6_R3.CrashReportConnectionPacketID;
|
||||||
|
import net.minecraft.server.v1_6_R3.CrashReportSystemDetails;
|
||||||
|
import net.minecraft.server.v1_6_R3.Entity;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityArrow;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityExperienceOrb;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityHorse;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityHuman;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityInsentient;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityItem;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityPlayer;
|
||||||
|
import net.minecraft.server.v1_6_R3.EnumChatFormat;
|
||||||
|
import net.minecraft.server.v1_6_R3.EnumMovingObjectType;
|
||||||
|
import net.minecraft.server.v1_6_R3.IInventory;
|
||||||
|
import net.minecraft.server.v1_6_R3.INetworkManager;
|
||||||
|
import net.minecraft.server.v1_6_R3.IntHashMap;
|
||||||
|
import net.minecraft.server.v1_6_R3.Item;
|
||||||
|
import net.minecraft.server.v1_6_R3.ItemBookAndQuill;
|
||||||
|
import net.minecraft.server.v1_6_R3.ItemStack;
|
||||||
|
import net.minecraft.server.v1_6_R3.ItemWrittenBook;
|
||||||
|
import net.minecraft.server.v1_6_R3.MathHelper;
|
||||||
|
import net.minecraft.server.v1_6_R3.MinecraftServer;
|
||||||
|
import net.minecraft.server.v1_6_R3.MovingObjectPosition;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet0KeepAlive;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet101CloseWindow;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet102WindowClick;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet103SetSlot;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet106Transaction;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet107SetCreativeSlot;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet108ButtonClick;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet10Flying;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet130UpdateSign;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet13PlayerLookMove;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet14BlockDig;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet15Place;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet16BlockItemSwitch;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet18ArmAnimation;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet19EntityAction;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet202Abilities;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet203TabComplete;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet204LocaleAndViewDistance;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet205ClientCommand;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet250CustomPayload;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet255KickDisconnect;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet27PlayerInput;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet39AttachEntity;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet3Chat;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet40EntityMetadata;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet53BlockChange;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet6SpawnPosition;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet7UseEntity;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet9Respawn;
|
||||||
|
import net.minecraft.server.v1_6_R3.PlayerConnection;
|
||||||
|
import net.minecraft.server.v1_6_R3.PlayerInventory;
|
||||||
|
import net.minecraft.server.v1_6_R3.ReportedException;
|
||||||
|
import net.minecraft.server.v1_6_R3.SharedConstants;
|
||||||
|
import net.minecraft.server.v1_6_R3.Slot;
|
||||||
|
import net.minecraft.server.v1_6_R3.TileEntity;
|
||||||
|
import net.minecraft.server.v1_6_R3.TileEntityBeacon;
|
||||||
|
import net.minecraft.server.v1_6_R3.TileEntityCommand;
|
||||||
|
import net.minecraft.server.v1_6_R3.TileEntitySign;
|
||||||
|
import net.minecraft.server.v1_6_R3.Vec3D;
|
||||||
|
import net.minecraft.server.v1_6_R3.WorldServer;
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
@ -17,12 +92,12 @@ import java.util.concurrent.ExecutionException;
|
|||||||
import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
|
import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.inventory.CraftInventoryView;
|
import org.bukkit.craftbukkit.v1_6_R3.inventory.CraftInventoryView;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.inventory.CraftItemStack;
|
import org.bukkit.craftbukkit.v1_6_R3.inventory.CraftItemStack;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.util.LazyPlayerSet;
|
import org.bukkit.craftbukkit.v1_6_R3.util.LazyPlayerSet;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.util.Waitable;
|
import org.bukkit.craftbukkit.v1_6_R3.util.Waitable;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftPlayer;
|
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftPlayer;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.event.CraftEventFactory;
|
import org.bukkit.craftbukkit.v1_6_R3.event.CraftEventFactory;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
@ -85,7 +160,7 @@ public class PlayerConnection extends Connection {
|
|||||||
this.server = minecraftserver.server;
|
this.server = minecraftserver.server;
|
||||||
}
|
}
|
||||||
|
|
||||||
private final org.bukkit.craftbukkit.v1_6_R2.CraftServer server;
|
private final org.bukkit.craftbukkit.v1_6_R3.CraftServer server;
|
||||||
private int lastTick = MinecraftServer.currentTick;
|
private int lastTick = MinecraftServer.currentTick;
|
||||||
private int lastDropTick = MinecraftServer.currentTick;
|
private int lastDropTick = MinecraftServer.currentTick;
|
||||||
private int dropCount = 0;
|
private int dropCount = 0;
|
||||||
@ -268,7 +343,7 @@ public class PlayerConnection extends Connection {
|
|||||||
float f = this.player.yaw;
|
float f = this.player.yaw;
|
||||||
float f1 = this.player.pitch;
|
float f1 = this.player.pitch;
|
||||||
|
|
||||||
this.player.vehicle.V();
|
this.player.vehicle.W();
|
||||||
d1 = this.player.locX;
|
d1 = this.player.locX;
|
||||||
d2 = this.player.locY;
|
d2 = this.player.locY;
|
||||||
d3 = this.player.locZ;
|
d3 = this.player.locZ;
|
||||||
@ -282,7 +357,7 @@ public class PlayerConnection extends Connection {
|
|||||||
this.player.X = 0.0F;
|
this.player.X = 0.0F;
|
||||||
this.player.setLocation(d1, d2, d3, f, f1);
|
this.player.setLocation(d1, d2, d3, f, f1);
|
||||||
if (this.player.vehicle != null) {
|
if (this.player.vehicle != null) {
|
||||||
this.player.vehicle.V();
|
this.player.vehicle.W();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.minecraftServer.getPlayerList().d(this.player);
|
this.minecraftServer.getPlayerList().d(this.player);
|
||||||
@ -479,6 +554,7 @@ public class PlayerConnection extends Connection {
|
|||||||
|
|
||||||
WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension);
|
WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension);
|
||||||
|
|
||||||
|
this.player.u();
|
||||||
if (packet14blockdig.e == 4) {
|
if (packet14blockdig.e == 4) {
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
// If the ticks aren't the same then the count starts from 0 and we update the lastDropTick.
|
// If the ticks aren't the same then the count starts from 0 and we update the lastDropTick.
|
||||||
@ -499,7 +575,7 @@ public class PlayerConnection extends Connection {
|
|||||||
} else if (packet14blockdig.e == 3) {
|
} else if (packet14blockdig.e == 3) {
|
||||||
this.player.a(true);
|
this.player.a(true);
|
||||||
} else if (packet14blockdig.e == 5) {
|
} else if (packet14blockdig.e == 5) {
|
||||||
this.player.bs();
|
this.player.bt();
|
||||||
} else {
|
} else {
|
||||||
boolean flag = false;
|
boolean flag = false;
|
||||||
|
|
||||||
@ -576,6 +652,7 @@ public class PlayerConnection extends Connection {
|
|||||||
// second one. This sadly has to remain until Mojang makes their packets saner. :(
|
// second one. This sadly has to remain until Mojang makes their packets saner. :(
|
||||||
// -- Grum
|
// -- Grum
|
||||||
|
|
||||||
|
this.player.u();
|
||||||
if (packet15place.getFace() == 255) {
|
if (packet15place.getFace() == 255) {
|
||||||
if (packet15place.getItemStack() != null && packet15place.getItemStack().id == this.lastMaterial && this.lastPacket != null && packet15place.timestamp - this.lastPacket < 100) {
|
if (packet15place.getItemStack() != null && packet15place.getItemStack().id == this.lastMaterial && this.lastPacket != null && packet15place.timestamp - this.lastPacket < 100) {
|
||||||
this.lastPacket = null;
|
this.lastPacket = null;
|
||||||
@ -749,11 +826,13 @@ public class PlayerConnection extends Connection {
|
|||||||
this.server.getPluginManager().callEvent(event);
|
this.server.getPluginManager().callEvent(event);
|
||||||
if (event.isCancelled()) {
|
if (event.isCancelled()) {
|
||||||
this.sendPacket(new Packet16BlockItemSwitch(this.player.inventory.itemInHandIndex));
|
this.sendPacket(new Packet16BlockItemSwitch(this.player.inventory.itemInHandIndex));
|
||||||
|
this.player.u();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
this.player.inventory.itemInHandIndex = packet16blockitemswitch.itemInHandIndex;
|
this.player.inventory.itemInHandIndex = packet16blockitemswitch.itemInHandIndex;
|
||||||
|
this.player.u();
|
||||||
} else {
|
} else {
|
||||||
this.minecraftServer.getLogger().warning(this.player.getName() + " tried to set an invalid carried item");
|
this.minecraftServer.getLogger().warning(this.player.getName() + " tried to set an invalid carried item");
|
||||||
this.disconnect("Nope!"); // CraftBukkit
|
this.disconnect("Nope!"); // CraftBukkit
|
||||||
@ -764,6 +843,7 @@ public class PlayerConnection extends Connection {
|
|||||||
if (this.player.getChatFlags() == 2) {
|
if (this.player.getChatFlags() == 2) {
|
||||||
this.sendPacket(new Packet3Chat(ChatMessage.e("chat.cannotSend").a(EnumChatFormat.RED)));
|
this.sendPacket(new Packet3Chat(ChatMessage.e("chat.cannotSend").a(EnumChatFormat.RED)));
|
||||||
} else {
|
} else {
|
||||||
|
this.player.u();
|
||||||
String s = packet3chat.message;
|
String s = packet3chat.message;
|
||||||
|
|
||||||
if (s.length() > 100) {
|
if (s.length() > 100) {
|
||||||
@ -1010,6 +1090,7 @@ public class PlayerConnection extends Connection {
|
|||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
if (this.player.dead) return;
|
if (this.player.dead) return;
|
||||||
|
|
||||||
|
this.player.u();
|
||||||
if (packet19entityaction.animation == 1 || packet19entityaction.animation == 2) {
|
if (packet19entityaction.animation == 1 || packet19entityaction.animation == 2) {
|
||||||
PlayerToggleSneakEvent event = new PlayerToggleSneakEvent(this.getPlayer(), packet19entityaction.animation == 1);
|
PlayerToggleSneakEvent event = new PlayerToggleSneakEvent(this.getPlayer(), packet19entityaction.animation == 1);
|
||||||
this.server.getPluginManager().callEvent(event);
|
this.server.getPluginManager().callEvent(event);
|
||||||
@ -1063,6 +1144,7 @@ public class PlayerConnection extends Connection {
|
|||||||
WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension);
|
WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension);
|
||||||
Entity entity = worldserver.getEntity(packet7useentity.target);
|
Entity entity = worldserver.getEntity(packet7useentity.target);
|
||||||
|
|
||||||
|
this.player.u();
|
||||||
if (entity != null) {
|
if (entity != null) {
|
||||||
boolean flag = this.player.o(entity);
|
boolean flag = this.player.o(entity);
|
||||||
double d0 = 36.0D;
|
double d0 = 36.0D;
|
||||||
@ -1083,7 +1165,7 @@ public class PlayerConnection extends Connection {
|
|||||||
|
|
||||||
if (triggerLeashUpdate && (event.isCancelled() || this.player.inventory.getItemInHand() == null || this.player.inventory.getItemInHand().id != Item.LEASH.id)) {
|
if (triggerLeashUpdate && (event.isCancelled() || this.player.inventory.getItemInHand() == null || this.player.inventory.getItemInHand().id != Item.LEASH.id)) {
|
||||||
// Refresh the current leash state
|
// Refresh the current leash state
|
||||||
this.sendPacket(new Packet39AttachEntity(1, entity, ((EntityInsentient) entity).bI()));
|
this.sendPacket(new Packet39AttachEntity(1, entity, ((EntityInsentient) entity).getLeashHolder()));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (triggerTagUpdate && (event.isCancelled() || this.player.inventory.getItemInHand() == null || this.player.inventory.getItemInHand().id != Item.NAME_TAG.id)) {
|
if (triggerTagUpdate && (event.isCancelled() || this.player.inventory.getItemInHand() == null || this.player.inventory.getItemInHand().id != Item.NAME_TAG.id)) {
|
||||||
@ -1125,6 +1207,7 @@ public class PlayerConnection extends Connection {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void a(Packet205ClientCommand packet205clientcommand) {
|
public void a(Packet205ClientCommand packet205clientcommand) {
|
||||||
|
this.player.u();
|
||||||
if (packet205clientcommand.a == 1) {
|
if (packet205clientcommand.a == 1) {
|
||||||
if (this.player.viewingCredits) {
|
if (this.player.viewingCredits) {
|
||||||
this.minecraftServer.getPlayerList().changeDimension(this.player, 0, PlayerTeleportEvent.TeleportCause.END_PORTAL); // CraftBukkit - reroute logic through custom portal management
|
this.minecraftServer.getPlayerList().changeDimension(this.player, 0, PlayerTeleportEvent.TeleportCause.END_PORTAL); // CraftBukkit - reroute logic through custom portal management
|
||||||
@ -1169,6 +1252,7 @@ public class PlayerConnection extends Connection {
|
|||||||
public void a(Packet102WindowClick packet102windowclick) {
|
public void a(Packet102WindowClick packet102windowclick) {
|
||||||
if (this.player.dead) return; // CraftBukkit
|
if (this.player.dead) return; // CraftBukkit
|
||||||
|
|
||||||
|
this.player.u();
|
||||||
if (this.player.activeContainer.windowId == packet102windowclick.a && this.player.activeContainer.c(this.player)) {
|
if (this.player.activeContainer.windowId == packet102windowclick.a && this.player.activeContainer.c(this.player)) {
|
||||||
// CraftBukkit start - Call InventoryClickEvent
|
// CraftBukkit start - Call InventoryClickEvent
|
||||||
if (packet102windowclick.slot < -1 && packet102windowclick.slot != -999) {
|
if (packet102windowclick.slot < -1 && packet102windowclick.slot != -999) {
|
||||||
@ -1455,6 +1539,7 @@ public class PlayerConnection extends Connection {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void a(Packet108ButtonClick packet108buttonclick) {
|
public void a(Packet108ButtonClick packet108buttonclick) {
|
||||||
|
this.player.u();
|
||||||
if (this.player.activeContainer.windowId == packet108buttonclick.a && this.player.activeContainer.c(this.player)) {
|
if (this.player.activeContainer.windowId == packet108buttonclick.a && this.player.activeContainer.c(this.player)) {
|
||||||
this.player.activeContainer.a((EntityHuman) this.player, packet108buttonclick.b);
|
this.player.activeContainer.a((EntityHuman) this.player, packet108buttonclick.b);
|
||||||
this.player.activeContainer.b();
|
this.player.activeContainer.b();
|
||||||
@ -1541,6 +1626,7 @@ public class PlayerConnection extends Connection {
|
|||||||
public void a(Packet130UpdateSign packet130updatesign) {
|
public void a(Packet130UpdateSign packet130updatesign) {
|
||||||
if (this.player.dead) return; // CraftBukkit
|
if (this.player.dead) return; // CraftBukkit
|
||||||
|
|
||||||
|
this.player.u();
|
||||||
WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension);
|
WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension);
|
||||||
|
|
||||||
if (worldserver.isLoaded(packet130updatesign.x, packet130updatesign.y, packet130updatesign.z)) {
|
if (worldserver.isLoaded(packet130updatesign.x, packet130updatesign.y, packet130updatesign.z)) {
|
||||||
@ -1586,7 +1672,7 @@ public class PlayerConnection extends Connection {
|
|||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
Player player = this.server.getPlayer(this.player);
|
Player player = this.server.getPlayer(this.player);
|
||||||
SignChangeEvent event = new SignChangeEvent((org.bukkit.craftbukkit.v1_6_R2.block.CraftBlock) player.getWorld().getBlockAt(j, k, i), this.server.getPlayer(this.player), packet130updatesign.lines);
|
SignChangeEvent event = new SignChangeEvent((org.bukkit.craftbukkit.v1_6_R3.block.CraftBlock) player.getWorld().getBlockAt(j, k, i), this.server.getPlayer(this.player), packet130updatesign.lines);
|
||||||
this.server.getPluginManager().callEvent(event);
|
this.server.getPluginManager().callEvent(event);
|
||||||
|
|
||||||
if (!event.isCancelled()) {
|
if (!event.isCancelled()) {
|
@ -1,4 +1,4 @@
|
|||||||
package net.minecraft.server.v1_6_R2;
|
package net.minecraft.server.v1_6_R3;
|
||||||
|
|
||||||
import com.google.common.base.Charsets;
|
import com.google.common.base.Charsets;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@ -13,10 +13,54 @@ import java.util.Map;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
|
import net.minecraft.server.v1_6_R3.BanEntry;
|
||||||
|
import net.minecraft.server.v1_6_R3.BanList;
|
||||||
|
import net.minecraft.server.v1_6_R3.ChatMessage;
|
||||||
|
import net.minecraft.server.v1_6_R3.ChunkCoordinates;
|
||||||
|
import net.minecraft.server.v1_6_R3.DemoPlayerInteractManager;
|
||||||
|
import net.minecraft.server.v1_6_R3.Entity;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityHuman;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityPlayer;
|
||||||
|
import net.minecraft.server.v1_6_R3.EntityTypes;
|
||||||
|
import net.minecraft.server.v1_6_R3.EnumGamemode;
|
||||||
|
import net.minecraft.server.v1_6_R3.INetworkManager;
|
||||||
|
import net.minecraft.server.v1_6_R3.IPlayerFileData;
|
||||||
|
import net.minecraft.server.v1_6_R3.MathHelper;
|
||||||
|
import net.minecraft.server.v1_6_R3.MinecraftServer;
|
||||||
|
import net.minecraft.server.v1_6_R3.MobEffect;
|
||||||
|
import net.minecraft.server.v1_6_R3.NBTTagCompound;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet16BlockItemSwitch;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet1Login;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet201PlayerInfo;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet202Abilities;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet209SetScoreboardTeam;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet250CustomPayload;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet3Chat;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet41MobEffect;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet43SetExperience;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet4UpdateTime;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet6SpawnPosition;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet70Bed;
|
||||||
|
import net.minecraft.server.v1_6_R3.Packet9Respawn;
|
||||||
|
import net.minecraft.server.v1_6_R3.PendingConnection;
|
||||||
|
import net.minecraft.server.v1_6_R3.PlayerChunkMap;
|
||||||
|
import net.minecraft.server.v1_6_R3.PlayerConnection;
|
||||||
|
import net.minecraft.server.v1_6_R3.PlayerDistanceComparator;
|
||||||
|
import net.minecraft.server.v1_6_R3.PlayerInteractManager;
|
||||||
|
import net.minecraft.server.v1_6_R3.Scoreboard;
|
||||||
|
import net.minecraft.server.v1_6_R3.ScoreboardObjective;
|
||||||
|
import net.minecraft.server.v1_6_R3.ScoreboardScore;
|
||||||
|
import net.minecraft.server.v1_6_R3.ScoreboardServer;
|
||||||
|
import net.minecraft.server.v1_6_R3.ScoreboardTeam;
|
||||||
|
import net.minecraft.server.v1_6_R3.ScoreboardTeamBase;
|
||||||
|
import net.minecraft.server.v1_6_R3.World;
|
||||||
|
import net.minecraft.server.v1_6_R3.WorldServer;
|
||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_6_R3.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.CraftWorld;
|
import org.bukkit.craftbukkit.v1_6_R3.CraftWorld;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.chunkio.ChunkIOExecutor;
|
import org.bukkit.craftbukkit.v1_6_R3.chunkio.ChunkIOExecutor;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
@ -54,7 +98,7 @@ public abstract class PlayerList {
|
|||||||
|
|
||||||
public PlayerList(MinecraftServer minecraftserver) {
|
public PlayerList(MinecraftServer minecraftserver) {
|
||||||
minecraftserver.server = new CraftServer(minecraftserver, this);
|
minecraftserver.server = new CraftServer(minecraftserver, this);
|
||||||
minecraftserver.console = org.bukkit.craftbukkit.v1_6_R2.command.ColouredConsoleSender.getInstance();
|
minecraftserver.console = org.bukkit.craftbukkit.v1_6_R3.command.ColouredConsoleSender.getInstance();
|
||||||
this.cserver = minecraftserver.server;
|
this.cserver = minecraftserver.server;
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
@ -252,7 +296,7 @@ public abstract class PlayerList {
|
|||||||
if (entityplayer.playerConnection.disconnected) return null; // CraftBukkit - exploitsies fix
|
if (entityplayer.playerConnection.disconnected) return null; // CraftBukkit - exploitsies fix
|
||||||
|
|
||||||
// CraftBukkit start - Quitting must be before we do final save of data, in case plugins need to modify it
|
// CraftBukkit start - Quitting must be before we do final save of data, in case plugins need to modify it
|
||||||
org.bukkit.craftbukkit.v1_6_R2.event.CraftEventFactory.handleInventoryCloseEvent(entityplayer);
|
org.bukkit.craftbukkit.v1_6_R3.event.CraftEventFactory.handleInventoryCloseEvent(entityplayer);
|
||||||
|
|
||||||
PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(this.cserver.getPlayer(entityplayer), "\u00A7e" + entityplayer.name + " left the game.");
|
PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(this.cserver.getPlayer(entityplayer), "\u00A7e" + entityplayer.name + " left the game.");
|
||||||
this.cserver.getPluginManager().callEvent(playerQuitEvent);
|
this.cserver.getPluginManager().callEvent(playerQuitEvent);
|
||||||
@ -497,7 +541,7 @@ public abstract class PlayerList {
|
|||||||
if (exitWorld != null) {
|
if (exitWorld != null) {
|
||||||
if ((cause == TeleportCause.END_PORTAL) && (i == 0)) {
|
if ((cause == TeleportCause.END_PORTAL) && (i == 0)) {
|
||||||
// THE_END -> NORMAL; use bed if available, otherwise default spawn
|
// THE_END -> NORMAL; use bed if available, otherwise default spawn
|
||||||
exit = ((org.bukkit.craftbukkit.v1_6_R2.entity.CraftPlayer) entityplayer.getBukkitEntity()).getBedSpawnLocation();
|
exit = ((org.bukkit.craftbukkit.v1_6_R3.entity.CraftPlayer) entityplayer.getBukkitEntity()).getBedSpawnLocation();
|
||||||
if (exit == null || ((CraftWorld) exit.getWorld()).getHandle().dimension != 0) {
|
if (exit == null || ((CraftWorld) exit.getWorld()).getHandle().dimension != 0) {
|
||||||
exit = exitWorld.getWorld().getSpawnLocation();
|
exit = exitWorld.getWorld().getSpawnLocation();
|
||||||
}
|
}
|
||||||
@ -508,7 +552,7 @@ public abstract class PlayerList {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TravelAgent agent = exit != null ? (TravelAgent) ((CraftWorld) exit.getWorld()).getHandle().t() : org.bukkit.craftbukkit.v1_6_R2.CraftTravelAgent.DEFAULT; // return arbitrary TA to compensate for implementation dependent plugins
|
TravelAgent agent = exit != null ? (TravelAgent) ((CraftWorld) exit.getWorld()).getHandle().t() : org.bukkit.craftbukkit.v1_6_R3.CraftTravelAgent.DEFAULT; // return arbitrary TA to compensate for implementation dependent plugins
|
||||||
PlayerPortalEvent event = new PlayerPortalEvent(entityplayer.getBukkitEntity(), enter, exit, agent, cause);
|
PlayerPortalEvent event = new PlayerPortalEvent(entityplayer.getBukkitEntity(), enter, exit, agent, cause);
|
||||||
event.useTravelAgent(useTravelAgent);
|
event.useTravelAgent(useTravelAgent);
|
||||||
Bukkit.getServer().getPluginManager().callEvent(event);
|
Bukkit.getServer().getPluginManager().callEvent(event);
|
@ -1,4 +1,4 @@
|
|||||||
package org.bukkit.craftbukkit.v1_6_R2.entity;
|
package org.bukkit.craftbukkit.v1_6_R3.entity;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableSet;
|
import com.google.common.collect.ImmutableSet;
|
||||||
import com.google.common.collect.MapMaker;
|
import com.google.common.collect.MapMaker;
|
||||||
@ -16,7 +16,7 @@ import java.util.Set;
|
|||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
import net.minecraft.server.v1_6_R2.*;
|
import net.minecraft.server.v1_6_R3.*;
|
||||||
|
|
||||||
import org.apache.commons.lang.Validate;
|
import org.apache.commons.lang.Validate;
|
||||||
import org.apache.commons.lang.NotImplementedException;
|
import org.apache.commons.lang.NotImplementedException;
|
||||||
@ -30,15 +30,17 @@ import org.bukkit.configuration.serialization.DelegateDeserialization;
|
|||||||
import org.bukkit.conversations.Conversation;
|
import org.bukkit.conversations.Conversation;
|
||||||
import org.bukkit.conversations.ConversationAbandonedEvent;
|
import org.bukkit.conversations.ConversationAbandonedEvent;
|
||||||
import org.bukkit.conversations.ManuallyAbandonedConversationCanceller;
|
import org.bukkit.conversations.ManuallyAbandonedConversationCanceller;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.conversations.ConversationTracker;
|
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftHumanEntity;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.CraftEffect;
|
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftPlayer;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.CraftOfflinePlayer;
|
import org.bukkit.craftbukkit.v1_6_R3.conversations.ConversationTracker;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.CraftServer;
|
import org.bukkit.craftbukkit.v1_6_R3.CraftEffect;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.CraftSound;
|
import org.bukkit.craftbukkit.v1_6_R3.CraftOfflinePlayer;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.CraftWorld;
|
import org.bukkit.craftbukkit.v1_6_R3.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.map.CraftMapView;
|
import org.bukkit.craftbukkit.v1_6_R3.CraftSound;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.map.RenderData;
|
import org.bukkit.craftbukkit.v1_6_R3.CraftWorld;
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.scoreboard.CraftScoreboard;
|
import org.bukkit.craftbukkit.v1_6_R3.map.CraftMapView;
|
||||||
|
import org.bukkit.craftbukkit.v1_6_R3.map.RenderData;
|
||||||
|
import org.bukkit.craftbukkit.v1_6_R3.scoreboard.CraftScoreboard;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@ -1051,7 +1053,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void updateScaledHealth() {
|
public void updateScaledHealth() {
|
||||||
AttributeMapServer attributemapserver = (AttributeMapServer) getHandle().aW();
|
AttributeMapServer attributemapserver = (AttributeMapServer) getHandle().aX();
|
||||||
Set set = attributemapserver.b();
|
Set set = attributemapserver.b();
|
||||||
|
|
||||||
injectScaledMaxHealth(set, true);
|
injectScaledMaxHealth(set, true);
|
||||||
@ -1076,6 +1078,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
collection.add(new AttributeModifiable(getHandle().aW(), (new AttributeRanged("generic.maxHealth", scaledHealth ? healthScale : getMaxHealth(), 0.0D, Float.MAX_VALUE)).a("Max Health").a(true)));
|
collection.add(new AttributeModifiable(getHandle().aX(), (new AttributeRanged("generic.maxHealth", scaledHealth ? healthScale : getMaxHealth(), 0.0D, Float.MAX_VALUE)).a("Max Health").a(true)));
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,5 +1,6 @@
|
|||||||
package org.bukkit.craftbukkit.v1_6_R2.inventory;
|
package org.bukkit.craftbukkit.v1_6_R3.inventory;
|
||||||
|
|
||||||
|
import org.bukkit.craftbukkit.v1_6_R3.inventory.CraftInventory;
|
||||||
import org.bukkit.event.inventory.InventoryType;
|
import org.bukkit.event.inventory.InventoryType;
|
||||||
import org.bukkit.inventory.InventoryHolder;
|
import org.bukkit.inventory.InventoryHolder;
|
||||||
|
|
@ -1,18 +1,29 @@
|
|||||||
package org.bukkit.craftbukkit.v1_6_R2.inventory;
|
package org.bukkit.craftbukkit.v1_6_R3.inventory;
|
||||||
|
|
||||||
import static org.bukkit.craftbukkit.v1_6_R2.inventory.CraftMetaItem.ENCHANTMENTS;
|
import static org.bukkit.craftbukkit.v1_6_R3.inventory.CraftMetaItem.ENCHANTMENTS;
|
||||||
import static org.bukkit.craftbukkit.v1_6_R2.inventory.CraftMetaItem.ENCHANTMENTS_ID;
|
import static org.bukkit.craftbukkit.v1_6_R3.inventory.CraftMetaItem.ENCHANTMENTS_ID;
|
||||||
import static org.bukkit.craftbukkit.v1_6_R2.inventory.CraftMetaItem.ENCHANTMENTS_LVL;
|
import static org.bukkit.craftbukkit.v1_6_R3.inventory.CraftMetaItem.ENCHANTMENTS_LVL;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import net.minecraft.server.v1_6_R2.EnchantmentManager;
|
import net.minecraft.server.v1_6_R3.EnchantmentManager;
|
||||||
import net.minecraft.server.v1_6_R2.NBTTagCompound;
|
import net.minecraft.server.v1_6_R3.NBTTagCompound;
|
||||||
import net.minecraft.server.v1_6_R2.NBTTagList;
|
import net.minecraft.server.v1_6_R3.NBTTagList;
|
||||||
|
|
||||||
import org.apache.commons.lang.Validate;
|
import org.apache.commons.lang.Validate;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.configuration.serialization.DelegateDeserialization;
|
import org.bukkit.configuration.serialization.DelegateDeserialization;
|
||||||
|
import org.bukkit.craftbukkit.v1_6_R3.inventory.CraftItemFactory;
|
||||||
|
import org.bukkit.craftbukkit.v1_6_R3.inventory.CraftItemStack;
|
||||||
|
import org.bukkit.craftbukkit.v1_6_R3.inventory.CraftMetaBook;
|
||||||
|
import org.bukkit.craftbukkit.v1_6_R3.inventory.CraftMetaCharge;
|
||||||
|
import org.bukkit.craftbukkit.v1_6_R3.inventory.CraftMetaEnchantedBook;
|
||||||
|
import org.bukkit.craftbukkit.v1_6_R3.inventory.CraftMetaFirework;
|
||||||
|
import org.bukkit.craftbukkit.v1_6_R3.inventory.CraftMetaItem;
|
||||||
|
import org.bukkit.craftbukkit.v1_6_R3.inventory.CraftMetaLeatherArmor;
|
||||||
|
import org.bukkit.craftbukkit.v1_6_R3.inventory.CraftMetaMap;
|
||||||
|
import org.bukkit.craftbukkit.v1_6_R3.inventory.CraftMetaPotion;
|
||||||
|
import org.bukkit.craftbukkit.v1_6_R3.inventory.CraftMetaSkull;
|
||||||
import org.bukkit.enchantments.Enchantment;
|
import org.bukkit.enchantments.Enchantment;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.inventory.meta.ItemMeta;
|
import org.bukkit.inventory.meta.ItemMeta;
|
||||||
@ -22,7 +33,7 @@ import com.google.common.collect.ImmutableMap;
|
|||||||
@DelegateDeserialization(ItemStack.class)
|
@DelegateDeserialization(ItemStack.class)
|
||||||
public class CraftItemStack extends ItemStack {
|
public class CraftItemStack extends ItemStack {
|
||||||
|
|
||||||
public static net.minecraft.server.v1_6_R2.ItemStack asNMSCopy(ItemStack original) {
|
public static net.minecraft.server.v1_6_R3.ItemStack asNMSCopy(ItemStack original) {
|
||||||
if (original instanceof CraftItemStack) {
|
if (original instanceof CraftItemStack) {
|
||||||
CraftItemStack stack = (CraftItemStack) original;
|
CraftItemStack stack = (CraftItemStack) original;
|
||||||
return stack.handle == null ? null : stack.handle.cloneItemStack();
|
return stack.handle == null ? null : stack.handle.cloneItemStack();
|
||||||
@ -30,15 +41,15 @@ public class CraftItemStack extends ItemStack {
|
|||||||
if (original == null || original.getTypeId() <= 0) {
|
if (original == null || original.getTypeId() <= 0) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
net.minecraft.server.v1_6_R2.ItemStack stack = new net.minecraft.server.v1_6_R2.ItemStack(original.getTypeId(), original.getAmount(), original.getDurability());
|
net.minecraft.server.v1_6_R3.ItemStack stack = new net.minecraft.server.v1_6_R3.ItemStack(original.getTypeId(), original.getAmount(), original.getDurability());
|
||||||
if (original.hasItemMeta()) {
|
if (original.hasItemMeta()) {
|
||||||
setItemMeta(stack, original.getItemMeta());
|
setItemMeta(stack, original.getItemMeta());
|
||||||
}
|
}
|
||||||
return stack;
|
return stack;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static net.minecraft.server.v1_6_R2.ItemStack copyNMSStack(net.minecraft.server.v1_6_R2.ItemStack original, int amount) {
|
public static net.minecraft.server.v1_6_R3.ItemStack copyNMSStack(net.minecraft.server.v1_6_R3.ItemStack original, int amount) {
|
||||||
net.minecraft.server.v1_6_R2.ItemStack stack = original.cloneItemStack();
|
net.minecraft.server.v1_6_R3.ItemStack stack = original.cloneItemStack();
|
||||||
stack.count = amount;
|
stack.count = amount;
|
||||||
return stack;
|
return stack;
|
||||||
}
|
}
|
||||||
@ -46,7 +57,7 @@ public class CraftItemStack extends ItemStack {
|
|||||||
/**
|
/**
|
||||||
* Copies the NMS stack to return as a strictly-Bukkit stack
|
* Copies the NMS stack to return as a strictly-Bukkit stack
|
||||||
*/
|
*/
|
||||||
public static ItemStack asBukkitCopy(net.minecraft.server.v1_6_R2.ItemStack original) {
|
public static ItemStack asBukkitCopy(net.minecraft.server.v1_6_R3.ItemStack original) {
|
||||||
if (original == null) {
|
if (original == null) {
|
||||||
return new ItemStack(Material.AIR);
|
return new ItemStack(Material.AIR);
|
||||||
}
|
}
|
||||||
@ -57,7 +68,7 @@ public class CraftItemStack extends ItemStack {
|
|||||||
return stack;
|
return stack;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static CraftItemStack asCraftMirror(net.minecraft.server.v1_6_R2.ItemStack original) {
|
public static CraftItemStack asCraftMirror(net.minecraft.server.v1_6_R3.ItemStack original) {
|
||||||
return new CraftItemStack(original);
|
return new CraftItemStack(original);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -69,20 +80,20 @@ public class CraftItemStack extends ItemStack {
|
|||||||
return new CraftItemStack(original);
|
return new CraftItemStack(original);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static CraftItemStack asNewCraftStack(net.minecraft.server.v1_6_R2.Item item) {
|
public static CraftItemStack asNewCraftStack(net.minecraft.server.v1_6_R3.Item item) {
|
||||||
return asNewCraftStack(item, 1);
|
return asNewCraftStack(item, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static CraftItemStack asNewCraftStack(net.minecraft.server.v1_6_R2.Item item, int amount) {
|
public static CraftItemStack asNewCraftStack(net.minecraft.server.v1_6_R3.Item item, int amount) {
|
||||||
return new CraftItemStack(item.id, amount, (short) 0, null);
|
return new CraftItemStack(item.id, amount, (short) 0, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
net.minecraft.server.v1_6_R2.ItemStack handle;
|
net.minecraft.server.v1_6_R3.ItemStack handle;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mirror
|
* Mirror
|
||||||
*/
|
*/
|
||||||
private CraftItemStack(net.minecraft.server.v1_6_R2.ItemStack item) {
|
private CraftItemStack(net.minecraft.server.v1_6_R3.ItemStack item) {
|
||||||
this.handle = item;
|
this.handle = item;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -109,7 +120,7 @@ public class CraftItemStack extends ItemStack {
|
|||||||
} else if (type == 0) {
|
} else if (type == 0) {
|
||||||
handle = null;
|
handle = null;
|
||||||
} else if (handle == null) {
|
} else if (handle == null) {
|
||||||
handle = new net.minecraft.server.v1_6_R2.ItemStack(type, 1, 0);
|
handle = new net.minecraft.server.v1_6_R3.ItemStack(type, 1, 0);
|
||||||
} else {
|
} else {
|
||||||
handle.id = type;
|
handle.id = type;
|
||||||
if (hasItemMeta()) {
|
if (hasItemMeta()) {
|
||||||
@ -145,7 +156,7 @@ public class CraftItemStack extends ItemStack {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public net.minecraft.server.v1_6_R2.ItemStack getHandle()
|
public net.minecraft.server.v1_6_R3.ItemStack getHandle()
|
||||||
{
|
{
|
||||||
return handle;
|
return handle;
|
||||||
}
|
}
|
||||||
@ -192,7 +203,7 @@ public class CraftItemStack extends ItemStack {
|
|||||||
list.add(tag);
|
list.add(tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
static boolean makeTag(net.minecraft.server.v1_6_R2.ItemStack item) {
|
static boolean makeTag(net.minecraft.server.v1_6_R3.ItemStack item) {
|
||||||
if (item == null) {
|
if (item == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -267,7 +278,7 @@ public class CraftItemStack extends ItemStack {
|
|||||||
return getEnchantments(handle);
|
return getEnchantments(handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Map<Enchantment, Integer> getEnchantments(net.minecraft.server.v1_6_R2.ItemStack item) {
|
static Map<Enchantment, Integer> getEnchantments(net.minecraft.server.v1_6_R3.ItemStack item) {
|
||||||
ImmutableMap.Builder<Enchantment, Integer> result = ImmutableMap.builder();
|
ImmutableMap.Builder<Enchantment, Integer> result = ImmutableMap.builder();
|
||||||
NBTTagList list = (item == null) ? null : item.getEnchantments();
|
NBTTagList list = (item == null) ? null : item.getEnchantments();
|
||||||
|
|
||||||
@ -285,7 +296,7 @@ public class CraftItemStack extends ItemStack {
|
|||||||
return result.build();
|
return result.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
static NBTTagList getEnchantmentList(net.minecraft.server.v1_6_R2.ItemStack item) {
|
static NBTTagList getEnchantmentList(net.minecraft.server.v1_6_R3.ItemStack item) {
|
||||||
return item == null ? null : item.getEnchantments();
|
return item == null ? null : item.getEnchantments();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -303,7 +314,7 @@ public class CraftItemStack extends ItemStack {
|
|||||||
return getItemMeta(handle);
|
return getItemMeta(handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ItemMeta getItemMeta(net.minecraft.server.v1_6_R2.ItemStack item) {
|
public static ItemMeta getItemMeta(net.minecraft.server.v1_6_R3.ItemStack item) {
|
||||||
if (!hasItemMeta(item)) {
|
if (!hasItemMeta(item)) {
|
||||||
return CraftItemFactory.instance().getItemMeta(getType(item));
|
return CraftItemFactory.instance().getItemMeta(getType(item));
|
||||||
}
|
}
|
||||||
@ -333,7 +344,7 @@ public class CraftItemStack extends ItemStack {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static Material getType(net.minecraft.server.v1_6_R2.ItemStack item) {
|
static Material getType(net.minecraft.server.v1_6_R3.ItemStack item) {
|
||||||
Material material = Material.getMaterial(item == null ? 0 : item.id);
|
Material material = Material.getMaterial(item == null ? 0 : item.id);
|
||||||
return material == null ? Material.AIR : material;
|
return material == null ? Material.AIR : material;
|
||||||
}
|
}
|
||||||
@ -343,7 +354,7 @@ public class CraftItemStack extends ItemStack {
|
|||||||
return setItemMeta(handle, itemMeta);
|
return setItemMeta(handle, itemMeta);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean setItemMeta(net.minecraft.server.v1_6_R2.ItemStack item, ItemMeta itemMeta) {
|
public static boolean setItemMeta(net.minecraft.server.v1_6_R3.ItemStack item, ItemMeta itemMeta) {
|
||||||
if (item == null) {
|
if (item == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -392,7 +403,7 @@ public class CraftItemStack extends ItemStack {
|
|||||||
return hasItemMeta(handle);
|
return hasItemMeta(handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
static boolean hasItemMeta(net.minecraft.server.v1_6_R2.ItemStack item) {
|
static boolean hasItemMeta(net.minecraft.server.v1_6_R3.ItemStack item) {
|
||||||
return !(item == null || item.tag == null || item.tag.isEmpty());
|
return !(item == null || item.tag == null || item.tag.isEmpty());
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,16 +1,17 @@
|
|||||||
package org.bukkit.craftbukkit.v1_6_R2.inventory;
|
package org.bukkit.craftbukkit.v1_6_R3.inventory;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.bukkit.craftbukkit.v1_6_R2.entity.CraftHumanEntity;
|
import org.bukkit.craftbukkit.v1_6_R3.inventory.CraftItemStack;
|
||||||
|
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftHumanEntity;
|
||||||
import org.bukkit.entity.HumanEntity;
|
import org.bukkit.entity.HumanEntity;
|
||||||
import org.bukkit.event.inventory.InventoryType;
|
import org.bukkit.event.inventory.InventoryType;
|
||||||
import org.bukkit.inventory.InventoryHolder;
|
import org.bukkit.inventory.InventoryHolder;
|
||||||
|
|
||||||
import net.minecraft.server.v1_6_R2.EntityHuman;
|
import net.minecraft.server.v1_6_R3.EntityHuman;
|
||||||
import net.minecraft.server.v1_6_R2.IInventory;
|
import net.minecraft.server.v1_6_R3.IInventory;
|
||||||
import net.minecraft.server.v1_6_R2.ItemStack;
|
import net.minecraft.server.v1_6_R3.ItemStack;
|
||||||
|
|
||||||
public class MinecraftInventory implements IInventory {
|
public class MinecraftInventory implements IInventory {
|
||||||
private final ItemStack[] items;
|
private final ItemStack[] items;
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user