Skip to content

Commit

Permalink
Sopping
Browse files Browse the repository at this point in the history
  • Loading branch information
SammySemicolon committed Dec 9, 2024
1 parent dd6d4d0 commit e27a480
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,20 +87,22 @@ public InteractionResultHolder<ItemStack> use(Level worldIn, Player playerIn, In
sound = SoundRegistry.CATALYST_LOBBER_UNLOCKED.get();
}
case 1 -> {
ItemStack ammo = ItemStack.EMPTY;
for (int i = 0; i < playerIn.getInventory().getContainerSize(); i++) {
ItemStack maybeAmmo = playerIn.getInventory().getItem(i);
if (maybeAmmo.getItem().equals(ItemRegistry.AURIC_EMBERS.get())) {
ammo = maybeAmmo;
break;
if (!playerIn.isCreative()) {
ItemStack ammo = ItemStack.EMPTY;
for (int i = 0; i < playerIn.getInventory().getContainerSize(); i++) {
ItemStack maybeAmmo = playerIn.getInventory().getItem(i);
if (maybeAmmo.getItem().equals(ItemRegistry.AURIC_EMBERS.get())) {
ammo = maybeAmmo;
break;
}
}
}
if (ammo.isEmpty()) {
return InteractionResultHolder.fail(stack);
if (ammo.isEmpty()) {
return InteractionResultHolder.fail(stack);
}
ammo.shrink(1);
}
cooldown = 20;
state = 2;
ammo.shrink(1);
sound = SoundRegistry.CATALYST_LOBBER_PRIMED.get();
}
case 2 -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public static void onDeath(LivingDeathEvent event) {
var attacker = source.getEntity() instanceof LivingEntity living ? living : target.getLastHurtByMob();
if (data.shouldDropSpirits()) {
var itemAsSoul = EntitySpiritDropData.getSpiritData(target).map(s -> s.itemAsSoul).orElse(null);
if (itemAsSoul != null) {
if (itemAsSoul == null) {
spawnSpirits(target, attacker, source);
} else {
var uuid = attacker != null ? attacker.getUUID() : null;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/sammy/malum/mixin/PlayerMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@Mixin(Player.class)
public abstract class PlayerMixin {

@ModifyArg(method = "aiStep", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/Level;getEntities(Lnet/minecraft/world/entity/Entity;Lnet/minecraft/world/phys/AABB;)Ljava/util/List;"))
@ModifyArg(method = "aiStep", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/Level;getEntities(Lnet/minecraft/world/entity/Entity;Lnet/minecraft/world/phys/AABB;)Ljava/util/List;"), index = 1)
private AABB malum$aiStep(AABB aabb) {
Player player = (Player) (Object) this;
return AqueousAura.growBoundingBox(player, aabb);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"exhaustion": 0.0,
"exhaustion": 0.1,
"message_id": "scythe_melee",
"scaling": "when_caused_by_living_non_player"
}

0 comments on commit e27a480

Please sign in to comment.