Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft changes for itemHandler #699

Merged
merged 11 commits into from
Oct 28, 2024
Merged

Draft changes for itemHandler #699

merged 11 commits into from
Oct 28, 2024

Conversation

Nightenom
Copy link
Member

@Nightenom Nightenom commented Sep 23, 2024

Changes proposed in this pull request

  • requires Extend single block FakeLevel BlockUI#101
  • reworks how we handle itemhandlers etc., should produce much more precise content handling, including nested inventories like shulkers
  • added "show resources" for build tool, scan tool doesnt do content extraction, build tool runs same methods as structure placer, so technically builder should show exactly the same as build tool resources
  • tested in single with blueprint shown on picture - all vanilla BEs with content, also tested with most entities

Testing

  • Yes I tested this before submitting it.
  • I also did a multiplayer test.

Review please

image
image

@Nightenom Nightenom added the 1.21 label Sep 23, 2024
@Nightenom
Copy link
Member Author

Nightenom commented Oct 4, 2024

@Raycoms this might probably do, but i havent tested it properly, also i have done nothing towards to double chest and alike

Also this should be accompanied by changed during placement/pre-placement traversals do we require exactly once the content of BE

@@ -264,6 +265,7 @@ public static boolean isWater(final BlockState iBlockState)
return iBlockState.getBlock() == Blocks.WATER;
}

@Deprecated(forRemoval = true, since = "1.21")
private static Item getItem(final BlockState blockState)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we will still need solutions for this kind of things, don't just deprecate it =D

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's in blockui for two version already

Raycoms
Raycoms previously approved these changes Oct 18, 2024
Copy link
Contributor

@Raycoms Raycoms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should otherwise be okay, was did tested?
(Please don't deprecate the others for now)

@@ -478,7 +478,7 @@ private void updateResources()
boolean handled = false;
for (final IPlacementHandler handler : PlacementHandlers.handlers)
{
if (handler.canHandle(world, BlockPos.ZERO, blockState))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was weird, especially no need to load world at zero during compute resources step

@Nightenom Nightenom marked this pull request as ready for review October 20, 2024 08:35
@Nightenom Nightenom requested a review from Raycoms October 21, 2024 18:20
@Nightenom Nightenom linked an issue Oct 24, 2024 that may be closed by this pull request
5 tasks
@Nightenom Nightenom enabled auto-merge (squash) October 28, 2024 07:11
@Nightenom Nightenom disabled auto-merge October 28, 2024 07:11
@Nightenom Nightenom merged commit ae55e35 into version/1.21 Oct 28, 2024
5 checks passed
@Nightenom Nightenom deleted the draft/item-handler branch October 28, 2024 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Entities not showing up properly in schematic previews.
2 participants