blob: c66e6a40decd0faef2394639dfba1b9aa6763e7d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
|
package common.itemBlocks;
import static com.google.common.math.LongMath.pow;
import java.math.BigInteger;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.StatCollector;
import gregtech.api.enums.GT_Values;
import gregtech.api.util.GT_Utility;
public class IB_LapotronicEnergyUnit extends ItemBlock {
public IB_LapotronicEnergyUnit(Block block) {
super(block);
}
@Override
public int getMetadata(int meta) {
return meta;
}
@Override
public boolean getHasSubtypes() {
return true;
}
@Override
public String getUnlocalizedName(ItemStack stack) {
return super.getUnlocalizedName() + "." + stack.getItemDamage();
}
// 5 Minutes, 5 mins * 60s * 20 ticks.
public static long LSC_time_between_wireless_rebalance_in_ticks = 5L * 60L * 20L;
// 60 Trillion EU.
public static BigInteger LSC_wireless_eu_cap = BigInteger.valueOf(60 * pow(10, 12));
// 10 Billion EU/t
private static BigInteger UHV_cap_eu_per_tick = LSC_wireless_eu_cap
.divide(BigInteger.valueOf(LSC_time_between_wireless_rebalance_in_ticks));
// 6 Quadrillion EU.
public static BigInteger UEV_wireless_eu_cap = BigInteger.valueOf(100 * 60 * pow(10, 12));
// 1 Trillion EU/t
private static BigInteger UEV_cap_eu_per_tick = UEV_wireless_eu_cap
.divide(BigInteger.valueOf(LSC_time_between_wireless_rebalance_in_ticks));
public static long EV_cap_storage = 60_000_000L;
public static long IV_cap_storage = 600_000_000L;
public static long LuV_cap_storage = 6_000_000_000L;
public static long ZPM_cap_storage = 60_000_000_000L;
public static long UV_cap_storage = 600_000_000_000L;
public static long UHV_cap_storage = Long.MAX_VALUE;
public static long UEV_cap_storage = Long.MAX_VALUE;
@SuppressWarnings("unchecked")
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List lines, boolean advancedTooltips) {
lines.add(StatCollector.translateToLocal("tile.kekztech_lapotronicenergyunit_block.desc"));
switch (stack.getItemDamage()) {
case 1:
lines.add(
"Capacity: " + EnumChatFormatting.RED
+ GT_Utility.formatNumbers(IV_cap_storage)
+ EnumChatFormatting.GRAY
+ "EU");
break;
case 2:
lines.add(
"Capacity: " + EnumChatFormatting.RED
+ GT_Utility.formatNumbers(LuV_cap_storage)
+ EnumChatFormatting.GRAY
+ "EU");
break;
case 3:
lines.add(
"Capacity: " + EnumChatFormatting.RED
+ GT_Utility.formatNumbers(ZPM_cap_storage)
+ EnumChatFormatting.GRAY
+ "EU");
break;
case 4:
lines.add(
"Capacity: " + EnumChatFormatting.RED
+ GT_Utility.formatNumbers(UV_cap_storage)
+ EnumChatFormatting.GRAY
+ "EU");
break;
case 5:
lines.add(
"Capacity: " + EnumChatFormatting.RED
+ GT_Utility.formatNumbers(UHV_cap_storage)
+ EnumChatFormatting.GRAY
+ "EU");
lines.add(
"Supports up to " + EnumChatFormatting.RED
+ GT_Utility.formatNumbers(UHV_cap_eu_per_tick)
+ EnumChatFormatting.GRAY
+ "EU/t of wireless transfer per "
+ GT_Values.TIER_COLORS[9]
+ GT_Values.VN[9]
+ EnumChatFormatting.GRAY
+ " capacitor.");
break;
case 6:
lines.add("Capacity: None");
break;
case 7:
lines.add(
"Capacity: " + EnumChatFormatting.RED
+ GT_Utility.formatNumbers(EV_cap_storage)
+ EnumChatFormatting.GRAY
+ " EU");
break;
case 8:
lines.add(
"Capacity: " + EnumChatFormatting.RED
+ GT_Utility.formatNumbers(UEV_cap_storage)
+ EnumChatFormatting.GRAY
+ "EU");
lines.add(
"Supports up to " + EnumChatFormatting.RED
+ GT_Utility.formatNumbers(UEV_cap_eu_per_tick)
+ EnumChatFormatting.GRAY
+ "EU/t of wireless transfer per "
+ GT_Values.TIER_COLORS[10]
+ GT_Values.VN[10]
+ EnumChatFormatting.GRAY
+ " capacitor.");
break;
}
}
}
|