Record Class UnlockIEMultiblockEffect
java.lang.Object
java.lang.Record
com.portingdeadmods.researchd.compat.immersiveengineering.UnlockIEMultiblockEffect
- All Implemented Interfaces:
ResearchEffect
public record UnlockIEMultiblockEffect(Optional<net.minecraft.world.item.ItemStack> icon, Optional<String> name, net.minecraft.resources.ResourceLocation multiblock)
extends Record
implements ResearchEffect
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.resources.ResourceLocationstatic final ResearchEffectSerializer<UnlockIEMultiblockEffect> -
Constructor Summary
ConstructorsConstructorDescriptionUnlockIEMultiblockEffect(Optional<net.minecraft.world.item.ItemStack> icon, Optional<String> name, net.minecraft.resources.ResourceLocation multiblock) Creates an instance of aUnlockIEMultiblockEffectrecord class.UnlockIEMultiblockEffect(net.minecraft.resources.ResourceLocation multiblock) UnlockIEMultiblockEffect(net.minecraft.world.item.ItemStack icon, String name, net.minecraft.resources.ResourceLocation multiblock) -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.net.minecraft.world.item.ItemStackfinal inthashCode()Returns a hash code value for this object.Optional<net.minecraft.world.item.ItemStack> icon()Returns the value of theiconrecord component.net.minecraft.resources.ResourceLocationid()net.minecraft.resources.ResourceLocationReturns the value of themultiblockrecord component.name()Returns the value of thenamerecord component.voidonLock(net.minecraft.world.level.Level level, ResearchTeam team, net.minecraft.resources.ResourceKey<Research> research) voidonUnlock(net.minecraft.world.level.Level level, ResearchTeam team, net.minecraft.resources.ResourceKey<Research> research) final StringtoString()Returns a string representation of this record class.type()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.portingdeadmods.researchd.api.research.effects.ResearchEffect
getTranslation
-
Field Details
-
SERIALIZER
-
ID
public static final net.minecraft.resources.ResourceLocation ID
-
-
Constructor Details
-
UnlockIEMultiblockEffect
public UnlockIEMultiblockEffect(net.minecraft.world.item.ItemStack icon, String name, net.minecraft.resources.ResourceLocation multiblock) -
UnlockIEMultiblockEffect
public UnlockIEMultiblockEffect(net.minecraft.resources.ResourceLocation multiblock) -
UnlockIEMultiblockEffect
public UnlockIEMultiblockEffect(Optional<net.minecraft.world.item.ItemStack> icon, Optional<String> name, net.minecraft.resources.ResourceLocation multiblock) Creates an instance of aUnlockIEMultiblockEffectrecord class.- Parameters:
icon- the value for theiconrecord componentname- the value for thenamerecord componentmultiblock- the value for themultiblockrecord component
-
-
Method Details
-
onUnlock
public void onUnlock(net.minecraft.world.level.Level level, ResearchTeam team, net.minecraft.resources.ResourceKey<Research> research) - Specified by:
onUnlockin interfaceResearchEffect
-
onLock
public void onLock(net.minecraft.world.level.Level level, ResearchTeam team, net.minecraft.resources.ResourceKey<Research> research) Description copied from interface:ResearchEffectInverse ofResearchEffect.onUnlock(net.minecraft.world.level.Level, com.portingdeadmods.researchd.api.team.ResearchTeam, net.minecraft.resources.ResourceKey<com.portingdeadmods.researchd.api.research.Research>). Called when a previously-completed research is removed, and once per non-completed research at team-creation / datapack-reload time so the default "everything blocked" state is built up incrementally rather than from a separateinitDefaultpass.- Specified by:
onLockin interfaceResearchEffect
-
id
public net.minecraft.resources.ResourceLocation id()- Specified by:
idin interfaceResearchEffect
-
type
- Specified by:
typein interfaceResearchEffect
-
getDisplayStack
public net.minecraft.world.item.ItemStack getDisplayStack() -
getSerializer
- Specified by:
getSerializerin interfaceResearchEffect
-
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). -
icon
Returns the value of theiconrecord component.- Returns:
- the value of the
iconrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
multiblock
public net.minecraft.resources.ResourceLocation multiblock()Returns the value of themultiblockrecord component.- Returns:
- the value of the
multiblockrecord component
-