Jump to content

Aspiring-Mod-Maker

Members
  • Posts

    9
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Aspiring-Mod-Maker's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. In 1.7.2 forge coding, I found the following function. MinecraftServer.getServer().getConfigurationManager().isPlayerOpped() However in trying to update my mod to 1.7.10, I've found that function no longer exists. I tried searching forge's changelogs to see if I could find that it had been renamed or replaced with something else, but I found nothing. I'm trying to use this as a check for one of my commands to see whether the player has the right to use this command to change settings based on whether they are opped or not (obviously). Does anyone know what I could use for this, or do I need to just start trying a bunch of the generic "func_###" until I hopefully find something that does what I'm looking for?
  2. I saw this somewhere once before, but I guess I did not bookmark it with all the rest of my tutorial links. Oops. I am adding a battery-like item to my mod, as a crafting material to make more complex items. I would also like to include extra recipes that support a few battery-like items from other mods to be useable as a replacement for my battery. I know the basic concept of how I have to check if the other mod is present to check if the recipe needs to be active or not, but I do not remember any of the specific methods/functions to use in my code. Also, by chance, does anyone know the coded item names of IC2's RE Battery and/or Galacticraft 2's Battery? These are the items I want to add recipe support for in case you couldn't guess.
  3. You're right, it wasn't hard. I just didn't have that little bit of needed information in my memory bank. It works perfectly now. Thank you so much for your help!
  4. I see. Back to square one. In that sense, it's really no different than using the LivingDeathEvent to check if the item is present and removing it form their inventory at that point. Using either LivingDeathEvent or PlayerDropsEvent, I still have to use PlayerRespawnEvent to give the item back. So now we return to the issue where coolboy4531 suggested I use the player LoggedIn/Out events to (I assume) save the soulbound item data in case the player logs off instead of respawning.
  5. /facepalm/ I forgot to preface my method with "@SubscribeEvent". No wonder I couldn't get it to do anything. Okay, yes, removing the item from the list prevents it from dropping, but it doesn't keep it in the player's inventory. The item is just deleted. I tried adding the item back into the inventory after removing it from the drops list, and now I can see it in the inventory hotbar when the player is dead and the respawn menu is up while all the other items have been dropped to the ground, but once I respawn, the item is gone again. And it still didn't drop.
  6. coolboy4531, I feel like I'm supposed to use the loggedIn/Out events to save the data about the soulbound item to the server while the player is away, but I'm at a loss when trying to figure out how to do it. Or did you mean for me to use those methods to do something else? diesieben07, I can't seem to do anything successful with that event. The annotation I found on it says I can cancel it to stop all drops from entering the world, but I only want to prevent the soulbound items from dropping. Upon further review, using "System.out.println()" I can see, this event isn't even being called when a player dies.
  7. Okay, I tried using LivingDeathEvent to check if the player had the item upon death and remove it from their inventory and using then PlayerRespawnEvent to give the item back to the player. This does seem to work, but I accidentally noticed if the player dies and doesn't respawn but exits instead, then when they return to the world and respawn, they don't get the item given to them.
  8. I'm working on a mod and have been stuck the past few days searching for a simple way to make one of my items soulbound such that if a player dies it stays in their inventory instead of being dropped. Does anyone have a good tutorial they could point me to, or a good set of ideas I can use to get this done?
×
×
  • Create New...

Important Information

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