Posted February 14, 20223 yr So I'm trying to get the comparator input override of a block (if it has one) with something like: @OnlyIn(Dist.CLIENT) @SubscribeEvent public void onRenderGameOverlay(RenderGameOverlayEvent.Post event) { //... if (blockstate.hasComparatorInputOverride()) { int p = blockstate.getComparatorInputOverride(minecraft.world, tBlockPos); } //... } For blocks like bee nest and cauldron it worked, but for blocks with inventory it always returns 0 because when it tries to get the block inventory gets an air full inventory(not null) even when the chest is full.
February 14, 20223 yr Author I have tried without it but same result. In what event should I get the value, dose RenderGameOverlayEvent occur in the server, because I want the value in this event, and how to send it to client?
February 14, 20223 yr Author 4 minutes ago, diesieben07 said: What blocks do you need to know this value for on the client? Any block the player looking at. Edited February 14, 20223 yr by Adham-084
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.