refactor 6

This commit is contained in:
GlodBlock committed 2023-01-23 16:45:14 +08:00
1 parent 5b62c4fdc8
commit 8d072f0c89
78 files changed
+525 -882

No files matched your search

@@ -27,7 +27,6 @@ import com.glodblock.github.common.item.ItemFluidDrop;
import com.glodblock.github.common.item.ItemFluidPacket;
import com.glodblock.github.common.parts.base.FCSharedFluidBus;
import com.glodblock.github.inventory.FluidConvertingInventoryAdaptor;
import com.glodblock.github.util.Util;
import com.google.common.collect.ImmutableSet;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@@ -230,8 +229,7 @@ public class PartFluidExportBus extends FCSharedFluidBus implements ICraftingReq
protected InventoryAdaptor getHandler(TileEntity target) {
return target != null
? FluidConvertingInventoryAdaptor.wrap(
target, Util.from(this.getSide().getOpposite()))
? FluidConvertingInventoryAdaptor.wrap(target, this.getSide().getOpposite())
: null;
}
@@ -265,7 +265,7 @@ public class PartFluidInterface extends PartInterface implements IDualHost {
player,
this.getHost().getTile().getWorldObj(),
new BlockPos(this.getHost().getTile()),
Objects.requireNonNull(Util.from(this.getSide())),
Objects.requireNonNull(this.getSide()),
GuiType.DUAL_INTERFACE_PART);
}
return true;
@@ -570,7 +570,7 @@ public class PartFluidLevelEmitter extends PartUpgradeable
player,
this.getHost().getTile().getWorldObj(),
new BlockPos(this.getHost().getTile()),
Objects.requireNonNull(Util.from(getSide())),
Objects.requireNonNull(getSide()),
GuiType.FLUID_LEVEL_EMITTER);
return true;
}
@@ -43,7 +43,6 @@ import com.glodblock.github.inventory.*;
import com.glodblock.github.inventory.gui.GuiType;
import com.glodblock.github.util.BlockPos;
import com.glodblock.github.util.ModAndClassUtil;
import com.glodblock.github.util.Util;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import extracells.tileentity.TileEntityFluidInterface;
@@ -305,7 +304,7 @@ public class PartFluidStorageBus extends PartUpgradeable
player,
this.getHost().getTile().getWorldObj(),
new BlockPos(this.getHost().getTile()),
Objects.requireNonNull(Util.from(this.getSide())),
Objects.requireNonNull(this.getSide()),
GuiType.FLUID_STORAGE_BUS);
}
return true;
@@ -224,8 +224,7 @@ public abstract class FCPart extends AEBasePart
if (Platform.isServer()) {
if (Util.hasPermission(player, SecurityPermissions.INJECT, (IGridHost) this)
|| Util.hasPermission(player, SecurityPermissions.EXTRACT, (IGridHost) this)) {
InventoryHandler.openGui(
player, te.getWorldObj(), tePos, Objects.requireNonNull(Util.from(getSide())), getGui());
InventoryHandler.openGui(player, te.getWorldObj(), tePos, Objects.requireNonNull(getSide()), getGui());
} else {
player.addChatComponentMessage(new ChatComponentText("You don't have permission to view."));
}
@@ -15,7 +15,6 @@ import com.glodblock.github.common.item.ItemFluidPacket;
import com.glodblock.github.inventory.InventoryHandler;
import com.glodblock.github.inventory.gui.GuiType;
import com.glodblock.github.util.BlockPos;
import com.glodblock.github.util.Util;
import java.util.Objects;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
@@ -75,7 +74,7 @@ public abstract class FCSharedFluidBus extends PartUpgradeable implements IGridT
player,
this.getHost().getTile().getWorldObj(),
new BlockPos(this.getHost().getTile()),
Objects.requireNonNull(Util.from(this.getSide())),
Objects.requireNonNull(this.getSide()),
GuiType.FLUID_BUS_IO);
}