Everything posted by Draco18s
-
[1.7.10] Custom Gui for custom crafting table.
You open the vanilla GUI, which checks to see if the player is using a vanilla workbench, and immediately closes the gui if they are not. You need to open your custom GUI using a GuiHandler and player.openGui(...) which includes passing your mod ID.
-
[SOLVED][1.9] Changing Forge/Minecraft Code I.E. Base Modding?
What you want is a coremod that operates via ASM. ASM is a very deep, dark abyss and you will get minimal help figuring out how to make a coremod. Primarily because: 1) You should not be modifying base classes at all ever, doing so can very easily introduce mod conflicts. 2) ASM requires understanding Java bytecode, you will need to know this before you can start, at all. 3) Providing resources on how to coremod will cause more people to go "yay, I can modify base classes!" when they didn't need to. Given that you are interested in doing this on 1.9, I suggest actually supplying a patch back to Forge as a Pull Request that inserts an event hook where you want it, that way you don't have to modify vanilla classes.
-
I can`t find any sources on making name tags above blocks? [1.7.10]
https://github.com/Draco18s/Artifacts/blob/master/main/java/com/draco18s/artifacts/client/PedestalRenderer.java#L57-L106
-
MC 1.7.10 Custom walls connecting
And then doesn't give a shit what the actual value of the metadata was, because it performed the same check on all of them: meta == i It doesn't matter what value meta was from the world (because it can only be 0 to 15), at some point during that loop that check will be true. Following that, because you are doing return true in the block-check, as soon as it determines that yes, one of these blocks is what we're looking for it never even fucking checks your loop.
-
[1.9] NBT change resetting block break
Rather than incrementing a counter every tick, store the start time and compare with the current time.
-
[1.9] Updating Mod from 1.6 to 1.9 [Unsolved]
Also, pretty sure that statement will never return false. //somewhere... stack new ItemStack(yourItem); //somewhere else... stack.getItem().getContainerItem(stack)
-
[1.8.9] [SOLVED] PlayerTickEvent not applying damage when it should
Or you can compare the player's lastPos values with its pos values and see if they have changed.
-
[1.9] RightClickBlock firing twice
http://www.minecraftforge.net/forum/index.php?topic=22764.0
-
[1.7.10][solved] spawnEntityInWorld producing unresponsive mobs
Do note that in order to add AI tasks, you need to wait until after the entity has spawned in the world. EntityLivingBase#tasks is null until then.
-
[1.8.9] Custom sign help!
...look at TileEntitySign and see how it does it?
-
How Does Forge Reflection Work?
You need to look at ClassLoaders. ClassLoaders are objects that load other classes when needed. This means that you can write a custom class loader that fetches a class, examines it, makes changes (if it wants), and then passes it off to the JVM.
-
[1.8.9] [SOLVED] Different textures for items depending on damage (not metadata)
Just to nitpick: Damage is metadata >..>
-
What is ClientTickEvent doing?
- [1.8] Stop block sound when destroyed
How long is the sound file (in seconds)? Option a: make it shorter. Option b: make it a sound like the jukebox or minecart, which can be canceled.- [1.9] I need Help With This New Item Stuff.
Hesus Christie. Put the setRegistryName chunk with the same chunk that does the unlocalized name and max stack size. Or better yet, put all of that into the constructors for those classes, the whole "method returns itself" pattern is dumb IMO.- [1.7.10] [Solved] Connected textures not working
if(block == otherBlock) ..?- [1.7.10] Crash when testing server in Eclipse
Good job not knowing how proxies work.- An ItemStack of cake
And some are weirdly related, like seeds. Seeds are absolutely not the item form of a block, yet when used they create a block, when that block is middle-clicked, you get a seed, and when the block is broken, you get the seed (usually!) But you can also get seeds from breaking tall grass (which has its own itemblock!)- [1.7.10] [Solved] Connected textures not working
.getUnlocalizedName() == this.getUnlocalizedName(); Hesus Christie! You have no idea what you're doing, do you.- [Solved] Adding custom crops to minecraft 1.8.9
You initialize Items before Blocks, but pass a Block (which is null) to your Item's constructor.- [1.7.10] Default Stone Slab gets put in Hotbar instead of custom Slab
Override createStackedBlock for your Block class.- What is ClientTickEvent doing?
No need for a tick event here, Potion class has isReady and performEffect methods which will be called. I meant the visual display next to your inventory where it contains a timer (the "duration"), not the effect.- [1.9] Custom sounds - Not sure how to specify the location
world.playSoundEffect(...) ? Also, have you even looked at how the Jukebox works?- [1.8.9] Sending a tileentity (with IInventory) through a packet
Integers are a fixed size. byteBuffer.writeInt(value)- What is ClientTickEvent doing?
It's a client-side tick notification, it can be used to keep things like potion durations updating correctly without having to wait for an update packet from the server, keeps the sun/moon/stars sliding smoothly across the heavens, etc. You'll notice during periods of extreme lag that these values keep updating even though they're wrong and will "snap" back to the correct value when an update packet from the server does finally arrive (yes, even single player!). Or at least, that's what vanilla does in between Phase.START and Phase.END, what a mod does with it is up to the mod, but that gives you an idea of the kinds of things that occur. - [1.8] Stop block sound when destroyed
IPS spam blocked by CleanTalk.
Important Information
By using this site, you agree to our Terms of Use.