Skip to content

Commit

Permalink
catalysis enchantment now has 3 levels
Browse files Browse the repository at this point in the history
  • Loading branch information
NewJumper committed Jul 28, 2023
1 parent e12f3c5 commit fd49b0b
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public void doPostAttack(LivingEntity pAttacker, Entity pTarget, int pLevel) {
if(entity.isDeadOrDying()) {
SculkSpreader spreader = SculkSpreader.createLevelSpreader();
spreader.addCursors(new BlockPos((int) (entity.position().x + 0.5 * Direction.UP.getNormal().getX()), (int) (entity.position().y + 0.5 * Direction.UP.getNormal().getY()), (int) (entity.position().z + 0.5 * Direction.UP.getNormal().getZ())), 20);
for(int i = 0; i < 10; i++) {
for(int i = 0; i < (int) (10 * pLevel * 0.9); i++) {
spreader.updateCursors(entity.level(), entity.blockPosition(), entity.getRandom(), true);
}
entity.skipDropExperience();
Expand All @@ -45,6 +45,11 @@ public int getMaxCost(int pLevel) {
return (int) (getMinCost(pLevel) * 1.5);
}

@Override
public int getMaxLevel() {
return 3;
}

@Override
public boolean canEnchant(ItemStack pStack) {
return pStack.getItem() instanceof AxeItem || super.canEnchant(pStack);
Expand Down

0 comments on commit fd49b0b

Please sign in to comment.