001/*
002 * Trident - A Multithreaded Server Alternative
003 * Copyright 2014 The TridentSDK Team
004 *
005 * Licensed under the Apache License, Version 2.0 (the "License");
006 * you may not use this file except in compliance with the License.
007 * You may obtain a copy of the License at
008 *
009 *    http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017package net.tridentsdk.server.world.change;
018
019import com.google.code.tempusfugit.concurrency.annotations.ThreadSafe;
020
021/**
022 * For Internal Use only
023 * <p/>
024 * <p>Representation of the changes to be made, queued in a MassChange</p>
025 * <p/>
026 * <p>Thread safe by immutability</p>
027 */
028@ThreadSafe
029public class BlockChange {
030    private final int x;
031    private final int y;
032    private final int z;
033
034    private final byte id;
035    private final byte data;
036
037    protected BlockChange(int x, int y, int z, byte id, byte data) {
038        this.x = x;
039        this.y = y;
040        this.z = z;
041
042        this.id = id;
043        this.data = data;
044    }
045
046    public byte data() {
047        return data;
048    }
049
050    public int x() {
051        return x;
052    }
053
054    public int y() {
055        return y;
056    }
057
058    public int z() {
059        return z;
060    }
061
062    public byte id() {
063        return id;
064    }
065}