-
Possible to force client to re-load chunks which have been changed on server ?
Fixed it! Realized then when updating blocks on the server, you need to also update the same blocks on the client.
-
Possible to force client to re-load chunks which have been changed on server ?
I have a mod which builds a structure upon use of a crafted item. Just changing blocks (building my structure) on the server does not automatically trigger the client to refresh the blocks resulting in clients not seeing the newly created structures. Does anybody know of a way I can tell the minecraft client to refresh certain chunks via forge ? many thanks in advance Lido666
-
[Solved]Struggling with world.setBlock changes not preserved
Thank you. After changing definition from minecraft to world = event.entity.worldObj; started to see events from the server. Kind Regards Lido666
-
[Solved]Struggling with world.setBlock changes not preserved
Thank you. Even when using 'onLivingUpdateEvent', I only ever get events which are remote. Used the code below, and only received remote events, even when mining, jumping, crafting. Any suggestions please? @SubscribeEvent public void onLivingUpdateEvent(LivingUpdateEvent event) { world = Minecraft.getMinecraft().theWorld; if (world!=null) System.out.println("I am on server" + world.isRemote); }
-
[Solved]Struggling with world.setBlock changes not preserved
world.isRemote returns true. I have setup client and server side classes using: @SidedProxy(clientSide = "com.example.examplemod.proxy.ClientProxyClass", serverSide = "com.example.examplemod.proxy.ServerProxy") public static proxyCommon proxy; Do I need to register my event_bus handler from the class ServerProxy ? Many thanks in advance Lido666
-
[Solved]Struggling with world.setBlock changes not preserved
Thanks for the quick response. Play events are exactly how you described them above. I create the hook on to the event bus using: @EventHandler public void init(FMLInitializationEvent event){ // We add the command below (and a new ItemPickupHandler class), all events now go in that class MinecraftForge.EVENT_BUS.register(new ItemPickupHandler()); It is from this class that I am calling the .setBlock
-
[Solved]Struggling with world.setBlock changes not preserved
I am calling this from my class which is triggered from the event_bus, eg @SubscribeEvent public void onPlayerUpdate(LivingUpdateEvent event) Where should I setup my event bus from to receive play events ? Many thanks in advance Lide o6666
-
[Solved]Struggling with world.setBlock changes not preserved
Hopefully somebody can help! Struggling with world.setBlock using forge 1.7.2 and gradle, I have the following code: World world = Minecraft.getMinecraft().theWorld; world.setBlock(xPos+x, yPos+1, zPos+z, Blocks.air,0,0); world.setBlock(xPos+x, yPos, zPos+z, Blocks.coal_block,20,20); I can set blocks within my mod, but the blocks reverts back to what they were before the .setBlock command (ie. if you try and use an item on them). when I exist a world, and return, my changes are gone. Rather than using custom blocks, I want to use standard inventory for the time being (unless I must create a custom block) ? If this something linked to client side changes to server side changes? It appears that I am making changes to a client side (cache) which is then being overidden by the server side cache? Any suggestions please ? Many thanks Lido666
IPS spam blocked by CleanTalk.