mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-16 10:34:40 +00:00
Cleanup (#253)
This commit is contained in:
1 parent
4a39cf4ece
commit
0df88f2305
63 files changed
+123
-187
No files matched your search
@@ -48,7 +48,7 @@ public class BlockFluidBuffer extends FCBaseBlock {
|
||||
if (fs == null && ias != null) {
|
||||
player.addChatMessage(
|
||||
new ChatComponentText(
|
||||
Tooltip.fluidFormat(ias.getFluid().getLocalizedName(), ias.getStackSize())));
|
||||
Tooltip.fluidFormat(ias.getFluidStack().getLocalizedName(), ias.getStackSize())));
|
||||
return false;
|
||||
} else {
|
||||
tile.setFluid(fs);
|
||||
|
||||
@@ -23,8 +23,7 @@ public class BaseItemBlockContainer extends ItemBlock {
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings("unchecked")
|
||||
public void addInformation(final ItemStack itemStack, final EntityPlayer player, final List toolTip,
|
||||
public void addInformation(final ItemStack itemStack, final EntityPlayer player, final List<String> toolTip,
|
||||
final boolean advancedToolTips) {
|
||||
blockType.addInformation(itemStack, player, toolTip, advancedToolTips);
|
||||
}
|
||||
|
||||
@@ -62,7 +62,6 @@ public abstract class FCBaseItemCell extends AEBaseItem implements IStorageFluid
|
||||
this.component = null;
|
||||
}
|
||||
|
||||
@SuppressWarnings("all")
|
||||
public FCBaseItemCell(final Optional<String> subName) {
|
||||
super(subName);
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ public class ItemBasicFluidStorageCell extends FCBaseItemCell
|
||||
this.totalBytes = kilobytes * 1024;
|
||||
this.component = whichCell;
|
||||
this.housingValue = housingValue;
|
||||
setUnlocalizedName(NameConst.ITEM_FLUID_STORAGE + kilobytes);
|
||||
setUnlocalizedName(NameConst.ITEM_FLUID_STORAGE + "." + kilobytes);
|
||||
|
||||
switch (this.component) {
|
||||
case Cell1kPart -> {
|
||||
|
||||
@@ -33,9 +33,8 @@ public class ItemEnergyCard extends FCBaseItem {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List toolTip, boolean flag) {
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List<String> toolTip, boolean flag) {
|
||||
if (isShiftKeyDown()) {
|
||||
toolTip.addAll(RenderUtil.listFormattedStringToWidth(NameConst.i18n(NameConst.TT_ENERGY_CARD_DESC)));
|
||||
} else {
|
||||
|
||||
@@ -41,9 +41,8 @@ public class ItemFluidDrop extends FCBaseItem {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list) {
|
||||
public void getSubItems(Item item, CreativeTabs tab, List<ItemStack> list) {
|
||||
if (CreativeTabs.tabMisc.equals(tab)) {
|
||||
list.add(newStack(new FluidStack(FluidRegistry.WATER, 1)));
|
||||
list.add(newStack(new FluidStack(FluidRegistry.LAVA, 1)));
|
||||
@@ -67,9 +66,8 @@ public class ItemFluidDrop extends FCBaseItem {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List tooltip, boolean flag) {
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List<String> tooltip, boolean flag) {
|
||||
FluidStack fluid = getFluidStack(stack);
|
||||
if (ItemFluidPacket.isDisplay(stack)) return;
|
||||
if (fluid != null) {
|
||||
|
||||
@@ -70,8 +70,7 @@ public class ItemFluidPacket extends FCBaseItem {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List tooltip, boolean flags) {
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List<String> tooltip, boolean flags) {
|
||||
FluidStack fluid = getFluidStack(stack);
|
||||
boolean display = isDisplay(stack);
|
||||
if (display) return;
|
||||
|
||||
@@ -44,7 +44,7 @@ public class ItemMultiFluidStorageCell extends FCBaseItemCell
|
||||
this.component = whichCell;
|
||||
this.housingValue = housingValue;
|
||||
this.maxType = 5;
|
||||
setUnlocalizedName(NameConst.ITEM_MULTI_FLUID_STORAGE + kilobytes);
|
||||
setUnlocalizedName(NameConst.ITEM_MULTI_FLUID_STORAGE + "." + kilobytes);
|
||||
|
||||
switch (this.component) {
|
||||
case Cell1kPart -> {
|
||||
|
||||
@@ -43,9 +43,8 @@ public class ItemPartFluidTerminal extends FCBaseItem implements IPartItem {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List toolTip, boolean flag) {
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List<String> toolTip, boolean flag) {
|
||||
if (isShiftKeyDown()) {
|
||||
toolTip.add(NameConst.i18n(NameConst.TT_FLUID_TERMINAL));
|
||||
} else {
|
||||
|
||||
@@ -43,9 +43,8 @@ public class ItemPartLevelTerminal extends FCBaseItem implements IPartItem {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List toolTip, boolean flag) {
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List<String> toolTip, boolean flag) {
|
||||
if (isShiftKeyDown()) {
|
||||
toolTip.add(NameConst.i18n(NameConst.TT_LEVEL_TERMINAL));
|
||||
} else {
|
||||
|
||||
@@ -33,9 +33,8 @@ public class ItemQuantumBridgeCard extends FCBaseItem {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List toolTip, boolean flag) {
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List<String> toolTip, boolean flag) {
|
||||
if (isShiftKeyDown()) {
|
||||
toolTip.addAll(
|
||||
RenderUtil.listFormattedStringToWidth(NameConst.i18n(NameConst.TT_QUANTUM_BRIDGE_CARD_DESC)));
|
||||
|
||||
@@ -226,8 +226,10 @@ public class PartFluidLevelEmitter extends PartUpgradeable implements IStackWatc
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStackChange(final IItemList o, final IAEStack fullStack, final IAEStack diffStack,
|
||||
final BaseActionSource src, final StorageChannel chan) {
|
||||
public void onStackChange(@SuppressWarnings("rawtypes") final IItemList o,
|
||||
@SuppressWarnings("rawtypes") final IAEStack fullStack,
|
||||
@SuppressWarnings("rawtypes") final IAEStack diffStack, final BaseActionSource src,
|
||||
final StorageChannel chan) {
|
||||
if (chan == StorageChannel.FLUIDS && fullStack.equals(this.getIAEFluidStack())) {
|
||||
this.lastReportedValue = fullStack.getStackSize();
|
||||
this.updateState();
|
||||
@@ -529,7 +531,8 @@ public class PartFluidLevelEmitter extends PartUpgradeable implements IStackWatc
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSetting(final IConfigManager manager, final Enum settingName, final Enum newValue) {
|
||||
public void updateSetting(final IConfigManager manager, @SuppressWarnings("rawtypes") final Enum settingName,
|
||||
@SuppressWarnings("rawtypes") final Enum newValue) {
|
||||
this.configureWatchers();
|
||||
}
|
||||
|
||||
|
||||
@@ -485,7 +485,7 @@ public class PartFluidP2PInterface extends PartP2PTunnelStatic<PartFluidP2PInter
|
||||
}
|
||||
|
||||
@Override
|
||||
public void pasteMemoryCardData(PartP2PTunnel newTunnel, NBTTagCompound data) throws GridAccessException {
|
||||
public void pasteMemoryCardData(PartP2PTunnel<?> newTunnel, NBTTagCompound data) throws GridAccessException {
|
||||
this.duality.getConfigManager().readFromNBT(data);
|
||||
super.pasteMemoryCardData(newTunnel, data);
|
||||
}
|
||||
|
||||
@@ -152,7 +152,8 @@ public class PartFluidStorageBus extends PartUpgradeable
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSetting(final IConfigManager manager, final Enum settingName, final Enum newValue) {
|
||||
public void updateSetting(final IConfigManager manager, @SuppressWarnings("rawtypes") final Enum settingName,
|
||||
@SuppressWarnings("rawtypes") final Enum newValue) {
|
||||
this.resetCache(true);
|
||||
this.getHost().markForSave();
|
||||
}
|
||||
@@ -447,7 +448,7 @@ public class PartFluidStorageBus extends PartUpgradeable
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveChanges(final IMEInventory cellInventory) {
|
||||
public void saveChanges(@SuppressWarnings("rawtypes") final IMEInventory cellInventory) {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
|
||||
@@ -284,7 +284,8 @@ public abstract class FCPart extends AEBasePart
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSetting(final IConfigManager manager, final Enum settingName, final Enum newValue) {}
|
||||
public void updateSetting(final IConfigManager manager, @SuppressWarnings("rawtypes") final Enum settingName,
|
||||
@SuppressWarnings("rawtypes") final Enum newValue) {}
|
||||
|
||||
@Override
|
||||
public IInventory getViewCellStorage() {
|
||||
|
||||
@@ -323,8 +323,10 @@ public abstract class FCPartMonitor extends AbstractPartDisplay implements IPart
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStackChange(final IItemList o, final IAEStack fullStack, final IAEStack diffStack,
|
||||
final BaseActionSource src, final StorageChannel chan) {
|
||||
public void onStackChange(@SuppressWarnings("rawtypes") final IItemList o,
|
||||
@SuppressWarnings("rawtypes") final IAEStack fullStack,
|
||||
@SuppressWarnings("rawtypes") final IAEStack diffStack, final BaseActionSource src,
|
||||
final StorageChannel chan) {
|
||||
if (this.configuredFluid != null) {
|
||||
if (fullStack == null) {
|
||||
this.configuredFluid.setStackSize(0);
|
||||
|
||||
@@ -51,7 +51,8 @@ public class FluidCellHandler implements ICellHandler {
|
||||
|
||||
@Override
|
||||
public void openChestGui(final EntityPlayer player, final IChestOrDrive chest, final ICellHandler cellHandler,
|
||||
final IMEInventoryHandler inv, final ItemStack is, final StorageChannel chan) {
|
||||
@SuppressWarnings("rawtypes") final IMEInventoryHandler inv, final ItemStack is,
|
||||
final StorageChannel chan) {
|
||||
if (chan == StorageChannel.FLUIDS) {
|
||||
if (chest instanceof TileEntity te) {
|
||||
InventoryHandler
|
||||
@@ -61,7 +62,7 @@ public class FluidCellHandler implements ICellHandler {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getStatusForCell(final ItemStack is, final IMEInventory handler) {
|
||||
public int getStatusForCell(final ItemStack is, @SuppressWarnings("rawtypes") final IMEInventory handler) {
|
||||
if (handler instanceof final FluidCellInventoryHandler ci) {
|
||||
return ci.getStatusForCell();
|
||||
}
|
||||
@@ -69,7 +70,7 @@ public class FluidCellHandler implements ICellHandler {
|
||||
}
|
||||
|
||||
@Override
|
||||
public double cellIdleDrain(final ItemStack is, final IMEInventory handler) {
|
||||
public double cellIdleDrain(final ItemStack is, @SuppressWarnings("rawtypes") final IMEInventory handler) {
|
||||
final IFluidCellInventory inv = ((IFluidCellInventoryHandler) handler).getCellInv();
|
||||
return inv.getIdleDrain(is);
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ public class TileFluidDiscretizer extends AENetworkTile implements IPriorityHost
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveChanges(IMEInventory cellInventory) {
|
||||
public void saveChanges(@SuppressWarnings("rawtypes") IMEInventory cellInventory) {
|
||||
markDirty();
|
||||
}
|
||||
|
||||
|
||||
@@ -295,22 +295,6 @@ public class TileLevelMaintainer extends AENetworkTile
|
||||
requests.updateStatus(idx, enable);
|
||||
}
|
||||
|
||||
private void readLinkFromNBT(NBTTagCompound data) {
|
||||
for (int i = 0; i < REQ_COUNT; i++) {
|
||||
final NBTTagCompound stackData = requests.getItemStack(i).getTagCompound();
|
||||
if (stackData != null && stackData.hasNoTags()
|
||||
&& !stackData.hasKey(TLMTags.Link.tagName)
|
||||
&& stackData.getCompoundTag(TLMTags.Link.tagName).hasNoTags()) {
|
||||
requests.updateLink(i, null);
|
||||
requests.updateState(i, State.Idle);
|
||||
} else {
|
||||
NBTTagCompound linkData = stackData.getCompoundTag(TLMTags.Link.tagName);
|
||||
requests.updateLink(i, AEApi.instance().storage().loadCraftingLink(linkData, this));
|
||||
if (!requests.isDone(i)) requests.updateState(i, State.Craft);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user