Class BlockEntityTagSubstitution
java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<net.minecraft.world.level.block.entity.BlockEntity>
net.minecraft.world.level.block.entity.BlockEntity
com.ldtteam.structurize.blockentities.BlockEntityTagSubstitution
- All Implemented Interfaces:
IBlueprintDataProviderBE,net.minecraftforge.common.capabilities.ICapabilityProvider,net.minecraftforge.common.capabilities.ICapabilityProviderImpl<net.minecraft.world.level.block.entity.BlockEntity>,net.minecraftforge.common.capabilities.ICapabilitySerializable<net.minecraft.nbt.CompoundTag>,net.minecraftforge.common.extensions.IForgeBlockEntity,net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
public class BlockEntityTagSubstitution
extends net.minecraft.world.level.block.entity.BlockEntity
implements IBlueprintDataProviderBE
The block entity for BlockTagSubstitution
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classStorage for information about the replacement block, if any.Nested classes/interfaces inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
net.minecraftforge.common.capabilities.CapabilityProvider.AsField<B extends net.minecraftforge.common.capabilities.ICapabilityProviderImpl<B>> -
Field Summary
Fields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPositionFields inherited from interface com.ldtteam.structurize.blockentities.interfaces.IBlueprintDataProviderBE
TAG_BLUEPRINTDATA, TAG_CORNER_ONE, TAG_CORNER_TWO, TAG_PACK, TAG_PATH, TAG_POS_TAG_MAP, TAG_SCHEMATIC_NAME, TAG_TAG_NAME, TAG_TAG_NAME_LIST, TAG_TAG_POSFields inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
INFINITE_EXTENT_AABB -
Constructor Summary
ConstructorsConstructorDescriptionBlockEntityTagSubstitution(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
Method Summary
Modifier and TypeMethodDescriptionGetter for the blueprint path.Get the pack name.Gets the map of blockpos and its applied tags.net.minecraft.util.Tuple<net.minecraft.core.BlockPos,net.minecraft.core.BlockPos> Gets the schematics corner positions, default is anchor PosGets the schematic name, required to be savednet.minecraft.core.BlockPosGets the TE's world positionnet.minecraft.network.protocol.game.ClientboundBlockEntityDataPacketGets the update packet, needed for initial placement through schematic paste@NotNull net.minecraft.nbt.CompoundTagvoidload(@NotNull net.minecraft.nbt.CompoundTag compound) voidonDataPacket(net.minecraft.network.Connection net, net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket packet) voidsaveAdditional(@NotNull net.minecraft.nbt.CompoundTag compound) voidsetBlueprintPath(String inPackPath) Set the blueprint path in the provider.voidsetPackName(String packName) Set the pack this blueprint belongs to.voidsetPositionedTags(Map<net.minecraft.core.BlockPos, List<String>> positionedTags) Sets the map of positioned tags.voidsetSchematicCorners(net.minecraft.core.BlockPos pos1, net.minecraft.core.BlockPos pos2) Sets the schematics corner positionsvoidsetSchematicName(String name) Sets the schematic nameMethods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, hasLevel, isRemoved, loadStatic, onChunkUnloaded, onlyOpCanSetNbt, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setLevel, setRemoved, triggerEventMethods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCapsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.ldtteam.structurize.blockentities.interfaces.IBlueprintDataProviderBE
addTag, getInWorldCorners, getRealWorldPos, getWorldTagNamePosMap, getWorldTagPosMap, readSchematicDataFromNBT, removeTag, writeSchematicDataToNBTMethods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability, getCapabilityMethods inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
deserializeNBT, getModelData, getRenderBoundingBox, handleUpdateTag, hasCustomOutlineRendering, onLoad, requestModelDataUpdate, serializeNBT
-
Constructor Details
-
BlockEntityTagSubstitution
public BlockEntityTagSubstitution(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
-
-
Method Details
-
getSchematicName
Description copied from interface:IBlueprintDataProviderBEGets the schematic name, required to be saved- Specified by:
getSchematicNamein interfaceIBlueprintDataProviderBE- Returns:
- schematic name
-
setSchematicName
Description copied from interface:IBlueprintDataProviderBESets the schematic name- Specified by:
setSchematicNamein interfaceIBlueprintDataProviderBE- Parameters:
name- name to set
-
getPositionedTags
Description copied from interface:IBlueprintDataProviderBEGets the map of blockpos and its applied tags. Positions are relative to the anchorpos, use pos + anchor bos to obtain real world coords.- Specified by:
getPositionedTagsin interfaceIBlueprintDataProviderBE- Returns:
- tagPosMap
-
setPositionedTags
Description copied from interface:IBlueprintDataProviderBESets the map of positioned tags.- Specified by:
setPositionedTagsin interfaceIBlueprintDataProviderBE- Parameters:
positionedTags- tag map
-
getSchematicCorners
public net.minecraft.util.Tuple<net.minecraft.core.BlockPos,net.minecraft.core.BlockPos> getSchematicCorners()Description copied from interface:IBlueprintDataProviderBEGets the schematics corner positions, default is anchor Pos- Specified by:
getSchematicCornersin interfaceIBlueprintDataProviderBE
-
setSchematicCorners
public void setSchematicCorners(net.minecraft.core.BlockPos pos1, net.minecraft.core.BlockPos pos2) Description copied from interface:IBlueprintDataProviderBESets the schematics corner positions- Specified by:
setSchematicCornersin interfaceIBlueprintDataProviderBE- Parameters:
pos1- first pospos2- second pos
-
getTilePos
public net.minecraft.core.BlockPos getTilePos()Description copied from interface:IBlueprintDataProviderBEGets the TE's world position- Specified by:
getTilePosin interfaceIBlueprintDataProviderBE- Returns:
- position
-
getReplacement
- Returns:
- the replacement block details
-
load
public void load(@NotNull @NotNull net.minecraft.nbt.CompoundTag compound) - Overrides:
loadin classnet.minecraft.world.level.block.entity.BlockEntity
-
saveAdditional
public void saveAdditional(@NotNull @NotNull net.minecraft.nbt.CompoundTag compound) - Overrides:
saveAdditionalin classnet.minecraft.world.level.block.entity.BlockEntity
-
getUpdatePacket
public net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket getUpdatePacket()Description copied from interface:IBlueprintDataProviderBEGets the update packet, needed for initial placement through schematic paste- Specified by:
getUpdatePacketin interfaceIBlueprintDataProviderBE- Overrides:
getUpdatePacketin classnet.minecraft.world.level.block.entity.BlockEntity- Returns:
- client update packet
-
setPackName
Description copied from interface:IBlueprintDataProviderBESet the pack this blueprint belongs to.- Specified by:
setPackNamein interfaceIBlueprintDataProviderBE- Parameters:
packName- the pack.
-
setBlueprintPath
Description copied from interface:IBlueprintDataProviderBESet the blueprint path in the provider.- Specified by:
setBlueprintPathin interfaceIBlueprintDataProviderBE- Parameters:
inPackPath- the path where the blueprint of this file was loaded from within a pack.
-
getPackName
Description copied from interface:IBlueprintDataProviderBEGet the pack name.- Specified by:
getPackNamein interfaceIBlueprintDataProviderBE- Returns:
- the pack name.
-
getBlueprintPath
Description copied from interface:IBlueprintDataProviderBEGetter for the blueprint path.- Specified by:
getBlueprintPathin interfaceIBlueprintDataProviderBE- Returns:
- the pack name.
-
getUpdateTag
@NotNull public @NotNull net.minecraft.nbt.CompoundTag getUpdateTag()- Overrides:
getUpdateTagin classnet.minecraft.world.level.block.entity.BlockEntity
-
onDataPacket
public void onDataPacket(net.minecraft.network.Connection net, net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket packet) - Specified by:
onDataPacketin interfacenet.minecraftforge.common.extensions.IForgeBlockEntity
-