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.

[1.11.2] [SOLVED] TileEntity performance

Featured Replies

  • Author
32 minutes ago, diesieben07 said:

You need two getCapability calls, one with side, one with null (if side fails).

 

Make sure that you have a breakpoint inside the lambda. You can't step-into a lambda (unless you are using IntelliJ's new smart step-into). If it really is not called then the map is empty.

Well, I've had one breakpoint before the lambda and one breakpoint inside the forEach loop with the lambda.

 

EDIT: Hm, the list seems to be emtpy, so somewhere in the search method findTransferPipes has to be a problem.

Edited by Bektor

Developer of Primeval Forest.

  • Author

Hm, when placing a breakpoint in the findTransferPipes methods in this line:

            if(this.getWorld().getTileEntity(current) instanceof TileEntityPipeEnergy) 
                this.getBlocksToScan(toSearch, scanned, current); // Breakpoint at this line

 

It seems like the block is always scanning the same position, as the current BlockPos had the same values even after going through about 40 times this breakpoint.

It also seems like the else if statement is never reached.

 

What was my construct for testing it (shows y axis, as x and z are the same for all of these blocks):

Quote

 

X -> transfer pipe

Y -> cable

X -> transfer pipe

 

 

EDIT: Hm, seems like the if-statement which checks if new blocks should be added was wrong. I also changed EnumSet.allOf(EnumFacing.class) back to EnumFacing.VALUES. But now it scans all block positions which should be scanned again and adds the correct blocks to the list. ;)

Edited by Bektor

Developer of Primeval Forest.

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.