Jump to content

Ottoguy

Members
  • Posts

    3
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Ottoguy's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. I want a command to be accessible by all players on a server as well as in single player. But I only manage to use the command if I'm an OP or allow a local server to use cheats. Could you help me out here? The code in my command class: package com.ottoguy.pointsmodmain.command; import net.minecraft.block.Block; import net.minecraft.command.CommandBase; import net.minecraft.command.CommandException; import net.minecraft.command.ICommand; import net.minecraft.command.ICommandSender; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.server.MinecraftServer; import net.minecraft.world.World; import net.minecraftforge.client.IClientCommand; import net.minecraftforge.fml.common.FMLCommonHandler; import net.minecraftforge.server.permission.PermissionAPI; public class CommandChooseTeam extends CommandBase{ @Override public String getName() { // TODO Auto-generated method stub return "points"; } @Override public String getUsage(ICommandSender sender) { // TODO Auto-generated method stub return "Used for choosing team in points mod"; } @Override public int getRequiredPermissionLevel() { return 0; } @Override public void execute(MinecraftServer server, ICommandSender sender, String[] args) throws CommandException { World world = sender.getEntityWorld(); if (world.isRemote) { System.out.println("Processing on the client side"); }else { System.out.println("Processing on the server side"); EntityPlayerMP player = getCommandSenderAsPlayer(sender); if(args[0].equals("red")) { int count = 1; while (count < 64) { String itemName = "minecraft:red_flower"; ItemStack itemstack = new ItemStack(getItemByText(sender, "minecraft:red_flower")); player.inventory.addItemStackToInventory(itemstack); count++; } }else if(args[0].equals("blue")) { int count = 0; while (count < 12) { String itemName = "minecraft:lapis_ore"; ItemStack itemstack = new ItemStack(getItemByText(sender, "minecraft:lapis_ore")); player.inventory.addItemStackToInventory(itemstack); count++; } } } } }
  2. I need some help from people more experienced with forge. Is there a way for me to add blocks that are in the size 32X32. I know how to code animated textures, but is it the same for 32X32 animated textures? I have a third question: Can i make my blocks use the connected textures option in Optifine without having to write the whole "connected textures code" myself? I apologize if this thread does not follow all rules, i have read through em´ all twice today but i could have missed something. Thanks in advance./Me
×
×
  • Create New...

Important Information

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