Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Before this gets locked, last i checked this was a place to get help not forced to update to another version of minecraft. If I had wanted to update to a newer version I would have. But I enjoy using 1.7.10. So if you post anything that does not relate to helping me get some information on how to make this work for 1.7.10 then dont even bother posting.

 

Basically, I am attempting to, after a minecraft day, start replacing the top blocks around the player. i am wanting it to happen every second, not tick, my mod will be a Nuclear Apocalypse mod. and I am trying to get the world to decay from radiation. this is what i was trying but it keeps suspending.

 

ServerTickHandler:

Hidden

Code: [select]

@SubscribeEvent

  public void onServerTick(WorldTickEvent event){

      if(!event.world.isRemote){

        ticks++;

        if(ticks == 20){

            ticks = 0;

            if(event.world.getWorldTime()/24000 >= 1){

              for(int a = 0; a < event.world.playerEntities.size(); a++){

      EntityPlayer player = (EntityPlayer) event.world.playerEntities.get(a);

              int x = player.serverPosX -32 + rand.nextInt(64);

              int z = player.serverPosZ -32 + rand.nextInt(64);

              int y = event.world.getHeightValue(x, z);

              Block block = event.world.getBlock(x, y, z);

      player.addChatComponentMessage(new ChatComponentText("Block Changed at" + x + ", " + y + ", " + z));

      if(block == Blocks.grass){

                  event.world.setBlock(x, y, z, BlockRegistry.irradiatedDirt);

      }else if(block == Blocks.stone){

                  event.world.setBlock(x,y,z, Blocks.cobblestone);

      }else{

                  event.world.setBlockToAir(x,y,z);

              }

            }

        }

      }

  }

}

 

If I have missed something please let me know, and if there is a way for me to accomplish my task better then what I already have please explain to me how. Thanks in advance.

Users posting privileges were removed for 24 hours to give him time to think about what he has done {recreating a locked thread} And to update his mod to 1.10.2.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Guest
This topic is now closed to further replies.

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.