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. Right, because the book itself is not enchanted, but rather it contains an enchantment (you can do both!)
  2. As an example... GameRegistry.addShapeedRecipe(new ItemStack(Items.cake), "mmm", "ses", "www", 'w', flour, 's', Items.sugar, 'e', Items.egg, 'm', Items.milk_bucket); varargs mean "and whatever other parameters were passed." varargs supports an infinite number of arguments. Edit: Sorry if this isn't 100% correct, my recipes right now all use the oredict.
  3. Fluid myFluid = new Fluid("myFuid"); myFluid.setViscosity(1000).setDensity(1000).setTemperature(295); ?
  4. Should be one more than you need to get started then, no?
  5. Also, public BlockFirestone(int par1, Material par2Material){ You can drop the "int par1" as you're not using it. That used to be the block ID, but as block IDs are no longer A Thing, you don't need it.
  6. It's an event. You need to register an event handler. It is not a method in any class.
  7. Might your crash be in any way related to this? Ok what he said worked and i launched MC but the block is not there. I checked my code and found that i had forgot to register the block so i put and it had an error, i checked quick fixes and it wanted to change it to make it this is causing my MC to crash again. Where I told you See above And then ?
  8. GL11 / LWJGL. http://www.lwjgl.org/
  9. Well this shouldn't even compile: @Override public Item getItemDropped(int metadata, Random random, int fortune) { return raze.Raze_carbondrop; } Because Raze_carbondrop is not of type Item. In fact, I'm not even sure it points to a class that exists ("com.raze.item.Raze_carbondrop" != "raze.Raze_carbondrop")
  10. Mostly this. There are a handful of functions that look like they're left click, but aren't. For example, the Block class has onBlockClicked, the Item class has hitEntity (which can only fire on a left-click) but there's no "swing wildly on click" function already built in.
  11. Well that was useless, post Raze_carbondrop and Mods_CarbonOre
  12. There's actually no reason to switch block IDs, you can do it with metadata.
  13. The last (four?) Forge src for 1.6.4 should use the Gradle system and still be usable. Farther back than that and you have to work really hard to download the secondary files, as the servers used changed.
  14. Also, don't store these in your Slot class (you'd be duplicating your efforts, if the TE also stores the same info). Make a static "RecipeManager" class that has a "getResult" method. Your slot class just needs to then go "hey, does this input have a non-null result?" for it's boolean check. Then your machine can use the same function to get its actual result.
  15. public void preInit(FMLPreInitializationEvent event) { Configuration config = new Configuration(event.getSuggestedConfigurationFile()); } ?
  16. Good point. Again, it was just what I'd yoinked from the recipe manager. My mod, while I will likely release it, is primarily intended to scratch my own itches.
  17. Here's the code I borrowed from the smelting recipe registry when making my own machine. private static boolean areSame(ItemStack input, ItemStack against) { if(input == null || against == null) return false; return against.getItem() == input.getItem() && (against.getItemDamage() == 32767 || against.getItemDamage() == input.getItemDamage()); } "against" is the stored itemstack that the slot item is compared against.
  18. I know that the smelting recipes uses getItem and getItemDamage (remember: metadata is important!). You would have to look at equals so see what it does. There's also a version of equation that checks NBT data.
  19. That is not how you compare ItemStacks. ItemStack is a complex data class and you need to check for equality in a different way. The == operator tells you if the two variables reference the same object in memory.
  20. Well, aside from using "new Object[]" this is what stands out: " X ",","," X ", 'X',Blocks.obsidian That is not a valid recipe. Let me break down what you have... " X " <-- three characters, one of which is an X, the others spaces. Spaces are good. "," <-- one character, a comma " X " <-- same as first line 'X',Blocks.obsidian <-- registration of what an X does. Two problems: 1) Your second line is only 1 character 2) Your second line contains a character that doesn't have an item associated with it.
  21. I'd still recommend 1.7.10, simply for Ease of Modding. 1.8 doesn't have Forge yet, just FML. Unless you need those 1.8 features.
  22. Pleasure to be of service.
  23. Yes, but it's recommended that you use 1.7.10 currently. While you can still use 1.6.4, there's some extra run-around you'll have to do, as file hosting has moved and the old Forge packages still look at old URLs (and no, no one is going to go back and fix 900+ zip files).
  24. It's a fuckin' string. What do you want to call the block? It can be anything (as long as you don't use something that's been used before). Seriously. Not. That. Hard.

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.