Jump to content

[Solved] Gradlew build without int check


Recommended Posts

Hello, I have a little issue when I use the line

gradlew build


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



Sorry for my English...


Thank for your help.


Link to comment
Share on other sites

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;

    public void fromBytes(ByteBuf buf) {
        text = ByteBufUtils.readUTF8String(buf); // this class is very useful in general for writing more complex objects

    public void toBytes(ByteBuf buf) {
        ByteBufUtils.writeUTF8String(buf, text);

    public static class PacketHandler implements IMessageHandler<PacketShema, IMessage> {
        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(":");
        	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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

By using this site, you agree to our Terms of Use.