cleanup after enabling modern & generic. Primarily changing raw lists to their correct type, changing to pattern variable & enhanced switch and removing unused/unreachable code + ancient comments.

This commit is contained in:
Lyfts authored and Martin Robertz committed 2024-05-16 18:51:58 +02:00
1 parent e7dc1d9bd4
commit a5bec6c22b
52 files changed
+273 -489

No files matched your search

@@ -16,21 +16,13 @@ public class SmelteryDamageSource extends DamageSource {
@Override
public IChatComponent func_151519_b(EntityLivingBase par1EntityLiving) {
String type = "";
switch (AbilityHelper.random.nextInt(4)) {
case 0:
type = "one.";
break;
case 1:
type = "two.";
break;
case 2:
type = "three.";
break;
case 3:
type = "four.";
break;
}
String type = switch (AbilityHelper.random.nextInt(4)) {
case 0 -> "one.";
case 1 -> "two.";
case 2 -> "three.";
case 3 -> "four.";
default -> "";
};
EntityLivingBase entityliving1 = par1EntityLiving.func_94060_bK();
String s = "death." + type + this.damageType;
String s1 = s + ".player";