Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Draco18s

Members
  • Joined

  • Last visited

Everything posted by Draco18s

  1. 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.
  2. By not doing it. Seriously, you asked on the Forge forums how to mod without using Forge?
  3. @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.
  4. Yes, I had. If I misread something as well, I apologize.
  5. 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."
  6. 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.
  7. 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.
  8. 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.
  9. I don't think you can do that.
  10. Such as...? Post them.
  11. 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.
  12. This is disgusting. Do this instead: new ModelResourceLocation(parBlock.getRegistryName(), "inventory")
  13. Block models are loaded automagically.
  14. 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.
  15. ITextComponent (or one of its subclasses, such as TextComponentString) are what you're looking for.
  16. Bingo, there we go. Pretty sure you still need to specify that in your build.gradle file, because it's not inside src/main
  17. 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.
  18. What are you front to accomplish? That is, what should happen from the user's perspective, nor how are you trying to code it?
  19. 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.
  20. if (entityIn instanceof EntityPlayer)
  21. 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!"
  22. Are you using a packet to send the slider value from the GUI back to the server?
  23. Nope, just in understanding the problem.
  24. No, this would not be possible.
  25. Are you using an API that is external?

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.