You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Players can silk touch nests/hives to move bees, but there currently isn't a way for the client to find out how many bees a nest contains (and on servers that have an economy, there's no way for either buyer or seller to know if the advertised "3 bees in this hive" is true.
This doesn't really have much to do with shulker boxes, but it would be some kind of "what's in this closed box I have in my inventory" functionality, so it might be better to have it in here than in yet another tiny mod.
As a proof of concept, I added this to the tooltip generator in one of my mods and it seems to be working fine (this is the Itemstack the mouse is hovering over):
if (!this.isEmpty() && (this.getItem() == Items.BEE_HIVE || this.getItem() == Items.BEE_NEST)) {
CompoundTag tag = this.getTag();
if (tag != null) {
String honeyLevel = tag.getCompound("BlockStateTag").getString("honey_level"); // wtf this is a string ???
int beeCount = tag.getCompound("BlockEntityTag").getList("Bees", 10).size();
list.add(new LiteralText(honeyLevel+" honey"));
list.add(new LiteralText(beeCount+ " bees"));
}
The text was updated successfully, but these errors were encountered:
Players can silk touch nests/hives to move bees, but there currently isn't a way for the client to find out how many bees a nest contains (and on servers that have an economy, there's no way for either buyer or seller to know if the advertised "3 bees in this hive" is true.
This doesn't really have much to do with shulker boxes, but it would be some kind of "what's in this closed box I have in my inventory" functionality, so it might be better to have it in here than in yet another tiny mod.
As a proof of concept, I added this to the tooltip generator in one of my mods and it seems to be working fine (
this
is the Itemstack the mouse is hovering over):The text was updated successfully, but these errors were encountered: