From 8015ad35b2015d1ef638a437797e44f665e52f28 Mon Sep 17 00:00:00 2001 From: Buuz135 Date: Fri, 8 Dec 2023 21:26:30 +0100 Subject: [PATCH] Updated README.md and fixed some crashes --- README.md | 48 ++++++++++++++++++- .../industrialforegoingsouls/lang/en_us.json | 2 +- .../block/tile/SoulSurgeBlockEntity.java | 12 +++-- .../data/IFSoulsLangProvider.java | 2 +- 4 files changed, 56 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index e386229..0bb657e 100644 --- a/README.md +++ b/README.md @@ -2,5 +2,51 @@ ![Discord](https://imgur.com/A7U3oXE.png) [Join my Discord](https://discord.gg/4tPfwjn)![Patreon](https://imgur.com/m9xyJSE.png) [Support me on Patreon](https://www.patreon.com/buuz135)![Twitter](https://imgur.com/A7U3oXE.png) [Follow me on twitter](https://twitter.com/Buuz135mods) -Industrial Foregoing: Souls uses souls extracted from Wardens to accelerate your machines. +Industrial Foregoing: Souls uses souls extracted from Wardens to accelerate your machines. To do it you +need to extract souls from a Warden using a Soul Lase Base with a **Blue Lens**. As +always the Stasis Chamber will be your friend. + +![Setup](https://i.imgur.com/oxRZtIm.gif) + +**Don't Forget to add a lens!** + +![Setup](https://i.imgur.com/FECPKSB.gif) + +Once you have some souls stored now you need to place a **Soul Surge** pointing at the block you want to accelerate and +connect it using **Soul Pipes** to the **Soul Laser Base**. You can stop the Soul Surge from working by applying a * +*redstone signal** to it. + +![Setup](https://imgur.com/vKGRR6G.png) + +Each soul lasts for 15 seconds and makes the machine 4 times faster by default (Can be changed in the config) + +You can prevent blocks from being accelerated by adding them to the block tag `industrialforegoingsouls:cant_accelerate` + +This mod also adds a way to get more **Echo Shards** as they are used a bunch in the mod. + +## Default Config + + [IFSoulsMachines.ConfigSoulLaserBase] + #Max soul storage tank amount + #Range: > 1 + SOUL_STORAGE_AMOUNT = 1350 + #Max progress of the machine + #Range: > 1 + MAX_PROGRESS = 20 + #Kill the warden when it's life reaches near to 0 or keep it alive + KILL_WARDEN = false + #Damage done to the warden when an operation is done + #Range: > 0 + DAMAGE_PER_OPERATION = 4 + #Souls generated when an operation is done + #Range: > 1 + SOULS_PER_OPERATION = 3 + + [IFSoulsMachines.ConfigSoulSurge] + #How long in ticks a soul last to accelerate ticks + #Range: > 1 + SOUL_TIME = 300 + #How many extra ticks the surge will accelerate + #Range: > 1 + ACCELERATION_TICK = 4 diff --git a/src/generated/resources/assets/industrialforegoingsouls/lang/en_us.json b/src/generated/resources/assets/industrialforegoingsouls/lang/en_us.json index 3fc11fb..f3cd92a 100644 --- a/src/generated/resources/assets/industrialforegoingsouls/lang/en_us.json +++ b/src/generated/resources/assets/industrialforegoingsouls/lang/en_us.json @@ -1,5 +1,5 @@ { - "block.industrialforegoingsouls.soul_laser_base": "Soul Laser", + "block.industrialforegoingsouls.soul_laser_base": "Soul Laser Base", "block.industrialforegoingsouls.soul_network_pipe": "Soul Pipe", "block.industrialforegoingsouls.soul_surge": "Soul Surge", "industrialforegoingsouls.soul_storage": "Soul Storage: ", diff --git a/src/main/java/com/buuz135/industrialforegoingsouls/block/tile/SoulSurgeBlockEntity.java b/src/main/java/com/buuz135/industrialforegoingsouls/block/tile/SoulSurgeBlockEntity.java index d614ae3..8ca02e0 100644 --- a/src/main/java/com/buuz135/industrialforegoingsouls/block/tile/SoulSurgeBlockEntity.java +++ b/src/main/java/com/buuz135/industrialforegoingsouls/block/tile/SoulSurgeBlockEntity.java @@ -48,12 +48,14 @@ public void serverTick(Level level, BlockPos pos, BlockState state, SoulSurgeBlo var targetingState = level.getBlockState(pos.relative(state.getValue(RotatableBlock.FACING_ALL).getOpposite())); if (!targetingState.is(SoulTags.Blocks.CANT_ACCELERATE)) { BlockEntity targetingTile = level.getBlockEntity(pos.relative(state.getValue(RotatableBlock.FACING_ALL).getOpposite())); - BlockEntityTicker ticker = (BlockEntityTicker) targetingState.getTicker(this.level, targetingTile.getType()); - if (ticker != null) { - for (int i = 0; i < ConfigSoulSurge.ACCELERATION_TICK; i++) { - ticker.tick(level, pos.relative(state.getValue(RotatableBlock.FACING_ALL).getOpposite()), targetingState, targetingTile); + if (targetingTile != null) { + BlockEntityTicker ticker = (BlockEntityTicker) targetingState.getTicker(this.level, targetingTile.getType()); + if (ticker != null) { + for (int i = 0; i < ConfigSoulSurge.ACCELERATION_TICK; i++) { + ticker.tick(level, pos.relative(state.getValue(RotatableBlock.FACING_ALL).getOpposite()), targetingState, targetingTile); + } + --tickingTime; } - --tickingTime; } } } diff --git a/src/main/java/com/buuz135/industrialforegoingsouls/data/IFSoulsLangProvider.java b/src/main/java/com/buuz135/industrialforegoingsouls/data/IFSoulsLangProvider.java index 0200e97..1d05363 100644 --- a/src/main/java/com/buuz135/industrialforegoingsouls/data/IFSoulsLangProvider.java +++ b/src/main/java/com/buuz135/industrialforegoingsouls/data/IFSoulsLangProvider.java @@ -12,7 +12,7 @@ public IFSoulsLangProvider(PackOutput output, String modid, String locale) { @Override protected void addTranslations() { - this.add(IndustrialForegoingSouls.SOUL_LASER_BLOCK.getKey().get(), "Soul Laser"); + this.add(IndustrialForegoingSouls.SOUL_LASER_BLOCK.getKey().get(), "Soul Laser Base"); this.add(IndustrialForegoingSouls.SOUL_PIPE_BLOCK.getKey().get(), "Soul Pipe"); this.add(IndustrialForegoingSouls.SOUL_SURGE_BLOCK.getKey().get(), "Soul Surge"); this.add("industrialforegoingsouls.soul_storage", "Soul Storage: ");