Some altar cleanup and renaming
This commit is contained in:
parent
fefeaf26af
commit
eada60f436
21 changed files with 253 additions and 254 deletions
|
@ -1,7 +1,7 @@
|
|||
package WayofTime.bloodmagic.api.impl;
|
||||
|
||||
import WayofTime.bloodmagic.api.IBloodMagicAPI;
|
||||
import WayofTime.bloodmagic.altar.EnumAltarComponent;
|
||||
import WayofTime.bloodmagic.altar.ComponentType;
|
||||
import WayofTime.bloodmagic.util.BMLog;
|
||||
import com.google.common.collect.ArrayListMultimap;
|
||||
import com.google.common.collect.Multimap;
|
||||
|
@ -17,7 +17,7 @@ public class BloodMagicAPI implements IBloodMagicAPI {
|
|||
private final BloodMagicBlacklist blacklist;
|
||||
private final BloodMagicRecipeRegistrar recipeRegistrar;
|
||||
private final BloodMagicValueManager valueManager;
|
||||
private final Multimap<EnumAltarComponent, IBlockState> altarComponents;
|
||||
private final Multimap<ComponentType, IBlockState> altarComponents;
|
||||
|
||||
public BloodMagicAPI() {
|
||||
this.blacklist = new BloodMagicBlacklist();
|
||||
|
@ -46,8 +46,8 @@ public class BloodMagicAPI implements IBloodMagicAPI {
|
|||
|
||||
@Override
|
||||
public void registerAltarComponent(@Nonnull IBlockState state, @Nonnull String componentType) {
|
||||
EnumAltarComponent component = null;
|
||||
for (EnumAltarComponent type : EnumAltarComponent.VALUES) {
|
||||
ComponentType component = null;
|
||||
for (ComponentType type : ComponentType.VALUES) {
|
||||
if (type.name().equalsIgnoreCase(componentType)) {
|
||||
component = type;
|
||||
break;
|
||||
|
@ -61,7 +61,7 @@ public class BloodMagicAPI implements IBloodMagicAPI {
|
|||
}
|
||||
|
||||
@Nonnull
|
||||
public List<IBlockState> getComponentStates(EnumAltarComponent component) {
|
||||
public List<IBlockState> getComponentStates(ComponentType component) {
|
||||
return (List<IBlockState>) altarComponents.get(component);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ import WayofTime.bloodmagic.ConfigHandler;
|
|||
import WayofTime.bloodmagic.api.BloodMagicPlugin;
|
||||
import WayofTime.bloodmagic.api.IBloodMagicAPI;
|
||||
import WayofTime.bloodmagic.api.IBloodMagicPlugin;
|
||||
import WayofTime.bloodmagic.altar.EnumAltarComponent;
|
||||
import WayofTime.bloodmagic.altar.ComponentType;
|
||||
import WayofTime.bloodmagic.api.IBloodMagicRecipeRegistrar;
|
||||
import WayofTime.bloodmagic.block.BlockBloodRune;
|
||||
import WayofTime.bloodmagic.block.BlockDecorative;
|
||||
|
@ -66,19 +66,19 @@ public class BloodMagicCorePlugin implements IBloodMagicPlugin {
|
|||
handleConfigValues(api);
|
||||
|
||||
// Add standard blocks for altar components
|
||||
api.registerAltarComponent(Blocks.GLOWSTONE.getDefaultState(), EnumAltarComponent.GLOWSTONE.name());
|
||||
api.registerAltarComponent(Blocks.SEA_LANTERN.getDefaultState(), EnumAltarComponent.GLOWSTONE.name());
|
||||
api.registerAltarComponent(Blocks.BEACON.getDefaultState(), EnumAltarComponent.BEACON.name());
|
||||
api.registerAltarComponent(Blocks.GLOWSTONE.getDefaultState(), ComponentType.GLOWSTONE.name());
|
||||
api.registerAltarComponent(Blocks.SEA_LANTERN.getDefaultState(), ComponentType.GLOWSTONE.name());
|
||||
api.registerAltarComponent(Blocks.BEACON.getDefaultState(), ComponentType.BEACON.name());
|
||||
|
||||
BlockDecorative decorative = (BlockDecorative) RegistrarBloodMagicBlocks.DECORATIVE_BRICK;
|
||||
api.registerAltarComponent(decorative.getDefaultState().withProperty(decorative.getProperty(), EnumDecorative.BLOODSTONE_BRICK), EnumAltarComponent.BLOODSTONE.name());
|
||||
api.registerAltarComponent(decorative.getDefaultState().withProperty(decorative.getProperty(), EnumDecorative.BLOODSTONE_TILE), EnumAltarComponent.BLOODSTONE.name());
|
||||
api.registerAltarComponent(decorative.getDefaultState().withProperty(decorative.getProperty(), EnumDecorative.CRYSTAL_BRICK), EnumAltarComponent.CRYSTAL.name());
|
||||
api.registerAltarComponent(decorative.getDefaultState().withProperty(decorative.getProperty(), EnumDecorative.CRYSTAL_TILE), EnumAltarComponent.CRYSTAL.name());
|
||||
api.registerAltarComponent(decorative.getDefaultState().withProperty(decorative.getProperty(), EnumDecorative.BLOODSTONE_BRICK), ComponentType.BLOODSTONE.name());
|
||||
api.registerAltarComponent(decorative.getDefaultState().withProperty(decorative.getProperty(), EnumDecorative.BLOODSTONE_TILE), ComponentType.BLOODSTONE.name());
|
||||
api.registerAltarComponent(decorative.getDefaultState().withProperty(decorative.getProperty(), EnumDecorative.CRYSTAL_BRICK), ComponentType.CRYSTAL.name());
|
||||
api.registerAltarComponent(decorative.getDefaultState().withProperty(decorative.getProperty(), EnumDecorative.CRYSTAL_TILE), ComponentType.CRYSTAL.name());
|
||||
|
||||
BlockBloodRune bloodRune = (BlockBloodRune) RegistrarBloodMagicBlocks.BLOOD_RUNE;
|
||||
for (BloodRuneType runeType : BloodRuneType.values())
|
||||
api.registerAltarComponent(bloodRune.getDefaultState().withProperty(bloodRune.getProperty(), runeType), EnumAltarComponent.BLOODRUNE.name());
|
||||
api.registerAltarComponent(bloodRune.getDefaultState().withProperty(bloodRune.getProperty(), runeType), ComponentType.BLOODRUNE.name());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package WayofTime.bloodmagic.api.impl.recipe;
|
||||
|
||||
import WayofTime.bloodmagic.altar.EnumAltarTier;
|
||||
import WayofTime.bloodmagic.altar.AltarTier;
|
||||
import com.google.common.base.Preconditions;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.Ingredient;
|
||||
|
@ -15,7 +15,7 @@ public class RecipeBloodAltar {
|
|||
@Nonnull
|
||||
private final ItemStack output;
|
||||
@Nonnull
|
||||
private final EnumAltarTier minimumTier;
|
||||
private final AltarTier minimumTier;
|
||||
@Nonnegative
|
||||
private final int syphon;
|
||||
@Nonnegative
|
||||
|
@ -27,14 +27,14 @@ public class RecipeBloodAltar {
|
|||
Preconditions.checkNotNull(input, "input cannot be null.");
|
||||
Preconditions.checkNotNull(output, "output cannot be null.");
|
||||
Preconditions.checkArgument(minimumTier >= 0, "minimumTier cannot be negative.");
|
||||
Preconditions.checkArgument(minimumTier <= EnumAltarTier.MAXTIERS, "minimumTier cannot be higher than max tier");
|
||||
Preconditions.checkArgument(minimumTier <= AltarTier.MAXTIERS, "minimumTier cannot be higher than max tier");
|
||||
Preconditions.checkArgument(syphon >= 0, "syphon cannot be negative.");
|
||||
Preconditions.checkArgument(consumeRate >= 0, "consumeRate cannot be negative.");
|
||||
Preconditions.checkArgument(drainRate >= 0, "drain cannot be negative.");
|
||||
|
||||
this.input = input;
|
||||
this.output = output;
|
||||
this.minimumTier = EnumAltarTier.values()[minimumTier];
|
||||
this.minimumTier = AltarTier.values()[minimumTier];
|
||||
this.syphon = syphon;
|
||||
this.consumeRate = consumeRate;
|
||||
this.drainRate = drainRate;
|
||||
|
@ -51,7 +51,7 @@ public class RecipeBloodAltar {
|
|||
}
|
||||
|
||||
@Nonnull
|
||||
public EnumAltarTier getMinimumTier() {
|
||||
public AltarTier getMinimumTier() {
|
||||
return minimumTier;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue