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;
}
}
}
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...