@Environment(value=CLIENT) public class DataQueryHandler extends Object
Modifier and Type | Field and Description |
---|---|
private Consumer<CompoundTag> |
callback |
private int |
expectedTransactionId |
private ClientPlayNetworkHandler |
networkHandler |
Constructor and Description |
---|
DataQueryHandler(ClientPlayNetworkHandler networkHandler) |
Modifier and Type | Method and Description |
---|---|
boolean |
handleQueryResponse(int transactionId,
CompoundTag tag) |
private int |
nextQuery(Consumer<CompoundTag> callback) |
void |
queryBlockNbt(BlockPos pos,
Consumer<CompoundTag> callback) |
void |
queryEntityNbt(int entityNetworkId,
Consumer<CompoundTag> callback) |
private final ClientPlayNetworkHandler networkHandler
private int expectedTransactionId
@Nullable private Consumer<CompoundTag> callback
public DataQueryHandler(ClientPlayNetworkHandler networkHandler)
public boolean handleQueryResponse(int transactionId, @Nullable CompoundTag tag)
private int nextQuery(Consumer<CompoundTag> callback)
public void queryEntityNbt(int entityNetworkId, Consumer<CompoundTag> callback)
public void queryBlockNbt(BlockPos pos, Consumer<CompoundTag> callback)