Jump to content

Blue_Atlas

Members
  • Posts

    132
  • Joined

  • Last visited

Everything posted by Blue_Atlas

  1. Could this be your problem?
  2. so here is my EventHandler package com.atlas.experimentmod.util.handlers; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraftforge.event.entity.EntityJoinWorldEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerLoggedInEvent; public class EventHandler { @SubscribeEvent public void onPlayerJoin(PlayerLoggedInEvent event) { if (!event.player.world.isRemote) { event.player.inventory.addItemStackToInventory(new ItemStack(Items.STICK)); } } } it doesnt work. could you tell me what is wrong? and how to make it right?
  3. still dont get it. how do i register/use my event handler? do i use a function in my main class? if so what function and where? is it just loaded as long as it is in my package? i cant find anything in the docs saying exactly how to do it
  4. Yeah but how do I register it? Do I use the @Mod.EventSubscriber?
  5. ok? so is it just a class in my handlers folder?
  6. ive edited my last reply to say what i meant
  7. could you maybe show me some example code for adding the item? where do i cal my RegistryHandler class and how do i call it? i assume its called in my main class but i dont know where
  8. i dont have one of those yet. where should i put that class when i make it? also is that where i put the enchanting or do i just put the inventory adding?
  9. Ok let me clarify: Where do I put the code for enchanting the items, How do I use the code for putting items in a player's inventory first time they enter the world, And where do I put the code for adding items to player inventory on first time spawning. that is what I am asking.
  10. Okay but where do I put this code? In the class where I register items?
  11. okay? still don't quite understand. is there any code you could show me that does this?
  12. have you tried looking at his github and maybe pasting some of the code to see what is wrong?
  13. where do i put the ItemStack#addEnchantment and EntityPlayer#addItemStackToInventory? also what do i replace the # with?
  14. First thing here is that 1.7.10 is not supported on these forums.
  15. I want it to happen the first time they join the world
  16. How would I enchant and add my custom armor and tool sets to a player's inventory on spawn?
  17. What are you even trying to do?
  18. Thank you for the info
  19. 1. What is a bump? 2. How do I close a topic/Mark it as solved?
  20. figured it out thanks for the help here is my json now: { "type": "minecraft:crafting_shapeless", "ingredients": [ { "item": "minecraft:stone_sword" }, { "item": "minecraft:flint" } ], "result": { "item": "minecraft:stone_sword", "nbt": { "ench": [ { "id": 16, "lvl": 1 } ] }, "count": 1 } }
  21. And how would I do that? I know how to do array lists i just don't known how to do them in jsons or where to put them in the json
×
×
  • Create New...

Important Information

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