Archiviert
13
0

SPIGOT-5443: BEE_NEST BlockState

- Add missing BEE_NEST block state
- Add a missing break in CraftMetaBlockState
Dieser Commit ist enthalten in:
ShaneBeee 2019-12-11 21:40:10 -08:00 committet von md_5
Ursprung 73698cf88d
Commit b97d581af2
4 geänderte Dateien mit 8 neuen und 1 gelöschten Zeilen

Datei anzeigen

@ -458,6 +458,7 @@ public class CraftBlock implements Block {
case SMOKER:
return new CraftSmoker(this);
case BEEHIVE:
case BEE_NEST:
return new CraftBeehive(this);
default:
TileEntity tileEntity = world.getTileEntity(position);

Datei anzeigen

@ -260,6 +260,7 @@ public final class CraftItemFactory implements ItemFactory {
case LECTERN:
case SMOKER:
case BEEHIVE:
case BEE_NEST:
return new CraftMetaBlockState(meta, material);
case TROPICAL_FISH_BUCKET:
return meta instanceof CraftMetaTropicalFishBucket ? meta : new CraftMetaTropicalFishBucket(meta);

Datei anzeigen

@ -511,6 +511,7 @@ public final class CraftItemStack extends ItemStack {
case LECTERN:
case SMOKER:
case BEEHIVE:
case BEE_NEST:
return new CraftMetaBlockState(item.getTag(), CraftMagicNumbers.getMaterial(item.getItem()));
case TROPICAL_FISH_BUCKET:
return new CraftMetaTropicalFishBucket(item.getTag());

Datei anzeigen

@ -241,6 +241,7 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta
case LECTERN:
case SMOKER:
case BEEHIVE:
case BEE_NEST:
return true;
}
return false;
@ -503,6 +504,7 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta
te = new TileEntitySmoker();
}
return new CraftSmoker(material, (TileEntitySmoker) te);
case BEE_NEST:
case BEEHIVE:
if (te == null){
te = new TileEntityBeehive();
@ -674,7 +676,9 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta
valid = blockState instanceof CraftSmoker;
break;
case BEEHIVE:
case BEE_NEST:
valid = blockState instanceof CraftBeehive;
break;
default:
valid = false;
break;