Everything posted by DavidM
-
[1.12.2 ] Approaches to create many items of one kind but with different nbt data by using one instance of that item class
If I understood correctly, you can try looking up and overriding Block#getSubBlocks and Item#getSubItem. Make sure you set Item#setHasSubtypes and Block#setHasSubtypes to true though.
-
"___ not a valid mod file"
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
See my revised post:
-
Removing Vanilla Stuff???
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
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
1. Define "doesn't work". 2. Post your code.
-
Removing Vanilla Stuff???
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.
-
[1.12.2] Side of Item#getItemStackDisplayName
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.
-
[1.12.2] Side of 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.
-
Aether 2 Crash's
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.
-
Loading Crash
Remove Fexcraft and try again. Also, where are you getting your mods?
-
Get item metadata of an item
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.
-
Can't run two versions of Forge?
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.
-
Get item metadata of an item
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.
-
Get item metadata of an item
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.
-
Get item metadata of an item
Yes basically (I posted the wrong method). Don't obtain the ItemStack in such a way though; use the one that is passed in.
-
Get item metadata of an item
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...).
-
How to get player to join server
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
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
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.
-
How to get player to join server
Please elaborate. No.. Create a server, and players who can reach the server can join it.
-
OnBlockActivated is not working
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.
-
Perform code on Item right click
I thought your main problem was fixed... If you want to implement the behavior on a custom item, just override Item#onItemUse.
-
Perform code on Item right click
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.
-
Perform code on Item right click
Sorry, but your clarification is slightly ambiguous. What do you mean by "spawn an image"?
IPS spam blocked by CleanTalk.