Package net.minecraft.world.item.alchemy
Part 1/1
Potion
- Full name:
net.minecraft.world.item.alchemy.Potion - Package:
net.minecraft.world.item.alchemy - Source:
common—net/minecraft/world/item/alchemy/Potion.java - Type:
class - Modifiers:
public - Implements:
FeatureElement
net.minecraft.world.item.alchemy.Potion#getEffects()
- Origin:
common - Source:
net/minecraft/world/item/alchemy/Potion.java:39 - Modifiers:
public - Return:
List<MobEffectInstance>
คืออะไร
อ่านค่า Effects
ทำงานยังไง
คืนค่า: this.effects.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.item.alchemy.Potion#hasInstantEffects()
- Origin:
common - Source:
net/minecraft/world/item/alchemy/Potion.java:47 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Instant Effects
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getEffect(), value(), isInstantenous(). มีจุด return อย่างน้อย 2 จุด.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.item.alchemy.Potion#name()
- Origin:
common - Source:
net/minecraft/world/item/alchemy/Potion.java:43 - Modifiers:
public - Return:
String
คืออะไร
ดำเนินการ name ตาม implementation ของ Potion
ทำงานยังไง
คืนค่า: this.name.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.item.alchemy.Potion#Potion(String,MobEffectInstance[])
- Origin:
common - Source:
net/minecraft/world/item/alchemy/Potion.java:24 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ Potion ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: name, effects. เรียกต่อ: of().
Parameters
String stringMobEffectInstance[] mobEffectInstances
ตัวอย่างใช้งาน
MobEffectInstance[] mobEffectInstances = ...;
Potion instance = new Potion("value", mobEffectInstances);
net.minecraft.world.item.alchemy.Potion#requiredFeatures()
- Origin:
common - Source:
net/minecraft/world/item/alchemy/Potion.java:34 - Modifiers:
public - Return:
FeatureFlagSet
คืออะไร
ดำเนินการ requiredFeatures ตาม implementation ของ Potion
ทำงานยังไง
คืนค่า: this.requiredFeatures.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.item.alchemy.Potion#requiredFeatures(FeatureFlag[])
- Origin:
common - Source:
net/minecraft/world/item/alchemy/Potion.java:29 - Modifiers:
public - Return:
Potion
คืออะไร
ดำเนินการ requiredFeatures ตาม implementation ของ Potion
ทำงานยังไง
แก้ state: requiredFeatures. เรียกต่อ: subset(). คืนค่า: this.
Parameters
FeatureFlag[] featureFlags
ตัวอย่างใช้งาน
Potion instance = ...;
FeatureFlag[] featureFlags = ...;
Potion result = instance.requiredFeatures(featureFlags);
PotionBrewing
- Full name:
net.minecraft.world.item.alchemy.PotionBrewing - Package:
net.minecraft.world.item.alchemy - Source:
common—net/minecraft/world/item/alchemy/PotionBrewing.java - Type:
class - Modifiers:
public
net.minecraft.world.item.alchemy.PotionBrewing#addVanillaMixes(PotionBrewing.Builder)
- Origin:
common - Source:
net/minecraft/world/item/alchemy/PotionBrewing.java:134 - Modifiers:
public static - Return:
void
คืออะไร
เพิ่ม Vanilla Mixes
ทำงานยังไง
เรียกต่อ: addContainer(), addContainerRecipe(), addMix(), addStartMix().
Parameters
PotionBrewing.Builder builder
ตัวอย่างใช้งาน
net.minecraft.world.item.alchemy.PotionBrewing#bootstrap(FeatureFlagSet)
- Origin:
common - Source:
net/minecraft/world/item/alchemy/PotionBrewing.java:128 - Modifiers:
public static - Return:
PotionBrewing
คืออะไร
ดำเนินการ bootstrap ตาม implementation ของ PotionBrewing
ทำงานยังไง
เรียกต่อ: Builder(), addVanillaMixes(), build(). สร้างออบเจ็กต์: PotionBrewing.Builder. คืนค่า: builder.build().
Parameters
FeatureFlagSet featureFlagSet
ตัวอย่างใช้งาน
FeatureFlagSet featureFlagSet = ...;
PotionBrewing result = PotionBrewing.bootstrap(featureFlagSet);
net.minecraft.world.item.alchemy.PotionBrewing#hasContainerMix(ItemStack,ItemStack)
- Origin:
common - Source:
net/minecraft/world/item/alchemy/PotionBrewing.java:78 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Container Mix
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: is(), test(). มีจุด return อย่างน้อย 2 จุด.
Parameters
ItemStack itemStackItemStack itemStack2
ตัวอย่างใช้งาน
PotionBrewing instance = ...;
ItemStack itemStack = ...;
ItemStack itemStack2 = ...;
boolean result = instance.hasContainerMix(itemStack, itemStack2);
net.minecraft.world.item.alchemy.PotionBrewing#hasMix(ItemStack,ItemStack)
- Origin:
common - Source:
net/minecraft/world/item/alchemy/PotionBrewing.java:74 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Mix
ทำงานยังไง
เรียกต่อ: isContainer(), hasContainerMix(), hasPotionMix(). คืนค่า: !this.isContainer(itemStack) ? false : this.hasContainerMix(itemStack, itemStack2) || this.hasPotionMix(itemStack, itemStack2).
Parameters
ItemStack itemStackItemStack itemStack2
ตัวอย่างใช้งาน
PotionBrewing instance = ...;
ItemStack itemStack = ...;
ItemStack itemStack2 = ...;
boolean result = instance.hasMix(itemStack, itemStack2);
net.minecraft.world.item.alchemy.PotionBrewing#hasPotionMix(ItemStack,ItemStack)
- Origin:
common - Source:
net/minecraft/world/item/alchemy/PotionBrewing.java:88 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Potion Mix
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getOrDefault(), potion(), isEmpty(), is(), get(), test(). มีจุด return อย่างน้อย 3 จุด.
Parameters
ItemStack itemStackItemStack itemStack2
ตัวอย่างใช้งาน
PotionBrewing instance = ...;
ItemStack itemStack = ...;
ItemStack itemStack2 = ...;
boolean result = instance.hasPotionMix(itemStack, itemStack2);
net.minecraft.world.item.alchemy.PotionBrewing#isBrewablePotion(Holder<Potion>)
- Origin:
common - Source:
net/minecraft/world/item/alchemy/PotionBrewing.java:64 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Brewable Potion
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: is(). มีจุด return อย่างน้อย 2 จุด.
Parameters
Holder<Potion> holder
ตัวอย่างใช้งาน
PotionBrewing instance = ...;
Holder<Potion> holder = ...;
boolean result = instance.isBrewablePotion(holder);
net.minecraft.world.item.alchemy.PotionBrewing#isContainerIngredient(ItemStack)
- Origin:
common - Source:
net/minecraft/world/item/alchemy/PotionBrewing.java:44 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Container Ingredient
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: test(). มีจุด return อย่างน้อย 2 จุด.
Parameters
ItemStack itemStack
ตัวอย่างใช้งาน
PotionBrewing instance = ...;
ItemStack itemStack = ...;
boolean result = instance.isContainerIngredient(itemStack);
net.minecraft.world.item.alchemy.PotionBrewing#isIngredient(ItemStack)
- Origin:
common - Source:
net/minecraft/world/item/alchemy/PotionBrewing.java:30 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Ingredient
ทำงานยังไง
เรียกต่อ: isContainerIngredient(), isPotionIngredient(). คืนค่า: this.isContainerIngredient(itemStack) || this.isPotionIngredient(itemStack).
Parameters
ItemStack itemStack
ตัวอย่างใช้งาน
PotionBrewing instance = ...;
ItemStack itemStack = ...;
boolean result = instance.isIngredient(itemStack);
net.minecraft.world.item.alchemy.PotionBrewing#isPotionIngredient(ItemStack)
- Origin:
common - Source:
net/minecraft/world/item/alchemy/PotionBrewing.java:54 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ Potion Ingredient
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: test(). มีจุด return อย่างน้อย 2 จุด.
Parameters
ItemStack itemStack
ตัวอย่างใช้งาน
PotionBrewing instance = ...;
ItemStack itemStack = ...;
boolean result = instance.isPotionIngredient(itemStack);
net.minecraft.world.item.alchemy.PotionBrewing#mix(ItemStack,ItemStack)
- Origin:
common - Source:
net/minecraft/world/item/alchemy/PotionBrewing.java:103 - Modifiers:
public - Return:
ItemStack
คืออะไร
ดำเนินการ mix ตาม implementation ของ PotionBrewing
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: isEmpty(), getOrDefault(), potion(), is(), test(), createItemStack(), value(), get(). มีจุด return อย่างน้อย 5 จุด.
Parameters
ItemStack itemStackItemStack itemStack2
ตัวอย่างใช้งาน
PotionBrewing instance = ...;
ItemStack itemStack = ...;
ItemStack itemStack2 = ...;
ItemStack result = instance.mix(itemStack, itemStack2);
PotionBrewing$Builder
- Full name:
net.minecraft.world.item.alchemy.PotionBrewing$Builder - Package:
net.minecraft.world.item.alchemy - Source:
common—net/minecraft/world/item/alchemy/PotionBrewing.java - Type:
class - Modifiers:
public static - Implements:
FabricBrewingRecipeRegistryBuilder
net.minecraft.world.item.alchemy.PotionBrewing$Builder#addContainer(Item)
- Origin:
common - Source:
net/minecraft/world/item/alchemy/PotionBrewing.java:221 - Modifiers:
public - Return:
void
คืออะไร
เพิ่ม Container
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isEnabled(), expectPotion(), add(), of().
Parameters
Item item
ตัวอย่างใช้งาน
net.minecraft.world.item.alchemy.PotionBrewing$Builder#addContainerRecipe(Item,Item,Item)
- Origin:
common - Source:
net/minecraft/world/item/alchemy/PotionBrewing.java:213 - Modifiers:
public - Return:
void
คืออะไร
เพิ่ม Container Recipe
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isEnabled(), expectPotion(), add(), builtInRegistryHolder(), of(). สร้างออบเจ็กต์: PotionBrewing.Mix<>.
Parameters
Item itemItem item2Item item3
ตัวอย่างใช้งาน
PotionBrewing.Builder instance = ...;
Item item = ...;
Item item2 = ...;
Item item3 = ...;
instance.addContainerRecipe(item, item2, item3);
net.minecraft.world.item.alchemy.PotionBrewing$Builder#addMix(Holder<Potion>,Item,Holder<Potion>)
- Origin:
common - Source:
net/minecraft/world/item/alchemy/PotionBrewing.java:228 - Modifiers:
public - Return:
void
คืออะไร
เพิ่ม Mix
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: value(), isEnabled(), add(), of(). สร้างออบเจ็กต์: PotionBrewing.Mix<>.
Parameters
Holder<Potion> holderItem itemHolder<Potion> holder2
ตัวอย่างใช้งาน
PotionBrewing.Builder instance = ...;
Holder<Potion> holder = ...;
Item item = ...;
Holder<Potion> holder2 = ...;
instance.addMix(holder, item, holder2);
net.minecraft.world.item.alchemy.PotionBrewing$Builder#addStartMix(Item,Holder<Potion>)
- Origin:
common - Source:
net/minecraft/world/item/alchemy/PotionBrewing.java:234 - Modifiers:
public - Return:
void
คืออะไร
เพิ่ม Start Mix
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: value(), isEnabled(), addMix().
Parameters
Item itemHolder<Potion> holder
ตัวอย่างใช้งาน
PotionBrewing.Builder instance = ...;
Item item = ...;
Holder<Potion> holder = ...;
instance.addStartMix(item, holder);
net.minecraft.world.item.alchemy.PotionBrewing$Builder#build()
- Origin:
common - Source:
net/minecraft/world/item/alchemy/PotionBrewing.java:241 - Modifiers:
public - Return:
PotionBrewing
คืออะไร
สร้าง build
ทำงานยังไง
เรียกต่อ: copyOf(). สร้างออบเจ็กต์: PotionBrewing. คืนค่า: new PotionBrewing(List.copyOf(this.containers), List.copyOf(this.potionMixes), List.copyOf(this.containerMixes)).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.item.alchemy.PotionBrewing$Builder#Builder(FeatureFlagSet)
- Origin:
common - Source:
net/minecraft/world/item/alchemy/PotionBrewing.java:203 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ PotionBrewing.Builder ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
แก้ state: enabledFeatures.
Parameters
FeatureFlagSet featureFlagSet
ตัวอย่างใช้งาน
FeatureFlagSet featureFlagSet = ...;
PotionBrewing.Builder instance = new PotionBrewing.Builder(featureFlagSet);
PotionContents
- Full name:
net.minecraft.world.item.alchemy.PotionContents - Package:
net.minecraft.world.item.alchemy - Source:
common—net/minecraft/world/item/alchemy/PotionContents.java - Type:
record - Modifiers:
public - Implements:
ConsumableListener
net.minecraft.world.item.alchemy.PotionContents#addPotionTooltip(Consumer<Component>,float,float)
- Origin:
common - Source:
net/minecraft/world/item/alchemy/PotionContents.java:148 - Modifiers:
public - Return:
void
คืออะไร
เพิ่ม Potion Tooltip
ทำงานยังไง
เรียกต่อ: getAllEffects().
Parameters
Consumer<Component> consumerfloat ffloat g
ตัวอย่างใช้งาน
PotionContents instance = ...;
Consumer<Component> consumer = ...;
instance.addPotionTooltip(consumer, 0.0F, 0.0F);
net.minecraft.world.item.alchemy.PotionContents#addPotionTooltip(Iterable<MobEffectInstance>,Consumer<Component>,float,float)
- Origin:
common - Source:
net/minecraft/world/item/alchemy/PotionContents.java:165 - Modifiers:
public static - Return:
void
คืออะไร
เพิ่ม Potion Tooltip
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: newArrayList(), translatable(), getDescriptionId(), getEffect(), value(), createModifiers(), getAmplifier(), add(). สร้างออบเจ็กต์: Pair<>.
Parameters
Iterable<MobEffectInstance> iterableConsumer<Component> consumerfloat ffloat g
ตัวอย่างใช้งาน
Iterable<MobEffectInstance> iterable = ...;
Consumer<Component> consumer = ...;
PotionContents.addPotionTooltip(iterable, consumer, 0.0F, 0.0F);
net.minecraft.world.item.alchemy.PotionContents#applyToLivingEntity(LivingEntity)
- Origin:
common - Source:
net/minecraft/world/item/alchemy/PotionContents.java:152 - Modifiers:
public - Return:
void
คืออะไร
นำไปใช้ To Living Entity
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: level(), forEachEffect(), getEffect(), value(), isInstantenous(), applyInstantenousEffect(), getAmplifier(), addEffect().
Parameters
LivingEntity livingEntity
ตัวอย่างใช้งาน
PotionContents instance = ...;
LivingEntity livingEntity = ...;
instance.applyToLivingEntity(livingEntity);
net.minecraft.world.item.alchemy.PotionContents#createItemStack(Item,Holder<Potion>)
- Origin:
common - Source:
net/minecraft/world/item/alchemy/PotionContents.java:69 - Modifiers:
public static - Return:
ItemStack
คืออะไร
สร้าง Item Stack
ทำงานยังไง
เรียกต่อ: set(). สร้างออบเจ็กต์: ItemStack, PotionContents. คืนค่า: itemStack.
Parameters
Item itemHolder<Potion> holder
ตัวอย่างใช้งาน
Item item = ...;
Holder<Potion> holder = ...;
ItemStack result = PotionContents.createItemStack(item, holder);
net.minecraft.world.item.alchemy.PotionContents#customEffects()
- Origin:
common - Source:
net/minecraft/world/item/alchemy/PotionContents.java:144 - Modifiers:
public - Return:
List<MobEffectInstance>
คืออะไร
ดำเนินการ customEffects ตาม implementation ของ PotionContents
ทำงานยังไง
เรียกต่อ: transform(). คืนค่า: Lists.transform(this.customEffects, MobEffectInstance::new).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.item.alchemy.PotionContents#forEachEffect(Consumer<MobEffectInstance>)
- Origin:
common - Source:
net/minecraft/world/item/alchemy/PotionContents.java:87 - Modifiers:
public - Return:
void
คืออะไร
ดำเนินการ forEachEffect ตาม implementation ของ PotionContents
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: isPresent(), get(), value(), getEffects(), accept(). สร้างออบเจ็กต์: MobEffectInstance.
Parameters
Consumer<MobEffectInstance> consumer
ตัวอย่างใช้งาน
PotionContents instance = ...;
Consumer<MobEffectInstance> consumer = ...;
instance.forEachEffect(consumer);
net.minecraft.world.item.alchemy.PotionContents#getAllEffects()
- Origin:
common - Source:
net/minecraft/world/item/alchemy/PotionContents.java:79 - Modifiers:
public - Return:
Iterable<MobEffectInstance>
คืออะไร
อ่านค่า All Effects
ทำงานยังไง
ตรวจเงื่อนไขด้วย if. เรียกต่อ: isEmpty(), get(), value(), getEffects(), concat(). มีจุด return อย่างน้อย 2 จุด.
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.item.alchemy.PotionContents#getColor()
- Origin:
common - Source:
net/minecraft/world/item/alchemy/PotionContents.java:107 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Color
ทำงานยังไง
เรียกต่อ: getColorOr(). คืนค่า: this.getColorOr(-13083194).
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.item.alchemy.PotionContents#getColorOptional(Iterable<MobEffectInstance>)
- Origin:
common - Source:
net/minecraft/world/item/alchemy/PotionContents.java:120 - Modifiers:
public static - Return:
OptionalInt
คืออะไร
อ่านค่า Color Optional
ทำงานยังไง
ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: isVisible(), getEffect(), value(), getColor(), getAmplifier(), red(), green(), blue(). คืนค่า: l == 0 ? OptionalInt.empty() : OptionalInt.of(ARGB.color(i / l, j / l, k / l)).
Parameters
Iterable<MobEffectInstance> iterable
ตัวอย่างใช้งาน
Iterable<MobEffectInstance> iterable = ...;
OptionalInt result = PotionContents.getColorOptional(iterable);
net.minecraft.world.item.alchemy.PotionContents#getColorOr(int)
- Origin:
common - Source:
net/minecraft/world/item/alchemy/PotionContents.java:111 - Modifiers:
public - Return:
int
คืออะไร
อ่านค่า Color Or
ทำงานยังไง
เรียกต่อ: isPresent(), get(), getColorOptional(), getAllEffects(), orElse(). คืนค่า: this.customColor.isPresent() ? this.customColor.get() : getColorOptional(this.getAllEffects()).orElse(i).
Parameters
int i
ตัวอย่างใช้งาน
net.minecraft.world.item.alchemy.PotionContents#getName(String)
- Origin:
common - Source:
net/minecraft/world/item/alchemy/PotionContents.java:115 - Modifiers:
public - Return:
Component
คืออะไร
อ่านค่า Name
ทำงานยังไง
เรียกต่อ: or(), map(), value(), name(), orElse(), translatable(). คืนค่า: Component.translatable(string + string2).
Parameters
String string
ตัวอย่างใช้งาน
net.minecraft.world.item.alchemy.PotionContents#hasEffects()
- Origin:
common - Source:
net/minecraft/world/item/alchemy/PotionContents.java:140 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบว่ามี Effects
ทำงานยังไง
เรียกต่อ: isEmpty(), isPresent(), get(), value(), getEffects(). คืนค่า: !this.customEffects.isEmpty() ? true : this.potion.isPresent() && !this.potion.get().value().getEffects().isEmpty().
Parameters
- ไม่มี
ตัวอย่างใช้งาน
net.minecraft.world.item.alchemy.PotionContents#is(Holder<Potion>)
- Origin:
common - Source:
net/minecraft/world/item/alchemy/PotionContents.java:75 - Modifiers:
public - Return:
boolean
คืออะไร
ตรวจสอบสถานะ is
ทำงานยังไง
เรียกต่อ: isPresent(), get(), isEmpty(). คืนค่า: this.potion.isPresent() && this.potion.get().is(holder) && this.customEffects.isEmpty().
Parameters
Holder<Potion> holder
ตัวอย่างใช้งาน
net.minecraft.world.item.alchemy.PotionContents#onConsume(Level,LivingEntity,ItemStack,Consumable)
- Origin:
common - Source:
net/minecraft/world/item/alchemy/PotionContents.java:230 - Modifiers:
public - Return:
void
คืออะไร
จัดการเหตุการณ์ Consume
ทำงานยังไง
เรียกต่อ: applyToLivingEntity().
Parameters
Level levelLivingEntity livingEntityItemStack itemStackConsumable consumable
ตัวอย่างใช้งาน
PotionContents instance = ...;
Level level = ...;
LivingEntity livingEntity = ...;
ItemStack itemStack = ...;
Consumable consumable = ...;
instance.onConsume(level, livingEntity, itemStack, consumable);
net.minecraft.world.item.alchemy.PotionContents#PotionContents(Holder<Potion>)
- Origin:
common - Source:
net/minecraft/world/item/alchemy/PotionContents.java:65 - Modifiers:
public - Kind: constructor
คืออะไร
สร้างออบเจ็กต์ PotionContents ด้วยพารามิเตอร์ที่ระบุ
ทำงานยังไง
เรียกต่อ: of(), empty().
Parameters
Holder<Potion> holder
ตัวอย่างใช้งาน
net.minecraft.world.item.alchemy.PotionContents#withEffectAdded(MobEffectInstance)
- Origin:
common - Source:
net/minecraft/world/item/alchemy/PotionContents.java:103 - Modifiers:
public - Return:
PotionContents
คืออะไร
ดำเนินการ withEffectAdded ตาม implementation ของ PotionContents
ทำงานยังไง
เรียกต่อ: copyAndAdd(). สร้างออบเจ็กต์: PotionContents. คืนค่า: new PotionContents(this.potion, this.customColor, Util.copyAndAdd(this.customEffects, mobEffectInstance), this.customName).
Parameters
MobEffectInstance mobEffectInstance
ตัวอย่างใช้งาน
PotionContents instance = ...;
MobEffectInstance mobEffectInstance = ...;
PotionContents result = instance.withEffectAdded(mobEffectInstance);
net.minecraft.world.item.alchemy.PotionContents#withPotion(Holder<Potion>)
- Origin:
common - Source:
net/minecraft/world/item/alchemy/PotionContents.java:99 - Modifiers:
public - Return:
PotionContents
คืออะไร
ดำเนินการ withPotion ตาม implementation ของ PotionContents
ทำงานยังไง
เรียกต่อ: of(). สร้างออบเจ็กต์: PotionContents. คืนค่า: new PotionContents(Optional.of(holder), this.customColor, this.customEffects, this.customName).
Parameters
Holder<Potion> holder
ตัวอย่างใช้งาน
PotionContents instance = ...;
Holder<Potion> holder = ...;
PotionContents result = instance.withPotion(holder);
Potions
- Full name:
net.minecraft.world.item.alchemy.Potions - Package:
net.minecraft.world.item.alchemy - Source:
common—net/minecraft/world/item/alchemy/Potions.java - Type:
class - Modifiers:
public
net.minecraft.world.item.alchemy.Potions#bootstrap(Registry<Potion>)
- Origin:
common - Source:
net/minecraft/world/item/alchemy/Potions.java:95 - Modifiers:
public static - Return:
Holder<Potion>
คืออะไร
ดำเนินการ bootstrap ตาม implementation ของ Potions
ทำงานยังไง
คืนค่า: WATER.
Parameters
Registry<Potion> registry