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

https://bitbucket.org/makerimages/electronica-engineered

 

Issue 5 and commit 8c31178 are related to this.

 

When I go to place down a bucket, it will place it INTO the block i clicked on, not the block that is on the face I clicked on, like it shoud do. Also, it wont empty the bucket. And the water wont immediately start flowing aswell.

 

If you can help me with that, you could please try out issue 5 part 2 aswell(the things i classified "Creative  only")

 

thanks!

 

Do you have any code that decides what side you clicked on and responds accordingly?

This is what you may be missing:

int x = movingobjectposition.blockX;
int y = movingobjectposition.blockY;
int z = movingobjectposition.blockZ;

if (!world.canMineBlock(player, x, y, z)) {
return item;
}
if (movingobjectposition.sideHit == 0) {
y--;
}
if (movingobjectposition.sideHit == 1) {
y++;
}
if (movingobjectposition.sideHit == 2) {
z--;
}
if (movingobjectposition.sideHit == 3) {
z++;
}
if (movingobjectposition.sideHit == 4) {
x--;
}
if (movingobjectposition.sideHit == 5) {
x++;
}

 

Try to understand what is happening here. The position of the block that has been hit is x, y, z. The side which the player hits the block is being checked, and depending on which side is hit, the x, y or z value is being decremented or incremented by 1, thus moving the position of the new block to put down out of the block that is hit.

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.