Skip to content

Commit

Permalink
ref: fixed imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Uhutown committed Aug 9, 2024
1 parent fb61dd3 commit ce91562
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 73 deletions.
92 changes: 46 additions & 46 deletions src/main/java/com/troblecodings/signals/init/OSItems.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

import com.google.gson.Gson;
import com.troblecodings.core.NBTWrapper;
import com.troblecodings.linkableapi.Linkingtool;
import com.troblecodings.linkableapi.MultiLinkingTool;
import com.troblecodings.opensignals.linkableapi.Linkingtool;
import com.troblecodings.opensignals.linkableapi.MultiLinkingTool;
import com.troblecodings.signals.OpenSignalsMain;
import com.troblecodings.signals.blocks.Signal;
import com.troblecodings.signals.items.ItemArmorTemplate;
Expand Down Expand Up @@ -43,8 +43,8 @@ private OSItems() {
final NBTWrapper wrapper = new NBTWrapper(tag);
wrapper.putString(pos.toShortString(), state.getBlock().getRegistryName().getPath());
});
public static final MultiLinkingTool MULTI_LINKING_TOOL =
new MultiLinkingTool(OSTabs.TAB, (world, pos) -> {
public static final MultiLinkingTool MULTI_LINKING_TOOL = new MultiLinkingTool(OSTabs.TAB,
(world, pos) -> {
final BlockState state = world.getBlockState(pos);
final Block block = state.getBlock();
final boolean isRedstoneBlock = block == OSBlocks.REDSTONE_IN
Expand All @@ -58,30 +58,30 @@ private OSItems() {
wrapper.putString(pos.toShortString(),
state.getBlock().getRegistryName().getPath());
});
public static final Item CONDUCTOR_TROWEL_GREEN =
new Item(new Properties().tab(CreativeModeTab.TAB_COMBAT));
public static final Item CONDUCTOR_TROWEL_RED =
new Item(new Properties().tab(CreativeModeTab.TAB_COMBAT));
public static final Item WARNING_FLAG =
new Item(new Properties().tab(CreativeModeTab.TAB_COMBAT));
public static final Item CONDUCTOR_TROWEL_GREEN = new Item(
new Properties().tab(CreativeModeTab.TAB_COMBAT));
public static final Item CONDUCTOR_TROWEL_RED = new Item(
new Properties().tab(CreativeModeTab.TAB_COMBAT));
public static final Item WARNING_FLAG = new Item(
new Properties().tab(CreativeModeTab.TAB_COMBAT));
public static final Item K_BOARD = new Item(new Properties().tab(CreativeModeTab.TAB_COMBAT));
public static final Item L_BOARD = new Item(new Properties().tab(CreativeModeTab.TAB_COMBAT));
public static final ItemArmorTemplate REFLECTIVE_HEAD =
new ItemArmorTemplate(ItemArmorTemplate.REFLECTIVE_ARMOR_MATERIAL, EquipmentSlot.HEAD);
public static final ItemArmorTemplate REFLECTIVE_CHESTPLATE =
new ItemArmorTemplate(ItemArmorTemplate.REFLECTIVE_ARMOR_MATERIAL, EquipmentSlot.CHEST);
public static final ItemArmorTemplate REFLECTIVE_PANTS =
new ItemArmorTemplate(ItemArmorTemplate.REFLECTIVE_ARMOR_MATERIAL, EquipmentSlot.LEGS);
public static final ItemArmorTemplate REFLECTIVE_SHOES =
new ItemArmorTemplate(ItemArmorTemplate.REFLECTIVE_ARMOR_MATERIAL, EquipmentSlot.FEET);
public static final ItemArmorTemplate DISPATCHER_HEAD =
new ItemArmorTemplate(ItemArmorTemplate.DISPATCHER_ARMOR_MATERIAL, EquipmentSlot.HEAD);
public static final ItemArmorTemplate DISPATCHER_CHESTPLATE =
new ItemArmorTemplate(ItemArmorTemplate.DISPATCHER_ARMOR_MATERIAL, EquipmentSlot.CHEST);
public static final ItemArmorTemplate DISPATCHER_PANTS =
new ItemArmorTemplate(ItemArmorTemplate.DISPATCHER_ARMOR_MATERIAL, EquipmentSlot.LEGS);
public static final ItemArmorTemplate DISPATCHER_SHOES =
new ItemArmorTemplate(ItemArmorTemplate.DISPATCHER_ARMOR_MATERIAL, EquipmentSlot.FEET);
public static final ItemArmorTemplate REFLECTIVE_HEAD = new ItemArmorTemplate(
ItemArmorTemplate.REFLECTIVE_ARMOR_MATERIAL, EquipmentSlot.HEAD);
public static final ItemArmorTemplate REFLECTIVE_CHESTPLATE = new ItemArmorTemplate(
ItemArmorTemplate.REFLECTIVE_ARMOR_MATERIAL, EquipmentSlot.CHEST);
public static final ItemArmorTemplate REFLECTIVE_PANTS = new ItemArmorTemplate(
ItemArmorTemplate.REFLECTIVE_ARMOR_MATERIAL, EquipmentSlot.LEGS);
public static final ItemArmorTemplate REFLECTIVE_SHOES = new ItemArmorTemplate(
ItemArmorTemplate.REFLECTIVE_ARMOR_MATERIAL, EquipmentSlot.FEET);
public static final ItemArmorTemplate DISPATCHER_HEAD = new ItemArmorTemplate(
ItemArmorTemplate.DISPATCHER_ARMOR_MATERIAL, EquipmentSlot.HEAD);
public static final ItemArmorTemplate DISPATCHER_CHESTPLATE = new ItemArmorTemplate(
ItemArmorTemplate.DISPATCHER_ARMOR_MATERIAL, EquipmentSlot.CHEST);
public static final ItemArmorTemplate DISPATCHER_PANTS = new ItemArmorTemplate(
ItemArmorTemplate.DISPATCHER_ARMOR_MATERIAL, EquipmentSlot.LEGS);
public static final ItemArmorTemplate DISPATCHER_SHOES = new ItemArmorTemplate(
ItemArmorTemplate.DISPATCHER_ARMOR_MATERIAL, EquipmentSlot.FEET);
public static final ItemArmorTemplate STATION_MANAGER_HEAD = new ItemArmorTemplate(
ItemArmorTemplate.STATIONMANAGER_ARMOR_MATERIAL, EquipmentSlot.HEAD);
public static final ItemArmorTemplate STATION_MANAGER_CHESTPLATE = new ItemArmorTemplate(
Expand All @@ -90,29 +90,29 @@ private OSItems() {
ItemArmorTemplate.STATIONMANAGER_ARMOR_MATERIAL, EquipmentSlot.LEGS);
public static final ItemArmorTemplate STATION_MANAGER_SHOES = new ItemArmorTemplate(
ItemArmorTemplate.STATIONMANAGER_ARMOR_MATERIAL, EquipmentSlot.FEET);
public static final ItemArmorTemplate TRAIN_DRIVER_HEAD =
new ItemArmorTemplate(ItemArmorTemplate.TRAINDRIVER_ARMOR_MATERIAL, EquipmentSlot.HEAD);
public static final ItemArmorTemplate TRAIN_DRIVER_HEAD = new ItemArmorTemplate(
ItemArmorTemplate.TRAINDRIVER_ARMOR_MATERIAL, EquipmentSlot.HEAD);
public static final ItemArmorTemplate TRAIN_DRIVER_CHESTPLATE = new ItemArmorTemplate(
ItemArmorTemplate.TRAINDRIVER_ARMOR_MATERIAL, EquipmentSlot.CHEST);
public static final ItemArmorTemplate TRAIN_DRIVER_PANTS =
new ItemArmorTemplate(ItemArmorTemplate.TRAINDRIVER_ARMOR_MATERIAL, EquipmentSlot.LEGS);
public static final ItemArmorTemplate TRAIN_DRIVER_SHOES =
new ItemArmorTemplate(ItemArmorTemplate.TRAINDRIVER_ARMOR_MATERIAL, EquipmentSlot.FEET);
public static final ItemArmorTemplate CONDUCTOR_HEAD =
new ItemArmorTemplate(ItemArmorTemplate.CONDUCTOR_ARMOR_MATERIAL, EquipmentSlot.HEAD);
public static final ItemArmorTemplate CONDUCTOR_CHESTPLATE =
new ItemArmorTemplate(ItemArmorTemplate.CONDUCTOR_ARMOR_MATERIAL, EquipmentSlot.CHEST);
public static final ItemArmorTemplate CONDUCTOR_PANTS =
new ItemArmorTemplate(ItemArmorTemplate.CONDUCTOR_ARMOR_MATERIAL, EquipmentSlot.LEGS);
public static final ItemArmorTemplate CONDUCTOR_SHOES =
new ItemArmorTemplate(ItemArmorTemplate.CONDUCTOR_ARMOR_MATERIAL, EquipmentSlot.FEET);
public static final Item SIGNAL_PLATE =
new Item(new Properties().tab(CreativeModeTab.TAB_MATERIALS));
public static final Item SIGNAL_SHIELD =
new Item(new Properties().tab(CreativeModeTab.TAB_MATERIALS));
public static final ItemArmorTemplate TRAIN_DRIVER_PANTS = new ItemArmorTemplate(
ItemArmorTemplate.TRAINDRIVER_ARMOR_MATERIAL, EquipmentSlot.LEGS);
public static final ItemArmorTemplate TRAIN_DRIVER_SHOES = new ItemArmorTemplate(
ItemArmorTemplate.TRAINDRIVER_ARMOR_MATERIAL, EquipmentSlot.FEET);
public static final ItemArmorTemplate CONDUCTOR_HEAD = new ItemArmorTemplate(
ItemArmorTemplate.CONDUCTOR_ARMOR_MATERIAL, EquipmentSlot.HEAD);
public static final ItemArmorTemplate CONDUCTOR_CHESTPLATE = new ItemArmorTemplate(
ItemArmorTemplate.CONDUCTOR_ARMOR_MATERIAL, EquipmentSlot.CHEST);
public static final ItemArmorTemplate CONDUCTOR_PANTS = new ItemArmorTemplate(
ItemArmorTemplate.CONDUCTOR_ARMOR_MATERIAL, EquipmentSlot.LEGS);
public static final ItemArmorTemplate CONDUCTOR_SHOES = new ItemArmorTemplate(
ItemArmorTemplate.CONDUCTOR_ARMOR_MATERIAL, EquipmentSlot.FEET);
public static final Item SIGNAL_PLATE = new Item(
new Properties().tab(CreativeModeTab.TAB_MATERIALS));
public static final Item SIGNAL_SHIELD = new Item(
new Properties().tab(CreativeModeTab.TAB_MATERIALS));
public static final Item LAMPS = new Item(new Properties().tab(CreativeModeTab.TAB_MATERIALS));
public static final Item ELECTRIC_PARTS =
new Item(new Properties().tab(CreativeModeTab.TAB_MATERIALS));
public static final Item ELECTRIC_PARTS = new Item(
new Properties().tab(CreativeModeTab.TAB_MATERIALS));
public static final Item MANIPULATOR = new Item(new Properties().tab(OSTabs.TAB));
public static final SignalBridgeItem SIGNAL_BRIDGE_ITEM = new SignalBridgeItem();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.troblecodings.core.NBTWrapper;
import com.troblecodings.guilib.ecs.interfaces.ISyncable;
import com.troblecodings.linkableapi.ILinkableTile;
import com.troblecodings.opensignals.linkableapi.ILinkableTile;
import com.troblecodings.signals.OpenSignalsMain;
import com.troblecodings.signals.blocks.BasicBlock;
import com.troblecodings.signals.blocks.Signal;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import com.google.common.collect.Maps;
import com.troblecodings.core.NBTWrapper;
import com.troblecodings.linkableapi.ILinkableTile;
import com.troblecodings.opensignals.linkableapi.ILinkableTile;
import com.troblecodings.signals.OpenSignalsMain;
import com.troblecodings.signals.blocks.SignalBox;
import com.troblecodings.signals.core.TileEntityInfo;
Expand All @@ -24,8 +24,8 @@ public class PathwayRequesterTileEntity extends SyncableTileEntity
implements ILinkableTile, IChunkLoadable {

private BlockPos linkedSignalBox;
private Map.Entry<Point, Point> pathway =
Maps.immutableEntry(new Point(-1, -1), new Point(-1, -1));
private Map.Entry<Point, Point> pathway = Maps.immutableEntry(new Point(-1, -1),
new Point(-1, -1));
private boolean addPWToSaver = true;

public PathwayRequesterTileEntity(final TileEntityInfo info) {
Expand Down Expand Up @@ -68,8 +68,8 @@ public void requestPathway() {
loadChunkAndGetTile(SignalBoxTileEntity.class, (ServerLevel) level, linkedSignalBox,
(tile, _u) -> {
final SignalBoxGrid grid = tile.getSignalBoxGrid();
final PathwayRequestResult result =
grid.requestWay(pathway.getKey(), pathway.getValue());
final PathwayRequestResult result = grid.requestWay(pathway.getKey(),
pathway.getValue());
if (!result.isPass() && result.canBeAddedToSaver() && addPWToSaver) {
grid.addNextPathway(pathway.getKey(), pathway.getValue());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import com.google.common.collect.ImmutableMap;
import com.troblecodings.core.NBTWrapper;
import com.troblecodings.guilib.ecs.interfaces.ISyncable;
import com.troblecodings.linkableapi.ILinkableTile;
import com.troblecodings.opensignals.linkableapi.ILinkableTile;
import com.troblecodings.signals.OpenSignalsMain;
import com.troblecodings.signals.SEProperty;
import com.troblecodings.signals.blocks.RedstoneInput;
Expand Down Expand Up @@ -199,13 +199,13 @@ public void loadWrapper(final NBTWrapper wrapper) {
});
enabledStates.put(direction, map);
if (comp.contains(RS_BOOLEAN)) {
currentStates[direction.ordinal()] =
comp.getWrapper(RS_BOOLEAN).getBoolean(RS_BOOLEAN);
currentStates[direction.ordinal()] = comp.getWrapper(RS_BOOLEAN)
.getBoolean(RS_BOOLEAN);
}
}
final List<NBTWrapper> list = wrapper.getList(ALLSTATES);
final List<SEProperty> properites =
linkedSignal == null ? new ArrayList<>() : linkedSignal.getProperties();
final List<SEProperty> properites = linkedSignal == null ? new ArrayList<>()
: linkedSignal.getProperties();
list.forEach(compund -> {
final int profile = compund.getInteger(PROFILE);
final NBTWrapper comp = compund.getWrapper(PROPERITES);
Expand All @@ -221,20 +221,20 @@ public void loadWrapper(final NBTWrapper wrapper) {
if (wrapper.contains(LINKED_RS_INPUT)) {
linkedRSInput = wrapper.getBlockPos(LINKED_RS_INPUT);
}
profileRSInput =
(byte) (wrapper.contains(RS_INPUT_PROFILE) ? wrapper.getInteger(RS_INPUT_PROFILE)
: -1);
profileRSInput = (byte) (wrapper.contains(RS_INPUT_PROFILE)
? wrapper.getInteger(RS_INPUT_PROFILE)
: -1);

}

@Override
public void onLoad() {
if (!level.isClientSide) {
if (linkedSignalPosition != null && linkedSignal != null) {
final SignalStateInfo info =
new SignalStateInfo(level, linkedSignalPosition, linkedSignal);
final LoadHolder<StateInfo> holder =
new LoadHolder<>(new StateInfo(level, worldPosition));
final SignalStateInfo info = new SignalStateInfo(level, linkedSignalPosition,
linkedSignal);
final LoadHolder<StateInfo> holder = new LoadHolder<>(
new StateInfo(level, worldPosition));
SignalStateHandler.loadSignal(new SignalStateLoadHoler(info, holder));
SignalStateHandler.addListener(info, listener);
NameHandler.loadName(new StateLoadHolder(info, holder));
Expand All @@ -244,10 +244,10 @@ public void onLoad() {

public void unloadSignal() {
if (linkedSignalPosition != null & linkedSignal != null) {
final SignalStateInfo info =
new SignalStateInfo(level, linkedSignalPosition, linkedSignal);
final LoadHolder<StateInfo> holder =
new LoadHolder<>(new StateInfo(level, worldPosition));
final SignalStateInfo info = new SignalStateInfo(level, linkedSignalPosition,
linkedSignal);
final LoadHolder<StateInfo> holder = new LoadHolder<>(
new StateInfo(level, worldPosition));
SignalStateHandler.unloadSignal(new SignalStateLoadHoler(info, holder));
NameHandler.unloadName(new StateLoadHolder(info, holder));
}
Expand Down Expand Up @@ -322,8 +322,8 @@ public void redstoneUpdate() {
if (profile == null || !allStates.containsKey(profile)) {
continue;
}
final SignalStateInfo info =
new SignalStateInfo(level, linkedSignalPosition, linkedSignal);
final SignalStateInfo info = new SignalStateInfo(level, linkedSignalPosition,
linkedSignal);
SignalStateHandler.runTaskWhenSignalLoaded(info, (stateInfo, _u1,
_u2) -> SignalStateHandler.setStates(info, allStates.get(profile)));
}
Expand All @@ -334,8 +334,8 @@ public void updateFromRSInput() {
return;
final Map<SEProperty, String> properties = allStates.get(profileRSInput);
if (properties != null) {
final SignalStateInfo info =
new SignalStateInfo(level, linkedSignalPosition, linkedSignal);
final SignalStateInfo info = new SignalStateInfo(level, linkedSignalPosition,
linkedSignal);
SignalStateHandler.runTaskWhenSignalLoaded(info,
(stateInfo, _u1, _u2) -> SignalStateHandler.setStates(info, properties));
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.troblecodings.signals.tileentitys;

import com.troblecodings.core.NBTWrapper;
import com.troblecodings.linkableapi.ILinkableTile;
import com.troblecodings.opensignals.linkableapi.ILinkableTile;
import com.troblecodings.signals.OpenSignalsMain;
import com.troblecodings.signals.blocks.SignalBox;
import com.troblecodings.signals.core.TileEntityInfo;
Expand Down

0 comments on commit ce91562

Please sign in to comment.