Everything posted by ItzPray
-
Force client to know whats in a chest
Thank you I got it to work
-
Custom GUI png is way bigger in game
Thanks for your response but I fixed the problem.
-
Force client to know whats in a chest
I have a custom block and it has one itemSlot in it and I need to force the client to know what item is inside of it before they open it. Is there a way to get this information from the client even if they have never opened the block?
-
Custom GUI png is way bigger in game
Both of the pictures that are put on the gui are the same size 256x256 yet my GUI is way bigger than normal. If anyone could help me with this that would be very helpful. My GUI GUI that works.
-
How to add 2D Icons to a block dynamically
I have a block that will hold an item in it and I want to grab the Icon of that Item that is inside my BlockEntity and apply to the front of the block so there is Icon of the item on the inside that is visible on the 3D block. Is this possible?
-
How to get the name of an Item that an Anvil changed it to.
Ok, thanks for the response
-
How to get the name of an Item that an Anvil changed it to.
Thank you i figured out a system to get this event to work. I have another question if you dont mind is it possible to pop up this menu manually instead of having a player open up an anvil and type in a value so they can just have a anvil gui pop up and they can just type in the value?
-
How to get the name of an Item that an Anvil changed it to.
Im trying to get the name of a paper item after its name was changed in an anvil. Although using ItemStack.getDisplayName(); or ItemStack.getHoverName(); does not return this. I also tried looking at Item but i cant find any way to get the Items Name. Is there any way to get the name I want from the ItemStack?
-
How to store data into Data entities
Yes I am trying to set the data in my BlockEntity. I am trying to store the players UUID in my block Entity on place. Is it just as simple as setting a variable in that block entity to the players uuid or is there more too it? If you could show an example i would love that.
-
How to store data into Data entities
I looked at it for a while and I tried to implement it but it cant figure out how to get it to work. Is there anyway you can give me an example of how I can do this with Capabilities? It would be greatly appreciated.
-
How to store data into Data entities
I am trying to store the player that placed down the block as soon as it gets placed down so whenever a player interacts with the block it will check if that player is the owner or not. Is there anyway to add data to the Block Entity and have it saved in that block to be checked whenever anyone interacts with it?
-
Help with @ObjectHolder
Since I am spawning in an item from a mod which is a gun. Is there a way to make an exact copy of that item? Im asking this because when the rifle spawns in the shoot sound is a button clicking and it spawns with no ammo and can shoot infinitely. FIXED
-
Help with @ObjectHolder
Thank you this fixed the error 😀
-
Help with @ObjectHolder
I am trying to use @ObjectHolder to make an Item variable that holds the information of an Item from another mod. How would I use the Mods ID and the item name to make that work? Heres what i am trying right now, I have never used this before so I am having trouble. If anyone could help it would be greatly apreciated @ObjectHolder(registryName = "Item", value = "cgm:rifle") public static final Item RIFLE = null;
-
Removing Items from player Server Sided
Nevermind I fixed it, it was because I was grabbing the Inventory from the client side and using it on the server side which was still deleting the item on client side even though it was running on server side.
-
Removing Items from player Server Sided
I am trying to remove items from the player on the server side. Even though I am removing the Item from the player when I am on the server there are still ghost items in the players inventory. The only way for it to actually update the removed items on the server is for the player to move the item into a new slot in their inventory. I am using the method Inventory.removeItem(ItemStack) and I am also using Inventory.removeItem(SlotID, RemoveAmount). This is being done by the client sending a packet to the server and then on the server I call those methods to remove the item but that does not work. If someone could help me on this topic that would be greatly appreciated .
-
Spawning Item in world
Yah i am sorry for asking so many questions. If you dont mind can you send the wiki link so I can look at it? Nvm I didnt see the link above sorry
-
Spawning Item in world
Also when giving the ItemStack to the player it always gives 2 times the amount that is in the ItemStack. Any idea why?
-
Spawning Item in world
Thank you for the reply, can you explain how can i make a ItemStack with the modded item ID from another mod?
-
Spawning Item in world
Also i would really love to know where I can go to get updated documentation on forge 1.19
-
Spawning Item in world
Hi, thanks for your response again. I am new to java and I was wondering if it would just be easier to use the /give command to give the player an item. I am going to be using this for modded items from another mod so I think this would be easier but I dont know how to call the giveItem function to make that happen. If you could help me out again that would be very nice of you.
-
Spawning Item in world
This is what im trying right now which is not working. I am brand new to minecraft development so dont be too hard on me I also tried ItemEntity with no luck
-
Spawning Item in world
Thanks for the reply but I am having the biggest issue where I just need an example of how to actually make an ItemStack() and then can you also provide an example of how Entity.spawnAtLocation() is used?
-
Spawning Item in world
I am trying to spawn in an item when a block is interacted with but I can't find any documentation on how to do this. If someone can please show me an example of how to do this or send me in the right area to the documentation it will be greatly appreciated .
IPS spam blocked by CleanTalk.