Implemented time check to make sure there is sunlight
This commit is contained in:
parent
7e8a65a994
commit
b7d346b29c
1 changed files with 5 additions and 4 deletions
|
|
@ -53,7 +53,7 @@ public class ModAutoRepair extends Modifier
|
||||||
if (iterStack != null && iterStack.getItem() instanceof ToolCore)
|
if (iterStack != null && iterStack.getItem() instanceof ToolCore)
|
||||||
tinkersTools.add(iterStack);
|
tinkersTools.add(iterStack);
|
||||||
|
|
||||||
// Works to include items held in the second hand
|
// Works to include items held in the second hand
|
||||||
if (player.getHeldItemOffhand() != null && player.getHeldItemOffhand().getItem() instanceof ToolCore)
|
if (player.getHeldItemOffhand() != null && player.getHeldItemOffhand().getItem() instanceof ToolCore)
|
||||||
tinkersTools.add(player.getHeldItemOffhand());
|
tinkersTools.add(player.getHeldItemOffhand());
|
||||||
|
|
||||||
|
|
@ -90,8 +90,9 @@ public class ModAutoRepair extends Modifier
|
||||||
if (player.dimension == -1)
|
if (player.dimension == -1)
|
||||||
return 10000 + rand;
|
return 10000 + rand;
|
||||||
if (world.canSeeSky(player.getPosition()) && !world.isRaining())
|
if (world.canSeeSky(player.getPosition()) && !world.isRaining())
|
||||||
return 12500 + rand;
|
if (world.getWorldTime() >= 0 && world.getWorldTime() <= 13000)
|
||||||
else
|
return 12500 + rand;
|
||||||
return 15000 + rand;
|
|
||||||
|
return 15000 + rand;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue