Skip to content

Commit

Permalink
Add missing reach extending modifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
opekope2 committed Jun 10, 2024
1 parent b4cbe63 commit d8af4f0
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import net.minecraft.util.TypedActionResult
import net.minecraft.world.World
import opekope2.avm_staff.api.item.renderer.IStaffItemRenderer
import opekope2.avm_staff.api.staff.StaffHandler
import opekope2.avm_staff.util.addDefault
import opekope2.avm_staff.util.attackDamage
import opekope2.avm_staff.util.attackSpeed
import opekope2.avm_staff.util.push
Expand Down Expand Up @@ -113,6 +114,8 @@ class BellBlockHandler : StaffHandler() {
private val ATTRIBUTE_MODIFIERS = AttributeModifiersComponent.builder()
.add(EntityAttributes.GENERIC_ATTACK_DAMAGE, attackDamage(8.0), AttributeModifierSlot.MAINHAND)
.add(EntityAttributes.GENERIC_ATTACK_SPEED, attackSpeed(1.5), AttributeModifierSlot.MAINHAND)
.addDefault(EntityAttributes.PLAYER_ENTITY_INTERACTION_RANGE)
.addDefault(EntityAttributes.PLAYER_BLOCK_INTERACTION_RANGE)
.build()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import net.minecraft.world.World
import net.minecraft.world.WorldEvents
import net.minecraft.world.event.GameEvent
import opekope2.avm_staff.api.staff.StaffHandler
import opekope2.avm_staff.util.addDefault
import opekope2.avm_staff.util.attackDamage
import opekope2.avm_staff.util.attackSpeed

Expand Down Expand Up @@ -76,6 +77,8 @@ class BoneBlockHandler : StaffHandler() {
private val ATTRIBUTE_MODIFIERS = AttributeModifiersComponent.builder()
.add(EntityAttributes.GENERIC_ATTACK_DAMAGE, attackDamage(5.0), AttributeModifierSlot.MAINHAND)
.add(EntityAttributes.GENERIC_ATTACK_SPEED, attackSpeed(2.0), AttributeModifierSlot.MAINHAND)
.addDefault(EntityAttributes.PLAYER_ENTITY_INTERACTION_RANGE)
.addDefault(EntityAttributes.PLAYER_BLOCK_INTERACTION_RANGE)
.build()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,8 @@ class FurnaceHandler<TRecipe : AbstractCookingRecipe>(
private val ATTRIBUTE_MODIFIERS = AttributeModifiersComponent.builder()
.add(EntityAttributes.GENERIC_ATTACK_DAMAGE, attackDamage(10.0), AttributeModifierSlot.MAINHAND)
.add(EntityAttributes.GENERIC_ATTACK_SPEED, attackSpeed(1.25), AttributeModifierSlot.MAINHAND)
.addDefault(EntityAttributes.PLAYER_ENTITY_INTERACTION_RANGE)
.addDefault(EntityAttributes.PLAYER_BLOCK_INTERACTION_RANGE)
.build()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ class MagmaBlockHandler : StaffHandler() {
private val ATTRIBUTE_MODIFIERS = AttributeModifiersComponent.builder()
.add(EntityAttributes.GENERIC_ATTACK_DAMAGE, attackDamage(10.0), AttributeModifierSlot.MAINHAND)
.add(EntityAttributes.GENERIC_ATTACK_SPEED, attackSpeed(1.25), AttributeModifierSlot.MAINHAND)
.addDefault(EntityAttributes.PLAYER_ENTITY_INTERACTION_RANGE)
.addDefault(EntityAttributes.PLAYER_BLOCK_INTERACTION_RANGE)
.build()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import net.minecraft.util.math.Direction
import net.minecraft.world.World
import opekope2.avm_staff.api.staff.StaffHandler
import opekope2.avm_staff.mixin.IMinecraftClientMixin
import opekope2.avm_staff.util.addDefault
import opekope2.avm_staff.util.attackDamage
import opekope2.avm_staff.util.attackSpeed
import opekope2.avm_staff.util.mutableItemStackInStaff
Expand Down Expand Up @@ -84,6 +85,8 @@ class WoolHandler(private val woolBlockItem: BlockItem, private val carpetBlockI
private val ATTRIBUTE_MODIFIERS = AttributeModifiersComponent.builder()
.add(EntityAttributes.GENERIC_ATTACK_DAMAGE, attackDamage(2.0), AttributeModifierSlot.MAINHAND)
.add(EntityAttributes.GENERIC_ATTACK_SPEED, attackSpeed(2.0), AttributeModifierSlot.MAINHAND)
.addDefault(EntityAttributes.PLAYER_ENTITY_INTERACTION_RANGE)
.addDefault(EntityAttributes.PLAYER_BLOCK_INTERACTION_RANGE)
.build()
}
}

0 comments on commit d8af4f0

Please sign in to comment.