Skip to content

Commit

Permalink
update code style
Browse files Browse the repository at this point in the history
  • Loading branch information
zy committed Jan 5, 2024
1 parent 1e6ed66 commit 7912a35
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/glodblock/github/FluidCraft.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public static void postInit(FMLPostInitializationEvent event) {
if (!Config.removeRecipe) {
RecipeLoader.INSTANCE.run();
}
if (Config.enableTestItemRecipe) {
if (Config.testItemRecipe) {
RecipeLoader.addTestItem();
}
RecipeLoader.runTerminalRecipe();
Expand Down
13 changes: 3 additions & 10 deletions src/main/java/com/glodblock/github/common/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@ public class Config {
public static boolean noFluidPacket;
public static boolean fluidIOBus;
public static boolean removeRecipe;
public static boolean enableTestItemRecipe = true;
public static boolean testItemRecipe;
public static double portableCellBattery;
public static boolean fluidP2PInterface;
public static int packetSize;
public static int packetRate;
public static boolean replaceEC2;
public static int levelMaintainerMinTicks;
public static int levelMaintainerMaxTicks;
Expand Down Expand Up @@ -57,13 +55,8 @@ private static void loadProperty() {
"Disable all recipes, for quick tweaker.");
portableCellBattery = Config.get("Fluid Craft for AE2", "Portable Fluid Cell Battery Capacity", 20000D)
.getDouble();
packetSize = Config.get("Fluid Craft for AE2", "packetSize", 256, "Number of items to be sent per packet")
.getInt();
if (packetSize <= 0) packetSize = 256;
packetRate = Config
.get("Fluid Craft for AE2", "packetRate", 50, "Period at which packets are dispatched, in ms.")
.getInt();
if (packetRate <= 0) packetRate = 50;
testItemRecipe = Config.get("Fluid Craft for AE2", "Experimental items", true, "Experimental items")
.getBoolean();
replaceEC2 = Config.getBoolean(
"replaceEC2",
"Fluid Craft for AE2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ protected void loadCellFluids() {
if (fs == null) continue;
IAEFluidStack iaeFluidStack = Util.FluidUtil.createAEFluidStack(fs);
if (this.cellFluids.findPrecise(iaeFluidStack) == null) {
iaeFluidStack.setStackSize(Integer.MAX_VALUE);
iaeFluidStack.setStackSize(Integer.MAX_VALUE * 1000L);
this.cellFluids.add(iaeFluidStack);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ public class ItemAndBlockHolder {

public static void init() {}

public static ItemEnergyCard ENERGY_CARD = new ItemEnergyCard().register();
public static ItemQuantumBridgeCard QUANTUM_BRIDGE_CARD = new ItemQuantumBridgeCard().register();
public static ItemMagnetCard MAGNET_CARD = new ItemMagnetCard().register();
public static BlockCertusQuartzTank CERTUS_QUARTZ_TANK = new BlockCertusQuartzTank().register();
public static BlockFluidAutoFiller FLUID_AUTO_FILLER = new BlockFluidAutoFiller().register();
public static BlockFluidDiscretizer DISCRETIZER = new BlockFluidDiscretizer().register();
Expand Down Expand Up @@ -144,6 +141,9 @@ public static void init() {}
public static ItemInfinityLavaStorageCell INFINITY_LAVA_CELL = new ItemInfinityLavaStorageCell().register();
public static ItemBasicFluidStoragePart CELL_PART = new ItemBasicFluidStoragePart().register();
public static ItemFluidStorageHousing CELL_HOUSING = new ItemFluidStorageHousing().register();
public static ItemEnergyCard ENERGY_CARD = new ItemEnergyCard().register();
public static ItemQuantumBridgeCard QUANTUM_BRIDGE_CARD = new ItemQuantumBridgeCard().register();
public static ItemMagnetCard MAGNET_CARD = new ItemMagnetCard().register();

public static void loadSetting() {
if (!Config.fluidCells) return;
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/com/glodblock/github/util/Util.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package com.glodblock.github.util;

import static com.glodblock.github.common.item.ItemBaseWirelessTerminal.*;
import static com.glodblock.github.common.item.ItemBaseWirelessTerminal.infinityBoosterCard;
import static com.glodblock.github.common.item.ItemBaseWirelessTerminal.infinityEnergyCard;
import static com.glodblock.github.common.item.ItemBaseWirelessTerminal.magnetCard;
import static com.glodblock.github.common.item.ItemBaseWirelessTerminal.restockItems;
import static net.minecraft.init.Items.glass_bottle;

import java.io.IOException;
Expand Down

0 comments on commit 7912a35

Please sign in to comment.