Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (โ‹ฎ) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

I know that pre 1.9 you just did worldObj.markBlockForupdate but i just can't find the 1.9 alternative.

Thanks in advance, Laseph.

Sorry to invade but there is something I never understood:

ย 

Use

World#notifyBlockUpdate

. You can see an example of this here.

ย 

getWorld().notifyBlockUpdate(getPos(), state, state, [u]3[/u]);

ย 

3. Where does this come from? I had no idea what to put there when I was needing to sync data, so I put Integer.MAX_VALUE.

getWorld().notifyBlockUpdate(getPos(), state, state, [u]3[/u]);

ย 

3. Where does this come from? I had no idea what to put there when I was needing to sync data, so I put Integer.MAX_VALUE.

ย 

Vanilla mostly uses 3 but it looks like the only place the argument is actually used is in

RenderGlobal#notifyBlockUpdate

, which only checks if

(flags &  != 0

. This is

false

for 3, but

true

for

Integer.MAX_VALUE

.

ย 

I don't fully understand the rendering code, but it looks like this value controls whether the

RenderChunk

updates now (

true

) or later (

false

).

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

From

World#getBlockState

:

/**
* Sets the block state at a given location. Flag 1 will cause a block update. Flag 2 will send the change to
* clients (you almost always want this). Flag 4 prevents the block from being re-rendered, if this is a client
* world. Flags can be added together.
*/

ย 

3 means it uses flags 1 and 2, so using flag 3 will cause a block update and send the changes to the client.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

ย 

1.12 -> 1.13 primer by williewillus.

ย 

1.7.10 and older versions of Minecraft are no longer supported due to it's age!ย Update to the latest version for support.

ย 

http://www.howoldisminecraft1710.today/

Those are the flags for

World#setBlockState

. Vanilla seems to use the same values for

World#notifyBlockUpdate

; but as I pointed out, only

RenderManager

(the client-side

IWorldEventListener

) checks if flag 8 is set.

PathWorldListener

(the common

IWorldEventListener

) and

WorldManager

(the server-side

IWorldEventListener

) ignore the flags completely.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

You're right, totally missed that. Would that be the only place flag 8 is ever checked? I haven't seen it been used anywhere else.

ย 

As for the flags I posted,

World#getBlockState

it's the only place in

World

with flag descriptions.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

ย 

1.12 -> 1.13 primer by williewillus.

ย 

1.7.10 and older versions of Minecraft are no longer supported due to it's age!ย Update to the latest version for support.

ย 

http://www.howoldisminecraft1710.today/

You're right, totally missed that. Would that be the only place flag 8 is ever checked? I haven't seen it been used anywhere else.

ย 

That is the only place flag 8 is checked, yes.

World#markAndNotifyBlock

is the only other place that checks flags and it only checks flags 1, 2 and 4.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions โ†’ Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.