Skip to content

Commit

Permalink
Apply code formatting to StonecutterBlock_StonecuttersDoDamageMixin
Browse files Browse the repository at this point in the history
  • Loading branch information
Gilly7CE committed Jul 28, 2023
1 parent b8b8bc0 commit 8ac41d8
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@
import net.minecraft.block.StonecutterBlock;
import net.minecraft.entity.Entity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.damage.*;
import net.minecraft.entity.damage.DamageSource;
import net.minecraft.entity.damage.DamageType;
import net.minecraft.entity.damage.DamageTypes;
import net.minecraft.registry.RegistryKeys;
import net.minecraft.registry.entry.RegistryEntry;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.World;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Unique;

import static carpetaddonsnotfound.CarpetAddonsNotFoundSettings.stonecuttersDoDamage;

Expand All @@ -34,7 +35,8 @@ public void onSteppedOn(World world, BlockPos pos, BlockState state, Entity enti
return;
}

RegistryEntry<DamageType> type = world.getRegistryManager().get(RegistryKeys.DAMAGE_TYPE).getEntry(DamageTypes.GENERIC).orElseThrow();
RegistryEntry<DamageType> type =
world.getRegistryManager().get(RegistryKeys.DAMAGE_TYPE).getEntry(DamageTypes.GENERIC).orElseThrow();
entity.damage(new DamageSource(type, new Vec3d(pos.getX(), pos.getY(), pos.getZ())), stonecuttersDoDamage);
}
}

0 comments on commit 8ac41d8

Please sign in to comment.