Class BrushableBlockEntity
- Mappings:
 Namespace Name named net/minecraft/block/entity/BrushableBlockEntityintermediary net/minecraft/class_8174official ebe
- 
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate static final intprivate static final intprivate static final intprivate static final Stringprivate ItemStackprivate static final Stringprivate static final Loggerprivate static final Stringprivate static final Stringprivate @Nullable RegistryKey<LootTable> private longprivate longprivate longFields inherited from class net.minecraft.block.entity.BlockEntity
pos, removed, world - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionbooleanbrush(long worldTime, ServerWorld world, LivingEntity brusher, Direction hitDirection, ItemStack brush) private voidfinishBrushing(ServerWorld world, LivingEntity brusher, ItemStack brush) private voidgenerateItem(ServerWorld world, LivingEntity brusher, ItemStack brush) private intgetItem()protected voidReads data fromnbt.private booleanvoidscheduledTick(ServerWorld world) voidsetLootTable(RegistryKey<LootTable> lootTable, long seed) private voidspawnItem(ServerWorld world, LivingEntity brusher, ItemStack brush) toInitialChunkDataNbt(RegistryWrapper.WrapperLookup registries) 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.protected voidWrites data tonbt.private booleanMethods inherited from class net.minecraft.block.entity.BlockEntity
addComponents, cancelRemoval, createComponentlessNbt, createComponentMap, createFromNbt, createNbt, createNbtWithIdentifyingData, getCachedState, getComponents, getNameForReport, getPos, getReporterContext, getType, getWorld, hasWorld, isRemoved, markDirty, markDirty, markRemoved, onBlockReplaced, onSyncedBlockEvent, populateCrashReport, posFromNbt, read, readComponentlessData, readComponents, readComponents, readComponents, removeFromCopiedStackData, setCachedState, setComponents, setWorld, supports, tryParseCustomName, writeComponentlessData, writeDataWithId, writeDataWithoutId, writeFullData, writeId 
- 
Field Details
- 
LOGGER
- Mappings:
 Namespace Name Mixin selector named LOGGERLnet/minecraft/block/entity/BrushableBlockEntity;LOGGER:Lorg/slf4j/Logger;intermediary field_42801Lnet/minecraft/class_8174;field_42801:Lorg/slf4j/Logger;official aLebe;a:Lorg/slf4j/Logger;
 - 
LOOT_TABLE_NBT_KEY
- See Also:
 - Mappings:
 Namespace Name Mixin selector named LOOT_TABLE_NBT_KEYLnet/minecraft/block/entity/BrushableBlockEntity;LOOT_TABLE_NBT_KEY:Ljava/lang/String;intermediary field_42802Lnet/minecraft/class_8174;field_42802:Ljava/lang/String;official bLebe;b:Ljava/lang/String;
 - 
LOOT_TABLE_SEED_NBT_KEY
- See Also:
 - Mappings:
 Namespace Name Mixin selector named LOOT_TABLE_SEED_NBT_KEYLnet/minecraft/block/entity/BrushableBlockEntity;LOOT_TABLE_SEED_NBT_KEY:Ljava/lang/String;intermediary field_42803Lnet/minecraft/class_8174;field_42803:Ljava/lang/String;official cLebe;c:Ljava/lang/String;
 - 
HIT_DIRECTION_NBT_KEY
- See Also:
 - Mappings:
 Namespace Name Mixin selector named HIT_DIRECTION_NBT_KEYLnet/minecraft/block/entity/BrushableBlockEntity;HIT_DIRECTION_NBT_KEY:Ljava/lang/String;intermediary field_42804Lnet/minecraft/class_8174;field_42804:Ljava/lang/String;official dLebe;d:Ljava/lang/String;
 - 
ITEM_NBT_KEY
- See Also:
 - Mappings:
 Namespace Name Mixin selector named ITEM_NBT_KEYLnet/minecraft/block/entity/BrushableBlockEntity;ITEM_NBT_KEY:Ljava/lang/String;intermediary field_42805Lnet/minecraft/class_8174;field_42805:Ljava/lang/String;official eLebe;e:Ljava/lang/String;
 - 
field_42806
private static final int field_42806- See Also:
 - Mappings:
 Namespace Name Mixin selector named field_42806Lnet/minecraft/block/entity/BrushableBlockEntity;field_42806:Iintermediary field_42806Lnet/minecraft/class_8174;field_42806:Iofficial fLebe;f:I
 - 
field_42807
private static final int field_42807- See Also:
 - Mappings:
 Namespace Name Mixin selector named field_42807Lnet/minecraft/block/entity/BrushableBlockEntity;field_42807:Iintermediary field_42807Lnet/minecraft/class_8174;field_42807:Iofficial gLebe;g:I
 - 
field_42808
private static final int field_42808- See Also:
 - Mappings:
 Namespace Name Mixin selector named field_42808Lnet/minecraft/block/entity/BrushableBlockEntity;field_42808:Iintermediary field_42808Lnet/minecraft/class_8174;field_42808:Iofficial hLebe;h:I
 - 
brushesCount
private int brushesCount- Mappings:
 Namespace Name Mixin selector named brushesCountLnet/minecraft/block/entity/BrushableBlockEntity;brushesCount:Iintermediary field_42809Lnet/minecraft/class_8174;field_42809:Iofficial iLebe;i:I
 - 
nextDustTime
private long nextDustTime- Mappings:
 Namespace Name Mixin selector named nextDustTimeLnet/minecraft/block/entity/BrushableBlockEntity;nextDustTime:Jintermediary field_42810Lnet/minecraft/class_8174;field_42810:Jofficial jLebe;j:J
 - 
nextBrushTime
private long nextBrushTime- Mappings:
 Namespace Name Mixin selector named nextBrushTimeLnet/minecraft/block/entity/BrushableBlockEntity;nextBrushTime:Jintermediary field_42811Lnet/minecraft/class_8174;field_42811:Jofficial kLebe;k:J
 - 
item
- Mappings:
 Namespace Name Mixin selector named itemLnet/minecraft/block/entity/BrushableBlockEntity;item:Lnet/minecraft/item/ItemStack;intermediary field_42812Lnet/minecraft/class_8174;field_42812:Lnet/minecraft/class_1799;official lLebe;l:Ldcv;
 - 
hitDirection
- Mappings:
 Namespace Name Mixin selector named hitDirectionLnet/minecraft/block/entity/BrushableBlockEntity;hitDirection:Lnet/minecraft/util/math/Direction;intermediary field_42813Lnet/minecraft/class_8174;field_42813:Lnet/minecraft/class_2350;official mLebe;m:Ljh;
 - 
lootTable
- Mappings:
 Namespace Name Mixin selector named lootTableLnet/minecraft/block/entity/BrushableBlockEntity;lootTable:Lnet/minecraft/registry/RegistryKey;intermediary field_42814Lnet/minecraft/class_8174;field_42814:Lnet/minecraft/class_5321;official qLebe;q:Lamd;
 - 
lootTableSeed
private long lootTableSeed- Mappings:
 Namespace Name Mixin selector named lootTableSeedLnet/minecraft/block/entity/BrushableBlockEntity;lootTableSeed:Jintermediary field_42815Lnet/minecraft/class_8174;field_42815:Jofficial rLebe;r:J
 
 - 
 - 
Constructor Details
- 
BrushableBlockEntity
- Mappings:
 Namespace Name Mixin selector named <init>Lnet/minecraft/block/entity/BrushableBlockEntity;<init>(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Vintermediary <init>Lnet/minecraft/class_8174;<init>(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Vofficial <init>Lebe;<init>(Ljb;Leeb;)V
 
 - 
 - 
Method Details
- 
brush
public boolean brush(long worldTime, ServerWorld world, LivingEntity brusher, Direction hitDirection, ItemStack brush) - Mappings:
 Namespace Name Mixin selector named brushLnet/minecraft/block/entity/BrushableBlockEntity;brush(JLnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/util/math/Direction;Lnet/minecraft/item/ItemStack;)Zintermediary method_49215Lnet/minecraft/class_8174;method_49215(JLnet/minecraft/class_3218;Lnet/minecraft/class_1309;Lnet/minecraft/class_2350;Lnet/minecraft/class_1799;)Zofficial aLebe;a(JLaub;Lcam;Ljh;Ldcv;)Z
 - 
generateItem
- Mappings:
 Namespace Name Mixin selector named generateItemLnet/minecraft/block/entity/BrushableBlockEntity;generateItem(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/item/ItemStack;)Vintermediary method_49217Lnet/minecraft/class_8174;method_49217(Lnet/minecraft/class_3218;Lnet/minecraft/class_1309;Lnet/minecraft/class_1799;)Vofficial aLebe;a(Laub;Lcam;Ldcv;)V
 - 
finishBrushing
- Mappings:
 Namespace Name Mixin selector named finishBrushingLnet/minecraft/block/entity/BrushableBlockEntity;finishBrushing(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/item/ItemStack;)Vintermediary method_49218Lnet/minecraft/class_8174;method_49218(Lnet/minecraft/class_3218;Lnet/minecraft/class_1309;Lnet/minecraft/class_1799;)Vofficial bLebe;b(Laub;Lcam;Ldcv;)V
 - 
spawnItem
- Mappings:
 Namespace Name Mixin selector named spawnItemLnet/minecraft/block/entity/BrushableBlockEntity;spawnItem(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/item/ItemStack;)Vintermediary method_49220Lnet/minecraft/class_8174;method_49220(Lnet/minecraft/class_3218;Lnet/minecraft/class_1309;Lnet/minecraft/class_1799;)Vofficial cLebe;c(Laub;Lcam;Ldcv;)V
 - 
scheduledTick
- Mappings:
 Namespace Name Mixin selector named scheduledTickLnet/minecraft/block/entity/BrushableBlockEntity;scheduledTick(Lnet/minecraft/server/world/ServerWorld;)Vintermediary method_49219Lnet/minecraft/class_8174;method_49219(Lnet/minecraft/class_3218;)Vofficial aLebe;a(Laub;)V
 - 
readLootTableFromData
- Mappings:
 Namespace Name Mixin selector named readLootTableFromDataLnet/minecraft/block/entity/BrushableBlockEntity;readLootTableFromData(Lnet/minecraft/storage/ReadView;)Zintermediary method_49222Lnet/minecraft/class_8174;method_49222(Lnet/minecraft/class_11368;)Zofficial dLebe;d(Lfda;)Z
 - 
writeLootTableToData
- Mappings:
 Namespace Name Mixin selector named writeLootTableToDataLnet/minecraft/block/entity/BrushableBlockEntity;writeLootTableToData(Lnet/minecraft/storage/WriteView;)Zintermediary method_49223Lnet/minecraft/class_8174;method_49223(Lnet/minecraft/class_11372;)Zofficial gLebe;g(Lfdc;)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
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(net.minecraft.registry.RegistryWrapper.WrapperLookup).- Overrides:
 toInitialChunkDataNbtin classBlockEntity- Returns:
 - the serialized state of this block entity that is observable by clients
 - See Also:
 - Mappings:
 Namespace Name Mixin selector named toInitialChunkDataNbtLnet/minecraft/block/entity/BlockEntity;toInitialChunkDataNbt(Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)Lnet/minecraft/nbt/NbtCompound;intermediary method_16887Lnet/minecraft/class_2586;method_16887(Lnet/minecraft/class_7225$class_7874;)Lnet/minecraft/class_2487;official aLeaz;a(Ljn$a;)Lui;
 - 
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 toon the client.invalid reference
#readNbt"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 named toUpdatePacketLnet/minecraft/block/entity/BrushableBlockEntity;toUpdatePacket()Lnet/minecraft/network/packet/s2c/play/BlockEntityUpdateS2CPacket;intermediary method_49221Lnet/minecraft/class_8174;method_49221()Lnet/minecraft/class_2622;official aLebe;a()Lacw;
 - 
readData
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:
 readDatain classBlockEntity- See Also:
 - Mappings:
 Namespace Name Mixin selector named readDataLnet/minecraft/block/entity/BlockEntity;readData(Lnet/minecraft/storage/ReadView;)Vintermediary method_11014Lnet/minecraft/class_2586;method_11014(Lnet/minecraft/class_11368;)Vofficial aLeaz;a(Lfda;)V
 - 
writeData
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:
 writeDatain classBlockEntity- See Also:
 - Mappings:
 Namespace Name Mixin selector named writeDataLnet/minecraft/block/entity/BlockEntity;writeData(Lnet/minecraft/storage/WriteView;)Vintermediary method_11007Lnet/minecraft/class_2586;method_11007(Lnet/minecraft/class_11372;)Vofficial aLeaz;a(Lfdc;)V
 - 
setLootTable
- Mappings:
 Namespace Name Mixin selector named setLootTableLnet/minecraft/block/entity/BrushableBlockEntity;setLootTable(Lnet/minecraft/registry/RegistryKey;J)Vintermediary method_49216Lnet/minecraft/class_8174;method_49216(Lnet/minecraft/class_5321;J)Vofficial aLebe;a(Lamd;J)V
 - 
getDustedLevel
private int getDustedLevel()- Mappings:
 Namespace Name Mixin selector named getDustedLevelLnet/minecraft/block/entity/BrushableBlockEntity;getDustedLevel()Iintermediary method_49226Lnet/minecraft/class_8174;method_49226()Iofficial fLebe;f()I
 - 
getHitDirection
- Mappings:
 Namespace Name Mixin selector named getHitDirectionLnet/minecraft/block/entity/BrushableBlockEntity;getHitDirection()Lnet/minecraft/util/math/Direction;intermediary method_49224Lnet/minecraft/class_8174;method_49224()Lnet/minecraft/class_2350;official cLebe;c()Ljh;
 - 
getItem
- Mappings:
 Namespace Name Mixin selector named getItemLnet/minecraft/block/entity/BrushableBlockEntity;getItem()Lnet/minecraft/item/ItemStack;intermediary method_49225Lnet/minecraft/class_8174;method_49225()Lnet/minecraft/class_1799;official dLebe;d()Ldcv;
 
 -