Package at.petrak.hexcasting.forge.cap
Record Class ForgeImpetusCapability
java.lang.Object
java.lang.Record
at.petrak.hexcasting.forge.cap.ForgeImpetusCapability
- All Implemented Interfaces:
net.minecraftforge.items.IItemHandler
public record ForgeImpetusCapability(at.petrak.hexcasting.api.block.circle.BlockEntityAbstractImpetus impetus)
extends Record
implements net.minecraftforge.items.IItemHandler
-
Constructor Summary
ConstructorsConstructorDescriptionForgeImpetusCapability(at.petrak.hexcasting.api.block.circle.BlockEntityAbstractImpetus impetus) Creates an instance of aForgeImpetusCapabilityrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.@NotNull net.minecraft.world.item.ItemStackextractItem(int slot, int amount, boolean simulate) intgetSlotLimit(int slot) intgetSlots()@NotNull net.minecraft.world.item.ItemStackgetStackInSlot(int slot) final inthashCode()Returns a hash code value for this object.at.petrak.hexcasting.api.block.circle.BlockEntityAbstractImpetusimpetus()Returns the value of theimpetusrecord component.@NotNull net.minecraft.world.item.ItemStackinsertItem(int slot, @NotNull net.minecraft.world.item.ItemStack originalStack, boolean simulate) booleanisItemValid(int slot, @NotNull net.minecraft.world.item.ItemStack stack) final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ForgeImpetusCapability
public ForgeImpetusCapability(at.petrak.hexcasting.api.block.circle.BlockEntityAbstractImpetus impetus) Creates an instance of aForgeImpetusCapabilityrecord class.- Parameters:
impetus- the value for theimpetusrecord component
-
-
Method Details
-
getSlots
public int getSlots()- Specified by:
getSlotsin interfacenet.minecraftforge.items.IItemHandler
-
getStackInSlot
@NotNull public @NotNull net.minecraft.world.item.ItemStack getStackInSlot(int slot) - Specified by:
getStackInSlotin interfacenet.minecraftforge.items.IItemHandler
-
insertItem
@NotNull public @NotNull net.minecraft.world.item.ItemStack insertItem(int slot, @NotNull @NotNull net.minecraft.world.item.ItemStack originalStack, boolean simulate) - Specified by:
insertItemin interfacenet.minecraftforge.items.IItemHandler
-
extractItem
@NotNull public @NotNull net.minecraft.world.item.ItemStack extractItem(int slot, int amount, boolean simulate) - Specified by:
extractItemin interfacenet.minecraftforge.items.IItemHandler
-
getSlotLimit
public int getSlotLimit(int slot) - Specified by:
getSlotLimitin interfacenet.minecraftforge.items.IItemHandler
-
isItemValid
public boolean isItemValid(int slot, @NotNull @NotNull net.minecraft.world.item.ItemStack stack) - Specified by:
isItemValidin interfacenet.minecraftforge.items.IItemHandler
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
impetus
public at.petrak.hexcasting.api.block.circle.BlockEntityAbstractImpetus impetus()Returns the value of theimpetusrecord component.- Returns:
- the value of the
impetusrecord component
-