
Blue_Atlas
Members-
Posts
132 -
Joined
-
Last visited
Everything posted by Blue_Atlas
-
Could this be your problem?
-
[MainlySolved]Adding enchanted items to inventory on player spawn
Blue_Atlas replied to Blue_Atlas's topic in Modder Support
I know but where do I put that code? -
[MainlySolved]Adding enchanted items to inventory on player spawn
Blue_Atlas replied to Blue_Atlas's topic in Modder Support
and how would i do that? -
[MainlySolved]Adding enchanted items to inventory on player spawn
Blue_Atlas replied to Blue_Atlas's topic in Modder Support
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? -
[MainlySolved]Adding enchanted items to inventory on player spawn
Blue_Atlas replied to Blue_Atlas's topic in Modder Support
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 -
[MainlySolved]Adding enchanted items to inventory on player spawn
Blue_Atlas replied to Blue_Atlas's topic in Modder Support
Yeah but how do I register it? Do I use the @Mod.EventSubscriber? -
[MainlySolved]Adding enchanted items to inventory on player spawn
Blue_Atlas replied to Blue_Atlas's topic in Modder Support
ok? so is it just a class in my handlers folder? -
[MainlySolved]Adding enchanted items to inventory on player spawn
Blue_Atlas replied to Blue_Atlas's topic in Modder Support
ive edited my last reply to say what i meant -
[MainlySolved]Adding enchanted items to inventory on player spawn
Blue_Atlas replied to Blue_Atlas's topic in Modder Support
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 -
[MainlySolved]Adding enchanted items to inventory on player spawn
Blue_Atlas replied to Blue_Atlas's topic in Modder Support
ok -
[MainlySolved]Adding enchanted items to inventory on player spawn
Blue_Atlas replied to Blue_Atlas's topic in Modder Support
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? -
[MainlySolved]Adding enchanted items to inventory on player spawn
Blue_Atlas replied to Blue_Atlas's topic in Modder Support
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. -
[MainlySolved]Adding enchanted items to inventory on player spawn
Blue_Atlas replied to Blue_Atlas's topic in Modder Support
Okay but where do I put this code? In the class where I register items? -
[MainlySolved]Adding enchanted items to inventory on player spawn
Blue_Atlas replied to Blue_Atlas's topic in Modder Support
okay? still don't quite understand. is there any code you could show me that does this? -
have you tried looking at his github and maybe pasting some of the code to see what is wrong?
-
[MainlySolved]Adding enchanted items to inventory on player spawn
Blue_Atlas replied to Blue_Atlas's topic in Modder Support
where do i put the ItemStack#addEnchantment and EntityPlayer#addItemStackToInventory? also what do i replace the # with? -
First thing here is that 1.7.10 is not supported on these forums.
-
[MainlySolved]Adding enchanted items to inventory on player spawn
Blue_Atlas replied to Blue_Atlas's topic in Modder Support
I want it to happen the first time they join the world -
[MainlySolved]Adding enchanted items to inventory on player spawn
Blue_Atlas replied to Blue_Atlas's topic in Modder Support
bump -
What are you even trying to do?
-
Thank you for the info
-
1. What is a bump? 2. How do I close a topic/Mark it as solved?
-
[SOLVED]1.12.2 how do I make a recipe make a n enchanted item?
Blue_Atlas replied to Blue_Atlas's topic in Modder Support
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 } } -
[SOLVED]1.12.2 how do I make a recipe make a n enchanted item?
Blue_Atlas replied to Blue_Atlas's topic in Modder Support
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