Class BrushableBlockEntity
- Mappings:
Namespace Name official czointermediary net/minecraft/class_8174named net/minecraft/block/entity/BrushableBlockEntity
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate static final Loggerprivate static final intprivate static final intprivate static final intprivate static final Stringprivate ItemStackprivate static final Stringprivate static final Stringprivate static final Stringprivate @Nullable Identifierprivate longprivate longprivate longFields inherited from class net.minecraft.block.entity.BlockEntity
pos, removed, world -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbrush(long worldTime, PlayerEntity player, Direction hitDirection) private voidfinishBrushing(PlayerEntity player) voidgenerateItem(PlayerEntity player) private intgetItem()private booleanvoidreadNbt(NbtCompound nbt) Reads data fromnbt.voidvoidsetLootTable(Identifier lootTable, long seed) private voidspawnItem(PlayerEntity player) Returns the serialized state of this block entity that is observable by clients.Returns the packet to send to nearby players when the block entity's observable state changes, ornullto not send the packet.private booleanprotected voidwriteNbt(NbtCompound nbt) 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, markDirty, markRemoved, onSyncedBlockEvent, populateCrashReport, posFromNbt, setCachedState, setStackNbt, setWorld, writeIdToNbt
-
Field Details
-
field_42801
- Mappings:
Namespace Name Mixin selector official aLczo;a:Lorg/slf4j/Logger;intermediary field_42801Lnet/minecraft/class_8174;field_42801:Lorg/slf4j/Logger;named field_42801Lnet/minecraft/block/entity/BrushableBlockEntity;field_42801:Lorg/slf4j/Logger;
-
LOOT_TABLE_NBT_KEY
- See Also:
- Mappings:
Namespace Name Mixin selector official bLczo;b:Ljava/lang/String;intermediary field_42802Lnet/minecraft/class_8174;field_42802:Ljava/lang/String;named LOOT_TABLE_NBT_KEYLnet/minecraft/block/entity/BrushableBlockEntity;LOOT_TABLE_NBT_KEY:Ljava/lang/String;
-
LOOT_TABLE_SEED_NBT_KEY
- See Also:
- Mappings:
Namespace Name Mixin selector official cLczo;c:Ljava/lang/String;intermediary field_42803Lnet/minecraft/class_8174;field_42803:Ljava/lang/String;named LOOT_TABLE_SEED_NBT_KEYLnet/minecraft/block/entity/BrushableBlockEntity;LOOT_TABLE_SEED_NBT_KEY:Ljava/lang/String;
-
HIT_DIRECTION_NBT_KEY
- See Also:
- Mappings:
Namespace Name Mixin selector official dLczo;d:Ljava/lang/String;intermediary field_42804Lnet/minecraft/class_8174;field_42804:Ljava/lang/String;named HIT_DIRECTION_NBT_KEYLnet/minecraft/block/entity/BrushableBlockEntity;HIT_DIRECTION_NBT_KEY:Ljava/lang/String;
-
ITEM_NBT_KEY
- See Also:
- Mappings:
Namespace Name Mixin selector official eLczo;e:Ljava/lang/String;intermediary field_42805Lnet/minecraft/class_8174;field_42805:Ljava/lang/String;named ITEM_NBT_KEYLnet/minecraft/block/entity/BrushableBlockEntity;ITEM_NBT_KEY:Ljava/lang/String;
-
field_42806
private static final int field_42806- See Also:
- Mappings:
Namespace Name Mixin selector official fLczo;f:Iintermediary field_42806Lnet/minecraft/class_8174;field_42806:Inamed field_42806Lnet/minecraft/block/entity/BrushableBlockEntity;field_42806:I
-
field_42807
private static final int field_42807- See Also:
- Mappings:
Namespace Name Mixin selector official gLczo;g:Iintermediary field_42807Lnet/minecraft/class_8174;field_42807:Inamed field_42807Lnet/minecraft/block/entity/BrushableBlockEntity;field_42807:I
-
field_42808
private static final int field_42808- See Also:
- Mappings:
Namespace Name Mixin selector official hLczo;h:Iintermediary field_42808Lnet/minecraft/class_8174;field_42808:Inamed field_42808Lnet/minecraft/block/entity/BrushableBlockEntity;field_42808:I
-
brushesCount
private int brushesCount- Mappings:
Namespace Name Mixin selector official iLczo;i:Iintermediary field_42809Lnet/minecraft/class_8174;field_42809:Inamed brushesCountLnet/minecraft/block/entity/BrushableBlockEntity;brushesCount:I
-
nextDustTime
private long nextDustTime- Mappings:
Namespace Name Mixin selector official jLczo;j:Jintermediary field_42810Lnet/minecraft/class_8174;field_42810:Jnamed nextDustTimeLnet/minecraft/block/entity/BrushableBlockEntity;nextDustTime:J
-
nextBrushTime
private long nextBrushTime- Mappings:
Namespace Name Mixin selector official kLczo;k:Jintermediary field_42811Lnet/minecraft/class_8174;field_42811:Jnamed nextBrushTimeLnet/minecraft/block/entity/BrushableBlockEntity;nextBrushTime:J
-
item
- Mappings:
Namespace Name Mixin selector official lLczo;l:Lcfx;intermediary field_42812Lnet/minecraft/class_8174;field_42812:Lnet/minecraft/class_1799;named itemLnet/minecraft/block/entity/BrushableBlockEntity;item:Lnet/minecraft/item/ItemStack;
-
hitDirection
- Mappings:
Namespace Name Mixin selector official mLczo;m:Lha;intermediary field_42813Lnet/minecraft/class_8174;field_42813:Lnet/minecraft/class_2350;named hitDirectionLnet/minecraft/block/entity/BrushableBlockEntity;hitDirection:Lnet/minecraft/util/math/Direction;
-
lootTable
- Mappings:
Namespace Name Mixin selector official nLczo;n:Lacq;intermediary field_42814Lnet/minecraft/class_8174;field_42814:Lnet/minecraft/class_2960;named lootTableLnet/minecraft/block/entity/BrushableBlockEntity;lootTable:Lnet/minecraft/util/Identifier;
-
lootTableSeed
private long lootTableSeed- Mappings:
Namespace Name Mixin selector official rLczo;r:Jintermediary field_42815Lnet/minecraft/class_8174;field_42815:Jnamed lootTableSeedLnet/minecraft/block/entity/BrushableBlockEntity;lootTableSeed:J
-
-
Constructor Details
-
BrushableBlockEntity
- Mappings:
Namespace Name Mixin selector official <init>Lczo;<init>(Lgu;Ldby;)Vintermediary <init>Lnet/minecraft/class_8174;<init>(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Vnamed <init>Lnet/minecraft/block/entity/BrushableBlockEntity;<init>(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
-
-
Method Details
-
brush
- Mappings:
Namespace Name Mixin selector official aLczo;a(JLbym;Lha;)Zintermediary method_49215Lnet/minecraft/class_8174;method_49215(JLnet/minecraft/class_1657;Lnet/minecraft/class_2350;)Znamed brushLnet/minecraft/block/entity/BrushableBlockEntity;brush(JLnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/math/Direction;)Z
-
generateItem
- Mappings:
Namespace Name Mixin selector official aLczo;a(Lbym;)Vintermediary method_49217Lnet/minecraft/class_8174;method_49217(Lnet/minecraft/class_1657;)Vnamed generateItemLnet/minecraft/block/entity/BrushableBlockEntity;generateItem(Lnet/minecraft/entity/player/PlayerEntity;)V
-
finishBrushing
- Mappings:
Namespace Name Mixin selector official bLczo;b(Lbym;)Vintermediary method_49218Lnet/minecraft/class_8174;method_49218(Lnet/minecraft/class_1657;)Vnamed finishBrushingLnet/minecraft/block/entity/BrushableBlockEntity;finishBrushing(Lnet/minecraft/entity/player/PlayerEntity;)V
-
spawnItem
- Mappings:
Namespace Name Mixin selector official cLczo;c(Lbym;)Vintermediary method_49220Lnet/minecraft/class_8174;method_49220(Lnet/minecraft/class_1657;)Vnamed spawnItemLnet/minecraft/block/entity/BrushableBlockEntity;spawnItem(Lnet/minecraft/entity/player/PlayerEntity;)V
-
scheduledTick
public void scheduledTick()- Mappings:
Namespace Name Mixin selector official cLczo;c()Vintermediary method_49219Lnet/minecraft/class_8174;method_49219()Vnamed scheduledTickLnet/minecraft/block/entity/BrushableBlockEntity;scheduledTick()V
-
readLootTableFromNbt
- Mappings:
Namespace Name Mixin selector official dLczo;d(Lqr;)Zintermediary method_49222Lnet/minecraft/class_8174;method_49222(Lnet/minecraft/class_2487;)Znamed readLootTableFromNbtLnet/minecraft/block/entity/BrushableBlockEntity;readLootTableFromNbt(Lnet/minecraft/nbt/NbtCompound;)Z
-
writeLootTableToNbt
- Mappings:
Namespace Name Mixin selector official eLczo;e(Lqr;)Zintermediary method_49223Lnet/minecraft/class_8174;method_49223(Lnet/minecraft/class_2487;)Znamed writeLootTableToNbtLnet/minecraft/block/entity/BrushableBlockEntity;writeLootTableToNbt(Lnet/minecraft/nbt/NbtCompound;)Z
-
toInitialChunkDataNbt
Returns the serialized state of this block entity that is observable by clients.This is sent alongside the initial chunk data, as well as when the block entity implements
BlockEntity.toUpdatePacket()and decides to use the defaultBlockEntityUpdateS2CPacket."Observable state" is a state that clients can observe without specific interaction. For example,
CampfireBlockEntity's cooked items are observable states, but chests' inventories are not observable states, since the player must first open that chest before they can see the contents.To send all NBT data of this block entity saved to disk, return
BlockEntity.createNbt().- Overrides:
toInitialChunkDataNbtin classBlockEntity- Returns:
- the serialized state of this block entity that is observable by clients
- See Also:
- Mappings:
Namespace Name Mixin selector official ao_Lczk;ao_()Lqr;intermediary method_16887Lnet/minecraft/class_2586;method_16887()Lnet/minecraft/class_2487;named toInitialChunkDataNbtLnet/minecraft/block/entity/BlockEntity;toInitialChunkDataNbt()Lnet/minecraft/nbt/NbtCompound;
-
toUpdatePacket
Description copied from class:BlockEntityReturns the packet to send to nearby players when the block entity's observable state changes, ornullto not send the packet.If the data returned by
initial chunk datais suitable for updates, the following shortcut can be used to create an update packet:BlockEntityUpdateS2CPacket.create(this). The NBT will be passed toBlockEntity.readNbt(net.minecraft.nbt.NbtCompound)on the client."Observable state" is a state that clients can observe without specific interaction. For example,
CampfireBlockEntity's cooked items are observable states, but chests' inventories are not observable states, since the player must first open that chest before they can see the contents.To sync block entity data using this method, use
serverWorld.getChunkManager().markForUpdate(this.getPos());.- Overrides:
toUpdatePacketin classBlockEntity- Returns:
- the packet to send to nearby players when the block entity's observable
state changes, or
nullto not send the packet - See Also:
- Mappings:
Namespace Name Mixin selector official dLczo;d()Luz;intermediary method_49221Lnet/minecraft/class_8174;method_49221()Lnet/minecraft/class_2622;named toUpdatePacketLnet/minecraft/block/entity/BrushableBlockEntity;toUpdatePacket()Lnet/minecraft/network/packet/s2c/play/BlockEntityUpdateS2CPacket;
-
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 aLczk;a(Lqr;)Vintermediary method_11014Lnet/minecraft/class_2586;method_11014(Lnet/minecraft/class_2487;)Vnamed readNbtLnet/minecraft/block/entity/BlockEntity;readNbt(Lnet/minecraft/nbt/NbtCompound;)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 bLczk;b(Lqr;)Vintermediary method_11007Lnet/minecraft/class_2586;method_11007(Lnet/minecraft/class_2487;)Vnamed writeNbtLnet/minecraft/block/entity/BlockEntity;writeNbt(Lnet/minecraft/nbt/NbtCompound;)V
-
setLootTable
- Mappings:
Namespace Name Mixin selector official aLczo;a(Lacq;J)Vintermediary method_49216Lnet/minecraft/class_8174;method_49216(Lnet/minecraft/class_2960;J)Vnamed setLootTableLnet/minecraft/block/entity/BrushableBlockEntity;setLootTable(Lnet/minecraft/util/Identifier;J)V
-
getDustedLevel
private int getDustedLevel()- Mappings:
Namespace Name Mixin selector official iLczo;i()Iintermediary method_49226Lnet/minecraft/class_8174;method_49226()Inamed getDustedLevelLnet/minecraft/block/entity/BrushableBlockEntity;getDustedLevel()I
-
getHitDirection
- Mappings:
Namespace Name Mixin selector official fLczo;f()Lha;intermediary method_49224Lnet/minecraft/class_8174;method_49224()Lnet/minecraft/class_2350;named getHitDirectionLnet/minecraft/block/entity/BrushableBlockEntity;getHitDirection()Lnet/minecraft/util/math/Direction;
-
getItem
- Mappings:
Namespace Name Mixin selector official gLczo;g()Lcfx;intermediary method_49225Lnet/minecraft/class_8174;method_49225()Lnet/minecraft/class_1799;named getItemLnet/minecraft/block/entity/BrushableBlockEntity;getItem()Lnet/minecraft/item/ItemStack;
-