mirror of
https://github.com/Creators-of-Create/Create.git
synced 2025-01-12 23:37:29 +01:00
Refactored PeripheralBase to SyncedPeripheral
This commit is contained in:
parent
7d47fdcd06
commit
9afdcaded7
7 changed files with 8 additions and 8 deletions
|
@ -13,7 +13,7 @@ import net.minecraft.nbt.ListTag;
|
|||
import net.minecraft.nbt.StringTag;
|
||||
import net.minecraft.nbt.Tag;
|
||||
|
||||
public class DisplayLinkPeripheral extends PeripheralBase<DisplayLinkTileEntity> {
|
||||
public class DisplayLinkPeripheral extends SyncedPeripheral<DisplayLinkTileEntity> {
|
||||
|
||||
public static final String TAG_KEY = "ComputerSourceList";
|
||||
private final AtomicInteger cursorX = new AtomicInteger();
|
||||
|
|
|
@ -11,7 +11,7 @@ import dan200.computercraft.api.lua.IArguments;
|
|||
import dan200.computercraft.api.lua.LuaException;
|
||||
import dan200.computercraft.api.lua.LuaFunction;
|
||||
|
||||
public class SequencedGearshiftPeripheral extends PeripheralBase<SequencedGearshiftTileEntity> {
|
||||
public class SequencedGearshiftPeripheral extends SyncedPeripheral<SequencedGearshiftTileEntity> {
|
||||
|
||||
public SequencedGearshiftPeripheral(SequencedGearshiftTileEntity tile) {
|
||||
super(tile);
|
||||
|
|
|
@ -7,7 +7,7 @@ import com.simibubi.create.foundation.tileEntity.behaviour.scrollvalue.ScrollVal
|
|||
|
||||
import dan200.computercraft.api.lua.LuaFunction;
|
||||
|
||||
public class SpeedControllerPeripheral extends PeripheralBase<SpeedControllerTileEntity> {
|
||||
public class SpeedControllerPeripheral extends SyncedPeripheral<SpeedControllerTileEntity> {
|
||||
|
||||
private final ScrollValueBehaviour targetSpeed;
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import com.simibubi.create.content.contraptions.relays.gauge.SpeedGaugeTileEntit
|
|||
|
||||
import dan200.computercraft.api.lua.LuaFunction;
|
||||
|
||||
public class SpeedGaugePeripheral extends PeripheralBase<SpeedGaugeTileEntity> {
|
||||
public class SpeedGaugePeripheral extends SyncedPeripheral<SpeedGaugeTileEntity> {
|
||||
|
||||
public SpeedGaugePeripheral(SpeedGaugeTileEntity tile) {
|
||||
super(tile);
|
||||
|
|
|
@ -23,7 +23,7 @@ import dan200.computercraft.api.lua.LuaFunction;
|
|||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
|
||||
public class StationPeripheral extends PeripheralBase<StationTileEntity> {
|
||||
public class StationPeripheral extends SyncedPeripheral<StationTileEntity> {
|
||||
|
||||
public StationPeripheral(StationTileEntity tile) {
|
||||
super(tile);
|
||||
|
|
|
@ -6,7 +6,7 @@ import com.simibubi.create.content.contraptions.relays.gauge.StressGaugeTileEnti
|
|||
|
||||
import dan200.computercraft.api.lua.LuaFunction;
|
||||
|
||||
public class StressGaugePeripheral extends PeripheralBase<StressGaugeTileEntity> {
|
||||
public class StressGaugePeripheral extends SyncedPeripheral<StressGaugeTileEntity> {
|
||||
|
||||
public StressGaugePeripheral(StressGaugeTileEntity tile) {
|
||||
super(tile);
|
||||
|
|
|
@ -14,12 +14,12 @@ import dan200.computercraft.api.peripheral.IComputerAccess;
|
|||
import dan200.computercraft.api.peripheral.IPeripheral;
|
||||
import net.minecraftforge.network.PacketDistributor;
|
||||
|
||||
public abstract class PeripheralBase<T extends SmartTileEntity> implements IPeripheral {
|
||||
public abstract class SyncedPeripheral<T extends SmartTileEntity> implements IPeripheral {
|
||||
|
||||
protected final T tile;
|
||||
private final AtomicInteger computers = new AtomicInteger();
|
||||
|
||||
public PeripheralBase(T tile) {
|
||||
public SyncedPeripheral(T tile) {
|
||||
this.tile = tile;
|
||||
}
|
||||
|
Loading…
Reference in a new issue