mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-27 04:55:47 +01:00
SPIGOT-5443: BEE_NEST BlockState
- Add missing BEE_NEST block state - Add a missing break in CraftMetaBlockState
This commit is contained in:
parent
73698cf88d
commit
b97d581af2
@ -458,6 +458,7 @@ public class CraftBlock implements Block {
|
|||||||
case SMOKER:
|
case SMOKER:
|
||||||
return new CraftSmoker(this);
|
return new CraftSmoker(this);
|
||||||
case BEEHIVE:
|
case BEEHIVE:
|
||||||
|
case BEE_NEST:
|
||||||
return new CraftBeehive(this);
|
return new CraftBeehive(this);
|
||||||
default:
|
default:
|
||||||
TileEntity tileEntity = world.getTileEntity(position);
|
TileEntity tileEntity = world.getTileEntity(position);
|
||||||
|
@ -260,6 +260,7 @@ public final class CraftItemFactory implements ItemFactory {
|
|||||||
case LECTERN:
|
case LECTERN:
|
||||||
case SMOKER:
|
case SMOKER:
|
||||||
case BEEHIVE:
|
case BEEHIVE:
|
||||||
|
case BEE_NEST:
|
||||||
return new CraftMetaBlockState(meta, material);
|
return new CraftMetaBlockState(meta, material);
|
||||||
case TROPICAL_FISH_BUCKET:
|
case TROPICAL_FISH_BUCKET:
|
||||||
return meta instanceof CraftMetaTropicalFishBucket ? meta : new CraftMetaTropicalFishBucket(meta);
|
return meta instanceof CraftMetaTropicalFishBucket ? meta : new CraftMetaTropicalFishBucket(meta);
|
||||||
|
@ -511,6 +511,7 @@ public final class CraftItemStack extends ItemStack {
|
|||||||
case LECTERN:
|
case LECTERN:
|
||||||
case SMOKER:
|
case SMOKER:
|
||||||
case BEEHIVE:
|
case BEEHIVE:
|
||||||
|
case BEE_NEST:
|
||||||
return new CraftMetaBlockState(item.getTag(), CraftMagicNumbers.getMaterial(item.getItem()));
|
return new CraftMetaBlockState(item.getTag(), CraftMagicNumbers.getMaterial(item.getItem()));
|
||||||
case TROPICAL_FISH_BUCKET:
|
case TROPICAL_FISH_BUCKET:
|
||||||
return new CraftMetaTropicalFishBucket(item.getTag());
|
return new CraftMetaTropicalFishBucket(item.getTag());
|
||||||
|
@ -241,6 +241,7 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta
|
|||||||
case LECTERN:
|
case LECTERN:
|
||||||
case SMOKER:
|
case SMOKER:
|
||||||
case BEEHIVE:
|
case BEEHIVE:
|
||||||
|
case BEE_NEST:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@ -503,6 +504,7 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta
|
|||||||
te = new TileEntitySmoker();
|
te = new TileEntitySmoker();
|
||||||
}
|
}
|
||||||
return new CraftSmoker(material, (TileEntitySmoker) te);
|
return new CraftSmoker(material, (TileEntitySmoker) te);
|
||||||
|
case BEE_NEST:
|
||||||
case BEEHIVE:
|
case BEEHIVE:
|
||||||
if (te == null){
|
if (te == null){
|
||||||
te = new TileEntityBeehive();
|
te = new TileEntityBeehive();
|
||||||
@ -674,7 +676,9 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta
|
|||||||
valid = blockState instanceof CraftSmoker;
|
valid = blockState instanceof CraftSmoker;
|
||||||
break;
|
break;
|
||||||
case BEEHIVE:
|
case BEEHIVE:
|
||||||
|
case BEE_NEST:
|
||||||
valid = blockState instanceof CraftBeehive;
|
valid = blockState instanceof CraftBeehive;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
valid = false;
|
valid = false;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user