Class TestInstanceBlockEntity
- All Implemented Interfaces:
BeamEmitter,StructureBoxRendering
- Mappings:
Namespace Name named net/minecraft/block/entity/TestInstanceBlockEntityintermediary net/minecraft/class_10638official eaj
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic enumNested classes/interfaces inherited from interface net.minecraft.block.entity.BeamEmitter
BeamEmitter.BeamSegmentNested classes/interfaces inherited from interface net.minecraft.block.entity.StructureBoxRendering
StructureBoxRendering.RenderMode, StructureBoxRendering.StructureBox -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final List<BeamEmitter.BeamSegment> private TestInstanceBlockEntity.Dataprivate static final Textprivate static final List<BeamEmitter.BeamSegment> private static final List<BeamEmitter.BeamSegment> private static final List<BeamEmitter.BeamSegment> private static final Vec3iprivate static final List<BeamEmitter.BeamSegment> Fields inherited from class net.minecraft.block.entity.BlockEntity
pos, removed, world -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprivate voidbooleanstatic booleanexportData(ServerWorld world, Identifier structureId, Consumer<Text> messageConsumer) voidforEachPos(Consumer<BlockPos> posConsumer) getBox()getSize()static BlockPosgetStructurePos(BlockPos pos) getStructureSize(ServerWorld world, RegistryKey<TestInstance> testInstance) private static Optional<StructureTemplate> getStructureTemplate(ServerWorld world, RegistryKey<TestInstance> testInstance) private Optional<RegistryEntry.Reference<TestInstance>> private Vec3ivoidMarks this block entity as dirty and that it needs to be saved.voidbooleanprivate voidplaceStructure(ServerWorld world, StructureTemplate template) protected voidreadNbt(NbtCompound nbt, RegistryWrapper.WrapperLookup registries) Reads data fromnbt.voidsaveStructure(Consumer<Text> messageConsumer) private voidvoidvoidsetErrorMessage(Text errorMessage) voidvoidbooleanvoidtoInitialChunkDataNbt(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 voidwriteNbt(NbtCompound nbt, RegistryWrapper.WrapperLookup registries) Writes data tonbt.Methods inherited from class net.minecraft.block.entity.BlockEntity
addComponents, cancelRemoval, createComponentlessNbt, createComponentlessNbtWithIdentifyingData, createComponentMap, createFromNbt, createNbt, createNbtWithId, createNbtWithIdentifyingData, getCachedState, getComponents, getPos, getType, getWorld, hasWorld, isRemoved, markDirty, markRemoved, onBlockReplaced, onSyncedBlockEvent, populateCrashReport, posFromNbt, read, readComponentlessNbt, readComponents, readComponents, readComponents, removeFromCopiedStackNbt, setCachedState, setComponents, setWorld, supports, tryParseCustomName, writeIdToNbt
-
Field Details
-
INVALID_TEST_TEXT
- Mappings:
Namespace Name Mixin selector named INVALID_TEST_TEXTLnet/minecraft/block/entity/TestInstanceBlockEntity;INVALID_TEST_TEXT:Lnet/minecraft/text/Text;intermediary field_56003Lnet/minecraft/class_10638;field_56003:Lnet/minecraft/class_2561;official aLeaj;a:Lxg;
-
CLEARED_BEAM_SEGMENTS
- Mappings:
Namespace Name Mixin selector named CLEARED_BEAM_SEGMENTSLnet/minecraft/block/entity/TestInstanceBlockEntity;CLEARED_BEAM_SEGMENTS:Ljava/util/List;intermediary field_56004Lnet/minecraft/class_10638;field_56004:Ljava/util/List;official bLeaj;b:Ljava/util/List;
-
RUNNING_BEAM_SEGMENTS
- Mappings:
Namespace Name Mixin selector named RUNNING_BEAM_SEGMENTSLnet/minecraft/block/entity/TestInstanceBlockEntity;RUNNING_BEAM_SEGMENTS:Ljava/util/List;intermediary field_56005Lnet/minecraft/class_10638;field_56005:Ljava/util/List;official cLeaj;c:Ljava/util/List;
-
SUCCESS_BEAM_SEGMENTS
- Mappings:
Namespace Name Mixin selector named SUCCESS_BEAM_SEGMENTSLnet/minecraft/block/entity/TestInstanceBlockEntity;SUCCESS_BEAM_SEGMENTS:Ljava/util/List;intermediary field_56006Lnet/minecraft/class_10638;field_56006:Ljava/util/List;official dLeaj;d:Ljava/util/List;
-
REQUIRED_FAIL_BEAM_SEGMENTS
- Mappings:
Namespace Name Mixin selector named REQUIRED_FAIL_BEAM_SEGMENTSLnet/minecraft/block/entity/TestInstanceBlockEntity;REQUIRED_FAIL_BEAM_SEGMENTS:Ljava/util/List;intermediary field_56007Lnet/minecraft/class_10638;field_56007:Ljava/util/List;official eLeaj;e:Ljava/util/List;
-
OPTIONAL_FAIL_BEAM_SEGMENTS
- Mappings:
Namespace Name Mixin selector named OPTIONAL_FAIL_BEAM_SEGMENTSLnet/minecraft/block/entity/TestInstanceBlockEntity;OPTIONAL_FAIL_BEAM_SEGMENTS:Ljava/util/List;intermediary field_56008Lnet/minecraft/class_10638;field_56008:Ljava/util/List;official fLeaj;f:Ljava/util/List;
-
STRUCTURE_OFFSET
- Mappings:
Namespace Name Mixin selector named STRUCTURE_OFFSETLnet/minecraft/block/entity/TestInstanceBlockEntity;STRUCTURE_OFFSET:Lnet/minecraft/util/math/Vec3i;intermediary field_56009Lnet/minecraft/class_10638;field_56009:Lnet/minecraft/class_2382;official gLeaj;g:Lkb;
-
data
- Mappings:
Namespace Name Mixin selector named dataLnet/minecraft/block/entity/TestInstanceBlockEntity;data:Lnet/minecraft/block/entity/TestInstanceBlockEntity$Data;intermediary field_56010Lnet/minecraft/class_10638;field_56010:Lnet/minecraft/class_10638$class_10639;official hLeaj;h:Leaj$a;
-
-
Constructor Details
-
TestInstanceBlockEntity
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/block/entity/TestInstanceBlockEntity;<init>(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Vintermediary <init>Lnet/minecraft/class_10638;<init>(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Vofficial <init>Leaj;<init>(Liw;Lebq;)V
-
-
Method Details
-
setData
- Mappings:
Namespace Name Mixin selector named setDataLnet/minecraft/block/entity/TestInstanceBlockEntity;setData(Lnet/minecraft/block/entity/TestInstanceBlockEntity$Data;)Vintermediary method_66745Lnet/minecraft/class_10638;method_66745(Lnet/minecraft/class_10638$class_10639;)Vofficial aLeaj;a(Leaj$a;)V
-
getStructureSize
public static Optional<Vec3i> getStructureSize(ServerWorld world, RegistryKey<TestInstance> testInstance) - Mappings:
Namespace Name Mixin selector named getStructureSizeLnet/minecraft/block/entity/TestInstanceBlockEntity;getStructureSize(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/registry/RegistryKey;)Ljava/util/Optional;intermediary method_66740Lnet/minecraft/class_10638;method_66740(Lnet/minecraft/class_3218;Lnet/minecraft/class_5321;)Ljava/util/Optional;official aLeaj;a(Lasb;Lalq;)Ljava/util/Optional;
-
getBlockBox
- Mappings:
Namespace Name Mixin selector named getBlockBoxLnet/minecraft/block/entity/TestInstanceBlockEntity;getBlockBox()Lnet/minecraft/util/math/BlockBox;intermediary method_66759Lnet/minecraft/class_10638;method_66759()Lnet/minecraft/class_3341;official dLeaj;d()Lesf;
-
getBox
- Mappings:
Namespace Name Mixin selector named getBoxLnet/minecraft/block/entity/TestInstanceBlockEntity;getBox()Lnet/minecraft/util/math/Box;intermediary method_66762Lnet/minecraft/class_10638;method_66762()Lnet/minecraft/class_238;official fLeaj;f()Lffx;
-
getStructureTemplate
private static Optional<StructureTemplate> getStructureTemplate(ServerWorld world, RegistryKey<TestInstance> testInstance) - Mappings:
Namespace Name Mixin selector named getStructureTemplateLnet/minecraft/block/entity/TestInstanceBlockEntity;getStructureTemplate(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/registry/RegistryKey;)Ljava/util/Optional;intermediary method_66752Lnet/minecraft/class_10638;method_66752(Lnet/minecraft/class_3218;Lnet/minecraft/class_5321;)Ljava/util/Optional;official bLeaj;b(Lasb;Lalq;)Ljava/util/Optional;
-
getTestKey
- Mappings:
Namespace Name Mixin selector named getTestKeyLnet/minecraft/block/entity/TestInstanceBlockEntity;getTestKey()Ljava/util/Optional;intermediary method_66763Lnet/minecraft/class_10638;method_66763()Ljava/util/Optional;official jLeaj;j()Ljava/util/Optional;
-
getTestName
- Mappings:
Namespace Name Mixin selector named getTestNameLnet/minecraft/block/entity/TestInstanceBlockEntity;getTestName()Lnet/minecraft/text/Text;intermediary method_66764Lnet/minecraft/class_10638;method_66764()Lnet/minecraft/class_2561;official kLeaj;k()Lxg;
-
getTestEntry
- Mappings:
Namespace Name Mixin selector named getTestEntryLnet/minecraft/block/entity/TestInstanceBlockEntity;getTestEntry()Ljava/util/Optional;intermediary method_66735Lnet/minecraft/class_10638;method_66735()Ljava/util/Optional;official ELeaj;E()Ljava/util/Optional;
-
shouldIgnoreEntities
public boolean shouldIgnoreEntities()- Mappings:
Namespace Name Mixin selector named shouldIgnoreEntitiesLnet/minecraft/block/entity/TestInstanceBlockEntity;shouldIgnoreEntities()Zintermediary method_66765Lnet/minecraft/class_10638;method_66765()Zofficial sLeaj;s()Z
-
getSize
- Mappings:
Namespace Name Mixin selector named getSizeLnet/minecraft/block/entity/TestInstanceBlockEntity;getSize()Lnet/minecraft/util/math/Vec3i;intermediary method_66766Lnet/minecraft/class_10638;method_66766()Lnet/minecraft/class_2382;official tLeaj;t()Lkb;
-
getRotation
- Mappings:
Namespace Name Mixin selector named getRotationLnet/minecraft/block/entity/TestInstanceBlockEntity;getRotation()Lnet/minecraft/util/BlockRotation;intermediary method_66767Lnet/minecraft/class_10638;method_66767()Lnet/minecraft/class_2470;official uLeaj;u()Ldui;
-
getErrorMessage
- Mappings:
Namespace Name Mixin selector named getErrorMessageLnet/minecraft/block/entity/TestInstanceBlockEntity;getErrorMessage()Ljava/util/Optional;intermediary method_66768Lnet/minecraft/class_10638;method_66768()Ljava/util/Optional;official vLeaj;v()Ljava/util/Optional;
-
setErrorMessage
- Mappings:
Namespace Name Mixin selector named setErrorMessageLnet/minecraft/block/entity/TestInstanceBlockEntity;setErrorMessage(Lnet/minecraft/text/Text;)Vintermediary method_66751Lnet/minecraft/class_10638;method_66751(Lnet/minecraft/class_2561;)Vofficial aLeaj;a(Lxg;)V
-
setFinished
public void setFinished()- Mappings:
Namespace Name Mixin selector named setFinishedLnet/minecraft/block/entity/TestInstanceBlockEntity;setFinished()Vintermediary method_66769Lnet/minecraft/class_10638;method_66769()Vofficial wLeaj;w()V
-
setRunning
public void setRunning()- Mappings:
Namespace Name Mixin selector named setRunningLnet/minecraft/block/entity/TestInstanceBlockEntity;setRunning()Vintermediary method_66770Lnet/minecraft/class_10638;method_66770()Vofficial xLeaj;x()V
-
markDirty
public void markDirty()Marks this block entity as dirty and that it needs to be saved. This also triggers.invalid reference
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 named markDirtyLnet/minecraft/block/entity/BlockEntity;markDirty()Vintermediary method_5431Lnet/minecraft/class_2586;method_5431()Vofficial eLdyo;e()V
-
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, net.minecraft.registry.RegistryWrapper.WrapperLookup)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 named toUpdatePacketLnet/minecraft/block/entity/TestInstanceBlockEntity;toUpdatePacket()Lnet/minecraft/network/packet/s2c/play/BlockEntityUpdateS2CPacket;intermediary method_66771Lnet/minecraft/class_10638;method_66771()Lnet/minecraft/class_2622;official yLeaj;y()Lacl;
-
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 aLdyo;a(Lji$a;)Lua;
-
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 named readNbtLnet/minecraft/block/entity/BlockEntity;readNbt(Lnet/minecraft/nbt/NbtCompound;Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)Vintermediary method_11014Lnet/minecraft/class_2586;method_11014(Lnet/minecraft/class_2487;Lnet/minecraft/class_7225$class_7874;)Vofficial aLdyo;a(Lua;Lji$a;)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 named writeNbtLnet/minecraft/block/entity/BlockEntity;writeNbt(Lnet/minecraft/nbt/NbtCompound;Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)Vintermediary method_11007Lnet/minecraft/class_2586;method_11007(Lnet/minecraft/class_2487;Lnet/minecraft/class_7225$class_7874;)Vofficial bLdyo;b(Lua;Lji$a;)V
-
getRenderMode
- Specified by:
getRenderModein interfaceStructureBoxRendering- Mappings:
Namespace Name Mixin selector named getRenderModeLnet/minecraft/block/entity/StructureBoxRendering;getRenderMode()Lnet/minecraft/block/entity/StructureBoxRendering$RenderMode;intermediary method_66713Lnet/minecraft/class_10634;method_66713()Lnet/minecraft/class_10634$class_10635;official bLdyr;b()Ldyr$a;
-
getStructurePos
- Mappings:
Namespace Name Mixin selector named getStructurePosLnet/minecraft/block/entity/TestInstanceBlockEntity;getStructurePos()Lnet/minecraft/util/math/BlockPos;intermediary method_66772Lnet/minecraft/class_10638;method_66772()Lnet/minecraft/class_2338;official zLeaj;z()Liw;
-
getStructurePos
- Mappings:
Namespace Name Mixin selector named getStructurePosLnet/minecraft/block/entity/TestInstanceBlockEntity;getStructurePos(Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/util/math/BlockPos;intermediary method_66747Lnet/minecraft/class_10638;method_66747(Lnet/minecraft/class_2338;)Lnet/minecraft/class_2338;official aLeaj;a(Liw;)Liw;
-
getStructureBox
- Specified by:
getStructureBoxin interfaceStructureBoxRendering- Mappings:
Namespace Name Mixin selector named getStructureBoxLnet/minecraft/block/entity/StructureBoxRendering;getStructureBox()Lnet/minecraft/block/entity/StructureBoxRendering$StructureBox;intermediary method_66714Lnet/minecraft/class_10634;method_66714()Lnet/minecraft/class_10634$class_10636;official cLdyr;c()Ldyr$b;
-
getBeamSegments
- Specified by:
getBeamSegmentsin interfaceBeamEmitter- Mappings:
Namespace Name Mixin selector named getBeamSegmentsLnet/minecraft/block/entity/BeamEmitter;getBeamSegments()Ljava/util/List;intermediary method_10937Lnet/minecraft/class_10633;method_10937()Ljava/util/List;official aLdyi;a()Ljava/util/List;
-
getTransformedSize
- Mappings:
Namespace Name Mixin selector named getTransformedSizeLnet/minecraft/block/entity/TestInstanceBlockEntity;getTransformedSize()Lnet/minecraft/util/math/Vec3i;intermediary method_66736Lnet/minecraft/class_10638;method_66736()Lnet/minecraft/class_2382;official FLeaj;F()Lkb;
-
reset
- Mappings:
Namespace Name Mixin selector named resetLnet/minecraft/block/entity/TestInstanceBlockEntity;reset(Ljava/util/function/Consumer;)Vintermediary method_66746Lnet/minecraft/class_10638;method_66746(Ljava/util/function/Consumer;)Vofficial aLeaj;a(Ljava/util/function/Consumer;)V
-
saveStructure
- Mappings:
Namespace Name Mixin selector named saveStructureLnet/minecraft/block/entity/TestInstanceBlockEntity;saveStructure(Ljava/util/function/Consumer;)Ljava/util/Optional;intermediary method_66753Lnet/minecraft/class_10638;method_66753(Ljava/util/function/Consumer;)Ljava/util/Optional;official bLeaj;b(Ljava/util/function/Consumer;)Ljava/util/Optional;
-
export
- Mappings:
Namespace Name Mixin selector named exportLnet/minecraft/block/entity/TestInstanceBlockEntity;export(Ljava/util/function/Consumer;)Zintermediary method_66757Lnet/minecraft/class_10638;method_66757(Ljava/util/function/Consumer;)Zofficial cLeaj;c(Ljava/util/function/Consumer;)Z
-
exportData
public static boolean exportData(ServerWorld world, Identifier structureId, Consumer<Text> messageConsumer) - Mappings:
Namespace Name Mixin selector named exportDataLnet/minecraft/block/entity/TestInstanceBlockEntity;exportData(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/Identifier;Ljava/util/function/Consumer;)Zintermediary method_66742Lnet/minecraft/class_10638;method_66742(Lnet/minecraft/class_3218;Lnet/minecraft/class_2960;Ljava/util/function/Consumer;)Zofficial aLeaj;a(Lasb;Lalr;Ljava/util/function/Consumer;)Z
-
start
- Mappings:
Namespace Name Mixin selector named startLnet/minecraft/block/entity/TestInstanceBlockEntity;start(Ljava/util/function/Consumer;)Vintermediary method_66760Lnet/minecraft/class_10638;method_66760(Ljava/util/function/Consumer;)Vofficial dLeaj;d(Ljava/util/function/Consumer;)V
-
placeStructure
public boolean placeStructure()- Mappings:
Namespace Name Mixin selector named placeStructureLnet/minecraft/block/entity/TestInstanceBlockEntity;placeStructure()Zintermediary method_66731Lnet/minecraft/class_10638;method_66731()Zofficial ALeaj;A()Z
-
placeStructure
- Mappings:
Namespace Name Mixin selector named placeStructureLnet/minecraft/block/entity/TestInstanceBlockEntity;placeStructure(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/structure/StructureTemplate;)Vintermediary method_66744Lnet/minecraft/class_10638;method_66744(Lnet/minecraft/class_3218;Lnet/minecraft/class_3499;)Vofficial aLeaj;a(Lasb;Lewp;)V
-
discardEntities
private void discardEntities()- Mappings:
Namespace Name Mixin selector named discardEntitiesLnet/minecraft/block/entity/TestInstanceBlockEntity;discardEntities()Vintermediary method_66737Lnet/minecraft/class_10638;method_66737()Vofficial GLeaj;G()V
-
setChunksForced
private void setChunksForced()- Mappings:
Namespace Name Mixin selector named setChunksForcedLnet/minecraft/block/entity/TestInstanceBlockEntity;setChunksForced()Vintermediary method_66738Lnet/minecraft/class_10638;method_66738()Vofficial HLeaj;H()V
-
getStartPos
- Mappings:
Namespace Name Mixin selector named getStartPosLnet/minecraft/block/entity/TestInstanceBlockEntity;getStartPos()Lnet/minecraft/util/math/BlockPos;intermediary method_66732Lnet/minecraft/class_10638;method_66732()Lnet/minecraft/class_2338;official BLeaj;B()Liw;
-
placeBarriers
public void placeBarriers()- Mappings:
Namespace Name Mixin selector named placeBarriersLnet/minecraft/block/entity/TestInstanceBlockEntity;placeBarriers()Vintermediary method_66733Lnet/minecraft/class_10638;method_66733()Vofficial CLeaj;C()V
-
clearBarriers
public void clearBarriers()- Mappings:
Namespace Name Mixin selector named clearBarriersLnet/minecraft/block/entity/TestInstanceBlockEntity;clearBarriers()Vintermediary method_66734Lnet/minecraft/class_10638;method_66734()Vofficial DLeaj;D()V
-
forEachPos
- Mappings:
Namespace Name Mixin selector named forEachPosLnet/minecraft/block/entity/TestInstanceBlockEntity;forEachPos(Ljava/util/function/Consumer;)Vintermediary method_66761Lnet/minecraft/class_10638;method_66761(Ljava/util/function/Consumer;)Vofficial eLeaj;e(Ljava/util/function/Consumer;)V
-