Skip to content

Commit

Permalink
🐛 Actually fix the bug
Browse files Browse the repository at this point in the history
  • Loading branch information
CallMeEchoCodes committed Jul 6, 2024
1 parent c6ad242 commit 68a4a2e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ protected void initDataTracker(DataTracker.Builder builder) {

public boolean getEnchanted() { return this.dataTracker.get(ENCHANTED); }

@Override
protected boolean canHit(Entity entity) {
return super.canHit(entity) && entity != this.getOwner() && !(entity instanceof JugglingBallEntity);
}

@Override
public void tick() {
HitResult hitResult = ProjectileUtil.getCollision(this, this::canHit);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public ProjectileEntityMixin(EntityType<?> type, World world) {

@Inject(method = "deflect", at = @At("HEAD"))
private void deflect(ProjectileDeflection deflection, Entity deflector, Entity owner, boolean fromAttack, CallbackInfoReturnable<Boolean> cir) {
if (!this.getWorld().isClient || !this.getType().isIn(PARRIABLE_PROJECTILE) || this.getType() == deflector.getType()) return;
if (!this.getWorld().isClient || !this.getType().isIn(PARRIABLE_PROJECTILE)) return;

ClientPlayerEntity player = MinecraftClient.getInstance().player;
if (player == null) return;
Expand Down

0 comments on commit 68a4a2e

Please sign in to comment.