beginning of gamerules, config works, translations

This commit is contained in:
2021-11-22 23:21:59 -05:00
parent c735b06779
commit 579a9f0f45
7 changed files with 49 additions and 20 deletions
@@ -2,6 +2,7 @@ package me.parsell.wireddust.common;
import java.util.Random;
import me.parsell.wireddust.core.WiredDustGamerules;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.block.BlockState;
@@ -22,8 +23,9 @@ public class WDBlazePowderWireBlock extends WDWireBlock{
@Override
public void onEntityCollision(BlockState state, World world, BlockPos pos, Entity entity) {
if (!entity.isFireImmune() && entity instanceof LivingEntity && !EnchantmentHelper.hasFrostWalker((LivingEntity)entity))
entity.damage(DamageSource.HOT_FLOOR, 1.0F);
if(world.getGameRules().getBoolean(WiredDustGamerules.DO_BLAZE_POWDER_WIRE_DAMAGE))
if (!entity.isFireImmune() && entity instanceof LivingEntity && !EnchantmentHelper.hasFrostWalker((LivingEntity)entity))
entity.damage(DamageSource.HOT_FLOOR, 1.0F);
}
@Environment(EnvType.CLIENT)