Class BeehiveBlockEntity
- Mappings:
Namespace Name official djiintermediary net/minecraft/class_4482named net/minecraft/block/entity/BeehiveBlockEntity
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classstatic enum -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate final List<BeehiveBlockEntity.Bee>static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final intstatic final Stringprivate static final intstatic final intstatic final StringFields inherited from class net.minecraft.block.entity.BlockEntity
pos, removed, world -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBee(NbtCompound nbtCompound, int ticksInHive, boolean hasNectar) private static voidvoidangerBees(@Nullable PlayerEntity player, BlockState state, BeehiveBlockEntity.BeeState beeState) intgetBees()static intgetHoneyLevel(BlockState state) private booleanbooleanbooleanbooleanbooleanisSmoked()voidMarks this block entity as dirty and that it needs to be saved.voidreadNbt(NbtCompound nbt, RegistryWrapper.WrapperLookup registryLookup) Reads data fromnbt.private static booleanreleaseBee(World world, BlockPos pos, BlockState state, BeehiveBlockEntity.Bee bee, @Nullable List<Entity> entities, BeehiveBlockEntity.BeeState beeState, @Nullable BlockPos flowerPos) (package private) static voidremoveIrrelevantNbtKeys(NbtCompound compound) static voidserverTick(World world, BlockPos pos, BlockState state, BeehiveBlockEntity blockEntity) private static voidtickBees(World world, BlockPos pos, BlockState state, List<BeehiveBlockEntity.Bee> bees, @Nullable BlockPos flowerPos) voidtryEnterHive(Entity entity, boolean hasNectar) voidtryEnterHive(Entity entity, boolean hasNectar, int ticksInHive) tryReleaseBee(BlockState state, BeehiveBlockEntity.BeeState beeState) protected voidwriteNbt(NbtCompound nbt, RegistryWrapper.WrapperLookup registryLookup) Writes data tonbt.Methods inherited from class net.minecraft.block.entity.BlockEntity
cancelRemoval, copyItemDataRequiresOperator, createFromNbt, createNbt, createNbtWithId, createNbtWithIdentifyingData, getCachedState, getPos, getType, getWorld, hasWorld, isRemoved, markDirty, markRemoved, onSyncedBlockEvent, populateCrashReport, posFromNbt, setCachedState, setStackNbt, setWorld, toInitialChunkDataNbt, toUpdatePacket, writeIdToNbt
-
Field Details
-
FLOWER_POS_KEY
- See Also:
- Mappings:
Namespace Name Mixin selector official aLdji;a:Ljava/lang/String;intermediary field_31306Lnet/minecraft/class_4482;field_31306:Ljava/lang/String;named FLOWER_POS_KEYLnet/minecraft/block/entity/BeehiveBlockEntity;FLOWER_POS_KEY:Ljava/lang/String;
-
MIN_OCCUPATION_TICKS_KEY
- See Also:
- Mappings:
Namespace Name Mixin selector official bLdji;b:Ljava/lang/String;intermediary field_31307Lnet/minecraft/class_4482;field_31307:Ljava/lang/String;named MIN_OCCUPATION_TICKS_KEYLnet/minecraft/block/entity/BeehiveBlockEntity;MIN_OCCUPATION_TICKS_KEY:Ljava/lang/String;
-
ENTITY_DATA_KEY
- See Also:
- Mappings:
Namespace Name Mixin selector official cLdji;c:Ljava/lang/String;intermediary field_31308Lnet/minecraft/class_4482;field_31308:Ljava/lang/String;named ENTITY_DATA_KEYLnet/minecraft/block/entity/BeehiveBlockEntity;ENTITY_DATA_KEY:Ljava/lang/String;
-
TICKS_IN_HIVE_KEY
- See Also:
- Mappings:
Namespace Name Mixin selector official dLdji;d:Ljava/lang/String;intermediary field_31309Lnet/minecraft/class_4482;field_31309:Ljava/lang/String;named TICKS_IN_HIVE_KEYLnet/minecraft/block/entity/BeehiveBlockEntity;TICKS_IN_HIVE_KEY:Ljava/lang/String;
-
HAS_NECTAR_KEY
- See Also:
- Mappings:
Namespace Name Mixin selector official eLdji;e:Ljava/lang/String;intermediary field_31310Lnet/minecraft/class_4482;field_31310:Ljava/lang/String;named HAS_NECTAR_KEYLnet/minecraft/block/entity/BeehiveBlockEntity;HAS_NECTAR_KEY:Ljava/lang/String;
-
BEES_KEY
- See Also:
- Mappings:
Namespace Name Mixin selector official fLdji;f:Ljava/lang/String;intermediary field_31311Lnet/minecraft/class_4482;field_31311:Ljava/lang/String;named BEES_KEYLnet/minecraft/block/entity/BeehiveBlockEntity;BEES_KEY:Ljava/lang/String;
-
IRRELEVANT_BEE_NBT_KEYS
- Mappings:
Namespace Name Mixin selector official iLdji;i:Ljava/util/List;intermediary field_33570Lnet/minecraft/class_4482;field_33570:Ljava/util/List;named IRRELEVANT_BEE_NBT_KEYSLnet/minecraft/block/entity/BeehiveBlockEntity;IRRELEVANT_BEE_NBT_KEYS:Ljava/util/List;
-
MAX_BEE_COUNT
public static final int MAX_BEE_COUNT- See Also:
- Mappings:
Namespace Name Mixin selector official gLdji;g:Iintermediary field_31312Lnet/minecraft/class_4482;field_31312:Inamed MAX_BEE_COUNTLnet/minecraft/block/entity/BeehiveBlockEntity;MAX_BEE_COUNT:I
-
ANGERED_CANNOT_ENTER_HIVE_TICKS
private static final int ANGERED_CANNOT_ENTER_HIVE_TICKS- See Also:
- Mappings:
Namespace Name Mixin selector official jLdji;j:Iintermediary field_31314Lnet/minecraft/class_4482;field_31314:Inamed ANGERED_CANNOT_ENTER_HIVE_TICKSLnet/minecraft/block/entity/BeehiveBlockEntity;ANGERED_CANNOT_ENTER_HIVE_TICKS:I
-
MIN_OCCUPATION_TICKS_WITH_NECTAR
private static final int MIN_OCCUPATION_TICKS_WITH_NECTAR- See Also:
- Mappings:
Namespace Name Mixin selector official kLdji;k:Iintermediary field_31315Lnet/minecraft/class_4482;field_31315:Inamed MIN_OCCUPATION_TICKS_WITH_NECTARLnet/minecraft/block/entity/BeehiveBlockEntity;MIN_OCCUPATION_TICKS_WITH_NECTAR:I
-
MIN_OCCUPATION_TICKS_WITHOUT_NECTAR
public static final int MIN_OCCUPATION_TICKS_WITHOUT_NECTAR- See Also:
- Mappings:
Namespace Name Mixin selector official hLdji;h:Iintermediary field_31313Lnet/minecraft/class_4482;field_31313:Inamed MIN_OCCUPATION_TICKS_WITHOUT_NECTARLnet/minecraft/block/entity/BeehiveBlockEntity;MIN_OCCUPATION_TICKS_WITHOUT_NECTAR:I
-
bees
- Mappings:
Namespace Name Mixin selector official lLdji;l:Ljava/util/List;intermediary field_20423Lnet/minecraft/class_4482;field_20423:Ljava/util/List;named beesLnet/minecraft/block/entity/BeehiveBlockEntity;bees:Ljava/util/List;
-
flowerPos
- Mappings:
Namespace Name Mixin selector official mLdji;m:Lib;intermediary field_20424Lnet/minecraft/class_4482;field_20424:Lnet/minecraft/class_2338;named flowerPosLnet/minecraft/block/entity/BeehiveBlockEntity;flowerPos:Lnet/minecraft/util/math/BlockPos;
-
-
Constructor Details
-
BeehiveBlockEntity
- Mappings:
Namespace Name Mixin selector official <init>Ldji;<init>(Lib;Ldme;)Vintermediary <init>Lnet/minecraft/class_4482;<init>(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Vnamed <init>Lnet/minecraft/block/entity/BeehiveBlockEntity;<init>(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
-
-
Method Details
-
markDirty
public void markDirty()Marks this block entity as dirty and that it needs to be saved. This also triggers comparator update.This must be called when something changed in a way that affects the saved NBT; otherwise, the game might not save the block entity.
- Overrides:
markDirtyin classBlockEntity- Mappings:
Namespace Name Mixin selector official eLdjl;e()Vintermediary method_5431Lnet/minecraft/class_2586;method_5431()Vnamed markDirtyLnet/minecraft/block/entity/BlockEntity;markDirty()V
-
isNearFire
public boolean isNearFire()- Mappings:
Namespace Name Mixin selector official bLdji;b()Zintermediary method_23280Lnet/minecraft/class_4482;method_23280()Znamed isNearFireLnet/minecraft/block/entity/BeehiveBlockEntity;isNearFire()Z
-
hasNoBees
public boolean hasNoBees()- Mappings:
Namespace Name Mixin selector official cLdji;c()Zintermediary method_22400Lnet/minecraft/class_4482;method_22400()Znamed hasNoBeesLnet/minecraft/block/entity/BeehiveBlockEntity;hasNoBees()Z
-
isFullOfBees
public boolean isFullOfBees()- Mappings:
Namespace Name Mixin selector official dLdji;d()Zintermediary method_21856Lnet/minecraft/class_4482;method_21856()Znamed isFullOfBeesLnet/minecraft/block/entity/BeehiveBlockEntity;isFullOfBees()Z
-
angerBees
public void angerBees(@Nullable @Nullable PlayerEntity player, BlockState state, BeehiveBlockEntity.BeeState beeState) - Mappings:
Namespace Name Mixin selector official aLdji;a(Lcia;Ldme;Ldji$b;)Vintermediary method_21850Lnet/minecraft/class_4482;method_21850(Lnet/minecraft/class_1657;Lnet/minecraft/class_2680;Lnet/minecraft/class_4482$class_4484;)Vnamed angerBeesLnet/minecraft/block/entity/BeehiveBlockEntity;angerBees(Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/block/BlockState;Lnet/minecraft/block/entity/BeehiveBlockEntity$BeeState;)V
-
tryReleaseBee
- Mappings:
Namespace Name Mixin selector official aLdji;a(Ldme;Ldji$b;)Ljava/util/List;intermediary method_21852Lnet/minecraft/class_4482;method_21852(Lnet/minecraft/class_2680;Lnet/minecraft/class_4482$class_4484;)Ljava/util/List;named tryReleaseBeeLnet/minecraft/block/entity/BeehiveBlockEntity;tryReleaseBee(Lnet/minecraft/block/BlockState;Lnet/minecraft/block/entity/BeehiveBlockEntity$BeeState;)Ljava/util/List;
-
tryEnterHive
- Mappings:
Namespace Name Mixin selector official aLdji;a(Lbof;Z)Vintermediary method_21848Lnet/minecraft/class_4482;method_21848(Lnet/minecraft/class_1297;Z)Vnamed tryEnterHiveLnet/minecraft/block/entity/BeehiveBlockEntity;tryEnterHive(Lnet/minecraft/entity/Entity;Z)V
-
getBeeCount
public int getBeeCount()- Mappings:
Namespace Name Mixin selector official fLdji;f()Iintermediary method_23903Lnet/minecraft/class_4482;method_23903()Inamed getBeeCountLnet/minecraft/block/entity/BeehiveBlockEntity;getBeeCount()I
-
getHoneyLevel
- Mappings:
Namespace Name Mixin selector official aLdji;a(Ldme;)Iintermediary method_23902Lnet/minecraft/class_4482;method_23902(Lnet/minecraft/class_2680;)Inamed getHoneyLevelLnet/minecraft/block/entity/BeehiveBlockEntity;getHoneyLevel(Lnet/minecraft/block/BlockState;)I
-
isSmoked
public boolean isSmoked()- Mappings:
Namespace Name Mixin selector official jLdji;j()Zintermediary method_23904Lnet/minecraft/class_4482;method_23904()Znamed isSmokedLnet/minecraft/block/entity/BeehiveBlockEntity;isSmoked()Z
-
tryEnterHive
- Mappings:
Namespace Name Mixin selector official aLdji;a(Lbof;ZI)Vintermediary method_21849Lnet/minecraft/class_4482;method_21849(Lnet/minecraft/class_1297;ZI)Vnamed tryEnterHiveLnet/minecraft/block/entity/BeehiveBlockEntity;tryEnterHive(Lnet/minecraft/entity/Entity;ZI)V
-
addBee
- Mappings:
Namespace Name Mixin selector official aLdji;a(Lsy;IZ)Vintermediary method_35292Lnet/minecraft/class_4482;method_35292(Lnet/minecraft/class_2487;IZ)Vnamed addBeeLnet/minecraft/block/entity/BeehiveBlockEntity;addBee(Lnet/minecraft/nbt/NbtCompound;IZ)V
-
releaseBee
private static boolean releaseBee(World world, BlockPos pos, BlockState state, BeehiveBlockEntity.Bee bee, @Nullable @Nullable List<Entity> entities, BeehiveBlockEntity.BeeState beeState, @Nullable @Nullable BlockPos flowerPos) - Mappings:
Namespace Name Mixin selector official aLdji;a(Lcwe;Lib;Ldme;Ldji$a;Ljava/util/List;Ldji$b;Lib;)Zintermediary method_21855Lnet/minecraft/class_4482;method_21855(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_4482$class_4483;Ljava/util/List;Lnet/minecraft/class_4482$class_4484;Lnet/minecraft/class_2338;)Znamed releaseBeeLnet/minecraft/block/entity/BeehiveBlockEntity;releaseBee(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/block/entity/BeehiveBlockEntity$Bee;Ljava/util/List;Lnet/minecraft/block/entity/BeehiveBlockEntity$BeeState;Lnet/minecraft/util/math/BlockPos;)Z
-
removeIrrelevantNbtKeys
- Mappings:
Namespace Name Mixin selector official bLdji;b(Lsy;)Vintermediary method_36379Lnet/minecraft/class_4482;method_36379(Lnet/minecraft/class_2487;)Vnamed removeIrrelevantNbtKeysLnet/minecraft/block/entity/BeehiveBlockEntity;removeIrrelevantNbtKeys(Lnet/minecraft/nbt/NbtCompound;)V
-
ageBee
- Mappings:
Namespace Name Mixin selector official aLdji;a(ILcan;)Vintermediary method_29562Lnet/minecraft/class_4482;method_29562(ILnet/minecraft/class_4466;)Vnamed ageBeeLnet/minecraft/block/entity/BeehiveBlockEntity;ageBee(ILnet/minecraft/entity/passive/BeeEntity;)V
-
hasFlowerPos
private boolean hasFlowerPos()- Mappings:
Namespace Name Mixin selector official lLdji;l()Zintermediary method_21857Lnet/minecraft/class_4482;method_21857()Znamed hasFlowerPosLnet/minecraft/block/entity/BeehiveBlockEntity;hasFlowerPos()Z
-
tickBees
private static void tickBees(World world, BlockPos pos, BlockState state, List<BeehiveBlockEntity.Bee> bees, @Nullable @Nullable BlockPos flowerPos) - Mappings:
Namespace Name Mixin selector official aLdji;a(Lcwe;Lib;Ldme;Ljava/util/List;Lib;)Vintermediary method_21858Lnet/minecraft/class_4482;method_21858(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Ljava/util/List;Lnet/minecraft/class_2338;)Vnamed tickBeesLnet/minecraft/block/entity/BeehiveBlockEntity;tickBees(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Ljava/util/List;Lnet/minecraft/util/math/BlockPos;)V
-
serverTick
public static void serverTick(World world, BlockPos pos, BlockState state, BeehiveBlockEntity blockEntity) - Mappings:
Namespace Name Mixin selector official aLdji;a(Lcwe;Lib;Ldme;Ldji;)Vintermediary method_31656Lnet/minecraft/class_4482;method_31656(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_4482;)Vnamed serverTickLnet/minecraft/block/entity/BeehiveBlockEntity;serverTick(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/block/entity/BeehiveBlockEntity;)V
-
readNbt
Reads data fromnbt. Subclasses should override this if they store a persistent data.NBT is a storage format; therefore, a data from NBT is loaded to a block entity instance's fields, which are used for other operations instead of the NBT. The data is written back to NBT when saving the block entity.
nbtmight not have all expected keys, or might have a key whose value does not meet the requirement (such as the type or the range). This method should fall back to a reasonable default value instead of throwing an exception.- Overrides:
readNbtin classBlockEntity- See Also:
- Mappings:
Namespace Name Mixin selector official aLdjl;a(Lsy;Lin$a;)Vintermediary method_11014Lnet/minecraft/class_2586;method_11014(Lnet/minecraft/class_2487;Lnet/minecraft/class_7225$class_7874;)Vnamed readNbtLnet/minecraft/block/entity/BlockEntity;readNbt(Lnet/minecraft/nbt/NbtCompound;Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)V
-
writeNbt
Writes data tonbt. Subclasses should override this if they store a persistent data.NBT is a storage format; therefore, a data from NBT is loaded to a block entity instance's fields, which are used for other operations instead of the NBT. The data is written back to NBT when saving the block entity.
- Overrides:
writeNbtin classBlockEntity- See Also:
- Mappings:
Namespace Name Mixin selector official bLdjl;b(Lsy;Lin$a;)Vintermediary method_11007Lnet/minecraft/class_2586;method_11007(Lnet/minecraft/class_2487;Lnet/minecraft/class_7225$class_7874;)Vnamed writeNbtLnet/minecraft/block/entity/BlockEntity;writeNbt(Lnet/minecraft/nbt/NbtCompound;Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)V
-
getBees
- Mappings:
Namespace Name Mixin selector official kLdji;k()Lte;intermediary method_21859Lnet/minecraft/class_4482;method_21859()Lnet/minecraft/class_2499;named getBeesLnet/minecraft/block/entity/BeehiveBlockEntity;getBees()Lnet/minecraft/nbt/NbtList;
-