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.

XenoMustache

Members
  • Joined

  • Last visited

  1. XenoMustache changed their profile photo
  2. Well, adding this method to the block constructor worked, thank you.
  3. Actually, it's just a convenience thing. You can totally do it inside the block's constructor (which is what I do, because then as many properties of that block that I can get away with are inside that block's class--liquids have things that are required elsewhere, etc. etc). Also, "initialize Block event"? Are you using an event handler of some kind? Yes I am using an event handler. I couldn't find where in the block's constructor to add this method either.
  4. I am currently creating a mod that requires some of the blocks to have a harvest level. This is not very specific I know, but all I am asking for is something basic. It is implied that you must add the ".setHarvestLevel( [tool], [level])" method as part of the initialize Block event, but doing this produces an error. "Type mismatch: cannot convert from void to Block" As I look around the internet for help, I find none, and looking for tutorials seems to not work either, as there are none.
  5. So I switched versions and it seems that I am now able to define the .setBlockTextureName method now, thank you for your sage advice, or methods of change, rather.
  6. How would one change the SRC that they are using?
  7. I don't really want to set up another workspace because I have done that 3 times already.
  8. I am using the latest SRC version for 1.7.10.
  9. I was hoping that what you posted would help with this problem, but sadly, no. I have done nothing else with the Block class, pasting the things you sent just gave me the same results, no access to .setBlockTextureName.
  10. Okay, I'm not sure I understand how to set up the @SideOnly part of this, do I put this in my MainRegistry package?
  11. I began to look in the source code package and found the string "textureName" to be protected. I cannot change this, however, as it is input into the original game and is not editable.
  12. There is nothing else in my code that has anything to do with the Block class.
  13. The tBlock class just extends the Block class, and has an empty constructor, but this has nothing to do with the texturing of the "Testing block".
  14. import com.xenopack.lib.RefStrings; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.init.Blocks; import cpw.mods.fml.common.registry.GameRegistry; public class TestingBlock { public static void mainRegistry(){ initializeBlock(); registerBlock(); } public static Block tBlock; public static void initializeBlock(){ tBlock = new tBlock(Material.ground).setBlockName("tBlock").setCreativeTab(CreativeTabs.tabBlock); } public static void registerBlock(){ GameRegistry.registerBlock(tBlock, tBlock.getUnlocalizedName()); } } This is the direct code that I am using from the package.

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.