clean up some more old names

This commit is contained in:
gamma-delta 2022-11-04 19:48:39 -05:00
parent 5295a0e4b9
commit 2e6551010f

View file

@ -44,27 +44,27 @@ public class ForgeCapabilityHandler {
/**
* Items that store an iota to their tag.
*/
public static final ResourceLocation IOTA_STORAGE_CAP = modLoc("data_holder");
public static final ResourceLocation IOTA_STORAGE_CAP = modLoc("iota_holder");
/**
* Items that intrinsically store an iota.
*/
public static final ResourceLocation IOTA_STATIC_CAP = modLoc("data_item");
public static final ResourceLocation IOTA_STATIC_CAP = modLoc("iota_item");
/**
* Items that store a variable amount of media to their tag.
*/
public static final ResourceLocation MEDIA_STORAGE_CAP = modLoc("mana_holder");
public static final ResourceLocation MEDIA_STORAGE_CAP = modLoc("media_holder");
/**
* Items that statically provide media.
*/
public static final ResourceLocation MEDIA_STATIC_CAP = modLoc("mana_item");
public static final ResourceLocation MEDIA_STATIC_CAP = modLoc("media_item");
/**
* Items that store a packaged Hex.
*/
public static final ResourceLocation HEX_HOLDER_CAP = modLoc("spell_item");
public static final ResourceLocation HEX_HOLDER_CAP = modLoc("hex_item");
/**
* Items that work as pigments.
*/
public static final ResourceLocation PIGMENT_CAP = modLoc("colorizer");
public static final ResourceLocation PIGMENT_CAP = modLoc("pigment");
private static final ResourceLocation IMPETUS_HANDLER = modLoc("impetus_items");
@ -80,26 +80,27 @@ public class ForgeCapabilityHandler {
if (stack.getItem() instanceof MediaHolderItem holder) {
evt.addCapability(MEDIA_STORAGE_CAP,
provide(stack, HexCapabilities.MANA, () -> new ItemBasedManaHolder(holder, stack)));
provide(stack, HexCapabilities.MANA, () -> new ItemBasedMediaHolder(holder, stack)));
} else if (stack.is(HexItems.AMETHYST_DUST)) {
evt.addCapability(MEDIA_STATIC_CAP, provide(stack, HexCapabilities.MANA, () ->
new StaticManaHolder(HexConfig.common()::dustManaAmount, ADMediaHolder.AMETHYST_DUST_PRIORITY, stack)));
new StaticMediaHolder(HexConfig.common()::dustManaAmount, ADMediaHolder.AMETHYST_DUST_PRIORITY,
stack)));
} else if (stack.is(Items.AMETHYST_SHARD)) {
evt.addCapability(MEDIA_STATIC_CAP, provide(stack, HexCapabilities.MANA, () -> new StaticManaHolder(
evt.addCapability(MEDIA_STATIC_CAP, provide(stack, HexCapabilities.MANA, () -> new StaticMediaHolder(
HexConfig.common()::shardManaAmount, ADMediaHolder.AMETHYST_SHARD_PRIORITY, stack)));
} else if (stack.is(HexItems.CHARGED_AMETHYST)) {
evt.addCapability(MEDIA_STATIC_CAP,
provide(stack, HexCapabilities.MANA, () -> new StaticManaHolder(
provide(stack, HexCapabilities.MANA, () -> new StaticMediaHolder(
HexConfig.common()::chargedCrystalManaAmount, ADMediaHolder.CHARGED_AMETHYST_PRIORITY, stack)));
}
if (stack.getItem() instanceof IotaHolderItem holder) {
evt.addCapability(IOTA_STORAGE_CAP,
provide(stack, HexCapabilities.DATUM, () -> new ItemBasedDataHolder(holder, stack)));
provide(stack, HexCapabilities.DATUM, () -> new ItemBasedIotaHolder(holder, stack)));
} else if (stack.is(Items.PUMPKIN_PIE)) {
// haha yes
evt.addCapability(IOTA_STATIC_CAP, provide(stack, HexCapabilities.DATUM, () ->
new StaticDatumHolder((s) -> new DoubleIota(Math.PI * s.getCount()), stack)));
new StaticIotaHolder((s) -> new DoubleIota(Math.PI * s.getCount()), stack)));
}
if (stack.getItem() instanceof HexHolderItem holder) {
@ -150,7 +151,7 @@ public class ForgeCapabilityHandler {
}
}
private record StaticManaHolder(Supplier<Integer> baseWorth,
private record StaticMediaHolder(Supplier<Integer> baseWorth,
int consumptionPriority,
ItemStack stack) implements ADMediaHolder {
@Override
@ -203,7 +204,7 @@ public class ForgeCapabilityHandler {
}
}
private record ItemBasedManaHolder(MediaHolderItem holder,
private record ItemBasedMediaHolder(MediaHolderItem holder,
ItemStack stack) implements ADMediaHolder {
@Override
@ -247,7 +248,7 @@ public class ForgeCapabilityHandler {
}
}
private record StaticDatumHolder(Function<ItemStack, Iota> provider,
private record StaticIotaHolder(Function<ItemStack, Iota> provider,
ItemStack stack) implements ADIotaHolder {
@Override
@ -269,7 +270,7 @@ public class ForgeCapabilityHandler {
}
}
private record ItemBasedDataHolder(IotaHolderItem holder,
private record ItemBasedIotaHolder(IotaHolderItem holder,
ItemStack stack) implements ADIotaHolder {
@Override