Jump to content

Jacky2611

Members
  • Posts

    499
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Jacky2611

  1. Wahh! We have a necromancer!
  2. Dimensions? Count me in! What exactly do you want? Server only (multiworld) Full dimension with custom biomes? dynamically generated dimensions? (Thats a bit harder, I still haven't got it working 100%) Should we also post little helper classes? (1.8 display title, easier Potions, auto-updater, donator particles (why did I create donator particles if I never publish any of m mods?),...) I think there is nothing wrong with copying code. I taught myself java by reading the decompiled Minecraft source and changing parts of it. I didn't even realize that I could google some stuff... I was such an idiot. EDIT: I can also post 5 to 6 different all-around Teleporter classes. They are always usefull.
  3. Ok, not sure why, but after I added some empty lines the player isn't in the first team by default. However, he still keeps his in team in another dim... @SubscribeEvent public void onEntityJoinWorldEvent(EntityJoinWorldEvent event){ if(event.entity instanceof EntityPlayer){ ... if(BlackGeckoServer.gameServer.containsKey(event.world.provider.getDimensionId())){ System.out.println("JOINED !!!!!!"); BlackGeckoServer.gameServer.get(event.world.provider.getDimensionId()).joinPlayer(player); } } }
  4. Have you already tried this?
  5. Nice questions. Have you tried to look at the vanilla play sound command?
  6. Ok, fixed it by using: team.func_178774_a(EnumTeam.values()[i].getChatColor()); team.setNamePrefix(EnumTeam.values()[i].getChatColor().toString()); team.setNameSuffix(EnumChatFormatting.RESET.toString()); Thats great. However, all my players are automatically added to the scoreboard. Not so great. Also it seems like the same scoreboard is used in all dimensions. How can i avoid this?
  7. oh, looks like my player actually joined my team, but the nametag color was never changed.... I am using team.func_178774_a(EnumChatFormatting.RED); But nothing really changes. Any ideas why? Here is my latest SkyBattle class.
  8. Yeah, but he just wants to change some nbt tags, so I doubt that there will be rendering errors. And it worked fine for me no matter which crafting table I used.
  9. Ähm, I am pretty sure that I am changing the outcome in my event handler with an ItemCraftedEvent. I use it to add poisons (=nbt tags) to all food items. https://github.com/Jacky2611/DimensionShiftCore/blob/master/src/main/java/net/dimensionshift/mod/event/EventHandlerDimensionShift.java
  10. Used that too. No difference.
  11. In my main class: RegisterDimensionClass: my Skybattle class: Btw, for everyone who is creating something similar, I wrote a class to display a title. Its not perfect but it works:
  12. The problem is that the player doesn't even display stuff such as the teams color. To create the teams I use: for(int i=0; i<teamNumber;i++){ //scoreboard.createTeam(i+""); ScorePlayerTeam team = new ScorePlayerTeam(scoreboard,i+""); team.setTeamName(EnumTeam.values()[i].toString()); team.func_178774_a(EnumTeam.values()[i].getChatColor()); team.setNamePrefix("TEST"); scoreboard.sendTeamUpdate(team); } once the dim is generated. And then I want to use: player.worldObj.getScoreboard().addPlayerToTeam(player.getName(), (i+"")); To add my player to the team. Problem is: nothing happens. No name suffix, no color, ... According to a bukkit tut here I have to set the players scoreboard somehow, but I have no idea how I should do this. I found player.setScore(int x); But this requires an int for the data watcher, and I don't know how I can get the scoreboards id. I will try to find some more information in the scoreboard command, but it would be awesome if someone could help me here.
  13. What? I would use a crafting event.
  14. Ah, pls use spoiler and code tags. I will have a look at it as soon as I am back at my pc. Ok: You loop through the crafting matrix to find your grinder. Good You get your grinder. Good You set the damage and place it in the correct slot. Good But you never check how many items are crafted. You have to check the output stack size and than add it to the damage from j.
  15. Hi! I am just writing the last part of a minigame-server project and need a way to access the Scoreboard. I know that I can use world.getScoreboard() to get the scoreboard, but now i am a little bit stuck. I tried to use .func_96516_a("adsasdasd"); to add a title to my scoreboard, but when i tested it nothing happened. (Player joined after scoreboard was created) So how would I set the title correctly? Or do I have to send my scoreboard to the player/add my player to the scoreboard? Jacky
  16. oh, that makes sense...
  17. So i just created a second event handler (for ticks), registered it and now the game always crashes one or two minutes after it has been fired. I need this event handler to create a countdown for my minigame. ... MinecraftForge.EVENT_BUS.register(new BlackGeckoEventHandler()); //Main event Handler FMLCommonHandler.instance().bus().register(new BlackGeckoEventHandler()); FMLCommonHandler.instance().bus().register(new TickHandlerDimensionShift()); ... Tick event handler My parent minigame class: And here is the minigame that starts the countdown: Oh, nearly forgot the crash: Any ideas why this is not working? EDIT: Just noticed that i called my tick event class *DimensionShift. Pls ignore the strange name. (Its now called BlackGeckoServerTickHandler)
  18. What have you changed to achieve this? looks hilarious... And why is there a nether portal?
  19. 1. Why don't you use a command? 2. Is this supposed to be an event? 3. Why doesn't it look like: @SubscribeEvent public void onServerChatEvent(ServerChatEvent event){ EntityPlayer player = event.player; BGSPlayer bgsPlayer = BGSPlayer.get(player); switch(bgsPlayer.getGameMode()){ case LOBBY: LobbyEvent.onServerChatEvent(event); break; } }
  20. Is the IPlayerTracker interface gone in 1.8? If yes, what should I use instead if I want to trigger the event only when a client connects and not always when a player joins a world?
  21. I never said that I copied and pasted code I didn't understand. I took 15 mins to copy and modify a code just cause I wanted to know if its possible to create a dim while minecraft is running at the server side dynamically. And I know why its not working, as already said, it was just a proof of concept. If you look through my posts you can see that I already have created dimensions before. But I needed 14 classes to get (nearly) everything working, and I believe that a simple way to "clone" the overworld would be useful.
  22. A friend recently told me that it would be awesome if I could add multiple world to a small side project (server only!) I started a while ago. So I copied everything from forge essentials "multiworld" folder into a new package, fixed all errors, created a few helper classes and then tried to create a new world. To my own surprise I was even able to tp to the new world before my server crashed (yeah, what I created never received any tick updates, looks like in FE this is done by the APIRegistry...) It looks like it could work if I would spend more time fixing these bugs. (Why should I?) But I doubt that every coder who wants to have multiple worlds has the time to create all this on his own. I know from a friend that in bukkit you just had to write one line of code in order to create a new dimension. Is there any chance that something like this will get added to forge?
×
×
  • Create New...

Important Information

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