Skip to content

Commit

Permalink
1.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Insane96 committed Sep 3, 2022
1 parent 35d0601 commit 23f0542
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 1.2.3
* Increased projectile speed and knockback with Recoil
* Ablaze now sets blocked projectiles on fire

## 1.2.2
* Reduced shield bash bounding box
* Fixed Shield Bash working without the enchantment
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false
mc_version=1.18.2
mod_version=1.2.2
mod_version=1.2.3
lib_version=1.5.1
mixin_version=0.8.5
forge_version=40.1.60
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.insane96mcp.shieldsplus.setup.SPEnchantments;
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.item.ItemStack;
Expand Down Expand Up @@ -36,12 +37,12 @@ public boolean canApplyAtEnchantingTable(ItemStack stack) {
}

public static void onBlocked(LivingEntity blockingEntity, DamageSource source) {
if (!(source.getDirectEntity() instanceof LivingEntity livingEntity))
return;
apply(blockingEntity, livingEntity);
if (source.getDirectEntity() instanceof LivingEntity livingEntity)
apply(blockingEntity, livingEntity);
apply(blockingEntity, source.getDirectEntity());
}

public static void apply(LivingEntity attacker, LivingEntity other) {
public static void apply(LivingEntity attacker, Entity other) {
ItemStack shield = attacker.getUseItem();
int ablaze = EnchantmentHelper.getItemEnchantmentLevel(SPEnchantments.ABLAZE.get(), shield);
if (ablaze > 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

public class ShieldRecoilEnchantment extends Enchantment {

public static final double KNOCKBACK = 0.4d;
public static final double PROJECTILE_KNOCKBACK = 3.5d;
public static final double KNOCKBACK = 0.5d;
public static final double PROJECTILE_KNOCKBACK = 5d;

public ShieldRecoilEnchantment() {
super(Rarity.UNCOMMON, EnchantmentCategory.BREAKABLE, new EquipmentSlot[]{EquipmentSlot.MAINHAND, EquipmentSlot.OFFHAND});
Expand Down

0 comments on commit 23f0542

Please sign in to comment.