mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-21 12:42:57 +00:00
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:
1 parent
e7dc1d9bd4
commit
a5bec6c22b
52 files changed
+273
-489
No files matched your search
@@ -24,8 +24,7 @@ public abstract class BehaviorProjectileBaseDispense extends BehaviorDefaultDisp
|
||||
|
||||
ItemStack reference;
|
||||
|
||||
if (stack.getItem() instanceof IAmmo) {
|
||||
IAmmo ammo = (IAmmo) stack.getItem();
|
||||
if (stack.getItem() instanceof IAmmo ammo) {
|
||||
// needs ammo to shoot
|
||||
if (ammo.getAmmoCount(stack) <= 0) return stack;
|
||||
ammo.consumeAmmo(1, stack);
|
||||
|
||||
Reference in new issue
Block a user