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.

Vebert

Members
  • Joined

  • Last visited

  1. Hi, I try minecraft forge for minecraft 1.8 with the new systeme of BlockState and I used it to save an integer. So It's work well exept when the Integer is bigger than 15, in thoses cases my block save well but the block can only be destroyed on client side. Finally I didn't understand two thing : - why it save the BlockState correctly when my Integer data is bigger than 15. (if it work as metadata in the past). - why the block block wasn't destroyed on the server side but work on the client side. Sorry for my english (I'm french :'( ) Have a nice day, thank for your help. Vebert
  2. Thank you a lot It's working .
  3. I will just show on class concerned by this Error because lot of the others class work with the same canvas. public class PacketShema implements IMessage{ private String text; public PacketShema() { } public PacketShema(int x,int y,int z, int id) { this.text = x + ":" + y + ":" + z + ":" + id; } @Override public void fromBytes(ByteBuf buf) { text = ByteBufUtils.readUTF8String(buf); // this class is very useful in general for writing more complex objects } @Override public void toBytes(ByteBuf buf) { ByteBufUtils.writeUTF8String(buf, text); } public static class PacketHandler implements IMessageHandler<PacketShema, IMessage> { @Override public IMessage onMessage(PacketShema message, MessageContext ctx) { ArrayList coord = tocoord(message.text); World world = ctx.getServerHandler().playerEntity.worldObj; Shematic.Operate(world,(int) coord.get(0),(int) coord.get(1),(int) coord.get(2),(short) coord.get(3)); return null; // no response in this case } public ArrayList tocoord(String str){ ArrayList ret = new ArrayList(); String[] list = str.split(":"); ret.add(Integer.parseInt(list[0])); ret.add(Integer.parseInt(list[1])); ret.add(Integer.parseInt(list[2])); ret.add(Short.parseShort(list[3])); return ret; } } } Sorry I haven't comment this class but it is very easy so I think you will understood, error in the build appear on Shematic.Operate(world,(int) coord.get(0),(int) coord.get(1),(int) coord.get(2),(short) coord.get(3)); when I said coord.get(0) where type int.
  4. Hello, I have a little issue when I use the line In my code I use many ArrayList, some of them contains int but when gradle compile the code he see a fail because he see the int as object (but the code works on Eclipse). So I ask you if we can dodge the check of the int by gradle and how ? I give you the gradle.log https://www.dropbox.com/s/5v39amoejcz8r6h/gradle.log?dl=0 Sorry for my English... Thank for your help. Vebert

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.