summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/bukkit
diff options
context:
space:
mode:
authorThinkofdeath <thinkofdeath@spigotmc.org>2014-12-07 13:38:16 +0000
committerThinkofdeath <thinkofdeath@spigotmc.org>2014-12-07 13:38:16 +0000
commita6465002bf63b645b2f45ecef75e8309be48ed67 (patch)
tree20911a4261043d0b38c537136bc7dbb4ed16e3d7 /src/main/java/org/bukkit
parent44ea9d88c2f814b1b25bce683b1be9c34089eb5a (diff)
downloadcraftbukkit-a6465002bf63b645b2f45ecef75e8309be48ed67.tar
craftbukkit-a6465002bf63b645b2f45ecef75e8309be48ed67.tar.gz
craftbukkit-a6465002bf63b645b2f45ecef75e8309be48ed67.tar.lz
craftbukkit-a6465002bf63b645b2f45ecef75e8309be48ed67.tar.xz
craftbukkit-a6465002bf63b645b2f45ecef75e8309be48ed67.zip
Add some missing Tile Entities
Diffstat (limited to 'src/main/java/org/bukkit')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java21
-rw-r--r--src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java21
-rw-r--r--src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaTileEntity.java23
3 files changed, 43 insertions, 22 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
index 9e846b60..3e483e56 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
@@ -83,18 +83,25 @@ public final class CraftItemFactory implements ItemFactory {
return meta instanceof CraftMetaEnchantedBook ? meta : new CraftMetaEnchantedBook(meta);
case BANNER:
return meta instanceof CraftMetaBanner ? meta : new CraftMetaBanner(meta);
- case COMMAND:
+ case FURNACE:
case CHEST:
case TRAPPED_CHEST:
- case FURNACE:
- case HOPPER:
- case MOB_SPAWNER:
- case SIGN:
- case BREWING_STAND_ITEM:
case JUKEBOX:
- case FLOWER_POT_ITEM:
case DISPENSER:
case DROPPER:
+ case SIGN:
+ case MOB_SPAWNER:
+ case NOTE_BLOCK:
+ case PISTON_BASE:
+ case BREWING_STAND_ITEM:
+ case ENCHANTMENT_TABLE:
+ case COMMAND:
+ case BEACON:
+ case DAYLIGHT_DETECTOR:
+ case DAYLIGHT_DETECTOR_INVERTED:
+ case HOPPER:
+ case REDSTONE_COMPARATOR:
+ case FLOWER_POT_ITEM:
if (meta instanceof CraftMetaTileEntity) {
CraftMetaTileEntity te = (CraftMetaTileEntity) meta;
if (te.material != material) {
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
index c8dadb53..36cf8d0b 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
@@ -347,18 +347,25 @@ public final class CraftItemStack extends ItemStack {
return new CraftMetaEnchantedBook(item.getTag());
case BANNER:
return new CraftMetaBanner(item.getTag());
- case COMMAND:
+ case FURNACE:
case CHEST:
case TRAPPED_CHEST:
- case FURNACE:
- case HOPPER:
- case MOB_SPAWNER:
- case SIGN:
- case BREWING_STAND_ITEM:
case JUKEBOX:
- case FLOWER_POT_ITEM:
case DISPENSER:
case DROPPER:
+ case SIGN:
+ case MOB_SPAWNER:
+ case NOTE_BLOCK:
+ case PISTON_BASE:
+ case BREWING_STAND_ITEM:
+ case ENCHANTMENT_TABLE:
+ case COMMAND:
+ case BEACON:
+ case DAYLIGHT_DETECTOR:
+ case DAYLIGHT_DETECTOR_INVERTED:
+ case HOPPER:
+ case REDSTONE_COMPARATOR:
+ case FLOWER_POT_ITEM:
return new CraftMetaTileEntity(item.getTag(), CraftMagicNumbers.getMaterial(item.getItem()));
default:
return new CraftMetaItem(item.getTag());
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaTileEntity.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaTileEntity.java
index 919e8698..fc293741 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaTileEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaTileEntity.java
@@ -97,19 +97,26 @@ public class CraftMetaTileEntity extends CraftMetaItem {
@Override
boolean applicableTo(Material type) {
- switch(type){
- case COMMAND:
+ switch(type){
+ case FURNACE:
case CHEST:
case TRAPPED_CHEST:
- case FURNACE:
- case HOPPER:
- case MOB_SPAWNER:
- case SIGN:
- case BREWING_STAND_ITEM:
case JUKEBOX:
- case FLOWER_POT_ITEM:
case DISPENSER:
case DROPPER:
+ case SIGN:
+ case MOB_SPAWNER:
+ case NOTE_BLOCK:
+ case PISTON_BASE:
+ case BREWING_STAND_ITEM:
+ case ENCHANTMENT_TABLE:
+ case COMMAND:
+ case BEACON:
+ case DAYLIGHT_DETECTOR:
+ case DAYLIGHT_DETECTOR_INVERTED:
+ case HOPPER:
+ case REDSTONE_COMPARATOR:
+ case FLOWER_POT_ITEM:
return true;
}
return false;