-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
62 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
src/main/java/ladysnake/impaled/common/damage/HellforkHeatDamageSource.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package ladysnake.impaled.common.damage; | ||
|
||
import net.minecraft.entity.damage.DamageSource; | ||
|
||
public class HellforkHeatDamageSource extends DamageSource { | ||
public static final DamageSource HELLFORK_HEAT = ((HellforkHeatDamageSource)new HellforkHeatDamageSource("hellfork_heat").setBypassesArmor()).setUnblockable(); | ||
|
||
protected HellforkHeatDamageSource(String name) { | ||
super(name); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
src/main/java/ladysnake/impaled/mixin/impaling/EntityRendererMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package ladysnake.impaled.mixin.impaling; | ||
|
||
import ladysnake.impaled.common.init.ImpaledItems; | ||
import net.minecraft.client.render.entity.EntityRenderer; | ||
import net.minecraft.entity.Entity; | ||
import net.minecraft.entity.LivingEntity; | ||
import net.minecraft.util.math.BlockPos; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; | ||
|
||
@Mixin(EntityRenderer.class) | ||
public class EntityRendererMixin<T extends Entity> { | ||
@Inject(method = "getBlockLight", at = @At("HEAD"), cancellable = true) | ||
protected void getBlockLight(T entity, BlockPos pos, CallbackInfoReturnable<Integer> cir) { | ||
if (entity instanceof LivingEntity livingEntity && livingEntity.isUsingRiptide() && (livingEntity.getMainHandStack().getItem() == ImpaledItems.HELLFORK || livingEntity.getOffHandStack().getItem() == ImpaledItems.HELLFORK)) { | ||
cir.setReturnValue(15); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters