Jump to content

VoidCatz

Members
  • Posts

    8
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

VoidCatz's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. It is possible to have clickable chat messages. To achieve that you create a custom ChatStye and add a ClickEvent to it. After that this ChatStyle can be applied to an IChatComponent. The ClickEvent allows you to choose an Action from an predefined Enum. The available Actions are: OPEN_URL, OPEN_FILE, RUN_COMMAND, TWITCH_USER_INFO, SUGGEST_COMMAND and CHANGE_PAGE. In my case I want to define custom click behavior. I tried overriding ClickEvent.getAction() but that doesn't seem to work... Here is my code so far: IChatComponent comp = new ChatComponentText("Text"); ChatStyle style = new ChatStyle().setChatClickEvent(new ClickEvent(Action.RUN_COMMAND, "") { @Override public Action getAction() { //custom behavior return Action.RUN_COMMAND; } }); comp.setChatStyle(style);
  2. Hey, I tried multiple times to install forge via the gradlew setupDecompWorkspace command, but it doesn't work : I got following error on recompiling: http://pastebin.com/c5CHU3Rg I’m using jre and jdk 8. Could this be the reason? How could I tell gradle to use jdk 7?
  3. Hey, I've just tried to set up a new forge workspace. But something failed with recomp... Here is my log: http://pastebin.com/rFdcBqw5 I use jre and jdk 8. My PATH variables are set up.
  4. Thanks for the quick answer, I will look into ICommandSender
  5. Hey, I tried to make an simple item, that executes a command when you right click. The command is stored as NBT data. It is for mapmakers, so it's only obtainable through the /give with NBT data tags. The item should work like a portable command block. Everyone can use it, even if he doesn't have the necessary rights to execute the command manually. But the only one who is able to create and hand out these items is the admin because he is the only one that can use the /give command. Now to my problem. I overrode the onItemRightClick() method. Here is my code: https://gist.github.com/VoidCatz/3be9f4b44d1334c20e67 (Gist) The problem is that the command is executed twice when I right click. The other problem is that non-op players can't execute op commands. How can I solve these problems? Edit 1: The execute twice issue works now... I had to test if(!world.isClient()) To solve the other issue I will have to look into the abstract class CommandBlockLogic... I hate obfuscated code...
  6. I tried to make a food item with 7 metadata states. Each one should have a own potion effect. They should have the same texture and label. I want to implement the addInformation() Method so that the effect is displayed under the Item! My code so far:
×
×
  • Create New...

Important Information

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