Skip to content

Tile Entity Logic#478

Draft
samdotjpg wants to merge 24 commits intoReMinecraftPE:masterfrom
samdotjpg:tile-entity-rev2
Draft

Tile Entity Logic#478
samdotjpg wants to merge 24 commits intoReMinecraftPE:masterfrom
samdotjpg:tile-entity-rev2

Conversation

@samdotjpg
Copy link
Contributor

@samdotjpg samdotjpg commented Feb 15, 2026

Okay I'll update this with more information about the PR and its features/changes when it's nearing completion. Right now I'm just documenting my progress and what's left to do.

  • Chests
    • Singleplayer functionality
    • Fix UI from console
    • Save compatibility check <- 0.4.0? where should we take this from? unneeded for now if goal is 0.3.3
    • Multiplayer support <- Once ContainerListener is fixed, this should work instantly. This isn't a TileEntity specific issue, but we need to be able to:
      • Open / close chest
      • See container items
      • Move items in container
  • Furnaces
    • Singleplayer functionality
    • Save compatibility check
    • Multiplayer support <- Same deal as chests
  • Note Blocks
    • Singleplayer functionality
    • Multiplayer support <- This will naturally work when TileEvent is fixed and players don't place a block/item when interacting with containers/crafting tables/etc.

misc:

Right now even interacting with tile entities in multiplayer causes your buddy's client watch you place whatever is in your hand.

@samdotjpg samdotjpg changed the title Tile entity rev2 Chests, Furnaces, Note Blocks Feb 15, 2026
int field_23C;
TileID* m_pBlockData;
std::vector<Entity*> m_entities[128 / 16];
std::map<ChunkTilePos, TileEntity*> m_tileEntities;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's getting to the point where we need an unordered hash map and we need to go through just about every map and see if it needs to be replaced so we can squash the o log n lookups.

@samdotjpg samdotjpg changed the title Chests, Furnaces, Note Blocks Tile Entity Groundwork Feb 15, 2026
@samdotjpg samdotjpg changed the title Tile Entity Groundwork Tile Entity Logic Feb 16, 2026
{
m_listeners.push_back(listener);

// Not done on PE
Copy link
Contributor Author

Choose a reason for hiding this comment

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

How do you want to broadcast the current state of the container? The ContainerSetContentPacket and ContainerSetSlotPacket just need to be hooked up to wherever they are in PE. Otherwise, the functions do work and transmit the data properly and I fixed the ServerPlayer container transmission bug.

@BrentDaMage is it possible I could get you to do container hookups where the PE equivs are? This PR isn't necessary for it, it's just the hookups to transmit data. Using this for the furnaces visual clues would help tho

Copy link
Member

Choose a reason for hiding this comment

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

I'll do this, there's some stuff in furnace that sends packets that I (for obvious reasons) never decompiled. I'm sure chests are the same.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are my hero

Copy link
Contributor Author

@samdotjpg samdotjpg left a comment

Choose a reason for hiding this comment

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

surface

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

4 participants

Comments