Skip to content

Commit

Permalink
Fix hellfork and soulfork putting the user on fire even when blocked
Browse files Browse the repository at this point in the history
  • Loading branch information
doctor4t committed May 23, 2022
1 parent 9b0a489 commit 5d69293
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,9 @@
# Impaled - Changelog:

### Impaled 1.1.3 - 1.18.2
- Fixed Hellfork and Soulforks setting targets on fire even if their shield were up
- Hellforks and Soulforks will now set targets on fire for 8 seconds instead of a random time between 4 and 8 seconds

### Impaled 1.1.2 - 1.18.2
- Reduced mining fatigue given by the channeling elder trident to 10s

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Expand Up @@ -10,7 +10,7 @@ loader_version=0.13.3
fabric_version=0.48.0+1.18.2

# Mod Properties
mod_version = 1.1.2
mod_version = 1.1.3
maven_group = io.github.ladysnake
archives_base_name = impaled

Expand Down
@@ -1,19 +1,23 @@
package ladysnake.impaled.common.entity;

import net.minecraft.entity.EntityType;
import net.minecraft.entity.LivingEntity;
import net.minecraft.particle.ParticleTypes;
import net.minecraft.util.hit.BlockHitResult;
import net.minecraft.util.hit.EntityHitResult;
import net.minecraft.util.hit.HitResult;
import net.minecraft.world.World;
import net.minecraft.world.event.GameEvent;

public class HellforkEntity extends ImpaledTridentEntity {
public HellforkEntity(EntityType<? extends HellforkEntity> entityType, World world) {
super(entityType, world);
}

@Override
protected void onEntityHit(EntityHitResult entityHitResult) {
super.onEntityHit(entityHitResult);
entityHitResult.getEntity().setOnFireFor(4 + this.world.getRandom().nextInt(4));
protected void onHit(LivingEntity target) {
super.onHit(target);
target.setOnFireFor(8);
}

@Override
Expand Down
@@ -1,8 +1,10 @@
package ladysnake.impaled.common.entity;

import net.minecraft.entity.EntityType;
import net.minecraft.entity.LivingEntity;
import net.minecraft.particle.ParticleTypes;
import net.minecraft.util.hit.EntityHitResult;
import net.minecraft.util.hit.HitResult;
import net.minecraft.world.World;

public class SoulforkEntity extends ImpaledTridentEntity {
Expand All @@ -11,9 +13,9 @@ public SoulforkEntity(EntityType<? extends SoulforkEntity> entityType, World wor
}

@Override
protected void onEntityHit(EntityHitResult entityHitResult) {
super.onEntityHit(entityHitResult);
entityHitResult.getEntity().setOnFireFor(4 + this.world.getRandom().nextInt(4));
protected void onHit(LivingEntity target) {
super.onHit(target);
target.setOnFireFor(8);
}

@Override
Expand Down

0 comments on commit 5d69293

Please sign in to comment.