From 6f4497a18f6c0de31b82a553533b3d36f3a63530 Mon Sep 17 00:00:00 2001 From: gamma-delta <29877714+gamma-delta@users.noreply.github.com> Date: Mon, 13 Jun 2022 19:41:13 -0500 Subject: [PATCH] whoopsy it modified things in caches. oh well. --- .../api/block/circle/BlockEntityAbstractImpetus.java | 2 +- .../common/blocks/akashic/BlockAkashicBookshelf.java | 2 +- .../blocks/akashic/BlockEntityAkashicRecord.java | 6 +++--- .../hexcasting/common/blocks/circles/BlockSlate.java | 2 +- .../hexcasting/common/casting/RegisterPatterns.java | 2 +- .../common/command/ListPatternsCommand.java | 2 +- .../petrak/hexcasting/common/items/ItemAbacus.java | 6 +++--- .../petrak/hexcasting/common/items/ItemScroll.java | 6 +++--- .../at/petrak/hexcasting/common/items/ItemSlate.java | 6 +++--- .../common/items/magic/ItemPackagedHex.java | 12 ++++++------ .../common/network/MsgNewSpellPatternSyn.java | 2 +- .../hexcasting/common/network/MsgShiftScrollSyn.java | 2 +- .../hexcasting/fabric/cc/adimpl/CCHexHolder.java | 6 +++--- 13 files changed, 28 insertions(+), 28 deletions(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/api/block/circle/BlockEntityAbstractImpetus.java b/Common/src/main/java/at/petrak/hexcasting/api/block/circle/BlockEntityAbstractImpetus.java index b5dcd503..0a815b4f 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/block/circle/BlockEntityAbstractImpetus.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/block/circle/BlockEntityAbstractImpetus.java @@ -5,7 +5,7 @@ import at.petrak.hexcasting.api.misc.FrozenColorizer; import at.petrak.hexcasting.api.misc.ManaConstants; import at.petrak.hexcasting.api.mod.HexConfig; 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.CastingHarness; import at.petrak.hexcasting.api.spell.casting.SpellCircleContext; diff --git a/Common/src/main/java/at/petrak/hexcasting/common/blocks/akashic/BlockAkashicBookshelf.java b/Common/src/main/java/at/petrak/hexcasting/common/blocks/akashic/BlockAkashicBookshelf.java index d4605c1f..e922077e 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/blocks/akashic/BlockAkashicBookshelf.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/blocks/akashic/BlockAkashicBookshelf.java @@ -2,7 +2,7 @@ package at.petrak.hexcasting.common.blocks.akashic; import at.petrak.hexcasting.annotations.SoftImplement; 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.lib.HexBlocks; import at.petrak.hexcasting.common.lib.HexSounds; diff --git a/Common/src/main/java/at/petrak/hexcasting/common/blocks/akashic/BlockEntityAkashicRecord.java b/Common/src/main/java/at/petrak/hexcasting/common/blocks/akashic/BlockEntityAkashicRecord.java index 40655a3d..bf6c9d61 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/blocks/akashic/BlockEntityAkashicRecord.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/blocks/akashic/BlockEntityAkashicRecord.java @@ -2,7 +2,7 @@ package at.petrak.hexcasting.common.blocks.akashic; import at.petrak.hexcasting.api.block.HexBlockEntity; 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.HexPattern; import at.petrak.hexcasting.common.lib.HexBlockEntities; @@ -45,7 +45,7 @@ public class BlockEntityAkashicRecord extends HexBlockEntity { * Will never clobber anything. */ public @Nullable - BlockPos addNewDatum(HexPattern key, LegacySpellDatum datum) { + BlockPos addNewDatum(HexPattern key, Iota datum) { String entryKey = getKey(key); if (this.entries.containsKey(entryKey)) { return null; // would clobber @@ -76,7 +76,7 @@ public class BlockEntityAkashicRecord extends HexBlockEntity { } public @Nullable - LegacySpellDatum lookupPattern(HexPattern key, ServerLevel slevel) { + Iota lookupPattern(HexPattern key, ServerLevel slevel) { var entry = this.entries.get(getKey(key)); if (entry == null) { return null; diff --git a/Common/src/main/java/at/petrak/hexcasting/common/blocks/circles/BlockSlate.java b/Common/src/main/java/at/petrak/hexcasting/common/blocks/circles/BlockSlate.java index 62751258..6cf54e79 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/blocks/circles/BlockSlate.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/blocks/circles/BlockSlate.java @@ -2,7 +2,7 @@ package at.petrak.hexcasting.common.blocks.circles; import at.petrak.hexcasting.annotations.SoftImplement; 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.common.lib.HexItems; import net.minecraft.core.BlockPos; diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/RegisterPatterns.java b/Common/src/main/java/at/petrak/hexcasting/common/casting/RegisterPatterns.java index 45bc277b..fe8895ab 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/RegisterPatterns.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/RegisterPatterns.java @@ -3,7 +3,7 @@ package at.petrak.hexcasting.common.casting; import at.petrak.hexcasting.api.PatternRegistry; import at.petrak.hexcasting.api.misc.ManaConstants; 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.math.HexAngle; import at.petrak.hexcasting.api.spell.math.HexDir; diff --git a/Common/src/main/java/at/petrak/hexcasting/common/command/ListPatternsCommand.java b/Common/src/main/java/at/petrak/hexcasting/common/command/ListPatternsCommand.java index 753e51e2..afff4822 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/command/ListPatternsCommand.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/command/ListPatternsCommand.java @@ -1,7 +1,7 @@ package at.petrak.hexcasting.common.command; 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.common.items.ItemScroll; import at.petrak.hexcasting.common.lib.HexItems; diff --git a/Common/src/main/java/at/petrak/hexcasting/common/items/ItemAbacus.java b/Common/src/main/java/at/petrak/hexcasting/common/items/ItemAbacus.java index ab264338..5be7ab6c 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/items/ItemAbacus.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/items/ItemAbacus.java @@ -1,7 +1,7 @@ package at.petrak.hexcasting.common.items; 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.common.lib.HexSounds; import net.minecraft.nbt.CompoundTag; @@ -32,12 +32,12 @@ public class ItemAbacus extends Item implements IotaHolderItem { } @Override - public boolean canWrite(ItemStack stack, LegacySpellDatum datum) { + public boolean canWrite(ItemStack stack, Iota datum) { return false; } @Override - public void writeDatum(ItemStack stack, LegacySpellDatum datum) { + public void writeDatum(ItemStack stack, Iota datum) { // nope } diff --git a/Common/src/main/java/at/petrak/hexcasting/common/items/ItemScroll.java b/Common/src/main/java/at/petrak/hexcasting/common/items/ItemScroll.java index adf19f8e..61fb19fb 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/items/ItemScroll.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/items/ItemScroll.java @@ -2,7 +2,7 @@ package at.petrak.hexcasting.common.items; import at.petrak.hexcasting.api.item.IotaHolderItem; 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.utils.NBTHelper; import at.petrak.hexcasting.client.gui.PatternTooltipGreeble; @@ -60,12 +60,12 @@ public class ItemScroll extends Item implements IotaHolderItem { } @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); } @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) { NBTHelper.putCompound(stack, TAG_PATTERN, pat.serializeToNBT()); } diff --git a/Common/src/main/java/at/petrak/hexcasting/common/items/ItemSlate.java b/Common/src/main/java/at/petrak/hexcasting/common/items/ItemSlate.java index 386a0522..b40a78f2 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/items/ItemSlate.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/items/ItemSlate.java @@ -4,7 +4,7 @@ import at.petrak.hexcasting.annotations.SoftImplement; import at.petrak.hexcasting.api.HexAPI; import at.petrak.hexcasting.api.item.IotaHolderItem; 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.utils.NBTHelper; import at.petrak.hexcasting.client.gui.PatternTooltipGreeble; @@ -82,12 +82,12 @@ public class ItemSlate extends BlockItem implements IotaHolderItem { } @Override - public boolean canWrite(ItemStack stack, LegacySpellDatum datum) { + public boolean canWrite(ItemStack stack, Iota datum) { return datum == null || datum.getType() == DatumType.PATTERN; } @Override - public void writeDatum(ItemStack stack, LegacySpellDatum datum) { + public void writeDatum(ItemStack stack, Iota datum) { if (this.canWrite(stack, datum)) { if (datum == null) { var beTag = NBTHelper.getOrCreateCompound(stack, "BlockEntityTag"); diff --git a/Common/src/main/java/at/petrak/hexcasting/common/items/magic/ItemPackagedHex.java b/Common/src/main/java/at/petrak/hexcasting/common/items/magic/ItemPackagedHex.java index 738c1c2e..628214f6 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/items/magic/ItemPackagedHex.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/items/magic/ItemPackagedHex.java @@ -1,7 +1,7 @@ package at.petrak.hexcasting.common.items.magic; 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.CastingHarness; import at.petrak.hexcasting.api.spell.math.HexPattern; @@ -58,14 +58,14 @@ public abstract class ItemPackagedHex extends ItemMediaHolder implements HexHold } @Override - public @Nullable List> getHex(ItemStack stack, ServerLevel level) { + public @Nullable List getHex(ItemStack stack, ServerLevel level) { var patsTag = NBTHelper.getList(stack, TAG_PATTERNS, Tag.TAG_COMPOUND); if (patsTag == null) { return null; } - var out = new ArrayList>(); + var out = new ArrayList(); for (var patTag : patsTag) { CompoundTag tag = NBTHelper.getAsCompound(patTag); if (tag.size() != 1) { @@ -78,9 +78,9 @@ public abstract class ItemPackagedHex extends ItemMediaHolder implements HexHold } @Override - public void writeHex(ItemStack stack, List> patterns, int mana) { + public void writeHex(ItemStack stack, List patterns, int mana) { ListTag patsTag = new ListTag(); - for (LegacySpellDatum pat : patterns) { + for (Iota pat : patterns) { patsTag.add(pat.serializeToNBT()); } @@ -107,7 +107,7 @@ public abstract class ItemPackagedHex extends ItemMediaHolder implements HexHold return InteractionResultHolder.success(stack); } - List> instrs = getHex(stack, (ServerLevel) world); + List instrs = getHex(stack, (ServerLevel) world); if (instrs == null) { return InteractionResultHolder.fail(stack); } diff --git a/Common/src/main/java/at/petrak/hexcasting/common/network/MsgNewSpellPatternSyn.java b/Common/src/main/java/at/petrak/hexcasting/common/network/MsgNewSpellPatternSyn.java index a726eba1..53916272 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/network/MsgNewSpellPatternSyn.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/network/MsgNewSpellPatternSyn.java @@ -2,7 +2,7 @@ package at.petrak.hexcasting.common.network; import at.petrak.hexcasting.api.mod.HexItemTags; 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.ResolvedPattern; import at.petrak.hexcasting.api.spell.casting.ResolvedPatternType; diff --git a/Common/src/main/java/at/petrak/hexcasting/common/network/MsgShiftScrollSyn.java b/Common/src/main/java/at/petrak/hexcasting/common/network/MsgShiftScrollSyn.java index 75f1cdaa..2d75a08f 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/network/MsgShiftScrollSyn.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/network/MsgShiftScrollSyn.java @@ -1,6 +1,6 @@ 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.common.items.ItemAbacus; import at.petrak.hexcasting.common.items.ItemSpellbook; diff --git a/Fabric/src/main/java/at/petrak/hexcasting/fabric/cc/adimpl/CCHexHolder.java b/Fabric/src/main/java/at/petrak/hexcasting/fabric/cc/adimpl/CCHexHolder.java index efcda913..046edb46 100644 --- a/Fabric/src/main/java/at/petrak/hexcasting/fabric/cc/adimpl/CCHexHolder.java +++ b/Fabric/src/main/java/at/petrak/hexcasting/fabric/cc/adimpl/CCHexHolder.java @@ -2,7 +2,7 @@ package at.petrak.hexcasting.fabric.cc.adimpl; import at.petrak.hexcasting.api.addldata.ADHexHolder; 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 dev.onyxstudios.cca.api.v3.item.ItemComponent; import net.minecraft.server.level.ServerLevel; @@ -40,12 +40,12 @@ public abstract class CCHexHolder extends ItemComponent implements ADHexHolder { } @Override - public @Nullable List> getHex(ServerLevel level) { + public @Nullable List getHex(ServerLevel level) { return this.hexHolder.getHex(this.stack, level); } @Override - public void writeHex(List> patterns, int mana) { + public void writeHex(List patterns, int mana) { this.hexHolder.writeHex(this.stack, patterns, mana); }