mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-19 06:34:56 +00:00
Fix Earth AutoSourcing not working
This commit is contained in:
parent
0e4dabee8a
commit
839164bdc5
1 changed files with 2 additions and 3 deletions
|
@ -250,9 +250,7 @@ public class BlockSource {
|
||||||
if (sourceBlock == null) {
|
if (sourceBlock == null) {
|
||||||
BlockSourceInformation blockInfo = getBlockSourceInformation(player, BlockSourceType.EARTH, clickType);
|
BlockSourceInformation blockInfo = getBlockSourceInformation(player, BlockSourceType.EARTH, clickType);
|
||||||
if (dynamic) {
|
if (dynamic) {
|
||||||
if (blockInfo == null) {
|
if (blockInfo != null) {
|
||||||
return null;
|
|
||||||
}
|
|
||||||
Block tempBlock = blockInfo.getBlock();
|
Block tempBlock = blockInfo.getBlock();
|
||||||
if (tempBlock == null) {
|
if (tempBlock == null) {
|
||||||
return null;
|
return null;
|
||||||
|
@ -260,6 +258,7 @@ public class BlockSource {
|
||||||
|
|
||||||
Location loc = tempBlock.getLocation();
|
Location loc = tempBlock.getLocation();
|
||||||
sourceBlock = EarthMethods.getNearbyEarthBlock(loc, autoRange, 2, earth, sand, metal);
|
sourceBlock = EarthMethods.getNearbyEarthBlock(loc, autoRange, 2, earth, sand, metal);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (auto && (sourceBlock == null || !sourceBlock.getLocation().getWorld().equals(player.getWorld()) || Math.abs(sourceBlock.getLocation().distance(player.getEyeLocation())) > selectRange)) {
|
if (auto && (sourceBlock == null || !sourceBlock.getLocation().getWorld().equals(player.getWorld()) || Math.abs(sourceBlock.getLocation().distance(player.getEyeLocation())) > selectRange)) {
|
||||||
return EarthMethods.getRandomEarthBlock(player, player.getLocation(), autoRange, earth, sand, metal);
|
return EarthMethods.getRandomEarthBlock(player, player.getLocation(), autoRange, earth, sand, metal);
|
||||||
|
|
Loading…
Reference in a new issue