Skip to content

Commit

Permalink
disable splash effect of holy water on blocks in the vampire forest
Browse files Browse the repository at this point in the history
  • Loading branch information
Cheaterpaul committed Sep 30, 2024
1 parent 444bfac commit 894c965
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import de.teamlapen.lib.lib.util.UtilLib;
import de.teamlapen.vampirism.api.blocks.HolyWaterEffectConsumer;
import de.teamlapen.vampirism.core.tags.ModBiomeTags;
import de.teamlapen.vampirism.entity.ThrowableItemEntity;
import de.teamlapen.vampirism.util.DamageHandler;
import net.minecraft.core.Direction;
Expand Down Expand Up @@ -65,13 +66,16 @@ protected void impactEntities(@NotNull ThrowableItemEntity bottleEntity, ItemSta
}

protected void impactBlocks(@NotNull ThrowableItemEntity bottleEntity, ItemStack stack, @NotNull HitResult result, boolean remote) {
Level level = bottleEntity.getCommandSenderWorld();
if (level.getBiome(bottleEntity.blockPosition()).is(ModBiomeTags.HasFaction.IS_FACTION_BIOME)) {
return;
}
int size = switch (getVampirismTier()) {
case NORMAL -> 1;
case ENHANCED -> 2;
case ULTIMATE -> 3;
};
AABB impactArea = bottleEntity.getBoundingBox().inflate(size);
Level level = bottleEntity.getCommandSenderWorld();
UtilLib.forEachBlockPos(impactArea, pos -> {
BlockState state = level.getBlockState(pos);
Block block = state.getBlock();
Expand Down

0 comments on commit 894c965

Please sign in to comment.