Class SideConfigurator<T>
java.lang.Object
me.desht.pneumaticcraft.common.block.entity.SideConfigurator<T>
- All Implemented Interfaces:
net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
public class SideConfigurator<T>
extends Object
implements net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
A class to manage which sides of a BE's block are mapped to which capability handler objects (item/fluid/energy...)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enum -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoiddeserializeNBT(net.minecraft.nbt.CompoundTag nbt) getButtonTag(SideConfigurator.RelativeFace relativeFace) net.minecraft.network.chat.ComponentgetFaceLabel(SideConfigurator.RelativeFace relativeFace) byte[]getFaces()getID()booleanhandleButtonPress(String tag, boolean hasShiftDown) voidstatic voidreadFromNBT(net.minecraft.nbt.CompoundTag tag, ISideConfigurable sideConfigurable) intregisterHandler(String id, net.minecraft.resources.ResourceLocation texture, net.minecraftforge.common.capabilities.Capability<T> cap, net.minecraftforge.common.util.NonNullSupplier<T> handler, SideConfigurator.RelativeFace... defaultRelativeFaces) intregisterHandler(String id, net.minecraft.world.item.ItemStack textureStack, net.minecraftforge.common.capabilities.Capability<T> cap, net.minecraftforge.common.util.NonNullSupplier<T> handler, SideConfigurator.RelativeFace... defaultRelativeFaces) net.minecraft.nbt.CompoundTagvoidsetFaces(byte[] faces) voidunregisterHandlers(Predicate<String> idMatcher) static net.minecraft.nbt.CompoundTagwriteToNBT(ISideConfigurable sideConfigurable)
-
Field Details
-
BASE_BUTTON_TAG
- See Also:
-
-
Method Details
-
registerHandler
public int registerHandler(String id, net.minecraft.world.item.ItemStack textureStack, net.minecraftforge.common.capabilities.Capability<T> cap, net.minecraftforge.common.util.NonNullSupplier<T> handler, SideConfigurator.RelativeFace... defaultRelativeFaces) -
registerHandler
public int registerHandler(String id, net.minecraft.resources.ResourceLocation texture, net.minecraftforge.common.capabilities.Capability<T> cap, net.minecraftforge.common.util.NonNullSupplier<T> handler, SideConfigurator.RelativeFace... defaultRelativeFaces) -
unregisterHandlers
-
invalidateCaps
public void invalidateCaps() -
getFaces
public byte[] getFaces() -
setFaces
public void setFaces(byte[] faces) -
handleButtonPress
-
getButtonTag
-
getID
-
getTranslationKey
-
getFaceLabel
public net.minecraft.network.chat.Component getFaceLabel(SideConfigurator.RelativeFace relativeFace) -
getEntry
-
serializeNBT
public net.minecraft.nbt.CompoundTag serializeNBT()- Specified by:
serializeNBTin interfacenet.minecraftforge.common.util.INBTSerializable<T>
-
deserializeNBT
public void deserializeNBT(net.minecraft.nbt.CompoundTag nbt) - Specified by:
deserializeNBTin interfacenet.minecraftforge.common.util.INBTSerializable<T>
-
writeToNBT
-
readFromNBT
public static void readFromNBT(net.minecraft.nbt.CompoundTag tag, ISideConfigurable sideConfigurable)
-