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.

nicolapcweek94

Members
  • Joined

  • Last visited

  1. thanks for the answers, i actually ended up using a code similar to the one used in the furnace. i have 2 blocks and switch between them with setblockwithnotify(), and they have different textures. @jammas615: i found out that it was exactly the "this" that was causing problem, because it pointed at TestBlock class which is the class for every Test Block in the world, not a single instance... thanks for making me understand that
  2. well, according to GitHub and the last changelog, they added some events to the worldgen. http://files.minecraftforge.net/minecraftforge/minecraftforge-changelog-1.4.5-6.4.2.443.txt even though i have absolutely no idea how to use them. maybe this helps. http://jd.minecraftforge.net/net/minecraftforge/event/terraingen/package-tree.html
  3. Sorry if this question has already been asked a thousand times. I was not able to find anything with the search function. I am making a mod that includes blocks reacting to redstone. One (very) basic type of reaction to redstone is changing the block texture. So, this is the way I implemented it: @Override public void onNeighborBlockChange(World world, int xCoord, int yCoord, int zCoord, int neighborID) { isRedstonePowered = world.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord); if (isRedstonePowered) { this.blockIndexInTexture = 0; } else { this.blockIndexInTexture = 1; } } where isRedstonePowered is a boolean declared in TestBlock.java (the block class from which this code is taken). This code works perfectly, changing the texture of the block if it is activated and changing it back when it loses the redstone signal. But it works a bit too much, it actually changes the texture for all the same blocks in the world and even the block in the hotbar (by powering a single block, all the blocks of the same kind change texture) and i obviously do not want that, i only want the powered block to change... Is there a way to do that? EDIT: i might end up using the vanilla furnace code if i don't find any other solution, but i don't like it very much because it implies adding some more blocks... (code in spoiler)

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.