Skip to content

Commit

Permalink
Added support for forge:tick_acceleration_disallowed tag
Browse files Browse the repository at this point in the history
  • Loading branch information
Buuz135 committed Apr 6, 2024
1 parent 7d753b2 commit 254c4ca
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Version 1.0.8

* Added support for forge:tick_acceleration_disallowed tag

# Version 1.0.7

* Fixed config not working properly, closes #4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public void serverTick(Level level, BlockPos pos, BlockState state, SoulSurgeBlo
}
if (tickingTime > 0) {
var targetingState = level.getBlockState(pos.relative(state.getValue(RotatableBlock.FACING_ALL).getOpposite()));
if (!targetingState.is(Blocks.AIR) && !targetingState.is(SoulTags.Blocks.CANT_ACCELERATE)) {
if (!targetingState.is(Blocks.AIR) && !targetingState.is(SoulTags.Blocks.CANT_ACCELERATE) && !targetingState.is(SoulTags.Blocks.FORGE_CANT_ACCELERATE)) {
BlockEntity targetingTile = level.getBlockEntity(pos.relative(state.getValue(RotatableBlock.FACING_ALL).getOpposite()));
if (targetingTile != null) {
BlockEntityTicker<BlockEntity> ticker = (BlockEntityTicker<BlockEntity>) targetingState.getTicker(this.level, targetingTile.getType());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@ protected void addTags(HolderLookup.Provider provider) {
.add(IndustrialForegoingSouls.SOUL_PIPE_BLOCK.getKey().get())
.add(IndustrialForegoingSouls.SOUL_SURGE_BLOCK.getKey().get());
tag(SoulTags.Blocks.CANT_ACCELERATE).add(IndustrialForegoingSouls.SOUL_SURGE_BLOCK.getKey().get());
tag(SoulTags.Blocks.FORGE_CANT_ACCELERATE).add(IndustrialForegoingSouls.SOUL_SURGE_BLOCK.getKey().get());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public class SoulTags {
public static class Blocks {

public static final TagKey<Block> CANT_ACCELERATE = TagUtil.getBlockTag(new ResourceLocation(IndustrialForegoingSouls.MOD_ID, "cant_accelerate"));
public static final TagKey<Block> FORGE_CANT_ACCELERATE = TagUtil.getBlockTag(new ResourceLocation("forge", "tick_acceleration_disallowed"));
}

public static class Entities {
Expand Down

0 comments on commit 254c4ca

Please sign in to comment.