mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-01 12:41:50 +01:00
SPIGOT-1758: Apply correct ItemMeta to new CommandBlock types
This commit is contained in:
parent
dcc45717b9
commit
94ba824302
3 changed files with 10 additions and 0 deletions
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue