Biomes and Dimensions Bug

Published by MrScautHD on Fri, 07/24/2020 - 20:12
Status
Fixed
Type
Product/platform
MCreator/Windows
MCreator version
Priority
Normal
Fixed in
Issue description

hi i have make a Dimensions and Bioms and when i play on a server with my mod crash this server and in the Mcreator server is it working on localhost or... is it not working

i send you the lastlog of my server and can you make a new version instand and not in next snapchot in this is fixed ? was really nice i dont can backport my workspace and i will release my mod 30.7.2020. was really nice! :)

 

and sry for spamming on twitter i stoped now really. can i have a last chance?

Issue comments

The Mcreator server is not crashing the other server localhost or Server hosters crash with this mod , Bioms and Dimensions is the ERROR!

Could you explain what you wanted to tell here?

Also it seems you use plugins again, with cooperation like this we will come nowhere, you see?

I see your problem. This code:

public void clickSync(PlayerInteractEvent.EntityInteract event) {
        event.getPlayer().getPersistentData().putDouble("fuel", event.getTarget().getPersistentData().getDouble("fuel"));
        event.getPlayer().getPersistentData().putInt("connectedfueledentityid", event.getTarget().getEntityId());
    }
    @SubscribeEvent
    public void playerTraceCheckSync(TickEvent.PlayerTickEvent event) {
        PlayerEntity playerEntity = event.player;
        Entity entity = playerEntity.world.getEntityByID(playerEntity.getPersistentData().getInt("connectedfueledentityid"));
        if (entity != null) {
            playerEntity.getPersistentData().putDouble("fuel", entity.getPersistentData().getDouble("fuel"));
        }
    }

is a dirty hack that will work on single-player or LAN but ultimately fail on dedicated servers. If you want to sync data, you will need to implement packets.

Or simply use PLAYER variables.

this custom code is working i have tested and in the old snapchot is this code working

This code will not work properly on a dedicated server. No other way around, do you understand network communication and how packets work in MC?



Donate to MCreator

By donating to developers you can speed up development, as with more resources, we can dedicate more time to MCreator. It is a free project made by developers working on it in their free time.