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.

TKContinuum

Members
  • Joined

  • Last visited

  1. Thanks! I was able to get it to work finally. Now just to clean it up like you suggested and I should be good to go.
  2. I'm trying to figure out if there's a way to convert an IBlockState into some form that can be passed through a Packet to the server. I'd like to be able to update a certain position on a map with a specific block (in a specific orientation) whenever this is called. The position was easy enough, but I can't seem to find any way to get the block with all its orientation data converted into something that can be passed... public class SetBlock implements IMessage, IMessageHandler<SetBlock, IMessage> { private int x; private int y; private int z; private IBlockState blockState; public SetBlock() {} public SetBlock(int x, int y, int z, IBlockState blockState) { this.x = x; this.y = y; this.z = z; this.blockState = blockState; } @Override public void toBytes(ByteBuf buf) { buf.writeInt(x); buf.writeInt(y); buf.writeInt(z); //blockState stuff } @Override public void fromBytes(ByteBuf buf) { this.x = buf.readInt(); this.y = buf.readInt(); this.z = buf.readInt(); //blockState stuff } @Override public IMessage onMessage(final SetBlock message, final MessageContext ctx) { World world = ctx.getServerHandler().playerEntity.worldObj; world.setBlockState(new BlockPos(message.x,message.y,message.z),Blocks.dirt.getDefaultState()); return null; } } The Dirt Block created was just a way for me to tell if the position was being passed correctly, and it is. Any help would be fantastic...this is that last thing I need to figure out. Thanks P.S. Yes, I know this probably isn't an ideal way to do this, but this mod is just for my personal use so there's no worrying about others potentially abusing the placement system.

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.