From 755553c03f9a3c2ed1bfce58a9317fcf20cd682f Mon Sep 17 00:00:00 2001 From: DarkWeird Date: Fri, 9 Jul 2021 16:53:18 +0300 Subject: [PATCH 1/3] fix(ecs-gestalt): Migrate Components to gestalt's Components. --- .../BlockLocationNetworkNodeComponent.java | 21 +++------------ .../components/EntityNetworkComponent.java | 21 +++------------ ...idedBlockLocationNetworkNodeComponent.java | 4 +-- .../components/FluidDisplayComponent.java | 21 +++------------ .../components/FluidInletOutletComponent.java | 21 +++------------ .../components/FluidPipeComponent.java | 21 +++------------ .../components/FluidPumpComponent.java | 21 +++------------ .../components/FluidTankDisplayComponent.java | 21 +++------------ .../FluidTankDropsFluidComponent.java | 21 +++------------ .../FluidTransportBlockNetworkComponent.java | 21 +++------------ .../MechanicalPowerToPressureComponent.java | 21 +++------------ .../PullInventoryInDirectionComponent.java | 21 +++------------ .../PushInventoryInDirectionComponent.java | 21 +++------------ .../MachineDefinitionComponent.java | 21 +++------------ .../components/NestedMachineComponent.java | 21 +++------------ .../ProcessRequirementsProviderComponent.java | 21 +++------------ ...mentsProviderFromWorkstationComponent.java | 21 +++------------ .../RenderInventoryInCategoryComponent.java | 27 +++++++------------ ...ctivatedInventoryInteractionComponent.java | 21 +++------------ .../RequirementInputComponent.java | 21 +++------------ .../MechanicalPowerBlockNetworkComponent.java | 21 +++------------ .../MechanicalPowerProducerComponent.java | 21 +++------------ .../MechanicalPowerRegenComponent.java | 21 +++------------ ...anicalPowerSidedBlockNetworkComponent.java | 21 +++------------ .../components/RotatingAxleComponent.java | 21 +++------------ .../ActivateEngineOutputComponent.java | 21 +++------------ .../MechanicalPowerInputComponent.java | 21 +++------------ 27 files changed, 112 insertions(+), 444 deletions(-) diff --git a/src/main/java/org/terasology/entityNetwork/components/BlockLocationNetworkNodeComponent.java b/src/main/java/org/terasology/entityNetwork/components/BlockLocationNetworkNodeComponent.java index 273069f..05e67bd 100644 --- a/src/main/java/org/terasology/entityNetwork/components/BlockLocationNetworkNodeComponent.java +++ b/src/main/java/org/terasology/entityNetwork/components/BlockLocationNetworkNodeComponent.java @@ -1,29 +1,16 @@ -/* - * Copyright 2015 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.entityNetwork.components; import org.joml.Vector3i; -import org.terasology.engine.entitySystem.Component; import org.terasology.engine.entitySystem.entity.EntityRef; import org.terasology.engine.world.block.BlockComponent; import org.terasology.entityNetwork.BlockLocationNetworkNode; import org.terasology.entityNetwork.NetworkNode; import org.terasology.entityNetwork.NetworkNodeBuilder; +import org.terasology.gestalt.entitysystem.component.Component; -public class BlockLocationNetworkNodeComponent implements Component, NetworkNodeBuilder { +public class BlockLocationNetworkNodeComponent implements Component, NetworkNodeBuilder { public String networkId; public boolean isLeaf; public int maximumGridDistance = 1; diff --git a/src/main/java/org/terasology/entityNetwork/components/EntityNetworkComponent.java b/src/main/java/org/terasology/entityNetwork/components/EntityNetworkComponent.java index 29c19ea..3ffc572 100644 --- a/src/main/java/org/terasology/entityNetwork/components/EntityNetworkComponent.java +++ b/src/main/java/org/terasology/entityNetwork/components/EntityNetworkComponent.java @@ -1,21 +1,8 @@ -/* - * Copyright 2015 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.entityNetwork.components; -import org.terasology.engine.entitySystem.Component; +import org.terasology.gestalt.entitysystem.component.Component; -public class EntityNetworkComponent implements Component { +public class EntityNetworkComponent implements Component { } diff --git a/src/main/java/org/terasology/entityNetwork/components/SidedBlockLocationNetworkNodeComponent.java b/src/main/java/org/terasology/entityNetwork/components/SidedBlockLocationNetworkNodeComponent.java index 12cc90c..384099d 100644 --- a/src/main/java/org/terasology/entityNetwork/components/SidedBlockLocationNetworkNodeComponent.java +++ b/src/main/java/org/terasology/entityNetwork/components/SidedBlockLocationNetworkNodeComponent.java @@ -4,7 +4,6 @@ import com.google.common.collect.Sets; import org.joml.Vector3i; -import org.terasology.engine.entitySystem.Component; import org.terasology.engine.entitySystem.entity.EntityRef; import org.terasology.engine.math.Direction; import org.terasology.engine.math.Side; @@ -13,11 +12,12 @@ import org.terasology.entityNetwork.NetworkNode; import org.terasology.entityNetwork.NetworkNodeBuilder; import org.terasology.entityNetwork.SidedBlockLocationNetworkNode; +import org.terasology.gestalt.entitysystem.component.Component; import org.terasology.machines.BlockFamilyUtil; import java.util.Set; -public class SidedBlockLocationNetworkNodeComponent implements Component, NetworkNodeBuilder { +public class SidedBlockLocationNetworkNodeComponent implements Component, NetworkNodeBuilder { public String networkId; public boolean isLeaf; public Set directions = Sets.newHashSet(); diff --git a/src/main/java/org/terasology/fluidTransport/components/FluidDisplayComponent.java b/src/main/java/org/terasology/fluidTransport/components/FluidDisplayComponent.java index e3d4a5c..2148120 100644 --- a/src/main/java/org/terasology/fluidTransport/components/FluidDisplayComponent.java +++ b/src/main/java/org/terasology/fluidTransport/components/FluidDisplayComponent.java @@ -1,25 +1,12 @@ -/* - * Copyright 2014 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.fluidTransport.components; -import org.terasology.engine.entitySystem.Component; import org.terasology.engine.entitySystem.Owns; import org.terasology.engine.entitySystem.entity.EntityRef; +import org.terasology.gestalt.entitysystem.component.Component; -public class FluidDisplayComponent implements Component { +public class FluidDisplayComponent implements Component { @Owns public EntityRef renderedEntity; } diff --git a/src/main/java/org/terasology/fluidTransport/components/FluidInletOutletComponent.java b/src/main/java/org/terasology/fluidTransport/components/FluidInletOutletComponent.java index 533cf7c..a003bba 100644 --- a/src/main/java/org/terasology/fluidTransport/components/FluidInletOutletComponent.java +++ b/src/main/java/org/terasology/fluidTransport/components/FluidInletOutletComponent.java @@ -1,28 +1,15 @@ -/* - * Copyright 2014 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.fluidTransport.components; -import org.terasology.engine.entitySystem.Component; import org.terasology.engine.world.block.ForceBlockActive; +import org.terasology.gestalt.entitysystem.component.Component; /** * Marks a block that also has a FluidInventoryComponent as able to exchange fluid with adjacent liquid blocks. */ @ForceBlockActive -public class FluidInletOutletComponent implements Component { +public class FluidInletOutletComponent implements Component { /** The maximum amount of liquid that can flow into the container, in litres (thousandths of a block) per second. */ public float inletRate; /** The maximum amount of liquid that can flow from the container, in litres (thousandths of a block) per second. */ diff --git a/src/main/java/org/terasology/fluidTransport/components/FluidPipeComponent.java b/src/main/java/org/terasology/fluidTransport/components/FluidPipeComponent.java index a40014e..2de37ca 100644 --- a/src/main/java/org/terasology/fluidTransport/components/FluidPipeComponent.java +++ b/src/main/java/org/terasology/fluidTransport/components/FluidPipeComponent.java @@ -1,22 +1,9 @@ -/* - * Copyright 2014 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.fluidTransport.components; -import org.terasology.engine.entitySystem.Component; +import org.terasology.gestalt.entitysystem.component.Component; -public class FluidPipeComponent implements Component { +public class FluidPipeComponent implements Component { public float maximumFlowRate; } diff --git a/src/main/java/org/terasology/fluidTransport/components/FluidPumpComponent.java b/src/main/java/org/terasology/fluidTransport/components/FluidPumpComponent.java index 54c29ca..c8b3d41 100644 --- a/src/main/java/org/terasology/fluidTransport/components/FluidPumpComponent.java +++ b/src/main/java/org/terasology/fluidTransport/components/FluidPumpComponent.java @@ -1,26 +1,13 @@ -/* - * Copyright 2014 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.fluidTransport.components; -import org.terasology.engine.entitySystem.Component; import org.terasology.engine.network.Replicate; import org.terasology.engine.world.block.ForceBlockActive; +import org.terasology.gestalt.entitysystem.component.Component; @ForceBlockActive -public class FluidPumpComponent implements Component { +public class FluidPumpComponent implements Component { @Replicate public float pressure; public float maximumFlowRate; diff --git a/src/main/java/org/terasology/fluidTransport/components/FluidTankDisplayComponent.java b/src/main/java/org/terasology/fluidTransport/components/FluidTankDisplayComponent.java index 2dc879d..6be51ca 100644 --- a/src/main/java/org/terasology/fluidTransport/components/FluidTankDisplayComponent.java +++ b/src/main/java/org/terasology/fluidTransport/components/FluidTankDisplayComponent.java @@ -1,21 +1,8 @@ -/* - * Copyright 2014 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.fluidTransport.components; -import org.terasology.engine.entitySystem.Component; +import org.terasology.gestalt.entitysystem.component.Component; -public class FluidTankDisplayComponent implements Component { +public class FluidTankDisplayComponent implements Component { } diff --git a/src/main/java/org/terasology/fluidTransport/components/FluidTankDropsFluidComponent.java b/src/main/java/org/terasology/fluidTransport/components/FluidTankDropsFluidComponent.java index 31d9a71..9b808d0 100644 --- a/src/main/java/org/terasology/fluidTransport/components/FluidTankDropsFluidComponent.java +++ b/src/main/java/org/terasology/fluidTransport/components/FluidTankDropsFluidComponent.java @@ -1,21 +1,8 @@ -/* - * Copyright 2015 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.fluidTransport.components; -import org.terasology.engine.entitySystem.Component; +import org.terasology.gestalt.entitysystem.component.Component; -public class FluidTankDropsFluidComponent implements Component { +public class FluidTankDropsFluidComponent implements Component { } diff --git a/src/main/java/org/terasology/fluidTransport/components/FluidTransportBlockNetworkComponent.java b/src/main/java/org/terasology/fluidTransport/components/FluidTransportBlockNetworkComponent.java index b2fabde..a37f965 100644 --- a/src/main/java/org/terasology/fluidTransport/components/FluidTransportBlockNetworkComponent.java +++ b/src/main/java/org/terasology/fluidTransport/components/FluidTransportBlockNetworkComponent.java @@ -1,27 +1,14 @@ -/* - * Copyright 2014 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.fluidTransport.components; -import org.terasology.engine.entitySystem.Component; import org.terasology.engine.world.block.ForceBlockActive; import org.terasology.entityNetwork.components.BlockLocationNetworkNodeComponent; import org.terasology.fluidTransport.systems.FluidTransportAuthoritySystem; +import org.terasology.gestalt.entitysystem.component.Component; @ForceBlockActive -public class FluidTransportBlockNetworkComponent extends BlockLocationNetworkNodeComponent implements Component { +public class FluidTransportBlockNetworkComponent extends BlockLocationNetworkNodeComponent implements Component { public FluidTransportBlockNetworkComponent() { this.networkId = FluidTransportAuthoritySystem.NETWORK_ID; } diff --git a/src/main/java/org/terasology/fluidTransport/processParts/MechanicalPowerToPressureComponent.java b/src/main/java/org/terasology/fluidTransport/processParts/MechanicalPowerToPressureComponent.java index 672860e..05b86f3 100644 --- a/src/main/java/org/terasology/fluidTransport/processParts/MechanicalPowerToPressureComponent.java +++ b/src/main/java/org/terasology/fluidTransport/processParts/MechanicalPowerToPressureComponent.java @@ -1,21 +1,8 @@ -/* - * Copyright 2014 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.fluidTransport.processParts; -import org.terasology.engine.entitySystem.Component; +import org.terasology.gestalt.entitysystem.component.Component; -public class MechanicalPowerToPressureComponent implements Component { +public class MechanicalPowerToPressureComponent implements Component { } diff --git a/src/main/java/org/terasology/itemTransport/components/PullInventoryInDirectionComponent.java b/src/main/java/org/terasology/itemTransport/components/PullInventoryInDirectionComponent.java index d70e36c..6556a95 100644 --- a/src/main/java/org/terasology/itemTransport/components/PullInventoryInDirectionComponent.java +++ b/src/main/java/org/terasology/itemTransport/components/PullInventoryInDirectionComponent.java @@ -1,23 +1,10 @@ -/* - * Copyright 2014 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.itemTransport.components; -import org.terasology.engine.entitySystem.Component; import org.terasology.engine.math.Direction; +import org.terasology.gestalt.entitysystem.component.Component; -public class PullInventoryInDirectionComponent implements Component { +public class PullInventoryInDirectionComponent implements Component { public Direction direction = Direction.FORWARD; } diff --git a/src/main/java/org/terasology/itemTransport/components/PushInventoryInDirectionComponent.java b/src/main/java/org/terasology/itemTransport/components/PushInventoryInDirectionComponent.java index 89e2f83..3b374f3 100644 --- a/src/main/java/org/terasology/itemTransport/components/PushInventoryInDirectionComponent.java +++ b/src/main/java/org/terasology/itemTransport/components/PushInventoryInDirectionComponent.java @@ -1,24 +1,11 @@ -/* - * Copyright 2014 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.itemTransport.components; -import org.terasology.engine.entitySystem.Component; import org.terasology.engine.math.Direction; +import org.terasology.gestalt.entitysystem.component.Component; -public class PushInventoryInDirectionComponent implements Component { +public class PushInventoryInDirectionComponent implements Component { public Direction direction = Direction.BACKWARD; public boolean animateMovingItem; public long timeToDestination = 2000; diff --git a/src/main/java/org/terasology/machines/components/MachineDefinitionComponent.java b/src/main/java/org/terasology/machines/components/MachineDefinitionComponent.java index 3635f74..acbdebd 100644 --- a/src/main/java/org/terasology/machines/components/MachineDefinitionComponent.java +++ b/src/main/java/org/terasology/machines/components/MachineDefinitionComponent.java @@ -1,30 +1,17 @@ -/* - * 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. - */ +// Copyright 2021 The Terasology Foundation +// SPDX-License-Identifier: Apache-2.0 package org.terasology.machines.components; import com.google.common.collect.Lists; import com.google.common.collect.Sets; -import org.terasology.engine.entitySystem.Component; import org.terasology.engine.world.block.ForceBlockActive; +import org.terasology.gestalt.entitysystem.component.Component; import java.util.List; import java.util.Set; @ForceBlockActive -public class MachineDefinitionComponent implements Component { +public class MachineDefinitionComponent implements Component { public int inputSlots; public String inputSlotsTitle = "Input"; public int requirementSlots; diff --git a/src/main/java/org/terasology/machines/components/NestedMachineComponent.java b/src/main/java/org/terasology/machines/components/NestedMachineComponent.java index c319d8e..7415257 100644 --- a/src/main/java/org/terasology/machines/components/NestedMachineComponent.java +++ b/src/main/java/org/terasology/machines/components/NestedMachineComponent.java @@ -1,21 +1,8 @@ -/* - * Copyright 2014 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.machines.components; -import org.terasology.engine.entitySystem.Component; +import org.terasology.gestalt.entitysystem.component.Component; -public class NestedMachineComponent implements Component { +public class NestedMachineComponent implements Component { } diff --git a/src/main/java/org/terasology/machines/components/ProcessRequirementsProviderComponent.java b/src/main/java/org/terasology/machines/components/ProcessRequirementsProviderComponent.java index 32e62ee..0638a71 100644 --- a/src/main/java/org/terasology/machines/components/ProcessRequirementsProviderComponent.java +++ b/src/main/java/org/terasology/machines/components/ProcessRequirementsProviderComponent.java @@ -1,27 +1,14 @@ -/* - * 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. - */ +// Copyright 2021 The Terasology Foundation +// SPDX-License-Identifier: Apache-2.0 package org.terasology.machines.components; import com.google.common.collect.Lists; -import org.terasology.engine.entitySystem.Component; import org.terasology.engine.network.Replicate; +import org.terasology.gestalt.entitysystem.component.Component; import java.util.List; -public class ProcessRequirementsProviderComponent implements Component { +public class ProcessRequirementsProviderComponent implements Component { @Replicate public List requirements = Lists.newArrayList(); diff --git a/src/main/java/org/terasology/machines/components/ProcessRequirementsProviderFromWorkstationComponent.java b/src/main/java/org/terasology/machines/components/ProcessRequirementsProviderFromWorkstationComponent.java index e58bb4e..8b197c9 100644 --- a/src/main/java/org/terasology/machines/components/ProcessRequirementsProviderFromWorkstationComponent.java +++ b/src/main/java/org/terasology/machines/components/ProcessRequirementsProviderFromWorkstationComponent.java @@ -1,29 +1,16 @@ -/* - * Copyright 2015 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.machines.components; import com.google.common.collect.Lists; -import org.terasology.engine.entitySystem.Component; import org.terasology.engine.network.Replicate; import org.terasology.engine.world.block.ForceBlockActive; +import org.terasology.gestalt.entitysystem.component.Component; import java.util.List; @ForceBlockActive -public class ProcessRequirementsProviderFromWorkstationComponent implements Component { +public class ProcessRequirementsProviderFromWorkstationComponent implements Component { @Replicate public List requirements = Lists.newArrayList(); diff --git a/src/main/java/org/terasology/machines/components/RenderInventoryInCategoryComponent.java b/src/main/java/org/terasology/machines/components/RenderInventoryInCategoryComponent.java index 5c06e3b..a3fd56f 100644 --- a/src/main/java/org/terasology/machines/components/RenderInventoryInCategoryComponent.java +++ b/src/main/java/org/terasology/machines/components/RenderInventoryInCategoryComponent.java @@ -1,28 +1,21 @@ -/* - * Copyright 2015 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.machines.components; -import org.terasology.engine.entitySystem.Component; +import org.terasology.gestalt.entitysystem.component.Component; import org.terasology.itemRendering.systems.RenderOwnedEntityDetails; /** * Add this to a block that you want items displayed from an inventory category. * Also add the RenderItemComponent to adjust the location of the item, otherwise it will be in the center of the containing block. */ -public class RenderInventoryInCategoryComponent extends RenderOwnedEntityDetails implements Component { +public class RenderInventoryInCategoryComponent extends RenderOwnedEntityDetails implements Component { public String category; public boolean isOutputCategory; + + @Override + public void copy(RenderInventoryInCategoryComponent other) { + this.category = other.category; + this.isOutputCategory = other.isOutputCategory; + } } diff --git a/src/main/java/org/terasology/machines/components/SideActivatedInventoryInteractionComponent.java b/src/main/java/org/terasology/machines/components/SideActivatedInventoryInteractionComponent.java index 169f475..b5413c2 100644 --- a/src/main/java/org/terasology/machines/components/SideActivatedInventoryInteractionComponent.java +++ b/src/main/java/org/terasology/machines/components/SideActivatedInventoryInteractionComponent.java @@ -1,23 +1,10 @@ -/* - * Copyright 2015 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.machines.components; -import org.terasology.engine.entitySystem.Component; +import org.terasology.gestalt.entitysystem.component.Component; -public class SideActivatedInventoryInteractionComponent implements Component { +public class SideActivatedInventoryInteractionComponent implements Component { public String direction; public String inputType; public Boolean inputIsOutputType; diff --git a/src/main/java/org/terasology/machines/processParts/RequirementInputComponent.java b/src/main/java/org/terasology/machines/processParts/RequirementInputComponent.java index f94fb80..48eaca0 100644 --- a/src/main/java/org/terasology/machines/processParts/RequirementInputComponent.java +++ b/src/main/java/org/terasology/machines/processParts/RequirementInputComponent.java @@ -1,25 +1,12 @@ -/* - * 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. - */ +// Copyright 2021 The Terasology Foundation +// SPDX-License-Identifier: Apache-2.0 package org.terasology.machines.processParts; import com.google.common.collect.Lists; -import org.terasology.engine.entitySystem.Component; +import org.terasology.gestalt.entitysystem.component.Component; import java.util.List; -public class RequirementInputComponent implements Component { +public class RequirementInputComponent implements Component { public List requirements = Lists.newArrayList(); } diff --git a/src/main/java/org/terasology/mechanicalPower/components/MechanicalPowerBlockNetworkComponent.java b/src/main/java/org/terasology/mechanicalPower/components/MechanicalPowerBlockNetworkComponent.java index 7e26816..5f199df 100644 --- a/src/main/java/org/terasology/mechanicalPower/components/MechanicalPowerBlockNetworkComponent.java +++ b/src/main/java/org/terasology/mechanicalPower/components/MechanicalPowerBlockNetworkComponent.java @@ -1,27 +1,14 @@ -/* - * Copyright 2014 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.mechanicalPower.components; -import org.terasology.engine.entitySystem.Component; import org.terasology.engine.world.block.ForceBlockActive; import org.terasology.entityNetwork.components.BlockLocationNetworkNodeComponent; +import org.terasology.gestalt.entitysystem.component.Component; import org.terasology.mechanicalPower.systems.MechanicalPowerAuthoritySystem; @ForceBlockActive -public class MechanicalPowerBlockNetworkComponent extends BlockLocationNetworkNodeComponent implements Component { +public class MechanicalPowerBlockNetworkComponent extends BlockLocationNetworkNodeComponent implements Component { public MechanicalPowerBlockNetworkComponent() { networkId = MechanicalPowerAuthoritySystem.NETWORK_ID; } diff --git a/src/main/java/org/terasology/mechanicalPower/components/MechanicalPowerProducerComponent.java b/src/main/java/org/terasology/mechanicalPower/components/MechanicalPowerProducerComponent.java index 9ee6ce6..5935551 100644 --- a/src/main/java/org/terasology/mechanicalPower/components/MechanicalPowerProducerComponent.java +++ b/src/main/java/org/terasology/mechanicalPower/components/MechanicalPowerProducerComponent.java @@ -1,26 +1,13 @@ -/* - * Copyright 2014 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.mechanicalPower.components; -import org.terasology.engine.entitySystem.Component; import org.terasology.engine.network.Replicate; import org.terasology.engine.world.block.ForceBlockActive; +import org.terasology.gestalt.entitysystem.component.Component; @ForceBlockActive -public class MechanicalPowerProducerComponent implements Component { +public class MechanicalPowerProducerComponent implements Component { @Replicate public float power; @Replicate diff --git a/src/main/java/org/terasology/mechanicalPower/components/MechanicalPowerRegenComponent.java b/src/main/java/org/terasology/mechanicalPower/components/MechanicalPowerRegenComponent.java index ed8ef87..809bf26 100644 --- a/src/main/java/org/terasology/mechanicalPower/components/MechanicalPowerRegenComponent.java +++ b/src/main/java/org/terasology/mechanicalPower/components/MechanicalPowerRegenComponent.java @@ -1,24 +1,11 @@ -/* - * Copyright 2014 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.mechanicalPower.components; -import org.terasology.engine.entitySystem.Component; import org.terasology.engine.network.Replicate; +import org.terasology.gestalt.entitysystem.component.Component; -public class MechanicalPowerRegenComponent implements Component { +public class MechanicalPowerRegenComponent implements Component { @Replicate public float power; } diff --git a/src/main/java/org/terasology/mechanicalPower/components/MechanicalPowerSidedBlockNetworkComponent.java b/src/main/java/org/terasology/mechanicalPower/components/MechanicalPowerSidedBlockNetworkComponent.java index 3641496..b4ce21f 100644 --- a/src/main/java/org/terasology/mechanicalPower/components/MechanicalPowerSidedBlockNetworkComponent.java +++ b/src/main/java/org/terasology/mechanicalPower/components/MechanicalPowerSidedBlockNetworkComponent.java @@ -1,27 +1,14 @@ -/* - * Copyright 2015 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.mechanicalPower.components; -import org.terasology.engine.entitySystem.Component; import org.terasology.engine.world.block.ForceBlockActive; import org.terasology.entityNetwork.components.SidedBlockLocationNetworkNodeComponent; +import org.terasology.gestalt.entitysystem.component.Component; import org.terasology.mechanicalPower.systems.MechanicalPowerAuthoritySystem; @ForceBlockActive -public class MechanicalPowerSidedBlockNetworkComponent extends SidedBlockLocationNetworkNodeComponent implements Component { +public class MechanicalPowerSidedBlockNetworkComponent extends SidedBlockLocationNetworkNodeComponent implements Component { public MechanicalPowerSidedBlockNetworkComponent() { networkId = MechanicalPowerAuthoritySystem.NETWORK_ID; } diff --git a/src/main/java/org/terasology/mechanicalPower/components/RotatingAxleComponent.java b/src/main/java/org/terasology/mechanicalPower/components/RotatingAxleComponent.java index 2e5c6e7..a3587d5 100644 --- a/src/main/java/org/terasology/mechanicalPower/components/RotatingAxleComponent.java +++ b/src/main/java/org/terasology/mechanicalPower/components/RotatingAxleComponent.java @@ -1,25 +1,12 @@ -/* - * Copyright 2014 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.mechanicalPower.components; -import org.terasology.engine.entitySystem.Component; import org.terasology.engine.entitySystem.Owns; import org.terasology.engine.entitySystem.entity.EntityRef; +import org.terasology.gestalt.entitysystem.component.Component; -public class RotatingAxleComponent implements Component { +public class RotatingAxleComponent implements Component { @Owns public EntityRef renderedEntity; } diff --git a/src/main/java/org/terasology/mechanicalPower/processParts/ActivateEngineOutputComponent.java b/src/main/java/org/terasology/mechanicalPower/processParts/ActivateEngineOutputComponent.java index 8ad4870..6432602 100644 --- a/src/main/java/org/terasology/mechanicalPower/processParts/ActivateEngineOutputComponent.java +++ b/src/main/java/org/terasology/mechanicalPower/processParts/ActivateEngineOutputComponent.java @@ -1,22 +1,9 @@ -/* - * Copyright 2014 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.mechanicalPower.processParts; -import org.terasology.engine.entitySystem.Component; +import org.terasology.gestalt.entitysystem.component.Component; -public class ActivateEngineOutputComponent implements Component { +public class ActivateEngineOutputComponent implements Component { public long activateTime; } diff --git a/src/main/java/org/terasology/mechanicalPower/processParts/MechanicalPowerInputComponent.java b/src/main/java/org/terasology/mechanicalPower/processParts/MechanicalPowerInputComponent.java index cc26771..230874c 100644 --- a/src/main/java/org/terasology/mechanicalPower/processParts/MechanicalPowerInputComponent.java +++ b/src/main/java/org/terasology/mechanicalPower/processParts/MechanicalPowerInputComponent.java @@ -1,22 +1,9 @@ -/* - * Copyright 2014 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.mechanicalPower.processParts; -import org.terasology.engine.entitySystem.Component; +import org.terasology.gestalt.entitysystem.component.Component; -public class MechanicalPowerInputComponent implements Component { +public class MechanicalPowerInputComponent implements Component { public float power; } From 03bc12f66bd691b9af5a8dfa239c943ca0f8c163 Mon Sep 17 00:00:00 2001 From: Michael Pollind Date: Sun, 11 Jul 2021 19:31:21 -0700 Subject: [PATCH 2/3] chore: update components --- .../BlockLocationNetworkNodeComponent.java | 7 +++++++ .../components/EntityNetworkComponent.java | 4 ++++ .../SidedBlockLocationNetworkNodeComponent.java | 8 ++++++++ .../components/FluidDisplayComponent.java | 5 +++++ .../components/FluidInletOutletComponent.java | 8 ++++++++ .../components/FluidPipeComponent.java | 5 +++++ .../components/FluidPumpComponent.java | 6 ++++++ .../components/FluidTankDisplayComponent.java | 4 ++++ .../FluidTankDropsFluidComponent.java | 4 ++++ .../FluidTransportBlockNetworkComponent.java | 2 +- .../MechanicalPowerToPressureComponent.java | 4 ++++ .../PullInventoryInDirectionComponent.java | 5 +++++ .../PushInventoryInDirectionComponent.java | 8 ++++++++ .../components/MachineDefinitionComponent.java | 15 +++++++++++++++ .../components/NestedMachineComponent.java | 4 ++++ .../ProcessRequirementsProviderComponent.java | 9 ++++----- ...rementsProviderFromWorkstationComponent.java | 14 +++++++------- ...eActivatedInventoryInteractionComponent.java | 8 ++++++++ .../processParts/RequirementInputComponent.java | 6 ++++++ .../MechanicalPowerBlockNetworkComponent.java | 2 +- .../MechanicalPowerProducerComponent.java | 6 ++++++ .../MechanicalPowerRegenComponent.java | 5 +++++ ...chanicalPowerSidedBlockNetworkComponent.java | 3 ++- .../components/RotatingAxleComponent.java | 5 +++++ .../ActivateEngineOutputComponent.java | 5 +++++ ...vateEngineOutputProcessPartCommonSystem.java | 17 ++--------------- .../MechanicalPowerInputComponent.java | 5 +++++ ...anicalPowerInputProcessPartCommonSystem.java | 17 ++--------------- 28 files changed, 146 insertions(+), 45 deletions(-) diff --git a/src/main/java/org/terasology/entityNetwork/components/BlockLocationNetworkNodeComponent.java b/src/main/java/org/terasology/entityNetwork/components/BlockLocationNetworkNodeComponent.java index 05e67bd..5bba41b 100644 --- a/src/main/java/org/terasology/entityNetwork/components/BlockLocationNetworkNodeComponent.java +++ b/src/main/java/org/terasology/entityNetwork/components/BlockLocationNetworkNodeComponent.java @@ -24,4 +24,11 @@ public NetworkNode build(EntityRef entityRef) { return null; } } + + @Override + public void copy(BlockLocationNetworkNodeComponent other) { + this.networkId = other.networkId; + this.isLeaf = other.isLeaf; + this.maximumGridDistance = other.maximumGridDistance; + } } diff --git a/src/main/java/org/terasology/entityNetwork/components/EntityNetworkComponent.java b/src/main/java/org/terasology/entityNetwork/components/EntityNetworkComponent.java index 3ffc572..35bba29 100644 --- a/src/main/java/org/terasology/entityNetwork/components/EntityNetworkComponent.java +++ b/src/main/java/org/terasology/entityNetwork/components/EntityNetworkComponent.java @@ -5,4 +5,8 @@ import org.terasology.gestalt.entitysystem.component.Component; public class EntityNetworkComponent implements Component { + @Override + public void copy(EntityNetworkComponent other) { + + } } diff --git a/src/main/java/org/terasology/entityNetwork/components/SidedBlockLocationNetworkNodeComponent.java b/src/main/java/org/terasology/entityNetwork/components/SidedBlockLocationNetworkNodeComponent.java index 384099d..6d0fb38 100644 --- a/src/main/java/org/terasology/entityNetwork/components/SidedBlockLocationNetworkNodeComponent.java +++ b/src/main/java/org/terasology/entityNetwork/components/SidedBlockLocationNetworkNodeComponent.java @@ -42,4 +42,12 @@ private byte calculateConnectionSides(BlockComponent block) { } return SideBitFlag.getSides(sides); } + + @Override + public void copy(SidedBlockLocationNetworkNodeComponent other) { + this.networkId = other.networkId; + this.isLeaf = other.isLeaf; + this.directions.clear(); + this.directions.addAll(other.directions); + } } diff --git a/src/main/java/org/terasology/fluidTransport/components/FluidDisplayComponent.java b/src/main/java/org/terasology/fluidTransport/components/FluidDisplayComponent.java index 2148120..c225fcf 100644 --- a/src/main/java/org/terasology/fluidTransport/components/FluidDisplayComponent.java +++ b/src/main/java/org/terasology/fluidTransport/components/FluidDisplayComponent.java @@ -9,4 +9,9 @@ public class FluidDisplayComponent implements Component { @Owns public EntityRef renderedEntity; + + @Override + public void copy(FluidDisplayComponent other) { + + } } diff --git a/src/main/java/org/terasology/fluidTransport/components/FluidInletOutletComponent.java b/src/main/java/org/terasology/fluidTransport/components/FluidInletOutletComponent.java index a003bba..9920642 100644 --- a/src/main/java/org/terasology/fluidTransport/components/FluidInletOutletComponent.java +++ b/src/main/java/org/terasology/fluidTransport/components/FluidInletOutletComponent.java @@ -17,4 +17,12 @@ public class FluidInletOutletComponent implements Component { public float maximumFlowRate; + + @Override + public void copy(FluidPipeComponent other) { + this.maximumFlowRate = other.maximumFlowRate; + } } diff --git a/src/main/java/org/terasology/fluidTransport/components/FluidPumpComponent.java b/src/main/java/org/terasology/fluidTransport/components/FluidPumpComponent.java index c8b3d41..1a4ec09 100644 --- a/src/main/java/org/terasology/fluidTransport/components/FluidPumpComponent.java +++ b/src/main/java/org/terasology/fluidTransport/components/FluidPumpComponent.java @@ -11,4 +11,10 @@ public class FluidPumpComponent implements Component { @Replicate public float pressure; public float maximumFlowRate; + + @Override + public void copy(FluidPumpComponent other) { + this.pressure = other.pressure; + this.maximumFlowRate = other.maximumFlowRate; + } } diff --git a/src/main/java/org/terasology/fluidTransport/components/FluidTankDisplayComponent.java b/src/main/java/org/terasology/fluidTransport/components/FluidTankDisplayComponent.java index 6be51ca..39f19b4 100644 --- a/src/main/java/org/terasology/fluidTransport/components/FluidTankDisplayComponent.java +++ b/src/main/java/org/terasology/fluidTransport/components/FluidTankDisplayComponent.java @@ -5,4 +5,8 @@ import org.terasology.gestalt.entitysystem.component.Component; public class FluidTankDisplayComponent implements Component { + @Override + public void copy(FluidTankDisplayComponent other) { + + } } diff --git a/src/main/java/org/terasology/fluidTransport/components/FluidTankDropsFluidComponent.java b/src/main/java/org/terasology/fluidTransport/components/FluidTankDropsFluidComponent.java index 9b808d0..ccf9cfe 100644 --- a/src/main/java/org/terasology/fluidTransport/components/FluidTankDropsFluidComponent.java +++ b/src/main/java/org/terasology/fluidTransport/components/FluidTankDropsFluidComponent.java @@ -5,4 +5,8 @@ import org.terasology.gestalt.entitysystem.component.Component; public class FluidTankDropsFluidComponent implements Component { + @Override + public void copy(FluidTankDropsFluidComponent other) { + + } } diff --git a/src/main/java/org/terasology/fluidTransport/components/FluidTransportBlockNetworkComponent.java b/src/main/java/org/terasology/fluidTransport/components/FluidTransportBlockNetworkComponent.java index a37f965..24cc854 100644 --- a/src/main/java/org/terasology/fluidTransport/components/FluidTransportBlockNetworkComponent.java +++ b/src/main/java/org/terasology/fluidTransport/components/FluidTransportBlockNetworkComponent.java @@ -8,7 +8,7 @@ import org.terasology.gestalt.entitysystem.component.Component; @ForceBlockActive -public class FluidTransportBlockNetworkComponent extends BlockLocationNetworkNodeComponent implements Component { +public class FluidTransportBlockNetworkComponent extends BlockLocationNetworkNodeComponent implements Component { public FluidTransportBlockNetworkComponent() { this.networkId = FluidTransportAuthoritySystem.NETWORK_ID; } diff --git a/src/main/java/org/terasology/fluidTransport/processParts/MechanicalPowerToPressureComponent.java b/src/main/java/org/terasology/fluidTransport/processParts/MechanicalPowerToPressureComponent.java index 05b86f3..2cbcec0 100644 --- a/src/main/java/org/terasology/fluidTransport/processParts/MechanicalPowerToPressureComponent.java +++ b/src/main/java/org/terasology/fluidTransport/processParts/MechanicalPowerToPressureComponent.java @@ -5,4 +5,8 @@ import org.terasology.gestalt.entitysystem.component.Component; public class MechanicalPowerToPressureComponent implements Component { + @Override + public void copy(MechanicalPowerToPressureComponent other) { + + } } diff --git a/src/main/java/org/terasology/itemTransport/components/PullInventoryInDirectionComponent.java b/src/main/java/org/terasology/itemTransport/components/PullInventoryInDirectionComponent.java index 6556a95..2bae9b0 100644 --- a/src/main/java/org/terasology/itemTransport/components/PullInventoryInDirectionComponent.java +++ b/src/main/java/org/terasology/itemTransport/components/PullInventoryInDirectionComponent.java @@ -7,4 +7,9 @@ public class PullInventoryInDirectionComponent implements Component { public Direction direction = Direction.FORWARD; + + @Override + public void copy(PullInventoryInDirectionComponent other) { + this.direction = other.direction; + } } diff --git a/src/main/java/org/terasology/itemTransport/components/PushInventoryInDirectionComponent.java b/src/main/java/org/terasology/itemTransport/components/PushInventoryInDirectionComponent.java index 3b374f3..1e53fb9 100644 --- a/src/main/java/org/terasology/itemTransport/components/PushInventoryInDirectionComponent.java +++ b/src/main/java/org/terasology/itemTransport/components/PushInventoryInDirectionComponent.java @@ -14,4 +14,12 @@ public class PushInventoryInDirectionComponent implements Component inputWidgets = Sets.newHashSet(); public List fluidInputSlotVolumes = Lists.newLinkedList(); public List fluidOutputSlotVolumes = Lists.newLinkedList(); + + @Override + public void copy(MachineDefinitionComponent other) { + this.inputSlots = other.inputSlots; + this.inputSlotsTitle = other.inputSlotsTitle; + this.requirementSlots = other.requirementSlots; + this.requirementSlotsTitle = other.requirementSlotsTitle; + this.outputSlots = other.outputSlots; + this.outputSlotsTitle = other.outputSlotsTitle; + this.actionTitle = other.actionTitle; + this.outputWidgets = Sets.newHashSet(other.outputWidgets); + this.inputWidgets = Sets.newHashSet(other.inputWidgets); + this.fluidInputSlotVolumes = Lists.newLinkedList(other.fluidInputSlotVolumes); + this.fluidOutputSlotVolumes = Lists.newLinkedList(other.fluidOutputSlotVolumes); + } } diff --git a/src/main/java/org/terasology/machines/components/NestedMachineComponent.java b/src/main/java/org/terasology/machines/components/NestedMachineComponent.java index 7415257..fe90e3b 100644 --- a/src/main/java/org/terasology/machines/components/NestedMachineComponent.java +++ b/src/main/java/org/terasology/machines/components/NestedMachineComponent.java @@ -5,4 +5,8 @@ import org.terasology.gestalt.entitysystem.component.Component; public class NestedMachineComponent implements Component { + @Override + public void copy(NestedMachineComponent other) { + + } } diff --git a/src/main/java/org/terasology/machines/components/ProcessRequirementsProviderComponent.java b/src/main/java/org/terasology/machines/components/ProcessRequirementsProviderComponent.java index 0638a71..155ad0f 100644 --- a/src/main/java/org/terasology/machines/components/ProcessRequirementsProviderComponent.java +++ b/src/main/java/org/terasology/machines/components/ProcessRequirementsProviderComponent.java @@ -6,6 +6,7 @@ import org.terasology.engine.network.Replicate; import org.terasology.gestalt.entitysystem.component.Component; +import java.util.Arrays; import java.util.List; public class ProcessRequirementsProviderComponent implements Component { @@ -15,10 +16,8 @@ public class ProcessRequirementsProviderComponent implements Component { + public ProcessRequirementsProviderFromWorkstationComponent() { + } + @Replicate public List requirements = Lists.newArrayList(); - public ProcessRequirementsProviderFromWorkstationComponent() { - } - public ProcessRequirementsProviderFromWorkstationComponent(String... requirements) { - for (String requirement : requirements) { - this.requirements.add(requirement); - } - } + @Override + public void copy(ProcessRequirementsProviderFromWorkstationComponent other) { + this.requirements = Lists.newArrayList(other.requirements); + } } diff --git a/src/main/java/org/terasology/machines/components/SideActivatedInventoryInteractionComponent.java b/src/main/java/org/terasology/machines/components/SideActivatedInventoryInteractionComponent.java index b5413c2..99a49fe 100644 --- a/src/main/java/org/terasology/machines/components/SideActivatedInventoryInteractionComponent.java +++ b/src/main/java/org/terasology/machines/components/SideActivatedInventoryInteractionComponent.java @@ -11,4 +11,12 @@ public class SideActivatedInventoryInteractionComponent implements Component { public List requirements = Lists.newArrayList(); + + @Override + public void copy(RequirementInputComponent other) { + this.requirements.clear(); + this.requirements.addAll(other.requirements); + } } diff --git a/src/main/java/org/terasology/mechanicalPower/components/MechanicalPowerBlockNetworkComponent.java b/src/main/java/org/terasology/mechanicalPower/components/MechanicalPowerBlockNetworkComponent.java index 5f199df..26ae3e9 100644 --- a/src/main/java/org/terasology/mechanicalPower/components/MechanicalPowerBlockNetworkComponent.java +++ b/src/main/java/org/terasology/mechanicalPower/components/MechanicalPowerBlockNetworkComponent.java @@ -8,7 +8,7 @@ import org.terasology.mechanicalPower.systems.MechanicalPowerAuthoritySystem; @ForceBlockActive -public class MechanicalPowerBlockNetworkComponent extends BlockLocationNetworkNodeComponent implements Component { +public class MechanicalPowerBlockNetworkComponent extends BlockLocationNetworkNodeComponent implements Component { public MechanicalPowerBlockNetworkComponent() { networkId = MechanicalPowerAuthoritySystem.NETWORK_ID; } diff --git a/src/main/java/org/terasology/mechanicalPower/components/MechanicalPowerProducerComponent.java b/src/main/java/org/terasology/mechanicalPower/components/MechanicalPowerProducerComponent.java index 5935551..3552629 100644 --- a/src/main/java/org/terasology/mechanicalPower/components/MechanicalPowerProducerComponent.java +++ b/src/main/java/org/terasology/mechanicalPower/components/MechanicalPowerProducerComponent.java @@ -12,4 +12,10 @@ public class MechanicalPowerProducerComponent implements Component { @Replicate public float power; + + @Override + public void copy(MechanicalPowerRegenComponent other) { + this.power = other.power; + } } diff --git a/src/main/java/org/terasology/mechanicalPower/components/MechanicalPowerSidedBlockNetworkComponent.java b/src/main/java/org/terasology/mechanicalPower/components/MechanicalPowerSidedBlockNetworkComponent.java index b4ce21f..ade0fc5 100644 --- a/src/main/java/org/terasology/mechanicalPower/components/MechanicalPowerSidedBlockNetworkComponent.java +++ b/src/main/java/org/terasology/mechanicalPower/components/MechanicalPowerSidedBlockNetworkComponent.java @@ -3,12 +3,13 @@ package org.terasology.mechanicalPower.components; import org.terasology.engine.world.block.ForceBlockActive; +import org.terasology.entityNetwork.components.BlockLocationNetworkNodeComponent; import org.terasology.entityNetwork.components.SidedBlockLocationNetworkNodeComponent; import org.terasology.gestalt.entitysystem.component.Component; import org.terasology.mechanicalPower.systems.MechanicalPowerAuthoritySystem; @ForceBlockActive -public class MechanicalPowerSidedBlockNetworkComponent extends SidedBlockLocationNetworkNodeComponent implements Component { +public class MechanicalPowerSidedBlockNetworkComponent extends SidedBlockLocationNetworkNodeComponent implements Component { public MechanicalPowerSidedBlockNetworkComponent() { networkId = MechanicalPowerAuthoritySystem.NETWORK_ID; } diff --git a/src/main/java/org/terasology/mechanicalPower/components/RotatingAxleComponent.java b/src/main/java/org/terasology/mechanicalPower/components/RotatingAxleComponent.java index a3587d5..426ed7a 100644 --- a/src/main/java/org/terasology/mechanicalPower/components/RotatingAxleComponent.java +++ b/src/main/java/org/terasology/mechanicalPower/components/RotatingAxleComponent.java @@ -9,4 +9,9 @@ public class RotatingAxleComponent implements Component { @Owns public EntityRef renderedEntity; + + @Override + public void copy(RotatingAxleComponent other) { + this.renderedEntity = other.renderedEntity; + } } diff --git a/src/main/java/org/terasology/mechanicalPower/processParts/ActivateEngineOutputComponent.java b/src/main/java/org/terasology/mechanicalPower/processParts/ActivateEngineOutputComponent.java index 6432602..0f31f66 100644 --- a/src/main/java/org/terasology/mechanicalPower/processParts/ActivateEngineOutputComponent.java +++ b/src/main/java/org/terasology/mechanicalPower/processParts/ActivateEngineOutputComponent.java @@ -6,4 +6,9 @@ public class ActivateEngineOutputComponent implements Component { public long activateTime; + + @Override + public void copy(ActivateEngineOutputComponent other) { + this.activateTime = other.activateTime; + } } diff --git a/src/main/java/org/terasology/mechanicalPower/processParts/ActivateEngineOutputProcessPartCommonSystem.java b/src/main/java/org/terasology/mechanicalPower/processParts/ActivateEngineOutputProcessPartCommonSystem.java index 9065fb0..9751eb0 100644 --- a/src/main/java/org/terasology/mechanicalPower/processParts/ActivateEngineOutputProcessPartCommonSystem.java +++ b/src/main/java/org/terasology/mechanicalPower/processParts/ActivateEngineOutputProcessPartCommonSystem.java @@ -1,18 +1,5 @@ -/* - * Copyright 2016 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.mechanicalPower.processParts; import org.terasology.engine.entitySystem.entity.EntityRef; diff --git a/src/main/java/org/terasology/mechanicalPower/processParts/MechanicalPowerInputComponent.java b/src/main/java/org/terasology/mechanicalPower/processParts/MechanicalPowerInputComponent.java index 230874c..ceaa147 100644 --- a/src/main/java/org/terasology/mechanicalPower/processParts/MechanicalPowerInputComponent.java +++ b/src/main/java/org/terasology/mechanicalPower/processParts/MechanicalPowerInputComponent.java @@ -6,4 +6,9 @@ public class MechanicalPowerInputComponent implements Component { public float power; + + @Override + public void copy(MechanicalPowerInputComponent other) { + this.power = other.power; + } } diff --git a/src/main/java/org/terasology/mechanicalPower/processParts/MechanicalPowerInputProcessPartCommonSystem.java b/src/main/java/org/terasology/mechanicalPower/processParts/MechanicalPowerInputProcessPartCommonSystem.java index 092c2a6..b177dc0 100644 --- a/src/main/java/org/terasology/mechanicalPower/processParts/MechanicalPowerInputProcessPartCommonSystem.java +++ b/src/main/java/org/terasology/mechanicalPower/processParts/MechanicalPowerInputProcessPartCommonSystem.java @@ -1,18 +1,5 @@ -/* - * Copyright 2016 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.mechanicalPower.processParts; import org.terasology.engine.entitySystem.entity.EntityRef; From 7de4690580b2e748c37d35743e1521ce34be3585 Mon Sep 17 00:00:00 2001 From: Tobias Nett Date: Sat, 14 Aug 2021 12:18:59 +0200 Subject: [PATCH 3/3] chore: rename copy >>> copyFrom (as per MovingBlocks/gestalt#123) --- .../components/BlockLocationNetworkNodeComponent.java | 2 +- .../entityNetwork/components/EntityNetworkComponent.java | 2 +- .../components/SidedBlockLocationNetworkNodeComponent.java | 2 +- .../fluidTransport/components/FluidDisplayComponent.java | 2 +- .../fluidTransport/components/FluidInletOutletComponent.java | 2 +- .../fluidTransport/components/FluidPipeComponent.java | 2 +- .../fluidTransport/components/FluidPumpComponent.java | 2 +- .../fluidTransport/components/FluidTankDisplayComponent.java | 2 +- .../components/FluidTankDropsFluidComponent.java | 2 +- .../processParts/MechanicalPowerToPressureComponent.java | 2 +- .../components/PullInventoryInDirectionComponent.java | 2 +- .../components/PushInventoryInDirectionComponent.java | 2 +- .../machines/components/MachineDefinitionComponent.java | 2 +- .../terasology/machines/components/NestedMachineComponent.java | 2 +- .../components/ProcessRequirementsProviderComponent.java | 3 +-- .../ProcessRequirementsProviderFromWorkstationComponent.java | 2 +- .../components/RenderInventoryInCategoryComponent.java | 2 +- .../components/SideActivatedInventoryInteractionComponent.java | 2 +- .../machines/processParts/RequirementInputComponent.java | 2 +- .../components/MechanicalPowerProducerComponent.java | 2 +- .../components/MechanicalPowerRegenComponent.java | 2 +- .../mechanicalPower/components/RotatingAxleComponent.java | 2 +- .../processParts/ActivateEngineOutputComponent.java | 2 +- .../processParts/MechanicalPowerInputComponent.java | 2 +- 24 files changed, 24 insertions(+), 25 deletions(-) diff --git a/src/main/java/org/terasology/entityNetwork/components/BlockLocationNetworkNodeComponent.java b/src/main/java/org/terasology/entityNetwork/components/BlockLocationNetworkNodeComponent.java index 5bba41b..715f789 100644 --- a/src/main/java/org/terasology/entityNetwork/components/BlockLocationNetworkNodeComponent.java +++ b/src/main/java/org/terasology/entityNetwork/components/BlockLocationNetworkNodeComponent.java @@ -26,7 +26,7 @@ public NetworkNode build(EntityRef entityRef) { } @Override - public void copy(BlockLocationNetworkNodeComponent other) { + public void copyFrom(BlockLocationNetworkNodeComponent other) { this.networkId = other.networkId; this.isLeaf = other.isLeaf; this.maximumGridDistance = other.maximumGridDistance; diff --git a/src/main/java/org/terasology/entityNetwork/components/EntityNetworkComponent.java b/src/main/java/org/terasology/entityNetwork/components/EntityNetworkComponent.java index 35bba29..f491caf 100644 --- a/src/main/java/org/terasology/entityNetwork/components/EntityNetworkComponent.java +++ b/src/main/java/org/terasology/entityNetwork/components/EntityNetworkComponent.java @@ -6,7 +6,7 @@ public class EntityNetworkComponent implements Component { @Override - public void copy(EntityNetworkComponent other) { + public void copyFrom(EntityNetworkComponent other) { } } diff --git a/src/main/java/org/terasology/entityNetwork/components/SidedBlockLocationNetworkNodeComponent.java b/src/main/java/org/terasology/entityNetwork/components/SidedBlockLocationNetworkNodeComponent.java index 6d0fb38..d7cd2a6 100644 --- a/src/main/java/org/terasology/entityNetwork/components/SidedBlockLocationNetworkNodeComponent.java +++ b/src/main/java/org/terasology/entityNetwork/components/SidedBlockLocationNetworkNodeComponent.java @@ -44,7 +44,7 @@ private byte calculateConnectionSides(BlockComponent block) { } @Override - public void copy(SidedBlockLocationNetworkNodeComponent other) { + public void copyFrom(SidedBlockLocationNetworkNodeComponent other) { this.networkId = other.networkId; this.isLeaf = other.isLeaf; this.directions.clear(); diff --git a/src/main/java/org/terasology/fluidTransport/components/FluidDisplayComponent.java b/src/main/java/org/terasology/fluidTransport/components/FluidDisplayComponent.java index c225fcf..f61006e 100644 --- a/src/main/java/org/terasology/fluidTransport/components/FluidDisplayComponent.java +++ b/src/main/java/org/terasology/fluidTransport/components/FluidDisplayComponent.java @@ -11,7 +11,7 @@ public class FluidDisplayComponent implements Component { public EntityRef renderedEntity; @Override - public void copy(FluidDisplayComponent other) { + public void copyFrom(FluidDisplayComponent other) { } } diff --git a/src/main/java/org/terasology/fluidTransport/components/FluidInletOutletComponent.java b/src/main/java/org/terasology/fluidTransport/components/FluidInletOutletComponent.java index 9920642..1676696 100644 --- a/src/main/java/org/terasology/fluidTransport/components/FluidInletOutletComponent.java +++ b/src/main/java/org/terasology/fluidTransport/components/FluidInletOutletComponent.java @@ -19,7 +19,7 @@ public class FluidInletOutletComponent implements Component { public float maximumFlowRate; @Override - public void copy(FluidPipeComponent other) { + public void copyFrom(FluidPipeComponent other) { this.maximumFlowRate = other.maximumFlowRate; } } diff --git a/src/main/java/org/terasology/fluidTransport/components/FluidPumpComponent.java b/src/main/java/org/terasology/fluidTransport/components/FluidPumpComponent.java index 1a4ec09..057198f 100644 --- a/src/main/java/org/terasology/fluidTransport/components/FluidPumpComponent.java +++ b/src/main/java/org/terasology/fluidTransport/components/FluidPumpComponent.java @@ -13,7 +13,7 @@ public class FluidPumpComponent implements Component { public float maximumFlowRate; @Override - public void copy(FluidPumpComponent other) { + public void copyFrom(FluidPumpComponent other) { this.pressure = other.pressure; this.maximumFlowRate = other.maximumFlowRate; } diff --git a/src/main/java/org/terasology/fluidTransport/components/FluidTankDisplayComponent.java b/src/main/java/org/terasology/fluidTransport/components/FluidTankDisplayComponent.java index 39f19b4..18399c9 100644 --- a/src/main/java/org/terasology/fluidTransport/components/FluidTankDisplayComponent.java +++ b/src/main/java/org/terasology/fluidTransport/components/FluidTankDisplayComponent.java @@ -6,7 +6,7 @@ public class FluidTankDisplayComponent implements Component { @Override - public void copy(FluidTankDisplayComponent other) { + public void copyFrom(FluidTankDisplayComponent other) { } } diff --git a/src/main/java/org/terasology/fluidTransport/components/FluidTankDropsFluidComponent.java b/src/main/java/org/terasology/fluidTransport/components/FluidTankDropsFluidComponent.java index ccf9cfe..80b2b19 100644 --- a/src/main/java/org/terasology/fluidTransport/components/FluidTankDropsFluidComponent.java +++ b/src/main/java/org/terasology/fluidTransport/components/FluidTankDropsFluidComponent.java @@ -6,7 +6,7 @@ public class FluidTankDropsFluidComponent implements Component { @Override - public void copy(FluidTankDropsFluidComponent other) { + public void copyFrom(FluidTankDropsFluidComponent other) { } } diff --git a/src/main/java/org/terasology/fluidTransport/processParts/MechanicalPowerToPressureComponent.java b/src/main/java/org/terasology/fluidTransport/processParts/MechanicalPowerToPressureComponent.java index 2cbcec0..c0fb1ae 100644 --- a/src/main/java/org/terasology/fluidTransport/processParts/MechanicalPowerToPressureComponent.java +++ b/src/main/java/org/terasology/fluidTransport/processParts/MechanicalPowerToPressureComponent.java @@ -6,7 +6,7 @@ public class MechanicalPowerToPressureComponent implements Component { @Override - public void copy(MechanicalPowerToPressureComponent other) { + public void copyFrom(MechanicalPowerToPressureComponent other) { } } diff --git a/src/main/java/org/terasology/itemTransport/components/PullInventoryInDirectionComponent.java b/src/main/java/org/terasology/itemTransport/components/PullInventoryInDirectionComponent.java index 2bae9b0..8a562bd 100644 --- a/src/main/java/org/terasology/itemTransport/components/PullInventoryInDirectionComponent.java +++ b/src/main/java/org/terasology/itemTransport/components/PullInventoryInDirectionComponent.java @@ -9,7 +9,7 @@ public class PullInventoryInDirectionComponent implements Component fluidOutputSlotVolumes = Lists.newLinkedList(); @Override - public void copy(MachineDefinitionComponent other) { + public void copyFrom(MachineDefinitionComponent other) { this.inputSlots = other.inputSlots; this.inputSlotsTitle = other.inputSlotsTitle; this.requirementSlots = other.requirementSlots; diff --git a/src/main/java/org/terasology/machines/components/NestedMachineComponent.java b/src/main/java/org/terasology/machines/components/NestedMachineComponent.java index fe90e3b..0e97fe8 100644 --- a/src/main/java/org/terasology/machines/components/NestedMachineComponent.java +++ b/src/main/java/org/terasology/machines/components/NestedMachineComponent.java @@ -6,7 +6,7 @@ public class NestedMachineComponent implements Component { @Override - public void copy(NestedMachineComponent other) { + public void copyFrom(NestedMachineComponent other) { } } diff --git a/src/main/java/org/terasology/machines/components/ProcessRequirementsProviderComponent.java b/src/main/java/org/terasology/machines/components/ProcessRequirementsProviderComponent.java index 155ad0f..e2c274e 100644 --- a/src/main/java/org/terasology/machines/components/ProcessRequirementsProviderComponent.java +++ b/src/main/java/org/terasology/machines/components/ProcessRequirementsProviderComponent.java @@ -6,7 +6,6 @@ import org.terasology.engine.network.Replicate; import org.terasology.gestalt.entitysystem.component.Component; -import java.util.Arrays; import java.util.List; public class ProcessRequirementsProviderComponent implements Component { @@ -17,7 +16,7 @@ public class ProcessRequirementsProviderComponent implements Component requirements = Lists.newArrayList(); @Override - public void copy(RequirementInputComponent other) { + public void copyFrom(RequirementInputComponent other) { this.requirements.clear(); this.requirements.addAll(other.requirements); } diff --git a/src/main/java/org/terasology/mechanicalPower/components/MechanicalPowerProducerComponent.java b/src/main/java/org/terasology/mechanicalPower/components/MechanicalPowerProducerComponent.java index 3552629..d7778f6 100644 --- a/src/main/java/org/terasology/mechanicalPower/components/MechanicalPowerProducerComponent.java +++ b/src/main/java/org/terasology/mechanicalPower/components/MechanicalPowerProducerComponent.java @@ -14,7 +14,7 @@ public class MechanicalPowerProducerComponent implements Component { public EntityRef renderedEntity; @Override - public void copy(RotatingAxleComponent other) { + public void copyFrom(RotatingAxleComponent other) { this.renderedEntity = other.renderedEntity; } } diff --git a/src/main/java/org/terasology/mechanicalPower/processParts/ActivateEngineOutputComponent.java b/src/main/java/org/terasology/mechanicalPower/processParts/ActivateEngineOutputComponent.java index 0f31f66..17f50eb 100644 --- a/src/main/java/org/terasology/mechanicalPower/processParts/ActivateEngineOutputComponent.java +++ b/src/main/java/org/terasology/mechanicalPower/processParts/ActivateEngineOutputComponent.java @@ -8,7 +8,7 @@ public class ActivateEngineOutputComponent implements Component