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

Ok, I will use only one variable.

19 minutes ago, Draco18s said:

Do not use this, this uses the vanilla IInventory system. You should use ItemStackHandler for inventory instead.

Ah ok thank you, it because of that it was a lot complicated to use the inventory of the block, thank you I will use ItemStackHandler.

 

20 minutes ago, Draco18s said:

What. Why are you passing a public static field to a private non-static method? What.

It's because the booelan dropBlock is used on other class like the gui.

 

21 minutes ago, Draco18s said:

This is not how you get an ItemStack from a block. This won't work for a whole host of blocks, from piston heads, to cake, to redstone wire, to crops.

Ok I haven't tested with complicated items, I have only tested on the ground with the dirt, grass stone, iron, ect it work. So how should I collect the ItemStack ?

 

24 minutes ago, Draco18s said:
45 minutes ago, Leonardlasardine said:

world.setBlockState(pos, newBlockstate, 1);

3 hours ago, Leonardlasardine said:

Ok thank you, so 3 is good.

  *Suspicion*

Oops...

4 hours ago, Leonardlasardine said:

It's because the booelan dropBlock is used on other class like the gui.

That's called Reaching Across Sides and won't work. If the client and sever are running on different machines, how do you think the server knows about the gui change?

4 hours ago, Leonardlasardine said:

So how should I collect the ItemStack ?

(a) use the loot system and get the block's drops

(b) pickBlock()

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

17 hours ago, Draco18s said:

how do you think the server knows about the gui change?

AH YES OK it's for that ! I need to click an on/off button to start and it don't send the information to the server. Thank you.

I remember in 1.12 we had to use packets for sending information across sides. Is it always that in 1.15 or there is an other way to send data?

17 hours ago, Draco18s said:

(b) pickBlock()

Ok thank you I will use pickBlock because I want my quarry to use skill touch.

Good evening

2 hours ago, Leonardlasardine said:

Is it always that in 1.15 or there is an other way to send data?

New versions don't make the need for packets to magically go away.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

It's was not evident ! I couldn't guess that. New version have removed GameRegistry, EnumHelper, IWorodGeneraror ect... It was possible that packets were removed.

14 hours ago, Leonardlasardine said:

It's was not evident ! I couldn't guess that.

...How else would data be transmitted from the client to the server or vice versa?

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Ok thank you everyone

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.