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.

ZTagre

Members
  • Joined

  • Last visited

Everything posted by ZTagre

  1. Hey folks! I am currently working on a "concept" item, and I need just a little help with one aspect of it. Here's what I'm doing in a "nutshell": I've created a "magic staff", which has custom, "insertable" charge-orbs; each orb gives the staff a single "magical use", before the ORB ONLY is destroyed. You craft the staff from three pieces, and then each orb has its own recipe as well. Now, for example, one of the ORB CHARGES makes the staff a "teleportation staff" when it's INSERTED into it (added to it using the crafting table, pretty basic...). When the teleportation staff as such is [shift]-right-clicked, I store the location of the block that the staff was pointing to in the staff's NBT compound. This is the location later used to teleport the player. Pretty straight-forward, so far... Now, I want to be able to REMOVE the ORB from the staff (also in the crafting table) once it has been "charged", for storage, and later use (by once again re-inserting it into the staff...). BUT, I need to somehow "copy" the NBT data from the complete teleportation staff to the "charged" teleporation ORB because it will of course be a new, seperate item (got me?). Thus, the ORB, while seperated from the staff, still contains the selected location for the teleport. When the ORB is later re-attached (re-inserted) into the magic staff, the staff once again becomes a "teleporation" staff, and the NBT data saved within the ORB now once again gets copied to the teleporation staff's NBT compound. So, what I need to do (sorry if this was long-winded) is somehow "intercept" the crafting table "handler", and a) Check if the contents of the crafting grid is a teleporation staff, and then b) if it is, then c) reate the ORB, with the staffs NBT data "copied" to it as the crafting result, whilst leaving the "normal", empty staff in the crafting grid. As a secondary stage, I will also need to be able to re-attach the "charged" ORB to the normal staff, with the resulting teleporation staff having the NBT data from the charged orb. But, to do any of this, I must somehow "intercept" the crafting table code, and I have looked long and hard at all of the vanilla code which pertains to crafting in any way. I know that , in later versions of Minecraft (later than 1.8, that is) there is something called ICraftingHandler, which would probably make this a lot easier; sadly, I don't think this will actually be that simple (but I could be wrong!). ANY pointers on how to begin here will be much appreciated. With every passing day, with the help of various tutorials, reading the vanilla source, and with help from you folks, I am getting better at this. Soon, I hope to be able to help someone who is much like me today! Thanks in advance, ZTagre.
  2. Thanks for the link, lars! I did actually read a lot of the Forge docs at that site, when I was first researching BlockStates...; somehow, I simply "missed" the OreDictionary! I am going to read it ALL now... Much appreciated!
  3. Thanks, Diesieben07! That's got it. Where can I find out more about the OreDictionary, because it looks incredibly interesting, as well as useful! I mean, I really don't know how I would have ever figured this one out. Got any good links? Something relevant, but also that pertains to MC 1.8 as well (ie. not too recent)?
  4. Hello; I am relatively new to modding MC, and have been quickly picking up skills in modding 1.8 w/Forge. Now I have run into a "snag", and I'm sure many (most?) of you have seen this problem before... I want to implement "recycling" of my (relatively "expensive") custom tools and armor in my mod, and I thought I could easily implement this using crafting recipes in the vanilla crafting table. For any tool or armor item (my mods ONLY), I would also require that one other item from my mod be present in the shapeless recipe as well (a specific GEM item, for example...). Now, I have this working well in 1.8, for any BRAND-NEW tool or armor item (ie one not yet damaged through use). But, whenever the item has been even the slightest bit damaged, that same item no longer works! I am aware that, previously, you would use an ItemStack with a condition value of -1, and this would work: new ItemStack(myModItem.SpecialSword, 1, -1) instead of just the item itself. So, for example: GameRegistry.addShapelessRecipe(new ItemStack(myModItem.specialIngot, myModItem.customGem, new ItemStack(myModItem.SpecialSword, 1, -1)); would give me an ingot back from the recycling of my mods custom sword. But this does not seem to work when the sword has taken even the slightest bit of damage! Is there any way to make a custom sword, in any condition, act as the "same sword" in a crafting recipe?

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.