geforkt von Mirrors/Paper
SPIGOT-2773: More fully implement ShulkerBox meta
Dieser Commit ist enthalten in:
Ursprung
2dd38f2dc4
Commit
0dedba43d1
@ -20,6 +20,7 @@ import net.minecraft.server.TileEntityFurnace;
|
||||
import net.minecraft.server.TileEntityHopper;
|
||||
import net.minecraft.server.TileEntityMobSpawner;
|
||||
import net.minecraft.server.TileEntityNote;
|
||||
import net.minecraft.server.TileEntityShulkerBox;
|
||||
import net.minecraft.server.TileEntitySign;
|
||||
import net.minecraft.server.TileEntitySkull;
|
||||
import net.minecraft.server.TileEntityStructure;
|
||||
@ -42,6 +43,7 @@ import org.bukkit.craftbukkit.block.CraftFurnace;
|
||||
import org.bukkit.craftbukkit.block.CraftHopper;
|
||||
import org.bukkit.craftbukkit.block.CraftJukebox;
|
||||
import org.bukkit.craftbukkit.block.CraftNoteBlock;
|
||||
import org.bukkit.craftbukkit.block.CraftShulkerBox;
|
||||
import org.bukkit.craftbukkit.block.CraftSign;
|
||||
import org.bukkit.craftbukkit.block.CraftSkull;
|
||||
import org.bukkit.craftbukkit.block.CraftStructureBlock;
|
||||
@ -309,6 +311,26 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta
|
||||
te = new TileEntityStructure();
|
||||
}
|
||||
return new CraftStructureBlock(material, (TileEntityStructure) te);
|
||||
case WHITE_SHULKER_BOX:
|
||||
case ORANGE_SHULKER_BOX:
|
||||
case MAGENTA_SHULKER_BOX:
|
||||
case LIGHT_BLUE_SHULKER_BOX:
|
||||
case YELLOW_SHULKER_BOX:
|
||||
case LIME_SHULKER_BOX:
|
||||
case PINK_SHULKER_BOX:
|
||||
case GRAY_SHULKER_BOX:
|
||||
case SILVER_SHULKER_BOX:
|
||||
case CYAN_SHULKER_BOX:
|
||||
case PURPLE_SHULKER_BOX:
|
||||
case BLUE_SHULKER_BOX:
|
||||
case BROWN_SHULKER_BOX:
|
||||
case GREEN_SHULKER_BOX:
|
||||
case RED_SHULKER_BOX:
|
||||
case BLACK_SHULKER_BOX:
|
||||
if (te == null) {
|
||||
te = new TileEntityShulkerBox();
|
||||
}
|
||||
return new CraftShulkerBox(material, (TileEntityShulkerBox) te);
|
||||
default:
|
||||
throw new IllegalStateException("Missing blockState for " + material);
|
||||
}
|
||||
@ -382,6 +404,23 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta
|
||||
case STRUCTURE_BLOCK:
|
||||
valid = te instanceof TileEntityStructure;
|
||||
break;
|
||||
case WHITE_SHULKER_BOX:
|
||||
case ORANGE_SHULKER_BOX:
|
||||
case MAGENTA_SHULKER_BOX:
|
||||
case LIGHT_BLUE_SHULKER_BOX:
|
||||
case YELLOW_SHULKER_BOX:
|
||||
case LIME_SHULKER_BOX:
|
||||
case PINK_SHULKER_BOX:
|
||||
case GRAY_SHULKER_BOX:
|
||||
case SILVER_SHULKER_BOX:
|
||||
case CYAN_SHULKER_BOX:
|
||||
case PURPLE_SHULKER_BOX:
|
||||
case BLUE_SHULKER_BOX:
|
||||
case BROWN_SHULKER_BOX:
|
||||
case GREEN_SHULKER_BOX:
|
||||
case RED_SHULKER_BOX:
|
||||
case BLACK_SHULKER_BOX:
|
||||
valid = te instanceof TileEntityShulkerBox;
|
||||
default:
|
||||
valid = false;
|
||||
break;
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren