-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented armor protection checks and stomp damage formula. Attempt…
…ed to balance it based on vanilla swords - taking into account attack speed, crits, & material cost
- Loading branch information
1 parent
399dcb6
commit 3af2880
Showing
18 changed files
with
151 additions
and
181 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 was deleted.
Oops, something went wrong.
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
20 changes: 0 additions & 20 deletions
20
src/main/java/com/floralquafloral/mixin/GameOptionsMixin.java
This file was deleted.
Oops, something went wrong.
21 changes: 21 additions & 0 deletions
21
src/main/java/com/floralquafloral/mixin/LivingEntityMixin.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 com.floralquafloral.mixin; | ||
|
||
import com.floralquafloral.MarioQuaMario; | ||
import com.floralquafloral.registries.stomp.ParsedStomp; | ||
import net.minecraft.entity.LivingEntity; | ||
import net.minecraft.entity.damage.DamageSource; | ||
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(LivingEntity.class) | ||
public class LivingEntityMixin { | ||
@Inject(method = "applyArmorToDamage", at = @At("RETURN"), cancellable = true) | ||
private void addStompPiercingDamage(DamageSource source, float amount, CallbackInfoReturnable<Float> cir) { | ||
if(source instanceof ParsedStomp.StompDamageSource stompDamageSource) { | ||
MarioQuaMario.LOGGER.info("Added piercing damage from Stomp: {}", stompDamageSource.getPiercing()); | ||
cir.setReturnValue(cir.getReturnValue() + stompDamageSource.getPiercing()); | ||
} | ||
} | ||
} |
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
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
23 changes: 23 additions & 0 deletions
23
src/main/java/com/floralquafloral/registries/states/action/baseactions/airborne/Stomp.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,23 @@ | ||
package com.floralquafloral.registries.states.action.baseactions.airborne; | ||
|
||
import com.floralquafloral.MarioQuaMario; | ||
import com.floralquafloral.registries.states.action.baseactions.grounded.DuckWaddle; | ||
import com.floralquafloral.stats.CharaStat; | ||
import com.floralquafloral.stats.StatCategory; | ||
import net.minecraft.util.Identifier; | ||
import org.jetbrains.annotations.NotNull; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
import java.util.List; | ||
|
||
public class Stomp extends Jump { | ||
@Override public @NotNull Identifier getID() { | ||
return Identifier.of(MarioQuaMario.MOD_ID, "stomp"); | ||
} | ||
|
||
public static final CharaStat CAP = new CharaStat(0.65, StatCategory.JUMP_CAP); | ||
|
||
@Override protected @Nullable CharaStat getJumpCap() { | ||
return CAP; | ||
} | ||
} |
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
Oops, something went wrong.