mirror of
https://github.com/GTNewHorizons/FindIt.git
synced 2026-11-24 18:24:21 +00:00
Search Fluids; Changed Block Highlighter (#13)
* Search Fluids; Changed Block Highlighter * fix hightlight when use rotate view --------- Co-authored-by: slprime <[email protected]>
This commit is contained in:
1 parent
9d6ce05d9e
commit
fc025b3b85
12 files changed
+303
-381
No files matched your search
@@ -12,6 +12,7 @@ import org.lwjgl.input.Keyboard;
|
||||
import com.gtnh.findit.FindIt;
|
||||
import com.gtnh.findit.FindItConfig;
|
||||
import com.gtnh.findit.FindItNetwork;
|
||||
import com.gtnh.findit.fx.HighlighterHandler;
|
||||
import com.gtnh.findit.fx.ParticlePosition;
|
||||
import com.gtnh.findit.util.AbstractStackFinder;
|
||||
|
||||
@@ -26,11 +27,21 @@ public class ClientBlockFindService extends BlockFindService {
|
||||
}
|
||||
|
||||
public void handleResponse(EntityClientPlayerMP player, BlockFoundResponse response) {
|
||||
player.closeScreen();
|
||||
ParticlePosition.highlightBlocks(player.worldObj, response.getPositions());
|
||||
|
||||
if (FindItConfig.ENABLE_ROTATE_VIEW) {
|
||||
lookAtTarget(player, response);
|
||||
if (!response.getPositions().isEmpty()) {
|
||||
player.closeScreen();
|
||||
|
||||
if (FindItConfig.ENABLE_ROTATE_VIEW) {
|
||||
lookAtTarget(player, response);
|
||||
}
|
||||
}
|
||||
|
||||
if (FindItConfig.USE_PARTICLE_HIGHLIGHTER) {
|
||||
ParticlePosition.highlightBlocks(player.worldObj, response.getPositions());
|
||||
} else {
|
||||
HighlighterHandler.highlightBlocks(
|
||||
response.getPositions(),
|
||||
System.currentTimeMillis() + FindItConfig.BLOCK_HIGHLIGHTING_DURATION * 1000);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,6 +55,7 @@ public class ClientBlockFindService extends BlockFindService {
|
||||
@Override
|
||||
protected boolean findStack(ItemStack stack) {
|
||||
Block block = Block.getBlockFromItem(stack.getItem());
|
||||
|
||||
if (block == Blocks.air) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user