Everything posted by Draco18s
-
Creating JAR-Mods for MC-Versions without MCP
Forge itself is built on Magic. Installation is a package that contains patch files (these are essentially text documents that tell the program how to identify parts of the original code and then what to change). This is done after deobfuscating the original source into something more functional (also called SRG names). How this is done, I don't actually know, but this is how Forge can distribute the changes it makes to vanilla code without requiring the user to do anything other than "download and run this program" and without distributing any of Mojang's code. SRG -> MCP is done at runtime. Runtime stuff is largely based around Class Loaders which are a kind of class that tells the JVM how to load other classes. If you are not familiar with any of these concepts, stop now. Mostly because folks here aren't going to teach you these things, one because its not our job, and two, because these kinds of things are dangerous.
-
Creating JAR-Mods for MC-Versions without MCP
By not doing it. Seriously, you asked on the Forge forums how to mod without using Forge?
-
I am unable to send PMs because my inbox is full
@diesieben07 I went to send you a message to add an item to the "common problems list" (trying to reference Items in block constructors) and I was unable to send a new message because my "inbox is full, delete some messages then try again." I have reduced my PM count from over 180 down to 36 and I still cannot send messages. I attempted to contact Invsion Power Services about this problem, but apparently only the forum owner (the person who actually paid to use this software) can submit bug reports (what a load of crock). I assume that is Lex, but I have no idea, and can't ask him because my inbox is full.
-
Custom armor textures for item
Yes, I had. If I misread something as well, I apologize.
-
Custom armor textures for item
No, no I did not. This thread was about textures for the different slots, I said "I don't think I can do that" you said "I found a way." I asked how and you said "see, extends ItemArrow."
-
Custom armor textures for item
Item vs. ItemArrow. That has nothing to do with the texture. private void checkEquipSlots(int slotIndex) { if (((EntityPlayer) entityIn).inventory.armorItemInSlot(slotIndex).getItem() instanceof ItemArrow) { ItemStack newStack = ((EntityPlayer) entityIn).inventory.armorItemInSlot(slotIndex); // Set it to normal Quiver if it has no tag, or arrow tag, or arrow <= 0 if (newStack.hasTagCompound()) { NBTTagCompound nbt = newStack.getTagCompound(); if (nbt.hasKey("Arrows")) { if (nbt.getInteger("Arrows") <= 0) { ((EntityPlayer) entityIn).inventory.armorInventory.set(slotIndex, new ItemStack(ItemInit.QUIVER)); return; } } else { ((EntityPlayer) entityIn).inventory.armorInventory.set(slotIndex, new ItemStack(ItemInit.QUIVER)); return; } } else { ((EntityPlayer) entityIn).inventory.armorInventory.set(slotIndex, new ItemStack(ItemInit.QUIVER)); return; } } } Then the chunk under // armor slot 2(chest) check gets replaced with checkEquipSlots(2) and // slot 1(legs) gets replaced with checkEquipSlots(1). Now you have no duplicate code.
-
Custom armor textures for item
The only thing I see you doing is changing from one item to another based on whether or not there are arrows (or not). Your code for CHEST and LEGS are exactly the same except for a 1 or a 2 (the slot number) and could be replaced with a function call containing said slot number.
-
Custom armor textures for item
I didn't say "you can't do that" I said "I don't think you can." As in, I do not know of a way to make the texture dependent on which slot it is in: that information is not available to the Item or ItemStack classes. But sure, if you've accomplished it, good job. I'd be interested to know how.
-
Custom armor textures for item
I don't think you can do that.
-
Make item not wearable on offhand
Such as...? Post them.
-
[1.12] Chest with separate Inventories
It's....simulating the insert. If true, the item will not actually be inserted, but the return value will be the same as if it had. It's the "does this fit?" check.
-
[1.12] "Vanilla model can't have non-vanilla parent"
This is disgusting. Do this instead: new ModelResourceLocation(parBlock.getRegistryName(), "inventory")
-
[1.12] "Vanilla model can't have non-vanilla parent"
Block models are loaded automagically.
-
[1.12] "Vanilla model can't have non-vanilla parent"
I presume it's due to lines like these: https://github.com/IceMetalPunk/Placeables/blob/glowstone-placeable/src/main/resources/assets/placeables/models/block/block_glowstone_dust_side0.json#L2 But as to why that error or how to fix it? I have no idea.
-
Compatibility and missing API documentation
ITextComponent (or one of its subclasses, such as TextComponentString) are what you're looking for.
-
Forge [1.11.2] Gradlew build fails on compileJava
Bingo, there we go. Pretty sure you still need to specify that in your build.gradle file, because it's not inside src/main
-
onItemLeftClick?
Uh... This is where that comment goes. The event itself apparently exists in common code (net.minecraftforge.fml.common.gameevent.InputEvent.KeyInputEvent) but it's only FIRED on the client.
-
onItemLeftClick?
What are you front to accomplish? That is, what should happen from the user's perspective, nor how are you trying to code it?
-
[1.12] Copy NBT on crafting
For recipes, there's no reason to reimplement something complicated like reading an item stack, vanilla did that already. Custom achievements though...99% copy-paste for the whole class. You literally go in, modify what data it is that needs to be deserialized and checked against (if any!) and then just fix all the red that shows up until it is gone. You modify like 12 lines total.
-
onUpdate() get player methods
if (entityIn instanceof EntityPlayer)
-
[1.12] Copy NBT on crafting
Those helpers really aren't that hard to understand. Every recipe factory I've created I've done by going "here's a vanilla/forge recipe that's really close to what I want...COPY....PASTE!"
-
Food Item with changing hunger values
Are you using a packet to send the slider value from the GUI back to the server?
-
Centering Sounds to ViewEntity not the player
Nope, just in understanding the problem.
-
Loading a mod midgame
No, this would not be possible.
-
Forge [1.11.2] Gradlew build fails on compileJava
Are you using an API that is external?
IPS spam blocked by CleanTalk.