Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Posts

  • Joined

  • Last visited

Everything posted by lido666

  1. Fixed it! Realized then when updating blocks on the server, you need to also update the same blocks on the client.
  2. 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
  3. Thank you. After changing definition from minecraft to world = event.entity.worldObj; started to see events from the server. Kind Regards Lido666
  4. 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); }
  5. 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
  6. 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
  7. 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
  8. 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
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.