Skip to content

Commit 8d659a3

Browse files
Minor cleanups
1 parent 1de4842 commit 8d659a3

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/main/java/gregtech/api/items/toolitem/ToolHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ public static void damageItem(ItemStack stack, EntityLivingBase entity, int dama
208208
if (!(stack.getItem() instanceof IGTTool)) {
209209
stack.damageItem(damage, entity);
210210
} else {
211-
if (stack.getTagCompound() != null && stack.getTagCompound().getBoolean("Unbreakable")) {
211+
if (stack.getTagCompound() != null && stack.getTagCompound().getBoolean(UNBREAKABLE_KEY)) {
212212
return;
213213
}
214214
IGTTool tool = (IGTTool) stack.getItem();

src/main/java/gregtech/api/items/toolitem/TreeFellingListener.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020

2121
public final class TreeFellingListener {
2222

23-
private static final int MAX_SCANS = 10;
24-
2523
private final EntityPlayerMP player;
2624
private final ItemStack tool;
2725
private final Deque<BlockPos> orderedBlocks;
@@ -48,13 +46,11 @@ public static void start(@Nonnull IBlockState state, ItemStack tool, BlockPos st
4846
Block block = state.getBlock();
4947
BlockPos.MutableBlockPos mutablePos = new BlockPos.MutableBlockPos();
5048

51-
int operations = 0;
52-
5349
Queue<BlockPos> checking = new ArrayDeque<>();
5450
Set<BlockPos> visited = new ObjectOpenHashSet<>();
5551
checking.add(start);
5652

57-
while (/*operations++ < MAX_SCANS &&*/ !checking.isEmpty()) {
53+
while (!checking.isEmpty()) {
5854
BlockPos check = checking.remove();
5955
if (check != start) {
6056
visited.add(check);

0 commit comments

Comments
 (0)