Skip to content

Commit

Permalink
fix(ecs-gestalt): Migrate Components to gestalt's Components. (#34)
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 committed Aug 25, 2021
1 parent 20d6bbf commit 7b3a82e
Showing 1 changed file with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// Copyright 2020 The Terasology Foundation
// Copyright 2021 The Terasology Foundation
// SPDX-License-Identifier: Apache-2.0

package org.terasology.flowingliquids.world.block;

import org.terasology.engine.entitySystem.Component;
import org.terasology.gestalt.entitysystem.component.Component;

/**
* Specifies that a liquid is able to flow into and destroy a particular block,
* and optionally create a different block in the process.
*/
public class LiquidSmooshingReactionComponent implements Component {
public class LiquidSmooshingReactionComponent implements Component<LiquidSmooshingReactionComponent> {
public String liquid;

/** The block that gets smooshed */
Expand All @@ -26,4 +26,14 @@ public class LiquidSmooshingReactionComponent implements Component {

/** If the block that is smooshed is also a liquid, whether the reverse reaction (`block` flowing into `liquid`) is also possible. */
public boolean reversible;

@Override
public void copyFrom(LiquidSmooshingReactionComponent other) {
this.liquid = other.liquid;
this.block = other.block;
this.product = other.product;
this.liquidRequired = other.liquidRequired;
this.otherLiquidRequired = other.otherLiquidRequired;
this.reversible = other.reversible;
}
}

0 comments on commit 7b3a82e

Please sign in to comment.