Everything posted by Jay Avery
-
Having a tough time creating a crafting mechanic
Ah, I've just noticed here: stackHandlerCapability.insertItem(occupiedSlots++, burningItems.get(i).getEntityItem(), true); The boolean argument in IItemHandler#insertItem is simulate. When it's set to true, the stack isn't actually added.
-
[Forge 1.10.2] Create a pickaxe that break unbreakable blocks?
It's a list of ItemStacks. If you want to get an ItemStack from it, you pick an index and take it from the list. This is again pretty fundamental Java stuff. You mean it doesn't reach the breakpoint? That shows that the code isn't being run at all. Where do you register your event handler?
-
[1.11.2] Axe attack speed and damage weird
This is the issue to focus on, because that constructor should work fine. Can you post the full log of this error?
-
Having a tough time creating a crafting mechanic
Now you're getting the tag and then not doing anything with it. You need to pass the tag to ItemStackHandler#deserializeNBT.
-
Having a tough time creating a crafting mechanic
Your read and write NBT methods aren't inverses. You write stackHandler to a tag compound of its own with the key "burnedItems", but then try to read it from the compound itself instead of getting the tag by the same key.
-
[Forge 1.10.2] Create a pickaxe that break unbreakable blocks?
https://www.jetbrains.com/help/idea/2017.1/creating-line-breakpoints.html
-
IProperties for texture changes 1.10
Where do you call your ModBlocks#init and ModBlocks#registerRenders methods? You need to create an ItemBlock from your block, and register that too. You should use block#getRegistryName instead of block.getUnlocalizedName().substring(5) - the registry name also contains the modid by default so don't provide that as a separate argument.
-
Porting the mod with 1.6.4 on 1.7.10
1.7.10 isn't supported on this forum anymore, your thread will be closed by a mod.
-
Very New to mc modding, want to create a very basic mod.
The Forge docs have a summary of how to get started and structure things. https://mcforge.readthedocs.io/en/latest/gettingstarted/
-
IProperties for texture changes 1.10
Is this the exact name and location of your model file?
-
IProperties for texture changes 1.10
Post the console log, model file(s), and a screenshot of your assets folder structure.
-
IProperties for texture changes 1.10
What version are you using? In 1.11+ all asset names (models, textures) must be entirely lower case. If that doesn't solve the problem, post the entire console output too. (Also please use the code tags - <> icon - to make code blocks easier to read)
-
How delay something
What is the context? When and how do you want this to happen, in gameplay terms (not code terms)?
-
[Forge 1.10.2] Create a pickaxe that break unbreakable blocks?
https://www.jetbrains.com/help/idea/2017.1/debugging.html
-
[Forge 1.10.2] Create a pickaxe that break unbreakable blocks?
Ignoring the mess of the code to spawn drops, there is no reason this line shouldn't be doing what you want. Step through the code with the debugger or use print statements to see whether the code is reaching this point and acting on the block you expect it to, to find out where it goes wrong.
-
My server crashes everytime i boot it up [Solved]
1.7.10 is no longer supported by Forge, your thread will be closed. You're also in the wrong forum, this is modder support for people who are making mods, not using them.
-
Why are item textures not displaying?
You need to put them in an EventHandler method with FMLPreInitializationEvent as a parameter, instead of one with FMLInitializationEvent as they are now.
-
[Forge 1.10.2] Create a pickaxe that break unbreakable blocks?
Does it break ordinary breakable blocks? Does the game crash? Does the event get called?
-
[Forge 1.10.2] Create a pickaxe that break unbreakable blocks?
You're still doing this pointless check. And now you do nothing with the drop variable after you create it anyway. When you say the code doesn't work, please be more specific. Exactly what does and doesn't happen, and what are you expecting to happen? At this point I've lost track of the problem.
-
[Forge 1.10.2] Ticking player crash?
I can't tell exactly what that crash means, but it's most likely another form of the same problem - something to do with bad slot indexes getting noticed when being written to NBT. Why did you change those slot indexes? I'd still recommend stepping through the container construction with the debugger and carefully watch the slots being added to see if they are indexed as you expect.
-
[Forge 1.10.2] Ticking player crash?
Can you post the entire log? (code tags and a spoiler will make it easier to read too)
-
[Forge 1.10.2] Ticking player crash?
Okay, what is the console log now?
-
[Forge 1.10.2] Ticking player crash?
And that change alone has resulted in your GUI not opening?
-
[Forge 1.10.2] Create a pickaxe that break unbreakable blocks?
Now you are comparing a List<ItemStack> to an ItemStack, so the result will always be false. Why are you making this comparison anyway? What result are you actually trying to get? You still keep using ==, which only checks for the exact same object, rather than for meaningfully equivalent objects. Two different ItemStacks made of the same Item and stacksize will not be equal with the == operator. How could drop possibly be null here after you have set it to a new ArrayList? (Hint: it couldn't). You seem to be having trouble with some fairly fundamental Java/OOP concepts, you might be better off learning some general programming first.
-
[Forge 1.10.2] Ticking player crash?
What have you changed?
IPS spam blocked by CleanTalk.