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.

magreet

Members
  • Joined

  • Last visited

  1. Hello, I am new to Minecraft modding and started working on a cement mod for 1.7.2. Goal: A placeable liquid that dries into stone (maybe with an intermediate block) within seconds. I followed the tutorial at http://www.minecraftforge.net/wiki/Create_a_Fluid resulting in: - new liquid cement - cement bucket can place and pickup source block Now, I cannot figure out how to let it dry. If I use an ExecuterService with a scheduled delay, bugs occur since world changes are not taken into account if I call world.setBlock(x, y, z, Blocks.stone); I noticed that there is always just one instance of the fluid block, and the displaced blocks are the same with increased metadata. I wanted to use onBlockAdded(final World world, final int x, final int y, final int z) to call a world.scheduleBlockUpdate(x, y, z, this, tickRate); but the scheduledBlockUpdate does not call updateTick (only by onNeighborBlockChange or something). In addition, how should I replace the flowing fluid by stone if they are one and the same object? If I replace the original source block; the adjacent blocks disappear. I tried a tick update loop with timestamp comparison but since they are the same block, they get turned to stone simultaneously. public final static int DELAY_DRY_MS = 3000; // 3sec ... @Override public void onBlockAdded(final World world, final int x, final int y, final int z) { super.onBlockAdded(world, x, y, z); dryingStartTime = System.currentTimeMillis(); } @Override public void updateTick(World world, int x, int y, int z, Random rand) { if (System.currentTimeMillis() - dryingStartTime >= DELAY_DRY_MS) { world.setBlock(x, y, z, Blocks.stone); return; } else { super.updateTick(world, x, y, z, rand); world.scheduleBlockUpdate(x, y, z, this, tickRate); } }

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.