Skip to content

Commit

Permalink
Update config option name
Browse files Browse the repository at this point in the history
  • Loading branch information
IcarussOne committed Jan 29, 2025
1 parent 551bacc commit 12e11a4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import java.util.HashMap;
import java.util.Random;

@SuppressWarnings("deprecation")
public class CRBlockManaPod extends Block implements IGrowable {
public static final PropertyInteger AGE = PropertyInteger.create("age", 0, 8);
public static float W1 = 0.0625F;
Expand Down Expand Up @@ -230,7 +231,7 @@ public ArrayList<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockSta

for (int k1 = 0; k1 < b0; k1++) {
ItemStack i = new ItemStack(CRItems.MANA_BEAN);
((CRItemManaBean) i.getItem()).setAspects(i, (new AspectList()).add(aspect, CRConfig.general_settings.MANA_BEAN_ASPECT));
((CRItemManaBean) i.getItem()).setAspects(i, (new AspectList()).add(aspect, CRConfig.general_settings.MANA_BEAN_ASPECT_COUNT));
dropped.add(i);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ public static class GeneralSettings {
@Config.RequiresMcRestart
public int FURIOUS_ZOMBIE_WEIGHT = 5;

@Config.Name("Mana Bean: Aspect")
@Config.Name("Mana Bean: Aspect Count")
@Config.Comment("Mana Bean contained aspect count. [default: 5]")
@Config.RangeInt(min = 1, max = 128)
@Config.RequiresMcRestart
public int MANA_BEAN_ASPECT = 5;
public int MANA_BEAN_ASPECT_COUNT = 5;

@Config.Name("Mana Bean: Effect List")
@Config.Comment("Configurable list of possible effects that eaten Mana Beans can apply.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public static ItemStack makeManaBean(Aspect aspect, int stackSize) {
return null;
} else {
ItemStack stack = new ItemStack(CRItems.MANA_BEAN, stackSize, 0);
((IEssentiaContainerItem) CRItems.MANA_BEAN).setAspects(stack, (new AspectList()).add(aspect, CRConfig.general_settings.MANA_BEAN_ASPECT));
((IEssentiaContainerItem) CRItems.MANA_BEAN).setAspects(stack, (new AspectList()).add(aspect, CRConfig.general_settings.MANA_BEAN_ASPECT_COUNT));
return stack;
}
}
Expand Down Expand Up @@ -88,7 +88,7 @@ public void getSubItems(CreativeTabs tab, NonNullList<ItemStack> items) {

for (Aspect tag : Aspect.aspects.values()) {
ItemStack stack = new ItemStack(this);
this.setAspects(stack, (new AspectList()).add(tag, CRConfig.general_settings.MANA_BEAN_ASPECT));
this.setAspects(stack, (new AspectList()).add(tag, CRConfig.general_settings.MANA_BEAN_ASPECT_COUNT));
items.add(stack);
}
}
Expand All @@ -110,7 +110,7 @@ public int getColor(ItemStack stack, int par2) {
@Override
public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) {
if (!par2World.isRemote && !par1ItemStack.hasTagCompound()) {
setAspects(par1ItemStack, (new AspectList()).add(displayAspects[this.rand.nextInt(displayAspects.length)], CRConfig.general_settings.MANA_BEAN_ASPECT));
setAspects(par1ItemStack, (new AspectList()).add(displayAspects[this.rand.nextInt(displayAspects.length)], CRConfig.general_settings.MANA_BEAN_ASPECT_COUNT));
}

super.onUpdate(par1ItemStack, par2World, par3Entity, par4, par5);
Expand All @@ -119,7 +119,7 @@ public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity
@Override
public void onCreated(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
if (!par1ItemStack.hasTagCompound()) {
setAspects(par1ItemStack, (new AspectList()).add(displayAspects[this.rand.nextInt(displayAspects.length)], CRConfig.general_settings.MANA_BEAN_ASPECT));
setAspects(par1ItemStack, (new AspectList()).add(displayAspects[this.rand.nextInt(displayAspects.length)], CRConfig.general_settings.MANA_BEAN_ASPECT_COUNT));
}
}

Expand Down

0 comments on commit 12e11a4

Please sign in to comment.