SPIGOT-1758: Apply correct ItemMeta to new CommandBlock types

This commit is contained in:
md_5 2016-03-05 15:52:44 +11:00
parent dcc45717b9
commit 94ba824302
3 changed files with 10 additions and 0 deletions

View File

@ -103,6 +103,8 @@ public final class CraftItemFactory implements ItemFactory {
case BREWING_STAND_ITEM:
case ENCHANTMENT_TABLE:
case COMMAND:
case COMMAND_REPEATING:
case COMMAND_CHAIN:
case BEACON:
case DAYLIGHT_DETECTOR:
case DAYLIGHT_DETECTOR_INVERTED:

View File

@ -365,6 +365,8 @@ public final class CraftItemStack extends ItemStack {
case BREWING_STAND_ITEM:
case ENCHANTMENT_TABLE:
case COMMAND:
case COMMAND_REPEATING:
case COMMAND_CHAIN:
case BEACON:
case DAYLIGHT_DETECTOR:
case DAYLIGHT_DETECTOR_INVERTED:

View File

@ -166,6 +166,8 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta
case BREWING_STAND_ITEM:
case ENCHANTMENT_TABLE:
case COMMAND:
case COMMAND_REPEATING:
case COMMAND_CHAIN:
case BEACON:
case DAYLIGHT_DETECTOR:
case DAYLIGHT_DETECTOR_INVERTED:
@ -248,6 +250,8 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta
}
return new CraftSkull(material, (TileEntitySkull) te);
case COMMAND:
case COMMAND_REPEATING:
case COMMAND_CHAIN:
if (te == null) {
te = new TileEntityCommand();
}
@ -316,6 +320,8 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta
valid = te instanceof TileEntitySkull;
break;
case COMMAND:
case COMMAND_REPEATING:
case COMMAND_CHAIN:
valid = te instanceof TileEntityCommand;
break;
case BEACON: