Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Posts

  • Joined

  • Last visited

Everything posted by KakesRevenge

  1. 1 More question .. My game is crashing cause of this line Why ?
  2. Oh i see .. i feel like an idiot now, cause i was trying to find this method earlier Thanks
  3. Thanks but i need to know the name. With hasDisplayName i only know if its named
  4. Hey, Is it possible to find out how a certain item has been named in an anvil? Thx4Help
  5. Oh ok isnt it something with the constructor ? we had problem with armer code which was calling the constructor of playerclasshandler and it has set the current class to unset again do you have a solution 4 that ?
  6. Do you have any tutorials for packets ? and how to solve the saving thing ?
  7. We have a command (/class) which is checking what is the current class. You can look at it here : https://github.com/KakesRevenge/ProjektWow/blob/master/src/main/java/cz/grossik/projektwow/command/GetClass.java
  8. setUnlocalizedName() is for naming items setBlockName() is for naming blocks
  9. Look at TiCon code there is reciperemover class and bunch of usefull stuff in it
  10. You need to make a class for the block .. and this coding style is awful
  11. Hello, I want to find out is an item is laying on the block ... How should i do that ? BTW: i know laying item is an entity ... Thx in advance
  12. + You dont need to spawn item you can just do event.drops.add(youritemstack) EDIT : this code works fine for me @SubscribeEvent public void harvestDrops (HarvestDropsEvent event) { if(event.block.equals(Blocks.stained_glass)) { event.drops.add(new ItemStack(Blocks.stained_glass,1,event.blockMetadata)); } }
  13. Command : NameFormatEvent The difference here is your name isnt changing
  14. Hello, I have 2 questions : 1. I'm subscribing name format event for changing username when something is true ... and im changing something to true when my command is fired ... but then name format is changing only when i relog so my question is : is there a way to change it rightaway the command is pressed ? 2.How to color the string which will be displayed in displayname in name format event ?iv tried &6&l in lang folder but it doesnt work Thx in advance
  15. Simply ChestGenHooks.getInfo(ChestGenHooks.BONUS_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(ItemsHandler.InfiniteFruit), 1,1,20)); Works for me.
  16. I knew theres is something bad about that ... and as i said im not working on this mod alone and im not author of the property as well. Tahnk you for that im gonna look on that Edit : this is how the config folder looks like
  17. NameFormat event edited : @SubscribeEvent(priority=EventPriority.NORMAL, receiveCanceled=true) public void NamingPlayers(NameFormat event) { String property = ProjektWow.player_class.getString(); if(property.equals(Reference.Warrior)) { event.displayname = Reference.WarriorName + event.username; } else if (property.equals(Reference.Thief)) { event.displayname = Reference.ThiefName + event.username; } else if (property.equals(Reference.Wizard)) { event.displayname = Reference.WizardName + event.username; } } ProjektWowClass
  18. ok i will remove it but thats not the main problem right ?
  19. that was for something else thats not needed thats doing nothing atm
  20. here : public static Property player_class; cWhole event handler class : Reference class :
  21. this is the warrior string in the reference class : public static String Warrior = "Warrior"; EDIT Basically im writing players player_class in config : (this isnt my code im working on this mod with someone else) @SubscribeEvent public void onPlayerLogin(PlayerEvent.PlayerLoggedInEvent event) { String name = event.player.getCommandSenderName(); NBTTagCompound playerData = event.player.getEntityData(); if (!playerData.hasKey("firstLogin")) { ProjektWow.config.load(); ProjektWow.player_class = ProjektWow.config.get(name, "Class", Reference.nul); ProjektWow.player_name = ProjektWow.config.get(name, "Player", name); playerData.setBoolean("firstLogin", true); ProjektWow.config.save(); } }
  22. Looks like i have another problem ... so i have the property and if the property is this then do this like so : @SubscribeEvent(priority=EventPriority.NORMAL, receiveCanceled=true) public void NamingPlayers(NameFormat event) { String property = ProjektWow.player_class.getString(); if(property == Reference.Warrior) { event.displayname = Reference.WarriorName + event.username; } else if (property == Reference.Thief) { event.displayname = Reference.ThiefName + event.username; } else if (property == Reference.Wizard) { event.displayname = Reference.WizardName + event.username; } } the property works fine for another things but in this case it crashes crash log :
  • Create New...

Important Information

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