From e536f47697869528c8943fc6ea6c584c73cbc9dc Mon Sep 17 00:00:00 2001 From: Rin Date: Thu, 31 Oct 2024 16:16:10 -0500 Subject: [PATCH] tweaks --- .../mizurin/shieldmod/entities/EntityIceBall.java | 3 ++- .../java/mizurin/shieldmod/entities/EntityWeb.java | 1 + .../java/mizurin/shieldmod/mixins/DazedMixin.java | 4 +++- .../mizurin/shieldmod/mixins/EntitySnowManMixin.java | 4 ++-- .../mizurin/shieldmod/mixins/EntitySpiderMixin.java | 2 +- .../java/mizurin/shieldmod/mixins/ShieldMixin.java | 11 +++++++---- .../java/mizurin/shieldmod/mixins/WorldMixin.java | 4 ++-- 7 files changed, 18 insertions(+), 11 deletions(-) diff --git a/src/main/java/mizurin/shieldmod/entities/EntityIceBall.java b/src/main/java/mizurin/shieldmod/entities/EntityIceBall.java index 1188dcd..5bffc14 100644 --- a/src/main/java/mizurin/shieldmod/entities/EntityIceBall.java +++ b/src/main/java/mizurin/shieldmod/entities/EntityIceBall.java @@ -3,12 +3,13 @@ import mizurin.shieldmod.interfaces.IDazed; import net.minecraft.core.HitResult; import net.minecraft.core.entity.EntityLiving; +import net.minecraft.core.entity.projectile.EntityProjectile; import net.minecraft.core.entity.projectile.EntitySnowball; import net.minecraft.core.item.Item; import net.minecraft.core.util.helper.DamageType; import net.minecraft.core.world.World; -public class EntityIceBall extends EntitySnowball { +public class EntityIceBall extends EntityProjectile { public EntityIceBall(World world) { super(world); this.modelItem = Item.ammoSnowball; diff --git a/src/main/java/mizurin/shieldmod/entities/EntityWeb.java b/src/main/java/mizurin/shieldmod/entities/EntityWeb.java index 8846a0b..d305f58 100644 --- a/src/main/java/mizurin/shieldmod/entities/EntityWeb.java +++ b/src/main/java/mizurin/shieldmod/entities/EntityWeb.java @@ -26,6 +26,7 @@ public EntityWeb(World world) { public void init() { super.init(); + this.defaultProjectileSpeed = 0.95F; } @Override diff --git a/src/main/java/mizurin/shieldmod/mixins/DazedMixin.java b/src/main/java/mizurin/shieldmod/mixins/DazedMixin.java index 492c617..406ed04 100644 --- a/src/main/java/mizurin/shieldmod/mixins/DazedMixin.java +++ b/src/main/java/mizurin/shieldmod/mixins/DazedMixin.java @@ -2,7 +2,6 @@ import mizurin.shieldmod.interfaces.IDazed; import net.minecraft.core.entity.Entity; -import net.minecraft.core.entity.player.EntityPlayer; import net.minecraft.core.util.helper.DamageType; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; @@ -32,12 +31,15 @@ public boolean hurt(Entity attacker, int damage, DamageType type) { @Unique public int remainingFreezeTicks; + //Mirrors the fire status effect but cannot be put out and slows the entity. @Inject(method = "baseTick()V", at = @At("HEAD")) public void inject(CallbackInfo callbackInfo) { if (this.remainingDazedTicks > 0) { + this.xd *= 0.85D; this.zd *= 0.85D; + if (this.remainingDazedTicks % 16 == 0) { this.hurt( null, 1, DamageType.COMBAT); } diff --git a/src/main/java/mizurin/shieldmod/mixins/EntitySnowManMixin.java b/src/main/java/mizurin/shieldmod/mixins/EntitySnowManMixin.java index 57f4e34..9e51c80 100644 --- a/src/main/java/mizurin/shieldmod/mixins/EntitySnowManMixin.java +++ b/src/main/java/mizurin/shieldmod/mixins/EntitySnowManMixin.java @@ -73,8 +73,8 @@ protected Entity findPlayerToAttack() { } /** - * @author McRin - * @reason Balls + * @author Rin + * @reason SnowBalls */ @Overwrite public void attackEntity(Entity entity, float distance) { diff --git a/src/main/java/mizurin/shieldmod/mixins/EntitySpiderMixin.java b/src/main/java/mizurin/shieldmod/mixins/EntitySpiderMixin.java index 7700e36..3f6b302 100644 --- a/src/main/java/mizurin/shieldmod/mixins/EntitySpiderMixin.java +++ b/src/main/java/mizurin/shieldmod/mixins/EntitySpiderMixin.java @@ -52,7 +52,7 @@ public void attackEntity(Entity entity, float distance) { double d2 = entity.y + (double)entity.getHeadHeight() - 0.2 - web.y; float f1 = MathHelper.sqrt_double(dX * dX + dZ * dZ) * 0.2F; this.world.playSoundAtEntity((Entity)null, this, "random.bow", 0.5F, 0.4F / (this.random.nextFloat() * 0.4F + 0.8F)); - web.setHeading(dX, d2 + (double) f1, dZ, 0.8F, 1.0F); + web.setHeading(dX, d2 + (double) f1, dZ, 1F, 1.0F); this.world.entityJoinedWorld(web); } diff --git a/src/main/java/mizurin/shieldmod/mixins/ShieldMixin.java b/src/main/java/mizurin/shieldmod/mixins/ShieldMixin.java index 1236ac6..bb557f7 100644 --- a/src/main/java/mizurin/shieldmod/mixins/ShieldMixin.java +++ b/src/main/java/mizurin/shieldmod/mixins/ShieldMixin.java @@ -147,10 +147,10 @@ public void parryHitbox(World world, EntityPlayer player) { } } - if (entity instanceof EntityFireball) { - entity.hurt(player, 1, DamageType.COMBAT); - world.playSoundAtEntity(player, player, "mob.ghast.fireball", 0.66f, 1.0f); - } +// if (entity instanceof EntityFireball) { +// entity.hurt(player, 1, DamageType.COMBAT); +// world.playSoundAtEntity(player, player, "mob.ghast.fireball", 0.66f, 1.0f); +// } if (entity instanceof EntityCannonball) { @@ -344,6 +344,9 @@ public void injectHurt(Entity attacker, int damage, DamageType type, CallbackInf at = @At(value = "HEAD") ) public void tickMixin(CallbackInfo ci){ + + + ItemStack stack = inventory.mainInventory[inventory.currentItem]; if (stack != null) { if (stack.getItem() instanceof ShieldItem) { diff --git a/src/main/java/mizurin/shieldmod/mixins/WorldMixin.java b/src/main/java/mizurin/shieldmod/mixins/WorldMixin.java index f0bde9a..9191ee4 100644 --- a/src/main/java/mizurin/shieldmod/mixins/WorldMixin.java +++ b/src/main/java/mizurin/shieldmod/mixins/WorldMixin.java @@ -15,8 +15,8 @@ public class WorldMixin { World thisObject = (World)(Object)this; /** - * @author - * @reason + * @author Rin + * @reason Leather armor reduce aggro range */ @Overwrite public EntityPlayer getClosestPlayer(double x, double y, double z, double radius) {