Record Class BrainsweepRecipe
java.lang.Object
java.lang.Record
at.petrak.hexcasting.common.recipe.BrainsweepRecipe
- All Implemented Interfaces:
net.minecraft.world.item.crafting.Recipe<net.minecraft.world.Container>
public record BrainsweepRecipe(net.minecraft.resources.ResourceLocation id, StateIngredient blockIn, BrainsweepeeIngredient entityIn, long mediaCost, net.minecraft.world.level.block.state.BlockState result)
extends Record
implements net.minecraft.world.item.crafting.Recipe<net.minecraft.world.Container>
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionBrainsweepRecipe(net.minecraft.resources.ResourceLocation id, StateIngredient blockIn, BrainsweepeeIngredient entityIn, long mediaCost, net.minecraft.world.level.block.state.BlockState result) Creates an instance of aBrainsweepReciperecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.item.ItemStackassemble(net.minecraft.world.Container pContainer, net.minecraft.core.RegistryAccess access) blockIn()Returns the value of theblockInrecord component.booleancanCraftInDimensions(int pWidth, int pHeight) static net.minecraft.world.level.block.state.BlockStatecopyProperties(net.minecraft.world.level.block.state.BlockState original, net.minecraft.world.level.block.state.BlockState copyTo) entityIn()Returns the value of theentityInrecord component.final booleanIndicates whether some other object is "equal to" this one.net.minecraft.resources.ResourceLocationgetId()net.minecraft.world.item.ItemStackgetResultItem(net.minecraft.core.RegistryAccess registryAccess) net.minecraft.world.item.crafting.RecipeSerializer<?>net.minecraft.world.item.crafting.RecipeType<?>getType()final inthashCode()Returns a hash code value for this object.net.minecraft.resources.ResourceLocationid()Returns the value of theidrecord component.booleanmatches(net.minecraft.world.Container pContainer, net.minecraft.world.level.Level pLevel) booleanmatches(net.minecraft.world.level.block.state.BlockState blockIn, net.minecraft.world.entity.Entity victim, net.minecraft.server.level.ServerLevel level) longReturns the value of themediaCostrecord component.net.minecraft.world.level.block.state.BlockStateresult()Returns the value of theresultrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.item.crafting.Recipe
getGroup, getIngredients, getRemainingItems, getToastSymbol, isIncomplete, isSpecial, showNotification
-
Constructor Details
-
BrainsweepRecipe
public BrainsweepRecipe(net.minecraft.resources.ResourceLocation id, StateIngredient blockIn, BrainsweepeeIngredient entityIn, long mediaCost, net.minecraft.world.level.block.state.BlockState result) Creates an instance of aBrainsweepReciperecord class.- Parameters:
id- the value for theidrecord componentblockIn- the value for theblockInrecord componententityIn- the value for theentityInrecord componentmediaCost- the value for themediaCostrecord componentresult- the value for theresultrecord component
-
-
Method Details
-
matches
public boolean matches(net.minecraft.world.level.block.state.BlockState blockIn, net.minecraft.world.entity.Entity victim, net.minecraft.server.level.ServerLevel level) -
getId
public net.minecraft.resources.ResourceLocation getId()- Specified by:
getIdin interfacenet.minecraft.world.item.crafting.Recipe<net.minecraft.world.Container>
-
getType
public net.minecraft.world.item.crafting.RecipeType<?> getType()- Specified by:
getTypein interfacenet.minecraft.world.item.crafting.Recipe<net.minecraft.world.Container>
-
getSerializer
public net.minecraft.world.item.crafting.RecipeSerializer<?> getSerializer()- Specified by:
getSerializerin interfacenet.minecraft.world.item.crafting.Recipe<net.minecraft.world.Container>
-
matches
public boolean matches(net.minecraft.world.Container pContainer, net.minecraft.world.level.Level pLevel) - Specified by:
matchesin interfacenet.minecraft.world.item.crafting.Recipe<net.minecraft.world.Container>
-
assemble
public net.minecraft.world.item.ItemStack assemble(net.minecraft.world.Container pContainer, net.minecraft.core.RegistryAccess access) - Specified by:
assemblein interfacenet.minecraft.world.item.crafting.Recipe<net.minecraft.world.Container>
-
canCraftInDimensions
public boolean canCraftInDimensions(int pWidth, int pHeight) - Specified by:
canCraftInDimensionsin interfacenet.minecraft.world.item.crafting.Recipe<net.minecraft.world.Container>
-
getResultItem
public net.minecraft.world.item.ItemStack getResultItem(net.minecraft.core.RegistryAccess registryAccess) - Specified by:
getResultItemin interfacenet.minecraft.world.item.crafting.Recipe<net.minecraft.world.Container>
-
copyProperties
public static net.minecraft.world.level.block.state.BlockState copyProperties(net.minecraft.world.level.block.state.BlockState original, net.minecraft.world.level.block.state.BlockState copyTo) -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
id
public net.minecraft.resources.ResourceLocation id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
blockIn
Returns the value of theblockInrecord component.- Returns:
- the value of the
blockInrecord component
-
entityIn
Returns the value of theentityInrecord component.- Returns:
- the value of the
entityInrecord component
-
mediaCost
public long mediaCost()Returns the value of themediaCostrecord component.- Returns:
- the value of the
mediaCostrecord component
-
result
public net.minecraft.world.level.block.state.BlockState result()Returns the value of theresultrecord component.- Returns:
- the value of the
resultrecord component
-