/*
 * Copyright 2013 MovingBlocks
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.terasology.world.block;

import org.terasology.entitySystem.Component;
import org.terasology.math.geom.Vector3i;
import org.terasology.network.Replicate;

/**
 * Used for entities representing a block in the world
 *
 */
public final class BlockComponent implements Component {
    @Replicate
    public Vector3i position = new Vector3i();
    @Replicate
    public Block block;

    public BlockComponent() {
    }

    public BlockComponent(Block block, Vector3i pos) {
        this.block = block;
        this.position.set(pos);
    }

    /**
     * @deprecated Deprecated on 21/Sep/2018, because it is error prone (no defensive copy) and needlessly verbose.
     */
    @Deprecated
    public Vector3i getPosition() {
        return position;
    }

    /**
     * @deprecated Deprecated on 21/Sep/2018, because it is needlessly verbose.
     */
    @Deprecated
    public void setPosition(Vector3i pos) {
        position.set(pos);
    }

    /**
     * @deprecated Deprecated on 21/Sep/2018, because it is error prone (no defensive copy) and needlessly verbose.
     */
    @Deprecated
    public void setBlock(Block block) {
        this.block = block;
    }

    /**
     * @deprecated Deprecated on 21/Sep/2018, because it is error prone (no defensive copy) and needlessly verbose.
     */
    @Deprecated
    public Block getBlock() {
        return block;
    }
}

@@ -673,16 +673,53 @@
 ponent;%0A
+import org.terasology.math.JomlUtil;%0A
 import o
@@ -853,19 +853,16 @@
 e world%0A
- *%0A
  */%0Apubl
@@ -1056,253 +1056,786 @@
   %7D%0A
-%0A    public BlockComponent(Block block, Vector3i pos) %7B%0A        this.block = block;%0A        this.position.set(pos);%0A    %7D%0A%0A    /**%0A     * @deprecated Deprecated on 21/Sep/2018, because it is error prone (no defensive copy) and needlessly verbose
+    /**%0A     * @deprecated This is scheduled for removal in an upcoming version method will be replaced with JOML implementation%0A     *     %7B@link #BlockComponent(Block, org.joml.Vector3i)%7D.%0A     */%0A    @Deprecated%0A    public BlockComponent(Block block, Vector3i pos) %7B%0A        this.block = block;%0A        this.position.set(pos);%0A    %7D%0A%0A    public BlockComponent(Block block, org.joml.Vector3i pos) %7B%0A        this.block = block;%0A        this.position.set(JomlUtil.from(pos));%0A    %7D%0A%0A    /**%0A     * @deprecated Deprecated on 21/Sep/2018, because it is error prone (no defensive copy) and needlessly verbose.%0A     * @deprecated This is scheduled for removal in an upcoming version method will be replaced with JOML implementation%0A     *     %7B@link #getPosition(org.joml.Vector3i)%7D
 .%0A  
@@ -2004,32 +2004,205 @@
 lessly verbose.%0A
+     * @deprecated This is scheduled for removal in an upcoming version method will be replaced with JOML implementation%0A     *     %7B@link #setPosition(org.joml.Vector3i)%7D.%0A
      */%0A    @Dep
@@ -2715,11 +2715,469 @@
 k;%0A    %7D
+%0A%0A    /**%0A     * get the position%0A     *%0A     * @param dest will hold the result%0A     * @return dest%0A     */%0A    public org.joml.Vector3i getPosition(org.joml.Vector3i dest) %7B%0A        dest.set(JomlUtil.from(position));%0A        return dest;%0A    %7D%0A%0A    /**%0A     * set the position of the %7B@link BlockComponent%7D%0A     *%0A     * @param pos position to set%0A     */%0A    public void setPosition(org.joml.Vector3i pos) %7B%0A        position.set(JomlUtil.from(pos));%0A    %7D
 %0A%7D%0A

prepare `BlockComponent` for migration (#4186)