mirror of
https://github.com/GTNewHorizons/FindIt.git
synced 2026-11-24 18:24:21 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
296f29ae76 | ||
|
|
84dd2e45f9 | ||
|
|
3b6d5fa3ad |
No files matched your search
@@ -3,9 +3,9 @@ name: Build and test
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ master, main ]
|
branches: [ master, main, release/** ]
|
||||||
push:
|
push:
|
||||||
branches: [ master, main ]
|
branches: [ master, main, release/** ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-test:
|
build-and-test:
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import com.gtnh.findit.FindItNetwork;
|
|||||||
import com.gtnh.findit.util.WorldUtils;
|
import com.gtnh.findit.util.WorldUtils;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
|
|
||||||
|
|
||||||
public class BlockFindService {
|
public class BlockFindService {
|
||||||
|
|
||||||
@@ -37,12 +36,11 @@ public class BlockFindService {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
int tileMeta;
|
int tileMeta = tileBlock.getDamageValue(
|
||||||
if (FindIt.isGregTechLoaded() && tileEntity instanceof IGregTechTileEntity gregTech) {
|
tileEntity.getWorldObj(),
|
||||||
tileMeta = gregTech.getMetaTileID();
|
tileEntity.xCoord,
|
||||||
} else {
|
tileEntity.yCoord,
|
||||||
tileMeta = tileEntity.getBlockMetadata();
|
tileEntity.zCoord);
|
||||||
}
|
|
||||||
|
|
||||||
if (request.getMetaToFind() == tileMeta) {
|
if (request.getMetaToFind() == tileMeta) {
|
||||||
positions.add(new ChunkPosition(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord));
|
positions.add(new ChunkPosition(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord));
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ public class ProtoUtils {
|
|||||||
buf.writeInt(positions.size());
|
buf.writeInt(positions.size());
|
||||||
for (ChunkPosition pos : positions) {
|
for (ChunkPosition pos : positions) {
|
||||||
buf.writeInt(pos.chunkPosX);
|
buf.writeInt(pos.chunkPosX);
|
||||||
buf.writeByte(pos.chunkPosY);
|
buf.writeInt(pos.chunkPosY);
|
||||||
buf.writeInt(pos.chunkPosZ);
|
buf.writeInt(pos.chunkPosZ);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -35,7 +35,7 @@ public class ProtoUtils {
|
|||||||
List<ChunkPosition> positions = new ArrayList<>();
|
List<ChunkPosition> positions = new ArrayList<>();
|
||||||
while (amount > 0) {
|
while (amount > 0) {
|
||||||
final int x = buf.readInt();
|
final int x = buf.readInt();
|
||||||
final int y = buf.readUnsignedByte();
|
final int y = buf.readInt();
|
||||||
final int z = buf.readInt();
|
final int z = buf.readInt();
|
||||||
positions.add(new ChunkPosition(x, y, z));
|
positions.add(new ChunkPosition(x, y, z));
|
||||||
--amount;
|
--amount;
|
||||||
|
|||||||
Reference in new issue
Block a user