From 55f5c5f80274e0ff188e46e0285c848a59b41771 Mon Sep 17 00:00:00 2001 From: MoriyaShiine <45156123+MoriyaShiine@users.noreply.github.com> Date: Thu, 17 Oct 2024 17:59:01 -0500 Subject: [PATCH] reformat and add todo --- .../ladysnake/blast/common/init/BlastDamageTypes.java | 8 ++++---- .../java/ladysnake/blast/common/init/BlastEntities.java | 2 +- src/main/java/ladysnake/blast/mixin/ExplosionMixin.java | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/ladysnake/blast/common/init/BlastDamageTypes.java b/src/main/java/ladysnake/blast/common/init/BlastDamageTypes.java index c0bd55d..8684c6c 100644 --- a/src/main/java/ladysnake/blast/common/init/BlastDamageTypes.java +++ b/src/main/java/ladysnake/blast/common/init/BlastDamageTypes.java @@ -25,9 +25,9 @@ public static DamageSource icicle(PersistentProjectileEntity projectile, @Nullab private static DamageSource create(RegistryKey key, World world, @Nullable Entity source, @Nullable Entity attacker) { return world.getRegistryManager() - .get(RegistryKeys.DAMAGE_TYPE) - .getEntry(key) - .map((type) -> new DamageSource(type, source, attacker)) - .orElse(world.getDamageSources().genericKill()); // Fallback, should never reach this + .get(RegistryKeys.DAMAGE_TYPE) + .getEntry(key) + .map((type) -> new DamageSource(type, source, attacker)) + .orElse(world.getDamageSources().genericKill()); // Fallback, should never reach this } } diff --git a/src/main/java/ladysnake/blast/common/init/BlastEntities.java b/src/main/java/ladysnake/blast/common/init/BlastEntities.java index fde14b0..bee800a 100644 --- a/src/main/java/ladysnake/blast/common/init/BlastEntities.java +++ b/src/main/java/ladysnake/blast/common/init/BlastEntities.java @@ -67,7 +67,7 @@ public static void init() { PIPE_BOMB = register("pipe_bomb", createBombEntityType(PipeBombEntity::new)); // explosive blocks - GUNPOWDER_BLOCK = register("gunpowder_block", EntityType.Builder.create(GunpowderBlockEntity::new, SpawnGroup.MISC).dimensions(1, 1).maxTrackingRange(10).trackingTickInterval(20).build()); + GUNPOWDER_BLOCK = register("gunpowder_block", EntityType.Builder.create(GunpowderBlockEntity::new, SpawnGroup.MISC).dimensions(1, 1).maxTrackingRange(10).trackingTickInterval(20).build()); STRIPMINER = register("stripminer", EntityType.Builder.create(StripminerEntity::new, SpawnGroup.MISC).dimensions(1, 1).maxTrackingRange(10).trackingTickInterval(10).build()); COLD_DIGGER = register("cold_digger", EntityType.Builder.create(ColdDiggerEntity::new, SpawnGroup.MISC).dimensions(1, 1).maxTrackingRange(10).trackingTickInterval(10).build()); BONESBURRIER = register("bonesburrier", EntityType.Builder.create(BonesburrierEntity::new, SpawnGroup.MISC).dimensions(1, 1).maxTrackingRange(10).trackingTickInterval(10).build()); diff --git a/src/main/java/ladysnake/blast/mixin/ExplosionMixin.java b/src/main/java/ladysnake/blast/mixin/ExplosionMixin.java index bfbb2c0..37022e8 100644 --- a/src/main/java/ladysnake/blast/mixin/ExplosionMixin.java +++ b/src/main/java/ladysnake/blast/mixin/ExplosionMixin.java @@ -59,8 +59,7 @@ public class ExplosionMixin { if (!fluidState.isEmpty()) { return Optional.of(0F); } - } - else if (isEffect(explosion, CustomExplosion.BlockBreakEffect.UNSTOPPABLE) && fluidState.isEmpty() && blockState.getHardness(world, pos) >= 0) { + } else if (isEffect(explosion, CustomExplosion.BlockBreakEffect.UNSTOPPABLE) && fluidState.isEmpty() && blockState.getHardness(world, pos) >= 0) { return Optional.of(0F); } return original.call(instance, explosion, world, pos, blockState, fluidState); @@ -82,6 +81,7 @@ else if (isEffect(explosion, CustomExplosion.BlockBreakEffect.UNSTOPPABLE) && fl } } + // todo fix fortune not working for some reason even though the pickaxe does @ModifyArg(method = "method_24024", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/explosion/Explosion;tryMergeStack(Ljava/util/List;Lnet/minecraft/item/ItemStack;Lnet/minecraft/util/math/BlockPos;)V")) private static ItemStack blast$fortuneEffect(ItemStack stack) { if (isEffect(currentExplosion, CustomExplosion.BlockBreakEffect.FORTUNE)) {