Get rid of the mismatched world exception!

  • Hi Im the developer of a mod called Valkyrian Warfare. Its basically Zeppelin mod but with Multiplayer and Physics.
    (http://www.minecraftforum.net/…-warfare-status-post</a>)


    What the hell kind of suggestion is this then!!?
    ~Im at a standstill in development because the airship entities each hold their own separate worlds inside of the Minecraft world. Though most other mods interact between multiple worlds with no problem, for some reason you guys added a crash when this tries to happen. None of the IC2 stuff works on airships


    Please edit code here:
    (NetworkManager.class)


    public final void sendComponentUpdate(TileEntityBlock te, String componentName, EntityPlayerMP player, GrowingBuffer data)
    {
    assert (!isClient());
    //Delete Start
    if (player.worldObj != te.getWorld()) {
    throw new IllegalArgumentException("mismatched world (te " + te.getWorld() + ", player " + player.worldObj + ")");
    }
    //Delete End
    GrowingBuffer buffer = new GrowingBuffer(64);
    try
    {
    SubPacketType.TileEntityBlockComponent.writeTo(buffer);
    DataEncoder.encode(buffer, te, false);
    buffer.writeString(componentName);
    buffer.writeVarInt(data.available());
    data.writeTo(buffer);
    }
    catch (IOException e)
    {
    throw new RuntimeException(e);
    }
    buffer.flip();
    sendPacket(buffer, player);
    }




    Have a Hayo day btw

    • Official Post

    Maybe you didn't know that, but airships and stuff that are made of blocks are inside an additional world that has nothing to do with the world the player is inside.


    Essentially a block is inside the airship, but the airship is a separate world meaning the tileentity of the block on the airship is in another world than the player in the "normal world" who clicks it.


    Or to make it even simpler: its blocks floating through the world like entities.

  • The idea is that I'm projecting this seperate dimensions onto Ships in the overworld.


    See Here (https://www.youtube.com/watch?v=WTWAMOpxVVY )



    The extent at which players can interact with other worlds isn't that deep, but everything in vanilla seems to work. Even beacons transmit their information and effects:




    I just think it'd be pretty cool to interact with IC2 on ships, much like beacons still work. The problem is that vanilla Gui's don't care what world you're in so things work perfectly. IC2 however does care for reasons unknown :thumbdown:


    I don't know, fix it if you care or whatever...