Skip to content

Commit

Permalink
fix(ecs-gestalt): Migrate Components to gestalt's Components. (#9)
Browse files Browse the repository at this point in the history
Ref: MovingBlocks/Terasology#4753

Co-authored-by: Tobias Nett <skaldarnar@googlemail.com>
  • Loading branch information
DarkWeird and skaldarnar authored Aug 25, 2021
1 parent d5acb37 commit 083f563
Showing 1 changed file with 11 additions and 17 deletions.
28 changes: 11 additions & 17 deletions src/main/java/org/terasology/climbables/ClamberComponent.java
Original file line number Diff line number Diff line change
@@ -1,26 +1,13 @@
/*
* Copyright 2018 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.
*/
// Copyright 2021 The Terasology Foundation
// SPDX-License-Identifier: Apache-2.0
package org.terasology.climbables;

import org.joml.Vector3i;
import org.joml.Vector3ic;
import org.terasology.engine.entitySystem.Component;
import org.terasology.engine.math.Side;
import org.terasology.gestalt.entitysystem.component.Component;

public class ClamberComponent implements Component {
public class ClamberComponent implements Component<ClamberComponent> {

public PlacingMode placingMode = PlacingMode.NORMAL;
public boolean support = false;
Expand All @@ -37,4 +24,11 @@ public Vector3ic getPlacingModeDirection() {
return new Vector3i(0, 0, 0);
}
}

@Override
public void copyFrom(ClamberComponent other) {
this.placingMode = other.placingMode;
this.support = other.support;
this.maxPlacementDistance = other.maxPlacementDistance;
}
}

0 comments on commit 083f563

Please sign in to comment.