From 7b3a82e9a580b5e940365eb578ff50fd01eb8b1c Mon Sep 17 00:00:00 2001 From: Nail Khanipov Date: Wed, 25 Aug 2021 16:13:20 +0300 Subject: [PATCH] fix(ecs-gestalt): Migrate Components to gestalt's Components. (#34) Ref: MovingBlocks/Terasology#4753 Co-authored-by: Tobias Nett --- .../block/LiquidSmooshingReactionComponent.java | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/terasology/flowingliquids/world/block/LiquidSmooshingReactionComponent.java b/src/main/java/org/terasology/flowingliquids/world/block/LiquidSmooshingReactionComponent.java index 19975e9..fc40b5f 100644 --- a/src/main/java/org/terasology/flowingliquids/world/block/LiquidSmooshingReactionComponent.java +++ b/src/main/java/org/terasology/flowingliquids/world/block/LiquidSmooshingReactionComponent.java @@ -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 { public String liquid; /** The block that gets smooshed */ @@ -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; + } }