Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
- The pattern itself is now a special handler with a variable tail length
- The tail length determines how many extra iotas from the original stack are included in each iteration's stack
- Iotas included via the above process are now popped from the original stack
- Using Akasha's Gambit with a pattern that already exists in a library will now overwrite the associated shelf ([#1301](https://github.com/FallingColors/HexMod/pull/1301)) @Robotgiggle
- Akashic Bookshelves can now be sealed with honeycomb to prevent overwriting ([#1301](https://github.com/FallingColors/HexMod/pull/1301)) @Robotgiggle

### Changed

Expand Down
Original file line number Diff line number Diff line change
@@ -1,107 +1,194 @@
{
"variants": {
"facing=east,has_books=false": {
"facing=east,has_books=0,sealed=false": {
"model": "hexcasting:block/akashic_bookshelf_empty",
"uvlock": true,
"y": 90
},
"facing=east,has_books=true": [
{
"model": "hexcasting:block/akashic_bookshelf_1",
"uvlock": true,
"y": 90
},
{
"model": "hexcasting:block/akashic_bookshelf_2",
"uvlock": true,
"y": 90
},
{
"model": "hexcasting:block/akashic_bookshelf_3",
"uvlock": true,
"y": 90
},
{
"model": "hexcasting:block/akashic_bookshelf_4",
"uvlock": true,
"y": 90
}
],
"facing=north,has_books=false": {
"facing=east,has_books=0,sealed=true": {
"model": "hexcasting:block/akashic_bookshelf_empty",
"uvlock": true,
"y": 90
},
"facing=east,has_books=1,sealed=false": {
"model": "hexcasting:block/akashic_bookshelf_1",
"uvlock": true,
"y": 90
},
"facing=east,has_books=1,sealed=true": {
"model": "hexcasting:block/akashic_bookshelf_1",
"uvlock": true,
"y": 90
},
"facing=east,has_books=2,sealed=false": {
"model": "hexcasting:block/akashic_bookshelf_2",
"uvlock": true,
"y": 90
},
"facing=east,has_books=2,sealed=true": {
"model": "hexcasting:block/akashic_bookshelf_2",
"uvlock": true,
"y": 90
},
"facing=east,has_books=3,sealed=false": {
"model": "hexcasting:block/akashic_bookshelf_3",
"uvlock": true,
"y": 90
},
"facing=east,has_books=3,sealed=true": {
"model": "hexcasting:block/akashic_bookshelf_3",
"uvlock": true,
"y": 90
},
"facing=east,has_books=4,sealed=false": {
"model": "hexcasting:block/akashic_bookshelf_4",
"uvlock": true,
"y": 90
},
"facing=east,has_books=4,sealed=true": {
"model": "hexcasting:block/akashic_bookshelf_4",
"uvlock": true,
"y": 90
},
"facing=north,has_books=0,sealed=false": {
"model": "hexcasting:block/akashic_bookshelf_empty",
"uvlock": true
},
"facing=north,has_books=0,sealed=true": {
"model": "hexcasting:block/akashic_bookshelf_empty",
"uvlock": true
},
"facing=north,has_books=1,sealed=false": {
"model": "hexcasting:block/akashic_bookshelf_1",
"uvlock": true
},
"facing=north,has_books=1,sealed=true": {
"model": "hexcasting:block/akashic_bookshelf_1",
"uvlock": true
},
"facing=north,has_books=2,sealed=false": {
"model": "hexcasting:block/akashic_bookshelf_2",
"uvlock": true
},
"facing=north,has_books=2,sealed=true": {
"model": "hexcasting:block/akashic_bookshelf_2",
"uvlock": true
},
"facing=north,has_books=true": [
{
"model": "hexcasting:block/akashic_bookshelf_1",
"uvlock": true
},
{
"model": "hexcasting:block/akashic_bookshelf_2",
"uvlock": true
},
{
"model": "hexcasting:block/akashic_bookshelf_3",
"uvlock": true
},
{
"model": "hexcasting:block/akashic_bookshelf_4",
"uvlock": true
}
],
"facing=south,has_books=false": {
"facing=north,has_books=3,sealed=false": {
"model": "hexcasting:block/akashic_bookshelf_3",
"uvlock": true
},
"facing=north,has_books=3,sealed=true": {
"model": "hexcasting:block/akashic_bookshelf_3",
"uvlock": true
},
"facing=north,has_books=4,sealed=false": {
"model": "hexcasting:block/akashic_bookshelf_4",
"uvlock": true
},
"facing=north,has_books=4,sealed=true": {
"model": "hexcasting:block/akashic_bookshelf_4",
"uvlock": true
},
"facing=south,has_books=0,sealed=false": {
"model": "hexcasting:block/akashic_bookshelf_empty",
"uvlock": true,
"y": 180
},
"facing=south,has_books=0,sealed=true": {
"model": "hexcasting:block/akashic_bookshelf_empty",
"uvlock": true,
"y": 180
},
"facing=south,has_books=true": [
{
"model": "hexcasting:block/akashic_bookshelf_1",
"uvlock": true,
"y": 180
},
{
"model": "hexcasting:block/akashic_bookshelf_2",
"uvlock": true,
"y": 180
},
{
"model": "hexcasting:block/akashic_bookshelf_3",
"uvlock": true,
"y": 180
},
{
"model": "hexcasting:block/akashic_bookshelf_4",
"uvlock": true,
"y": 180
}
],
"facing=west,has_books=false": {
"facing=south,has_books=1,sealed=false": {
"model": "hexcasting:block/akashic_bookshelf_1",
"uvlock": true,
"y": 180
},
"facing=south,has_books=1,sealed=true": {
"model": "hexcasting:block/akashic_bookshelf_1",
"uvlock": true,
"y": 180
},
"facing=south,has_books=2,sealed=false": {
"model": "hexcasting:block/akashic_bookshelf_2",
"uvlock": true,
"y": 180
},
"facing=south,has_books=2,sealed=true": {
"model": "hexcasting:block/akashic_bookshelf_2",
"uvlock": true,
"y": 180
},
"facing=south,has_books=3,sealed=false": {
"model": "hexcasting:block/akashic_bookshelf_3",
"uvlock": true,
"y": 180
},
"facing=south,has_books=3,sealed=true": {
"model": "hexcasting:block/akashic_bookshelf_3",
"uvlock": true,
"y": 180
},
"facing=south,has_books=4,sealed=false": {
"model": "hexcasting:block/akashic_bookshelf_4",
"uvlock": true,
"y": 180
},
"facing=south,has_books=4,sealed=true": {
"model": "hexcasting:block/akashic_bookshelf_4",
"uvlock": true,
"y": 180
},
"facing=west,has_books=0,sealed=false": {
"model": "hexcasting:block/akashic_bookshelf_empty",
"uvlock": true,
"y": 270
},
"facing=west,has_books=true": [
{
"model": "hexcasting:block/akashic_bookshelf_1",
"uvlock": true,
"y": 270
},
{
"model": "hexcasting:block/akashic_bookshelf_2",
"uvlock": true,
"y": 270
},
{
"model": "hexcasting:block/akashic_bookshelf_3",
"uvlock": true,
"y": 270
},
{
"model": "hexcasting:block/akashic_bookshelf_4",
"uvlock": true,
"y": 270
}
]
"facing=west,has_books=0,sealed=true": {
"model": "hexcasting:block/akashic_bookshelf_empty",
"uvlock": true,
"y": 270
},
"facing=west,has_books=1,sealed=false": {
"model": "hexcasting:block/akashic_bookshelf_1",
"uvlock": true,
"y": 270
},
"facing=west,has_books=1,sealed=true": {
"model": "hexcasting:block/akashic_bookshelf_1",
"uvlock": true,
"y": 270
},
"facing=west,has_books=2,sealed=false": {
"model": "hexcasting:block/akashic_bookshelf_2",
"uvlock": true,
"y": 270
},
"facing=west,has_books=2,sealed=true": {
"model": "hexcasting:block/akashic_bookshelf_2",
"uvlock": true,
"y": 270
},
"facing=west,has_books=3,sealed=false": {
"model": "hexcasting:block/akashic_bookshelf_3",
"uvlock": true,
"y": 270
},
"facing=west,has_books=3,sealed=true": {
"model": "hexcasting:block/akashic_bookshelf_3",
"uvlock": true,
"y": 270
},
"facing=west,has_books=4,sealed=false": {
"model": "hexcasting:block/akashic_bookshelf_4",
"uvlock": true,
"y": 270
},
"facing=west,has_books=4,sealed=true": {
"model": "hexcasting:block/akashic_bookshelf_4",
"uvlock": true,
"y": 270
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package at.petrak.hexcasting.api.casting.mishaps

import at.petrak.hexcasting.api.casting.eval.CastingEnvironment
import at.petrak.hexcasting.api.casting.iota.Iota
import at.petrak.hexcasting.api.pigment.FrozenPigment
import at.petrak.hexcasting.api.utils.TreeList
import net.minecraft.core.BlockPos
import net.minecraft.world.item.DyeColor

class MishapNoShelfSpace(val pos: BlockPos) : Mishap() {
override fun accentColor(env: CastingEnvironment, errorCtx: Context): FrozenPigment =
dyeColor(DyeColor.PURPLE)

override fun execute(env: CastingEnvironment, errorCtx: Context, stack: TreeList<Iota>): TreeList<Iota> {
env.mishapEnvironment.removeXp(20)
return stack
}

override fun errorMessage(env: CastingEnvironment, errorCtx: Context) =
error("no_shelf_space", pos.toShortString())
}
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public static void registerColorProviders(BiConsumer<ItemColor, Item> itemColorR
itemColorRegistry.accept(makeIotaStorageColorizer(HexItems.THOUGHT_KNOT.get()::getColor), HexItems.THOUGHT_KNOT.get());

blockColorRegistry.accept((bs, level, pos, idx) -> {
if (!bs.getValue(BlockAkashicBookshelf.HAS_BOOKS) || level == null || pos == null) {
if (bs.getValue(BlockAkashicBookshelf.HAS_BOOKS) == 0 || level == null || pos == null) {
return 0xff_ffffff;
}
var tile = level.getBlockEntity(pos);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import at.petrak.hexcasting.api.block.circle.BlockAbstractImpetus;
import at.petrak.hexcasting.api.casting.circles.BlockEntityAbstractImpetus;
import at.petrak.hexcasting.api.client.ScryingLensOverlayRegistry;
import at.petrak.hexcasting.common.blocks.akashic.BlockAkashicBookshelf;
import at.petrak.hexcasting.common.blocks.akashic.BlockEntityAkashicBookshelf;
import at.petrak.hexcasting.common.lib.HexBlocks;
import com.mojang.datafixers.util.Pair;
Expand Down Expand Up @@ -65,6 +66,10 @@ public static void addScryingLensStuff() {
var display = iota.display();
lines.add(new Pair<>(new ItemStack(Items.BOOK), display));
}
if (state.getValue(BlockAkashicBookshelf.SEALED)) {
var sealed = Component.translatable("hexcasting.tooltip.spellbook.sealed").withStyle(ChatFormatting.GOLD);
lines.add(new Pair<>(new ItemStack(Items.HONEYCOMB), sealed));
}
}
});

Expand Down
Loading
Loading