Skip to content

Commit

Permalink
Book Stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
SammySemicolon committed Oct 25, 2023
1 parent 0ce4b7a commit b5cc42e
Show file tree
Hide file tree
Showing 50 changed files with 292 additions and 124 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ org.gradle.daemon=false
# Dependency Version
minecraftVersion=1.18.2
forgeVersion=40.2.0
lodestoneVersion=1.4.2.486
lodestoneVersion=1.4.2.487
forgegradleVersion=5.1.53
mixingradleVersion=0.7-SNAPSHOT
librarianVersion=1.+
Expand Down
21 changes: 14 additions & 7 deletions src/generated/resources/.cache/cache
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ cb6a17c4dca30d064eedc28529420373d25d1933 assets/malum/blockstates/wall_ether_tor
55635004672302336ef4a04dbe0d38dff66c4cd9 assets/malum/blockstates/weeping_well_core.json
55188decc0c9a982e5ba40f8df2adea65a032e32 assets/malum/blockstates/weeping_well_corner.json
62e007ecef751f8b9b42eaa138f06d18cc008d05 assets/malum/blockstates/weeping_well_side.json
db3bdcc5154eb8053d48f8b97afa55fca8282952 assets/malum/lang/en_us.json
902a033ca070a4b64430c4e9c6c935d89cc927be assets/malum/lang/en_us.json
c2637401df2afc394d62b5c6bde312c604cdb21f assets/malum/models/block/blazing_quartz_ore.json
782e64739e04f0b87aa0aeafb55893cc348df504 assets/malum/models/block/blighted_earth.json
c0b5a7b1d337a7090eaf86d07fd8b47d35fbc1e1 assets/malum/models/block/blighted_soil.json
Expand Down Expand Up @@ -703,6 +703,7 @@ df37f5225df9befe5ca793442c83f16c8bf36104 assets/malum/models/item/cracked_silver
7ba46065e9827054f92c5cb8c2ea04485ee309a8 assets/malum/models/item/cracked_zinc_impetus.json
cc14b3ff96bec26168c3d7fa674cd0cb44ce7140 assets/malum/models/item/crushed_brilliance.json
e5410aa88d294a4366fd88705fba463785eab435 assets/malum/models/item/crushed_soulstone.json
48ffb89f8977d0ea9b3ace331b43ecb83883edde assets/malum/models/item/crystallized_nihility.json
46251c7bb1c980634d26f54dc62d79f89b669783 assets/malum/models/item/cthonic_gold.json
6d9b524060dfccbe2488aff9d2c7a0a0430bd254 assets/malum/models/item/cursed_grit.json
4f70b1243b893549113da1a9e158c61fa03f1f60 assets/malum/models/item/cut_runewood_planks.json
Expand Down Expand Up @@ -800,6 +801,7 @@ c62e6536260b5e9971fd9f66fa261d1865169122 assets/malum/models/item/necklace_of_th
0ce75baaf3721c88e6e4285543accabec7b5d903 assets/malum/models/item/necklace_of_tidal_affinity.json
a91b2cd9b62c544f476f101cfcbf3ccc1da6c827 assets/malum/models/item/nickel_impetus.json
0ed6a6048b7366e7948ab05c21b0090136240b26 assets/malum/models/item/nickel_node.json
88aafeb96797992464f90855fc56c2a29f281a1d assets/malum/models/item/null_slate.json
b28005f548ec1ef41d3b487a1ce84281287b8531 assets/malum/models/item/ornate_necklace.json
7ff1cdcc1d1a779509a8716266a1798009ed5faa assets/malum/models/item/ornate_ring.json
b55a6ada8f629d03faa9fc365d804097dcb2b23a assets/malum/models/item/osmium_impetus.json
Expand Down Expand Up @@ -837,10 +839,11 @@ eb7b211a030ef70e110798cd220720f8e97f5557 assets/malum/models/item/revealed_runew
3be1650db18bc78223da198b28a1dc3c1f13cfcc assets/malum/models/item/revealed_soulwood_log.json
a1be2c85c94965037db29b423105bf6bce46dfca assets/malum/models/item/ring_of_alchemical_mastery.json
0865fd5dfe63866e2814f914c2910d042dbb4473 assets/malum/models/item/ring_of_arcane_prowess.json
4a1f6f7b7d8af7823a080d9bbb5d5f71df512d14 assets/malum/models/item/ring_of_bloody_temperance.json
ca8fd5fe9afdf4d969aebb680811ee9a2e1bedf0 assets/malum/models/item/ring_of_curative_talent.json
c3940ae4e28ab382ce90195ff702f95f782cc815 assets/malum/models/item/ring_of_desperate_voracity.json
df216d5f5d5c244205ea72983253700478354719 assets/malum/models/item/ring_of_esoteric_spoils.json
d301f68443803ed8116c4afb84ed88de72ac49ed assets/malum/models/item/ring_of_growing_flesh.json
49d9c324a37907243d7919422dc5b5c9acc0488f assets/malum/models/item/ring_of_gruesome_satiation.json
39006a8db27350c24b03518f26ebbcf55e223ec1 assets/malum/models/item/ring_of_the_demolitionist.json
5f3e93dbf31babbad4012a9a84fc431f0e07abe1 assets/malum/models/item/ring_of_the_hoarder.json
d5d476b62ea7c5202ce0d8cf4e290d6b1c3cf082 assets/malum/models/item/rotting_essence.json
Expand Down Expand Up @@ -1051,7 +1054,7 @@ d77f0ad1da38969caa81ac9dda635e8489792040 assets/malum/models/item/zinc_node.json
05a3bb3cca9ff66e09b8571f8a8e4f43e0c93fb6 data/farmersdelight/tags/items/tools/knives.json
5736c68f4e1bf1daacb3685108f42dd499ddffdb data/forge/tags/blocks/fence_gates/wooden.json
14e43dbddca55da7019d426b6e601c63ed63e01f data/forge/tags/blocks/ores.json
506112292f60e1a1e50e1128207e6db43a31607f data/forge/tags/blocks/storage_blocks.json
aed6719ede3daca4961b7820bdb282860122c5ed data/forge/tags/blocks/storage_blocks.json
cc6d034c0dc05acb049e9a1f9d9292b1fa1fc1b2 data/forge/tags/blocks/stripped_logs.json
47e85f1717b604e87d13b21055a8715ac035638e data/forge/tags/items/gems.json
25c0bab813d31da58924161f204b3fb38c042d6d data/forge/tags/items/gems/quartz.json
Expand All @@ -1061,7 +1064,7 @@ e8fab8d2e63dec1fbb96cca35aaa365190400b02 data/forge/tags/items/nuggets/copper.js
14e43dbddca55da7019d426b6e601c63ed63e01f data/forge/tags/items/ores.json
96ed2b8a733298462d5805fded9826a1f85463b1 data/forge/tags/items/ores/quartz.json
2956c7ab14fca69e8efefa4ef85e2bb49eb29956 data/forge/tags/items/slimeballs.json
506112292f60e1a1e50e1128207e6db43a31607f data/forge/tags/items/storage_blocks.json
aed6719ede3daca4961b7820bdb282860122c5ed data/forge/tags/items/storage_blocks.json
cc6d034c0dc05acb049e9a1f9d9292b1fa1fc1b2 data/forge/tags/items/stripped_logs.json
05a3bb3cca9ff66e09b8571f8a8e4f43e0c93fb6 data/forge/tags/items/tools/knives.json
12e91a0923b969a078b72ac01a8cf5722373a6cb data/malum/advancements/recipes/aluminum_from_node_blasting.json
Expand Down Expand Up @@ -2179,9 +2182,13 @@ db470b95141d7b70c5251d28caea9054ff6fd687 data/malum/recipes/vertical_runewood_pl
f20706fed208e84778d8d7112e487053fe0685ee data/malum/recipes/vertical_soulwood_planks.json
7c0b5c59986c84bd0c6ec74cc29fa487c782bac6 data/malum/recipes/vertical_soulwood_planks_slab.json
aa95dbfa14350ca1c5868221663ac9a5481f35be data/malum/recipes/vertical_soulwood_planks_stairs.json
a9f2ada8da69d98193f75656160ca267e6815afd data/malum/recipes/void_favor/raw_soulstone.json
4d2e1627dc7d4f0dd860a79a88dca3751c06ddb4 data/malum/recipes/void_favor/the_vessel.json
e8aa0f04dcaf9d9ef0f4bf63f4f1c75690d4e684 data/malum/recipes/void_favor/void_salts.json
678486ec425a70266fd5914e99a3312dc03f55e5 data/malum/recipes/void_favor/anomalous_snare.json
74066cf2b9f8e345ebfaef68f00b93440942abca data/malum/recipes/void_favor/crystallized_nihility.json
f86db12c910149b44dfe00edd46d00268e3b369f data/malum/recipes/void_favor/null_slate.json
eaf9a25862b50bf447a8c0f778db58bd2dd834dd data/malum/recipes/void_favor/raw_soulstone.json
6e240a92c945d68d3b03c54e50307f5472a0ad47 data/malum/recipes/void_favor/strange_nucleus.json
49da947d625a708be60ea24e1f4e08981edd93b3 data/malum/recipes/void_favor/the_vessel.json
205a808a9cb6e1f6f00af516fd5e4821256e7570 data/malum/recipes/void_favor/void_salts.json
6be7bd80785f638a452b6075d0bb6fb8a1acba36 data/malum/recipes/weavers_workbench.json
c9a00a0dea1e204ea6d81e70ce5f3d8b0a90c499 data/malum/recipes/zinc_from_node_blasting.json
14730fbd0a601a657e165c1ae3d8f1684c23378e data/malum/recipes/zinc_from_node_smelting.json
Expand Down
5 changes: 4 additions & 1 deletion src/generated/resources/assets/malum/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@
"item.malum.crude_scythe": "Crude Scythe",
"item.malum.crushed_brilliance": "Crushed Brilliance",
"item.malum.crushed_soulstone": "Crushed Soulstone",
"item.malum.crystallized_nihility": "Crystallized Nihility",
"item.malum.cthonic_gold": "Cthonic Gold",
"item.malum.cursed_grit": "Cursed Grit",
"item.malum.demiboy_prideweave": "Demiboy Prideweave",
Expand Down Expand Up @@ -360,6 +361,7 @@
"item.malum.necklace_of_tidal_affinity": "Necklace of Tidal Affinity",
"item.malum.nickel_impetus": "Nickel Impetus",
"item.malum.nickel_node": "Nickel Node",
"item.malum.null_slate": "Null Slate",
"item.malum.ornate_necklace": "Ornate Necklace",
"item.malum.ornate_ring": "Ornate Ring",
"item.malum.osmium_impetus": "Osmium Impetus",
Expand All @@ -373,10 +375,11 @@
"item.malum.raw_soulstone": "Raw Soulstone",
"item.malum.ring_of_alchemical_mastery": "Ring of Alchemical Mastery",
"item.malum.ring_of_arcane_prowess": "Ring of Arcane Prowess",
"item.malum.ring_of_bloody_temperance": "Ring of Bloody Temperance",
"item.malum.ring_of_curative_talent": "Ring of Curative Talent",
"item.malum.ring_of_desperate_voracity": "Ring of Desperate Voracity",
"item.malum.ring_of_esoteric_spoils": "Ring of Esoteric Spoils",
"item.malum.ring_of_growing_flesh": "Ring of Growing Flesh",
"item.malum.ring_of_gruesome_satiation": "Ring of Gruesome Satiation",
"item.malum.ring_of_the_demolitionist": "Ring of the Demolitionist",
"item.malum.ring_of_the_hoarder": "Ring of the Hoarder",
"item.malum.rotting_essence": "Rotting Essence",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "malum:item/ring_of_bloody_temperance"
"layer0": "malum:item/crystallized_nihility"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "malum:item/null_slate"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "malum:item/ring_of_growing_flesh"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "malum:item/ring_of_gruesome_satiation"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,17 @@
"values": [
"malum:block_of_grim_talc",
"malum:block_of_astral_weave",
"malum:mote_of_raw_arcana",
"malum:block_of_cursed_grit",
"malum:block_of_alchemical_calx",
"malum:mote_of_infernal_arcana",
"malum:mote_of_aqueous_arcana",
"malum:mass_of_blighted_gunk",
"malum:block_of_blazing_quartz",
"malum:block_of_void_salts",
"malum:mote_of_aerial_arcana",
"malum:block_of_soulstone",
"malum:mote_of_eldritch_arcana",
"malum:mote_of_sacred_arcana",
"malum:block_of_arcane_charcoal",
"malum:block_of_soul_stained_steel",
"malum:block_of_hallowed_gold",
"malum:block_of_rotting_essence",
"malum:mote_of_earthen_arcana",
"malum:block_of_hex_ash",
"malum:mote_of_wicked_arcana",
"malum:block_of_raw_soulstone",
"malum:block_of_brilliance"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,17 @@
"values": [
"malum:block_of_grim_talc",
"malum:block_of_astral_weave",
"malum:mote_of_raw_arcana",
"malum:block_of_cursed_grit",
"malum:block_of_alchemical_calx",
"malum:mote_of_infernal_arcana",
"malum:mote_of_aqueous_arcana",
"malum:mass_of_blighted_gunk",
"malum:block_of_blazing_quartz",
"malum:block_of_void_salts",
"malum:mote_of_aerial_arcana",
"malum:block_of_soulstone",
"malum:mote_of_eldritch_arcana",
"malum:mote_of_sacred_arcana",
"malum:block_of_arcane_charcoal",
"malum:block_of_soul_stained_steel",
"malum:block_of_hallowed_gold",
"malum:block_of_rotting_essence",
"malum:mote_of_earthen_arcana",
"malum:block_of_hex_ash",
"malum:mote_of_wicked_arcana",
"malum:block_of_raw_soulstone",
"malum:block_of_brilliance"
]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "malum:favor_of_the_void",
"input": {
"tag": "forge:storage_blocks/iron"
},
"output": {
"item": "malum:anomalous_snare"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "malum:favor_of_the_void",
"input": {
"item": "minecraft:ghast_tear"
},
"output": {
"item": "malum:crystallized_nihility"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "malum:favor_of_the_void",
"input": {
"item": "malum:processed_soulstone"
},
"output": {
"item": "malum:null_slate"
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"type": "malum:favor_of_the_void",
"input": {
"tag": "forge:raw_materials",
"count": 1
"tag": "forge:raw_materials"
},
"output": {
"item": "malum:raw_soulstone"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "malum:favor_of_the_void",
"input": {
"tag": "forge:ender_pearls"
},
"output": {
"item": "malum:strange_nucleus"
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"type": "malum:favor_of_the_void",
"input": {
"item": "malum:the_device",
"count": 1
"item": "malum:the_device"
},
"output": {
"item": "malum:the_vessel"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"type": "malum:favor_of_the_void",
"input": {
"item": "malum:hex_ash",
"count": 4
"item": "malum:hex_ash"
},
"output": {
"item": "malum:void_salts"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.client.resources.model.Material;
import net.minecraft.core.Direction;
import net.minecraft.resources.*;
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
import team.lodestar.lodestone.handlers.RenderHandler;
import team.lodestar.lodestone.setup.LodestoneRenderTypeRegistry;
Expand All @@ -24,12 +25,8 @@


public class TotemPoleRenderer implements BlockEntityRenderer<TotemPoleBlockEntity> {
public static Map<MalumSpiritType, Material> overlayHashmap = new HashMap<>();

public TotemPoleRenderer(BlockEntityRendererProvider.Context context) {
SpiritTypeRegistry.SPIRITS.forEach((s, t) ->
overlayHashmap.put(t, new Material(TextureAtlas.LOCATION_BLOCKS, t.getTotemGlowTexture()))
);
}

@Override
Expand All @@ -38,12 +35,11 @@ public void render(TotemPoleBlockEntity blockEntityIn, float partialTicks, PoseS
if (blockEntityIn.type == null) {
return;
}
renderQuad(overlayHashmap.get(blockEntityIn.type), blockEntityIn.type.getPrimaryColor(), blockEntityIn.currentColor/20f, direction, poseStack);
renderQuad(blockEntityIn.type.getTotemGlowTexture(), blockEntityIn.type.getPrimaryColor(), blockEntityIn.currentColor/20f, direction, poseStack);
}

public void renderQuad(Material material, Color color, float alpha, Direction direction, PoseStack poseStack) {
TextureAtlasSprite sprite = material.sprite();
VertexConsumer consumer = RenderHandler.DELAYED_RENDER.getBuffer(LodestoneRenderTypeRegistry.ADDITIVE_BLOCK);
public void renderQuad(ResourceLocation resourceLocation, Color color, float alpha, Direction direction, PoseStack poseStack) {
VertexConsumer consumer = RenderHandler.DELAYED_RENDER.getBuffer(LodestoneRenderTypeRegistry.ADDITIVE_TEXTURE.applyAndCache(resourceLocation));

Vector3f[] positions = new Vector3f[]{new Vector3f(0, 0, 2.01f), new Vector3f(2, 0, 2.01f), new Vector3f(2, 2, 2.01f), new Vector3f(0, 2, 2.01f)};

Expand All @@ -54,7 +50,6 @@ public void renderQuad(Material material, Color color, float alpha, Direction di
VFXBuilders.createWorld()
.setPosColorTexLightmapDefaultFormat()
.setColor(color, alpha)
.setUV(sprite.getU0(), sprite.getV0(), sprite.getU1(), sprite.getV1())
.renderQuad(consumer, poseStack, positions, 0.5f);
poseStack.popPose();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.mojang.blaze3d.vertex.*;
import com.mojang.math.*;
import com.sammy.malum.core.systems.rites.*;
import com.sammy.malum.core.systems.spirit.*;
import net.minecraft.*;
import net.minecraft.client.*;
import net.minecraft.client.gui.Font;
Expand Down Expand Up @@ -38,39 +39,41 @@ public enum BookTheme {
DEFAULT, EASY_READING
}

public static void renderRiteIcon(MalumRiteType rite, PoseStack stack, boolean corrupted, int x, int y) {
renderRiteIcon(rite, stack, corrupted, x, y, 0);
public static void renderRiteIcon(MalumRiteType rite, PoseStack stack, boolean corrupted, float glowAlpha, int x, int y) {
renderRiteIcon(rite.getIcon(), rite.getEffectSpirit(), stack, corrupted, glowAlpha, x, y, 0);
}

public static void renderRiteIcon(MalumRiteType rite, PoseStack stack, boolean corrupted, int x, int y, int z) {
public static void renderRiteIcon(ResourceLocation texture, MalumSpiritType spiritType, PoseStack stack, boolean corrupted, float glowAlpha, int x, int y) {
renderRiteIcon(texture, spiritType, stack, corrupted, glowAlpha, x, y, 0);
}
public static void renderRiteIcon(ResourceLocation texture, MalumSpiritType spiritType, PoseStack stack, boolean corrupted, float glowAlpha, int x, int y, int z) {
ExtendedShaderInstance shaderInstance = (ExtendedShaderInstance) LodestoneShaderRegistry.DISTORTED_TEXTURE.getInstance().get();
shaderInstance.safeGetUniform("YFrequency").set(corrupted ? 5f : 11f);
shaderInstance.safeGetUniform("XFrequency").set(corrupted ? 12f : 17f);
shaderInstance.safeGetUniform("Speed").set(2000f * (corrupted ? -0.75f : 1));
shaderInstance.safeGetUniform("Intensity").set(corrupted ? 14f : 50f);
Supplier<ShaderInstance> shaderInstanceSupplier = () -> shaderInstance;
Color color = rite.getEffectSpirit().getPrimaryColor();

VFXBuilders.ScreenVFXBuilder builder = VFXBuilders.createScreen()
.setPosColorTexLightmapDefaultFormat()
.setShader(shaderInstanceSupplier)
.setColor(color)
.setColor(spiritType.getPrimaryColor())
.setAlpha(0.9f)
.setZLevel(z)
.setShader(() -> shaderInstance);

RenderSystem.enableBlend();
RenderSystem.disableDepthTest();
RenderSystem.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
renderTexture(rite.getIcon(), stack, builder, x, y, 0, 0, 16, 16, 16, 16);
builder.setAlpha(0.4f);
renderTexture(rite.getIcon(), stack, builder, x - 1, y, 0, 0, 16, 16, 16, 16);
renderTexture(rite.getIcon(), stack, builder, x + 1, y, 0, 0, 16, 16, 16, 16);
renderTexture(rite.getIcon(), stack, builder, x, y - 1, 0, 0, 16, 16, 16, 16);
renderTexture(texture, stack, builder, x, y, 0, 0, 16, 16, 16, 16);
builder.setAlpha(glowAlpha);
renderTexture(texture, stack, builder, x - 1, y, 0, 0, 16, 16, 16, 16);
renderTexture(texture, stack, builder, x + 1, y, 0, 0, 16, 16, 16, 16);
renderTexture(texture, stack, builder, x, y - 1, 0, 0, 16, 16, 16, 16);
if (corrupted) {
builder.setColor(rite.getEffectSpirit().getSecondaryColor());
builder.setColor(spiritType.getSecondaryColor());
}
renderTexture(rite.getIcon(), stack, builder, x, y + 1, 0, 0, 16, 16, 16, 16);
renderTexture(texture, stack, builder, x, y + 1, 0, 0, 16, 16, 16, 16);
shaderInstance.setUniformDefaults();
RenderSystem.enableDepthTest();
RenderSystem.defaultBlendFunc();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ public static void setupEntries() {
);

ENTRIES.add(new BookEntry(
"tyrving", TYRVING.get(), 0, 17).setSoulwood()
"tyrving", TYRVING.get(), 1, 16).setSoulwood()
.addPage(new HeadlineTextPage("tyrving", "tyrving.1"))
.addPage(SpiritInfusionPage.fromOutput(TYRVING.get()))
.addPage(new TextPage("tyrving.2"))
Expand Down
Loading

0 comments on commit b5cc42e

Please sign in to comment.