Class TestInstanceBlockEntity
- All Implemented Interfaces:
BeamEmitter,StructureBoxRendering
- Mappings:
Namespace Name named net/minecraft/block/entity/TestInstanceBlockEntityintermediary net/minecraft/class_10638official egy
-
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 voidReads 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 voidWrites data tonbt.Methods 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, markRemoved, onBlockReplaced, onSyncedBlockEvent, populateCrashReport, posFromNbt, read, readComponentlessData, readComponents, readComponents, readComponents, removeFromCopiedStackData, setCachedState, setComponents, setWorld, supports, tryParseCustomName, writeComponentlessData, writeDataWithId, writeDataWithoutId, writeFullData, writeId
-
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 aLegy;a:Lxv;
-
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 bLegy;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 cLegy;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 dLegy;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 eLegy;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 fLegy;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 gLegy;g:Lkg;
-
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 hLegy;h:Legy$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>Legy;<init>(Ljb;Leig;)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 aLegy;a(Legy$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 aLegy;a(Laws;Lamv;)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 dLegy;d()Leyw;
-
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 fLegy;f()Lfmt;
-
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 bLegy;b(Laws;Lamv;)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 hLegy;h()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 kLegy;k()Lxv;
-
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 GLegy;G()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 lLegy;l()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 vLegy;v()Lkg;
-
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 wLegy;w()Leal;
-
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 xLegy;x()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 aLegy;a(Lxv;)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 yLegy;y()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 zLegy;z()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 eLefa;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 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/TestInstanceBlockEntity;toUpdatePacket()Lnet/minecraft/network/packet/s2c/play/BlockEntityUpdateS2CPacket;intermediary method_66771Lnet/minecraft/class_10638;method_66771()Lnet/minecraft/class_2622;official ALegy;A()Lado;
-
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 aLefa;a(Ljn$a;)Luo;
-
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 aLefa;a(Lfhg;)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 aLefa;a(Lfhi;)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 bLefd;b()Lefd$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 BLegy;B()Ljb;
-
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 aLegy;a(Ljb;)Ljb;
-
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 cLefd;c()Lefd$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 aLeeu;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 HLegy;H()Lkg;
-
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 aLegy;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 bLegy;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 cLegy;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 aLegy;a(Laws;Lamw;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 dLegy;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 CLegy;C()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 aLegy;a(Laws;Lfdg;)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 ILegy;I()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 JLegy;J()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 DLegy;D()Ljb;
-
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 ELegy;E()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 FLegy;F()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 eLegy;e(Ljava/util/function/Consumer;)V
-