Skip 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. Look at any vanilla block you can walk through. Look for any method that returns AxisAlignedBB.
  2. Well...."pmcheese" isn't equal to cheese.getRegistryName()
  3. I've never had anyone complain, but I recognize your point as valid.
  4. Exactly what I (tried) to do. Ended up realizing I'd done it in a way that didn't do what I'd been trying to accomplish. Ended up with a scenario where I had to increment the number that was the "Library" version number despite the library not having actually changed. The 1.10 version numbers will fix that. The major-est number will be explicit the Library version, rather than just a major revision. Except that the reason I'm doing it is because my users explicitly requested it. They wanted a single feature I had in a mod as its own mod, without all the other things the main mod did. I did split it off as a standalone feature, but the two mods were effective "mutually exclusive" with each other (although checks were made to insure that singleton static references behaved nicely). So in the 1.10 rebuild, they're properly separate, and the main mod instead depends on the single-feature mod.
  5. What I did was just have separate packages in my workspace (mod.draco18s.library, mod.draco18s.mod1, mod.draco18s.mod2...) and use the build.gradle file to set up separate build tasks that would put the compiled code into separate jar files. A few other folks will have other suggestions, but this is the one that worked for me.
  6. Looks good, but for one thing that I made a comment about.
  7. That's actually an O(n) operation, not an O(2n). You're still doing one loop, you're just comparing "old vs. new" and then either Doing Stuff or not, then saving new to old. You don't need to loop twice. But yes, not the most efficient way to do things.
  8. The problem is, you've overlapped two different ways of handling containers (the old way and the new way) and the two don't talk to each other. At all. You just kind of float along hoping Magic will solve it, but it won't.
  9. Also, if you do any tooltip stuff, or other text-on-screen that you translate, good practice to put your modID in those too. e.g. from one of my items: @Override @SideOnly(Side.CLIENT) public void addInformation(ItemStack stack, EntityPlayer playerIn, List<String> tooltip, boolean advanced) { tooltip.add("+10 "+I18n.format("description.harderfarming:damagebonus")); }
  10. This: Item myItem = new Item(); myItem.setRegistryName("my_cool_item"); System.out.println(myItem.getRegistryName()); Will print: mymodid:my_cool_item Basically, it takes whatever string you input and prepends your mod ID so that Minecraft can locate all assets related to your item: blockstate files, model files, etc. It's also good practice to set your items' unlocalized name to the registry name: myItem.setUnlocalizedName(myItem.getRegistryName()); So that the unlocalized name contains your mod ID and prevents language translation collisions between mods (e.g. two mods using the same unlocalized name for unrelated items).
  11. Sooo...first off...neither CROP_ROCKCRESS nor FERTILESOIL appear to have a registry name set (it is definitely missing for FERTILESOIL, as it is in neither the constructor nor the register function). This is bad. VERY VERY BAD. Until you fix that, I cannot help you with models.
  12. Don't check against BlockCrop or of BlockBush. Check against IGrowable. Its the interface that all bonemeal-able blocks implement somewhere in their higherarchy.
  13. While the advice trollworkout is mostly correct, I would make one small change: Rather than item.setUnlocalizedName("ingot_copper").setRegistryName("ingot_copper") I would do: item.setRegistryName("ingot_copper"); item.setUnlocalizedName(getRegistryName(); This puts your modID in your unlocalized name string, which avoids conflicts, should another mod use the same unlocalized name (which for an item like "ingot_copper" is non-zero).
  14. Well, bonemeal outright increases the plant's AGE state. If you want to force-tick it, you'll want world.scheduleBlockUpdateTick() But that'll only make it tick once, which may not make it grow at all.
  15. It should throw a logging error. Also, use ROCKCRESS.getRegistryName() instead of "PMReference.MODID + ":" + "pmrockcress"
  16. ModelLoader.setCustomModelResourceLocation
  17. Well. ItemSeedFood (if vanilla*) doesn't implement ItemModelProvider, your class. So of course your register(...) method isn't going to register an item model for it. *The vanilla class is ItemSeeds. Oh derp, carrots/etc.
  18. The problem is not that the method he wants to override is private, but that that method invokes other methods which are private. So to duplicate the base (public) function he needs to duplicate several private methods as well. I'd suggest a forge PR that makes those methods and fields protected.
  19. Following that, what do you mean by "activate"? Do you mean "left click action" or "right click action"? Also, take a look at how Minecraft handles input for the [9] key and the mouse buttons.
  20. #1: You're wrong, it's 3 values, not four. #2: No integers are present, see #1: you're wrong, its 3 values not 4. #3: 1, 1, 0 is not invisible, it is yellow: Ergo yes, you're an idiot. The reason it isn't showing up has nothing to do with the color values, but the fact that you're moving them around by manipulating the Z position.
  21. http://minecraft.gamepedia.com/Sapling#Block_state The 4th bit of the metadata component number is the "stage." Saplings need to receive two block updates in order to turn into trees, rather than 1. That bit stores whether or not its already "grown" once (it's similar to crop's AGE state value). The bitwise operators are just a fast way of composing and decomposing the state into/outof metadata integers.
  22. Oh jesus christ. First, the color arguments are only 3 values, not 4. The -2 there is not part of your color values. It's part of your "position Z" argument. Second, -1 and 0 are functionally identical. Color values range from 0 to 1 as a floating point number and are clamped to this range. Third, you didn't "find" green. You threw random numbers at it until green occurred which everyone else here could have told you (and did, actually) that green is 0, 1, 0.
  23. Yellow is yellow that's why they call it that goofball Your computer screen does not contain yellow pixels. It contains RED pixels, GREEN pixels, and BLUE pixels. In order to display yellow it turns on both the RED and the GREEN pixels. Hence: I am now muting all of your posts because you're a bloody idiot.
  24. You want what to do the thing you said? You want an item that activates your 9th hotbar slot? A block? An event?

Important Information

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

Account

Navigation

Search

Search

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.