public class ModularEntity<ENT extends net.minecraft.entity.Entity & net.minecraft.util.IItemProvider> extends java.lang.Object implements IModularEntity
| Constructor and Description |
|---|
ModularEntity(ENT entity,
ModuleSlot... moduleSlots) |
ModularEntity(ENT entity,
java.util.function.Supplier<ModuleSlot>... moduleSlots) |
| 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) |
net.minecraft.item.Item |
asItem() |
net.minecraft.item.ItemStack |
asItemStack() |
boolean |
canEquip(Module<?> module) |
void |
deserializeNBT(net.minecraft.nbt.CompoundNBT nbt) |
<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) |
<T> net.minecraftforge.common.util.LazyOptional<T> |
getCapability(net.minecraftforge.common.capabilities.Capability<T> cap,
net.minecraft.util.Direction side) |
ModuleInstance<?> |
getModuleInstance(ModuleSlot moduleSlot) |
<T extends Module<T>,U extends ModuleInstance<T>> |
getModuleInstance(ModuleType moduleType) |
java.util.Collection<ModuleInstance<?>> |
getModuleInstances() |
java.util.List<ModuleSlot> |
getModuleSlots() |
net.minecraft.entity.Entity |
getSelf() |
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) |
net.minecraft.nbt.CompoundNBT |
serializeNBT() |
void |
write(net.minecraft.network.PacketBuffer packetBuffer) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitapplyPlayerInteraction, callModule, canInteractWith, getModuleInstance, getTheWorld@SafeVarargs public ModularEntity(ENT entity, java.util.function.Supplier<ModuleSlot>... moduleSlots)
public ModularEntity(ENT entity, ModuleSlot... moduleSlots)
public void openContainer(net.minecraft.entity.player.PlayerEntity playerEntity,
net.minecraft.inventory.container.INamedContainerProvider provider,
java.util.function.Consumer<net.minecraft.network.PacketBuffer> packetBufferConsumer)
openContainer in interface IModularEntity@Nonnull public net.minecraft.entity.Entity getSelf()
getSelf in interface IModularEntitypublic boolean canEquip(Module<?> module)
canEquip in interface IModularEntity@Nonnull public java.util.List<ModuleSlot> getModuleSlots()
getModuleSlots in interface IModularEntity@Nullable public <T extends Module<T>> ModuleInstance<T> add(Module<T> module, ModuleSlot moduleSlot, boolean sendUpdate)
add in interface IModularEntity@Nullable public ModuleInstance<?> getModuleInstance(ModuleSlot moduleSlot)
getModuleInstance in interface IModularEntity@Nullable public <T extends Module<T>,U extends ModuleInstance<T>> U getModuleInstance(ModuleType moduleType)
getModuleInstance in interface IModularEntity@Nonnull public net.minecraft.item.Item asItem()
asItem in interface net.minecraft.util.IItemProviderpublic net.minecraft.item.ItemStack asItemStack()
asItemStack in interface IModularEntitypublic net.minecraft.nbt.CompoundNBT serializeNBT()
serializeNBT in interface net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundNBT>public void deserializeNBT(net.minecraft.nbt.CompoundNBT nbt)
deserializeNBT in interface net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundNBT>public void write(net.minecraft.network.PacketBuffer packetBuffer)
write in interface IModularEntitypublic java.util.Collection<ModuleInstance<?>> getModuleInstances()
getModuleInstances in interface IModularEntitypublic 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)
applyPlayerInteraction in interface IModularEntitypublic void read(net.minecraft.network.PacketBuffer packetBuffer)
read in interface IModularEntitypublic void remove(ModuleSlot moduleSlot, boolean sendUpdate)
remove in interface IModularEntitypublic void remove(ModuleInstance<?> moduleInstance)
remove in interface IModularEntity@Nonnull
public <T> net.minecraftforge.common.util.LazyOptional<T> getCapability(@Nonnull
net.minecraftforge.common.capabilities.Capability<T> cap,
@Nullable
net.minecraft.util.Direction side)
getCapability in interface net.minecraftforge.common.capabilities.ICapabilityProvider@Nonnull
public <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)
getCapabilities in interface IModularEntitypublic void invalidateCapabilities()
invalidateCapabilities in interface IModularEntitypublic void sendClientUpdate(ModuleInstance<?> moduleInstance, int type, net.minecraft.nbt.CompoundNBT compoundNBT)
sendClientUpdate in interface IModularEntity