Everything posted by Draco18s
-
[1.11.2] Registering blocks
You never create (and register) an item version of your block.
-
Check if player is able to craft item which has multiple possible inputs
I'm not sure what your use-case is, still. Like, why are you checking every item in the player's inventory to see if that results in a valid craft? What's the point? I don't see any reason why the player would ever use an item that "automatically crafts everything in their inventory into whatever it can."
-
Check if player is able to craft item which has multiple possible inputs
Are you trying to fill actual grid slots, or are you just checking to see if the player can craft a given item? (Also, don't forget you can split stacks: that bread in your example could actually fill both slots!)
-
Check if player is able to craft item which has multiple possible inputs
You're probably better off doing this the other way around: Loop over the recipes list and see if the player has the required items.
-
[1.10.2] solved add enchant-able item?
I'm at a loss. Put a breakpoint on line 327 of ContainerEnchantment (net.minecraft.inventory) just before it calls EnchantmentHelper.buildEnchantmentList(...) and stick your item in and trace the code to see what it does and why it doesn't call canApply for your item.
-
[1.10.2] solved add enchant-able item?
Have you overriden getItemEnchantability in your Item? The base value is 0, which means not enchantable.
-
[1.10.2] solved add enchant-able item?
Try overriding canApplyAtEnchantingTable in your enchantment too.
-
[1.10.2] solved add enchant-able item?
I think that's supposed to be Enchantment#canApplyAtEnchantingTable Edit: return stack.getItem() == ItemList.ENCHANT_CRAFTING_ITEM ? true:false; There is no reason to do this. You can simply do this: return stack.getItem() == ItemList.ENCHANT_CRAFTING_ITEM; Second, make your max enchantibility a larger number. As is, you've said "this is only valid at exactly 3 levels." Too high and it'll get skipped.
-
LivingDeathEvent not firing
Does the death event actually fire client-side? (for non-this-client-player entities, that is) I'm not sure it does.
-
LivingDeathEvent not firing
Well, yes. The dedicated server has no idea what a JFrame is.
-
LivingDeathEvent not firing
MinecraftForge.EVENT_BUS.register(new EventKill(frame)); Hmm, what's this frame object, looking up... JFrame frame; Oh, it's null. Got it.
-
Newbe Texture Troubles
Why have you uploaded the compiled class files in raw format rather than using any text pasting service like PasteBin or Gist?
-
Cross-mod compatitility
And the ore dictionary for recipes.
-
What kind of value is this?
That is a pointer to an array of floats. You need to cast it to the object type returned by inventoryHandsDropChances that you can see in the code (either float[] or List<float>, I'm not looking at it right now), then you can use it.
-
Eclipse Debug Mode
.....er, sorry, I misread something twice. Not all awake. Ignore that.
-
Eclipse Debug Mode
Compiling outputs multiple files (on obfuscated, one non), are you sure you grabbed the right one?
-
[1.11.2] Localize potion effects
Note that localization only works on the client side. You cannot translate on the server.
-
[1.11.2][Solved] No TE special renderer for tessellating
If the data your TE is storing can fit within 4 bits, then absolutely you can compress that into metadata. You'll be having to create a BlockState for it anyway.
-
Confusing Error while modding enum sided block
Read your god damn crash report. Caused by: com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Unterminated object at line 5 column 4
-
Send data to server
EntityJoinedWorldEvent is probably the best
-
[1.10.2] Creative Tab Crash
Just because they're not null when you open up a save game and toss them around doesn't mean they aren't null when you initialize your creative tab. Item myItem; Tab myTab; preInit() { myTab = new Tab(myItem); myItem = new Item(); } In the above (heavily simplified) code, myTab is initialized with a null item. Why because it hasn't been created yet even though the item itself exists later and you can pick it up and toss it, the tab's item is still null.
-
Inventory doesnt update on addItemStackToInventory()
Where are you running your code? Client or server?
-
How to get a position directly in front of the player?
So. This is what vectors are for. The player has a vector that is their "front" called "LookVec" (Search the EntityPlayer class). Take that vector, multiply by 0.5 (or 0.2 or whatever), add their current position, and voila. You have the spot a half-block in front of them.
-
How to make a block disapear when it is no longer near a torch
Look at how leaves work.
-
[Solved] Define inventory model in blockstates file
That is both the only way AND the correct solution, as you have discovered.
IPS spam blocked by CleanTalk.