public interface IModularEntity
extends net.minecraft.util.IItemProvider, net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundNBT>, net.minecraftforge.common.capabilities.ICapabilityProvider
| Modifier and Type | Method and Description |
|---|---|
<T extends Module<T>> |
add(Module<T> module,
ModuleSlot moduleSlot,
boolean sendUpdate) |
net.minecraft.util.ActionResultType |
applyPlayerInteraction(ModuleSlot moduleSlot,
net.minecraft.entity.player.PlayerEntity player,
net.minecraft.util.math.vector.Vector3d vec,
net.minecraft.util.Hand hand) |
default net.minecraft.util.ActionResultType |
applyPlayerInteraction(java.util.function.Supplier<ModuleSlot> moduleSlot,
net.minecraft.entity.player.PlayerEntity player,
net.minecraft.util.math.vector.Vector3d vec,
net.minecraft.util.Hand hand) |
net.minecraft.item.ItemStack |
asItemStack() |
default <T extends Module<T>,U extends ModuleInstance<T>,V> |
callModule(java.util.function.Supplier<ModuleType> moduleType,
java.util.function.Function<U,V> calling,
java.util.function.Supplier<V> defaultValue) |
boolean |
canEquip(Module<?> module) |
default boolean |
canInteractWith(net.minecraft.entity.player.PlayerEntity playerEntity) |
<T> java.util.List<net.minecraftforge.common.util.LazyOptional<T>> |
getCapabilities(net.minecraftforge.common.capabilities.Capability<T> cap,
net.minecraft.util.Direction side,
ModuleSlot priority) |
ModuleInstance<?> |
getModuleInstance(ModuleSlot moduleSlot) |
<T extends Module<T>,U extends ModuleInstance<T>> |
getModuleInstance(ModuleType moduleType) |
default <T extends Module<T>,U extends ModuleInstance<T>> |
getModuleInstance(java.util.function.Supplier<ModuleType> moduleType) |
java.util.Collection<ModuleInstance<?>> |
getModuleInstances() |
java.util.List<ModuleSlot> |
getModuleSlots() |
net.minecraft.entity.Entity |
getSelf() |
default net.minecraft.world.World |
getTheWorld() |
void |
invalidateCapabilities() |
void |
openContainer(net.minecraft.entity.player.PlayerEntity playerEntity,
net.minecraft.inventory.container.INamedContainerProvider provider,
java.util.function.Consumer<net.minecraft.network.PacketBuffer> packetBufferConsumer) |
void |
read(net.minecraft.network.PacketBuffer packetBuffer) |
void |
remove(ModuleInstance<?> moduleInstance) |
void |
remove(ModuleSlot moduleSlot,
boolean sendUpdate) |
void |
sendClientUpdate(ModuleInstance<?> moduleInstance,
int type,
net.minecraft.nbt.CompoundNBT compoundNBT) |
void |
write(net.minecraft.network.PacketBuffer packetBuffer) |
void openContainer(net.minecraft.entity.player.PlayerEntity playerEntity,
net.minecraft.inventory.container.INamedContainerProvider provider,
java.util.function.Consumer<net.minecraft.network.PacketBuffer> packetBufferConsumer)
default boolean canInteractWith(net.minecraft.entity.player.PlayerEntity playerEntity)
@Nonnull default net.minecraft.world.World getTheWorld()
@Nonnull net.minecraft.entity.Entity getSelf()
boolean canEquip(Module<?> module)
@Nonnull java.util.List<ModuleSlot> getModuleSlots()
void remove(ModuleSlot moduleSlot, boolean sendUpdate)
void remove(ModuleInstance<?> moduleInstance)
@Nullable <T extends Module<T>> ModuleInstance<T> add(Module<T> module, ModuleSlot moduleSlot, boolean sendUpdate)
@Nullable ModuleInstance<?> getModuleInstance(ModuleSlot moduleSlot)
@Nullable <T extends Module<T>,U extends ModuleInstance<T>> U getModuleInstance(ModuleType moduleType)
@Nullable default <T extends Module<T>,U extends ModuleInstance<T>> U getModuleInstance(java.util.function.Supplier<ModuleType> moduleType)
default <T extends Module<T>,U extends ModuleInstance<T>,V> V callModule(java.util.function.Supplier<ModuleType> moduleType, java.util.function.Function<U,V> calling, java.util.function.Supplier<V> defaultValue)
net.minecraft.item.ItemStack asItemStack()
void read(net.minecraft.network.PacketBuffer packetBuffer)
void write(net.minecraft.network.PacketBuffer packetBuffer)
java.util.Collection<ModuleInstance<?>> getModuleInstances()
default net.minecraft.util.ActionResultType applyPlayerInteraction(java.util.function.Supplier<ModuleSlot> moduleSlot, net.minecraft.entity.player.PlayerEntity player, net.minecraft.util.math.vector.Vector3d vec, net.minecraft.util.Hand hand)
net.minecraft.util.ActionResultType applyPlayerInteraction(ModuleSlot moduleSlot, net.minecraft.entity.player.PlayerEntity player, net.minecraft.util.math.vector.Vector3d vec, net.minecraft.util.Hand hand)
<T> java.util.List<net.minecraftforge.common.util.LazyOptional<T>> getCapabilities(@Nonnull
net.minecraftforge.common.capabilities.Capability<T> cap,
@Nullable
net.minecraft.util.Direction side,
@Nullable
ModuleSlot priority)
void invalidateCapabilities()
void sendClientUpdate(ModuleInstance<?> moduleInstance, int type, net.minecraft.nbt.CompoundNBT compoundNBT)