whoopsy it modified things in caches. oh well.

This commit is contained in:
gamma-delta 2022-06-13 19:41:13 -05:00
parent 7403d87e6f
commit 6f4497a18f
13 changed files with 28 additions and 28 deletions

View file

@ -5,7 +5,7 @@ import at.petrak.hexcasting.api.misc.FrozenColorizer;
import at.petrak.hexcasting.api.misc.ManaConstants; import at.petrak.hexcasting.api.misc.ManaConstants;
import at.petrak.hexcasting.api.mod.HexConfig; import at.petrak.hexcasting.api.mod.HexConfig;
import at.petrak.hexcasting.api.spell.ParticleSpray; import at.petrak.hexcasting.api.spell.ParticleSpray;
import at.petrak.hexcasting.api.spell.LegacySpellDatum; import at.petrak.hexcasting.api.spell.iota.Iota;
import at.petrak.hexcasting.api.spell.casting.CastingContext; import at.petrak.hexcasting.api.spell.casting.CastingContext;
import at.petrak.hexcasting.api.spell.casting.CastingHarness; import at.petrak.hexcasting.api.spell.casting.CastingHarness;
import at.petrak.hexcasting.api.spell.casting.SpellCircleContext; import at.petrak.hexcasting.api.spell.casting.SpellCircleContext;

View file

@ -2,7 +2,7 @@ package at.petrak.hexcasting.common.blocks.akashic;
import at.petrak.hexcasting.annotations.SoftImplement; import at.petrak.hexcasting.annotations.SoftImplement;
import at.petrak.hexcasting.api.spell.DatumType; import at.petrak.hexcasting.api.spell.DatumType;
import at.petrak.hexcasting.api.spell.LegacySpellDatum; import at.petrak.hexcasting.api.spell.iota.Iota;
import at.petrak.hexcasting.common.items.ItemScroll; import at.petrak.hexcasting.common.items.ItemScroll;
import at.petrak.hexcasting.common.lib.HexBlocks; import at.petrak.hexcasting.common.lib.HexBlocks;
import at.petrak.hexcasting.common.lib.HexSounds; import at.petrak.hexcasting.common.lib.HexSounds;

View file

@ -2,7 +2,7 @@ package at.petrak.hexcasting.common.blocks.akashic;
import at.petrak.hexcasting.api.block.HexBlockEntity; import at.petrak.hexcasting.api.block.HexBlockEntity;
import at.petrak.hexcasting.api.spell.DatumType; import at.petrak.hexcasting.api.spell.DatumType;
import at.petrak.hexcasting.api.spell.LegacySpellDatum; import at.petrak.hexcasting.api.spell.iota.Iota;
import at.petrak.hexcasting.api.spell.math.HexDir; import at.petrak.hexcasting.api.spell.math.HexDir;
import at.petrak.hexcasting.api.spell.math.HexPattern; import at.petrak.hexcasting.api.spell.math.HexPattern;
import at.petrak.hexcasting.common.lib.HexBlockEntities; import at.petrak.hexcasting.common.lib.HexBlockEntities;
@ -45,7 +45,7 @@ public class BlockEntityAkashicRecord extends HexBlockEntity {
* Will never clobber anything. * Will never clobber anything.
*/ */
public @Nullable public @Nullable
BlockPos addNewDatum(HexPattern key, LegacySpellDatum<?> datum) { BlockPos addNewDatum(HexPattern key, Iota datum) {
String entryKey = getKey(key); String entryKey = getKey(key);
if (this.entries.containsKey(entryKey)) { if (this.entries.containsKey(entryKey)) {
return null; // would clobber return null; // would clobber
@ -76,7 +76,7 @@ public class BlockEntityAkashicRecord extends HexBlockEntity {
} }
public @Nullable public @Nullable
LegacySpellDatum<?> lookupPattern(HexPattern key, ServerLevel slevel) { Iota lookupPattern(HexPattern key, ServerLevel slevel) {
var entry = this.entries.get(getKey(key)); var entry = this.entries.get(getKey(key));
if (entry == null) { if (entry == null) {
return null; return null;

View file

@ -2,7 +2,7 @@ package at.petrak.hexcasting.common.blocks.circles;
import at.petrak.hexcasting.annotations.SoftImplement; import at.petrak.hexcasting.annotations.SoftImplement;
import at.petrak.hexcasting.api.block.circle.BlockCircleComponent; import at.petrak.hexcasting.api.block.circle.BlockCircleComponent;
import at.petrak.hexcasting.api.spell.LegacySpellDatum; import at.petrak.hexcasting.api.spell.iota.Iota;
import at.petrak.hexcasting.api.spell.math.HexPattern; import at.petrak.hexcasting.api.spell.math.HexPattern;
import at.petrak.hexcasting.common.lib.HexItems; import at.petrak.hexcasting.common.lib.HexItems;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;

View file

@ -3,7 +3,7 @@ package at.petrak.hexcasting.common.casting;
import at.petrak.hexcasting.api.PatternRegistry; import at.petrak.hexcasting.api.PatternRegistry;
import at.petrak.hexcasting.api.misc.ManaConstants; import at.petrak.hexcasting.api.misc.ManaConstants;
import at.petrak.hexcasting.api.spell.Operator; import at.petrak.hexcasting.api.spell.Operator;
import at.petrak.hexcasting.api.spell.LegacySpellDatum; import at.petrak.hexcasting.api.spell.iota.Iota;
import at.petrak.hexcasting.api.spell.Widget; import at.petrak.hexcasting.api.spell.Widget;
import at.petrak.hexcasting.api.spell.math.HexAngle; import at.petrak.hexcasting.api.spell.math.HexAngle;
import at.petrak.hexcasting.api.spell.math.HexDir; import at.petrak.hexcasting.api.spell.math.HexDir;

View file

@ -1,7 +1,7 @@
package at.petrak.hexcasting.common.command; package at.petrak.hexcasting.common.command;
import at.petrak.hexcasting.api.PatternRegistry; import at.petrak.hexcasting.api.PatternRegistry;
import at.petrak.hexcasting.api.spell.LegacySpellDatum; import at.petrak.hexcasting.api.spell.iota.Iota;
import at.petrak.hexcasting.api.spell.math.HexPattern; import at.petrak.hexcasting.api.spell.math.HexPattern;
import at.petrak.hexcasting.common.items.ItemScroll; import at.petrak.hexcasting.common.items.ItemScroll;
import at.petrak.hexcasting.common.lib.HexItems; import at.petrak.hexcasting.common.lib.HexItems;

View file

@ -1,7 +1,7 @@
package at.petrak.hexcasting.common.items; package at.petrak.hexcasting.common.items;
import at.petrak.hexcasting.api.item.IotaHolderItem; import at.petrak.hexcasting.api.item.IotaHolderItem;
import at.petrak.hexcasting.api.spell.LegacySpellDatum; import at.petrak.hexcasting.api.spell.iota.Iota;
import at.petrak.hexcasting.api.utils.NBTHelper; import at.petrak.hexcasting.api.utils.NBTHelper;
import at.petrak.hexcasting.common.lib.HexSounds; import at.petrak.hexcasting.common.lib.HexSounds;
import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.CompoundTag;
@ -32,12 +32,12 @@ public class ItemAbacus extends Item implements IotaHolderItem {
} }
@Override @Override
public boolean canWrite(ItemStack stack, LegacySpellDatum<?> datum) { public boolean canWrite(ItemStack stack, Iota datum) {
return false; return false;
} }
@Override @Override
public void writeDatum(ItemStack stack, LegacySpellDatum<?> datum) { public void writeDatum(ItemStack stack, Iota datum) {
// nope // nope
} }

View file

@ -2,7 +2,7 @@ package at.petrak.hexcasting.common.items;
import at.petrak.hexcasting.api.item.IotaHolderItem; import at.petrak.hexcasting.api.item.IotaHolderItem;
import at.petrak.hexcasting.api.spell.DatumType; import at.petrak.hexcasting.api.spell.DatumType;
import at.petrak.hexcasting.api.spell.LegacySpellDatum; import at.petrak.hexcasting.api.spell.iota.Iota;
import at.petrak.hexcasting.api.spell.math.HexPattern; import at.petrak.hexcasting.api.spell.math.HexPattern;
import at.petrak.hexcasting.api.utils.NBTHelper; import at.petrak.hexcasting.api.utils.NBTHelper;
import at.petrak.hexcasting.client.gui.PatternTooltipGreeble; import at.petrak.hexcasting.client.gui.PatternTooltipGreeble;
@ -60,12 +60,12 @@ public class ItemScroll extends Item implements IotaHolderItem {
} }
@Override @Override
public boolean canWrite(ItemStack stack, LegacySpellDatum<?> datum) { public boolean canWrite(ItemStack stack, Iota datum) {
return datum != null && datum.getType() == DatumType.PATTERN && !NBTHelper.hasCompound(stack, TAG_PATTERN); return datum != null && datum.getType() == DatumType.PATTERN && !NBTHelper.hasCompound(stack, TAG_PATTERN);
} }
@Override @Override
public void writeDatum(ItemStack stack, LegacySpellDatum<?> datum) { public void writeDatum(ItemStack stack, Iota datum) {
if (this.canWrite(stack, datum) && datum.getPayload() instanceof HexPattern pat) { if (this.canWrite(stack, datum) && datum.getPayload() instanceof HexPattern pat) {
NBTHelper.putCompound(stack, TAG_PATTERN, pat.serializeToNBT()); NBTHelper.putCompound(stack, TAG_PATTERN, pat.serializeToNBT());
} }

View file

@ -4,7 +4,7 @@ import at.petrak.hexcasting.annotations.SoftImplement;
import at.petrak.hexcasting.api.HexAPI; import at.petrak.hexcasting.api.HexAPI;
import at.petrak.hexcasting.api.item.IotaHolderItem; import at.petrak.hexcasting.api.item.IotaHolderItem;
import at.petrak.hexcasting.api.spell.DatumType; import at.petrak.hexcasting.api.spell.DatumType;
import at.petrak.hexcasting.api.spell.LegacySpellDatum; import at.petrak.hexcasting.api.spell.iota.Iota;
import at.petrak.hexcasting.api.spell.math.HexPattern; import at.petrak.hexcasting.api.spell.math.HexPattern;
import at.petrak.hexcasting.api.utils.NBTHelper; import at.petrak.hexcasting.api.utils.NBTHelper;
import at.petrak.hexcasting.client.gui.PatternTooltipGreeble; import at.petrak.hexcasting.client.gui.PatternTooltipGreeble;
@ -82,12 +82,12 @@ public class ItemSlate extends BlockItem implements IotaHolderItem {
} }
@Override @Override
public boolean canWrite(ItemStack stack, LegacySpellDatum<?> datum) { public boolean canWrite(ItemStack stack, Iota datum) {
return datum == null || datum.getType() == DatumType.PATTERN; return datum == null || datum.getType() == DatumType.PATTERN;
} }
@Override @Override
public void writeDatum(ItemStack stack, LegacySpellDatum<?> datum) { public void writeDatum(ItemStack stack, Iota datum) {
if (this.canWrite(stack, datum)) { if (this.canWrite(stack, datum)) {
if (datum == null) { if (datum == null) {
var beTag = NBTHelper.getOrCreateCompound(stack, "BlockEntityTag"); var beTag = NBTHelper.getOrCreateCompound(stack, "BlockEntityTag");

View file

@ -1,7 +1,7 @@
package at.petrak.hexcasting.common.items.magic; package at.petrak.hexcasting.common.items.magic;
import at.petrak.hexcasting.api.item.HexHolderItem; import at.petrak.hexcasting.api.item.HexHolderItem;
import at.petrak.hexcasting.api.spell.LegacySpellDatum; import at.petrak.hexcasting.api.spell.iota.Iota;
import at.petrak.hexcasting.api.spell.casting.CastingContext; import at.petrak.hexcasting.api.spell.casting.CastingContext;
import at.petrak.hexcasting.api.spell.casting.CastingHarness; import at.petrak.hexcasting.api.spell.casting.CastingHarness;
import at.petrak.hexcasting.api.spell.math.HexPattern; import at.petrak.hexcasting.api.spell.math.HexPattern;
@ -58,14 +58,14 @@ public abstract class ItemPackagedHex extends ItemMediaHolder implements HexHold
} }
@Override @Override
public @Nullable List<LegacySpellDatum<?>> getHex(ItemStack stack, ServerLevel level) { public @Nullable List<Iota> getHex(ItemStack stack, ServerLevel level) {
var patsTag = NBTHelper.getList(stack, TAG_PATTERNS, Tag.TAG_COMPOUND); var patsTag = NBTHelper.getList(stack, TAG_PATTERNS, Tag.TAG_COMPOUND);
if (patsTag == null) { if (patsTag == null) {
return null; return null;
} }
var out = new ArrayList<LegacySpellDatum<?>>(); var out = new ArrayList<Iota>();
for (var patTag : patsTag) { for (var patTag : patsTag) {
CompoundTag tag = NBTHelper.getAsCompound(patTag); CompoundTag tag = NBTHelper.getAsCompound(patTag);
if (tag.size() != 1) { if (tag.size() != 1) {
@ -78,9 +78,9 @@ public abstract class ItemPackagedHex extends ItemMediaHolder implements HexHold
} }
@Override @Override
public void writeHex(ItemStack stack, List<LegacySpellDatum<?>> patterns, int mana) { public void writeHex(ItemStack stack, List<Iota> patterns, int mana) {
ListTag patsTag = new ListTag(); ListTag patsTag = new ListTag();
for (LegacySpellDatum<?> pat : patterns) { for (Iota pat : patterns) {
patsTag.add(pat.serializeToNBT()); patsTag.add(pat.serializeToNBT());
} }
@ -107,7 +107,7 @@ public abstract class ItemPackagedHex extends ItemMediaHolder implements HexHold
return InteractionResultHolder.success(stack); return InteractionResultHolder.success(stack);
} }
List<LegacySpellDatum<?>> instrs = getHex(stack, (ServerLevel) world); List<Iota> instrs = getHex(stack, (ServerLevel) world);
if (instrs == null) { if (instrs == null) {
return InteractionResultHolder.fail(stack); return InteractionResultHolder.fail(stack);
} }

View file

@ -2,7 +2,7 @@ package at.petrak.hexcasting.common.network;
import at.petrak.hexcasting.api.mod.HexItemTags; import at.petrak.hexcasting.api.mod.HexItemTags;
import at.petrak.hexcasting.api.mod.HexStatistics; import at.petrak.hexcasting.api.mod.HexStatistics;
import at.petrak.hexcasting.api.spell.LegacySpellDatum; import at.petrak.hexcasting.api.spell.iota.Iota;
import at.petrak.hexcasting.api.spell.casting.ControllerInfo; import at.petrak.hexcasting.api.spell.casting.ControllerInfo;
import at.petrak.hexcasting.api.spell.casting.ResolvedPattern; import at.petrak.hexcasting.api.spell.casting.ResolvedPattern;
import at.petrak.hexcasting.api.spell.casting.ResolvedPatternType; import at.petrak.hexcasting.api.spell.casting.ResolvedPatternType;

View file

@ -1,6 +1,6 @@
package at.petrak.hexcasting.common.network; package at.petrak.hexcasting.common.network;
import at.petrak.hexcasting.api.spell.LegacySpellDatum; import at.petrak.hexcasting.api.spell.iota.Iota;
import at.petrak.hexcasting.api.utils.NBTHelper; import at.petrak.hexcasting.api.utils.NBTHelper;
import at.petrak.hexcasting.common.items.ItemAbacus; import at.petrak.hexcasting.common.items.ItemAbacus;
import at.petrak.hexcasting.common.items.ItemSpellbook; import at.petrak.hexcasting.common.items.ItemSpellbook;

View file

@ -2,7 +2,7 @@ package at.petrak.hexcasting.fabric.cc.adimpl;
import at.petrak.hexcasting.api.addldata.ADHexHolder; import at.petrak.hexcasting.api.addldata.ADHexHolder;
import at.petrak.hexcasting.api.item.HexHolderItem; import at.petrak.hexcasting.api.item.HexHolderItem;
import at.petrak.hexcasting.api.spell.LegacySpellDatum; import at.petrak.hexcasting.api.spell.iota.Iota;
import at.petrak.hexcasting.fabric.cc.HexCardinalComponents; import at.petrak.hexcasting.fabric.cc.HexCardinalComponents;
import dev.onyxstudios.cca.api.v3.item.ItemComponent; import dev.onyxstudios.cca.api.v3.item.ItemComponent;
import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerLevel;
@ -40,12 +40,12 @@ public abstract class CCHexHolder extends ItemComponent implements ADHexHolder {
} }
@Override @Override
public @Nullable List<LegacySpellDatum<?>> getHex(ServerLevel level) { public @Nullable List<Iota> getHex(ServerLevel level) {
return this.hexHolder.getHex(this.stack, level); return this.hexHolder.getHex(this.stack, level);
} }
@Override @Override
public void writeHex(List<LegacySpellDatum<?>> patterns, int mana) { public void writeHex(List<Iota> patterns, int mana) {
this.hexHolder.writeHex(this.stack, patterns, mana); this.hexHolder.writeHex(this.stack, patterns, mana);
} }