Skip to content

Commit

Permalink
reformat and add todo
Browse files Browse the repository at this point in the history
  • Loading branch information
MoriyaShiine committed Oct 17, 2024
1 parent 4b2bef1 commit 55f5c5f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ public static DamageSource icicle(PersistentProjectileEntity projectile, @Nullab

private static DamageSource create(RegistryKey<DamageType> 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
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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.<GunpowderBlockEntity>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());
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/ladysnake/blast/mixin/ExplosionMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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)) {
Expand Down

0 comments on commit 55f5c5f

Please sign in to comment.