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.

TarasTech

Members
  • Joined

  • Last visited

  1. Im really sorry I wasted your time. I guess I should go learn some more java before i try doing this.
  2. Im Still kind of new to java. Heres the code that i want to modify. I cant figure out how to set up the code correctly for that. Plaus after i set up the code how do i run the command? package com.TarasTech.mod; import java.util.Random; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.server.MinecraftServer; public class BlockRain extends Block { protected BlockRain(Material material) { super(material); } @Override public boolean isOpaqueCube() { return false; } public Item getItemDropped(int metadata, Random random, int fortune) { int w = random.nextInt(6); if (w == 0) { return Testing.itemRaindrop; } if (w == 1) { return MinecraftServer.getServer().MinecraftServer#getCommandManager ; } if (w == 2) { return Testing.itemRaindrop; } if (w == 3) { return Testing.itemRaindrop; } if (w == 4) { return Testing.itemRaindrop; } else { return Testing.itemRaindrop; } } }
  3. So I want to make a block that does a couple random things like drops an item, or changes the weather to rain, or kills the player, but i have no idea how to run the /weather command in forge, or the /kill. I really need help. Searched around the web for a while now...

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.