-
Posts
1830 -
Joined
-
Last visited
-
Days Won
12
Everything posted by DavidM
-
You are trying to load mods for 1.12.2 on Minecraft 1.13.2. This will not work, as mods are designed for specific version of Minecraft. Download the 1.13.2 version of the mods instead.
-
[1.12.2] Get the index of an inventory slot if it contains an item
DavidM replied to MisterGamer _'s topic in Modder Support
See my revised post: -
Don't put it in the IRecipe registry event; put it in something like the post init instead.
-
[1.12.2] Get the index of an inventory slot if it contains an item
DavidM replied to MisterGamer _'s topic in Modder Support
You cannot manipulate the player’s inventory on the client side. Send a packet to the server when the button is clicked and perform the inventory editing on the server. -
[1.12.2] Get the index of an inventory slot if it contains an item
DavidM replied to MisterGamer _'s topic in Modder Support
1. Define "doesn't work". 2. Post your code. -
Yes. Do something similar to that. (that was terribly explained, sorry) I meant you should do something logically similar: iterate through the list of recipes and remove the recipe if it matches certain criteria.
-
Thanks. I assume that means I cannot run client-only code in display name related method? I am wondering if I can use the client side "I18n" in Item#getItemStackDisplayName.
-
Is Item#getItemStackDisplayName, or display name related methods, client side only? My current guess is yes; however, I am rather uncertain due to the absence of @SideOnly annotations on such methods.
-
Sorry, 1.7.10 is no longer supported on this forum due to its age. Consider updating to a modern version of Minecraft to receive support.
-
Remove Fexcraft and try again. Also, where are you getting your mods?
-
This should be basic Java. If you do not know how to pass objects as parameters, then I'm afraid you are not ready to make a mod. Learn Java first.
-
It is possible to install different versions of forge. You can delete a version of forge by going to the version folder in your Minecraft path and delete the corresponding version.
-
Why do you need another class for the cool down? Just store the cool down value in the NBTTag of the stack or something. Alternatively, you can get the meta from the stack and pass it to methods in the other class.
-
I'm not going to write your code for you, as you won't learn that way. If you want your repair gem to repair items while the gem is in the player's inventory, you will probably need to override Item#onUpdate, which is defined as: public void onUpdate(ItemStack stack, World world, Entity entity, int itemSlot, boolean isSelected) See the ItemStack in the parameter? You should use that stack instead of creating a new one, so you should call stack.getMetaData() on that ItemStack.
-
Yes basically (I posted the wrong method). Don't obtain the ItemStack in such a way though; use the one that is passed in.
-
1. Use Item#getMetadata Stack#getMetadata and pass in the ItemStack you want to check. 2. Your else ifs are rather messy and unnecessary. Use math to generalize the relationship between tiers and cool downs. 3. If you are talking about this: https://minecraft.curseforge.com/projects/repair-gem, then I am making it baubles compatible (I almost forgot about that mod...).
-
I wouldn't recommend doing that. The admin kicks the player for a reason, and the player should reflect on what he did wrong before rejoining the server. Auto-rejoining might potentially result in a ban.
-
[1.12.2] Get the index of an inventory slot if it contains an item
DavidM replied to MisterGamer _'s topic in Modder Support
Iterate through player.inventory and record the index when the ItemStack is what you want. Hint (pseudocode) : EDIT: Just realized that this is already solved... -
[1.12.2] NPC/ Custom Entity Resource collection
DavidM replied to DarkLord2101's topic in Modder Support
What you are asking to do is very specific, thus I doubt there will be any tutorials out there. However, mods like MeeCreep do have entities that chop trees; I would suggest checking out its source: https://github.com/McJtyMods/MeeCreeps. -
Please elaborate. No.. Create a server, and players who can reach the server can join it.
-
This indicates that you are not so familiar with how methods and methods signatures work in Java. I would recommend to look up tutorials or explanations on method signatures and overriding in Java.
-
I thought your main problem was fixed... If you want to implement the behavior on a custom item, just override Item#onItemUse.
-
In this case you should just map each color to a block; there is no need for strings. Something like Map<Color, Block> should suffice.
-
Sorry, but your clarification is slightly ambiguous. What do you mean by "spawn an image"?