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. Use your debugger and find out.
  2. BlockContainer implements ITileEntityProvider:
  3. Subscribe to the BlockHarvestEvent
  4. By the way you don't need both of these checks: heldItem != null && heldItem.getItem() != null The first one is sufficient, you will never have a non-null item stack of a null item. Also, don't use ITileentityProvider, you should override the hasTileEntity and getTileEntity methods that are present in the Block class (which have a different signature).
  5. I mean really, what's wrong with List<BlockPos>? Also this: if(!b.getRegistryName().contains("air")){ Block#isAirBlock() much?
  6. Make a boolean. When it's true: play the sound and set it to false.
  7. You also can't map Block -> BlockPos. There are more BlockPos locations than there are Blocks, and the nature of a Hashmap is specifically One-to-One. Your code right now will create exactly 1 falling block for an explosion taking place inside pure stone.
  8. That was it, thanks!
  9. The bit you posted, by the way, says "This is just a prompt for computer specs to be printed. THIS IS NOT A ERROR" You know, for next time.
  10. I'm not sure a giant collection of "instanceof X? do Y" code blocks is going to be any less chaotic. If anything it splits one logical operation ("Create this block and register it") out across several methods ("create this block" "register it with the game" "register an item block for it too" "register the block's renderer" "register the ItemBlock's renderer").
  11. Yes, I had to use an interface for the statemapper business. Couldn't find another clean way of handling it. But no, still no loops other than looping over valid blockstates for registering item renderers. millstone = new BlockMillstone(); //create EasyRegistry.registerBlockWithItem(millstone, "millstone"); //register axel = new BlockAxel(); //create EasyRegistry.registerBlockWithItem(axel, "axel"); //register //etc
  12. Which I don't like (or the array for that matter) because it assumes that all of my blocks and all of my items are going to be registered in the same way. Which they aren't. Which is why I have a whole slew of helper methods for registration (six main methods: Block, Block + ItemBlock, Block + Custom ItemBlock, Block + Custom ItemBlock + Custom StateMapper, Item, Item w/ Variants).
  13. For being able to reference your stuff later, using an array isn't a good idea. The only time you'd want it is if you were doing something with the whole collection. Which a number of folks have done for their item registration, but you'd still have the public static properties.
  14. Ah yes. That is correct. Was my mistake. Doing this asynchronously means forgetting some context.
  15. What are you referring to? Passing two ItemStacks into the constructor? Yes. His wrapper object currently also contains the output, which makes it hard to construct a search-object from two arbitrary inputs and locate the output.
  16. Your input is two itemstacks, then yes, you need to make your wrapper a 2-stack object.
  17. Your experienceList is also probably not going to work (it's a map and ItemStack does not override equals or hashcode, making it a bad class to use as a key). public void addDualRecipes(InscriberWrapper input, InscriberWrapper inputSecond) { dualList.add(input); dualList.add(inputSecond); } For fuck's sake. Your "add recipe" method should take ItemStacks and you wrap them in the wrapper then add that wrapper to the list.
  18. To avoid damage, you need to set the player's fall distance back to 0.
  19. Well, if you want Blue Carpet and Blue Wool to be considered the same...
  20. "other.item1 == this.item1" was not meant to be used literally. You can't compare ItemStacks that way
  21. 1.7.10 is no longer supported here.
  22. this.item1 == that.item1 && this.item2 == that.item2, etc.
  23. In 1.7 I had tasks set up for being able to build my release jars, including a line like this: oresJar.dependsOn('reobf') In 1.10, Gradle fails saying there is no such task "reobf" however if I remove this line, then I get a huge list of unknown symbols, ie. it's attempting to perform the compile before reobfuscation has occurred. What do I tell gradle my task depends on?
  24. Ah, yes, a list that way. I was more focused on writing a proper "wrapper" around the three ingredients.
  25. Oh for fuck's sake. EntityFallingBlock entityfallingblock = new EntityFallingBlock(worldIn, (double)pos.getX() + 0.5D, (double)pos.getY(), (double)pos.getZ() + 0.5D, worldIn.getBlockState(pos));

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.