Skip to content

Commit d8d6db1

Browse files
authored
合并拉取请求 #2
* 虚拟油田信息卡 * 添加tooltips * mixin * mixin! * spotless * spotless * 优化代码结构,添加材质 * 更新readme * 减少蒸汽虚空矿机的蒸汽消耗量,削弱虚空矿机的产量 * 虚拟油田定位卡添加配方 * 修复虚拟油田定位卡配方问题
1 parent bcc2db3 commit d8d6db1

File tree

23 files changed

+903
-38
lines changed

23 files changed

+903
-38
lines changed

README.md

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,49 @@
11
## 关于本模组
2-
GTNH私货模组
3-
为GTNH添加一些机器、物品,使得前期更轻松一些。
2+
GTNH私货模组
3+
4+
为GTNH添加一些机器、物品,使得前期更轻松一些。
45

56
## 机器、物品
67
* ### 大型焦炉
7-
不用再堆焦炉阵列了
8-
搭建4个焦炉所需的焦炉砖即可搭建大型焦炉,提供4并行,加高建筑以提高并行数,最高16并行。
8+
不用再堆焦炉阵列了
9+
10+
搭建4个焦炉所需的焦炉砖即可搭建大型焦炉,提供4并行,加高建筑以提高并行数,最高16并行。
11+
912
可以使用原始仓室来实现自动化。
1013

1114
* ### 大型土高炉
12-
不用再堆土高炉阵列了
13-
搭建4个土高炉所需的材料即可搭建大型土高炉,提供4并行,加高建筑以提高并行数,最高16并行。
15+
不用再堆土高炉阵列了
16+
17+
搭建4个土高炉所需的材料即可搭建大型土高炉,提供4并行,加高建筑以提高并行数,最高16并行。
18+
1419
可以使用原始仓室来实现自动化。
1520

16-
* ### 更便宜的虚空矿机(WIP)
17-
参考[更便宜的虚空矿机](https://github.com/Jonodonozym/CheaperVoidMiners),添加原始版本和蒸汽版本。~~JOJO,我不想再挖矿啦~~
21+
* ### 更便宜的虚空矿机
22+
参考[更便宜的虚空矿机](https://github.com/Jonodonozym/CheaperVoidMiners),添加原始版本和蒸汽版本。~~JOJO,我不想再挖矿啦~~
23+
1824
移除了采矿管道的需求(~~感谢原始人提供技术支持。~~)
19-
* 原始(木制):2秒(40t)/次,4个粗矿,需要放入可燃物做为燃料
20-
* 蒸汽:1秒(20t)/次,4个粗矿,需要通入蒸汽作为燃料(80mb/t)
21-
* LV: 0.5秒(10t)/次,2个原矿,32 eu/t
22-
* HV: 0.5秒(10t)/次,4个原矿,512 eu/t
23-
* IV: 0.5秒(10t)/次,8个原矿,8192 eu/t
25+
* 原始(木制):2秒(40t)/次,2个粗矿,需要放入可燃物做为燃料
26+
* 蒸汽:1秒(20t)/次,2个粗矿,需要通入蒸汽作为燃料(20mb/t)
27+
* LV: 0.5秒(10t)/次,1个原矿,32 eu/t
28+
* HV: 0.5秒(10t)/次,2个原矿,512 eu/t
29+
* IV: 0.5秒(10t)/次,4个原矿,8192 eu/t
2430

25-
* ### 原始仓室(WIP)
31+
* ### 原始仓室
2632
使用了原始人技术制造出来的仓室。
2733
* 原始输入总线: 1格,无虚拟电路
2834
* 原始输出总线: 1格,无自动输出,无过滤
2935
* 原始输入仓: 8B容量(目前似乎没有使用场景)
3036
* 原始输出仓: 64B容量,无流体锁定功能
3137

38+
* ### 虚拟油田定位卡
39+
在虚拟油田所在区块右键定位卡,会将维度和区块坐标以及所包含的虚拟油田的信息保存至定位卡中。
40+
41+
在油气矿机的控制器方块物品栏中放入虚拟油田定位卡,油气矿机会直接挖取定位卡上记录的区块内包含的虚拟油田。
42+
43+
* ### 修改多方块矿机(WIP)
44+
现在采集虚拟资源(油气、虚空)的多方块矿机都不需要采矿管道了(~~再次感谢原始人提供技术支持。~~)
45+
3246
## TODO List
47+
* [ ] 完善Tooltips
48+
* [ ] 蒸汽油气矿机
3349

dependencies.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
dependencies {
3737
api("com.github.GTNewHorizons:GTNHLib:0.5.11:dev")
3838
api('com.github.GTNewHorizons:GT5-Unofficial:5.09.50.114:dev')
39+
runtimeOnly("com.github.GTNewHorizons:Mixingasm:v0.2.4:dev")
3940
runtimeOnlyNonPublishable("com.github.GTNewHorizons:NotEnoughItems:2.7.4-GTNH:dev")
4041
implementation('com.github.GTNewHorizons:Railcraft:9.15.15:dev')
4142
implementation("com.github.GTNewHorizons:EnderCore:0.4.6:dev") { transitive = false }

gradle.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,21 +74,21 @@ apiPackage =
7474
accessTransformersFile =
7575

7676
# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled!
77-
usesMixins = false
77+
usesMixins = true
7878

7979
# Set to a non-empty string to configure mixins in a separate source set under src/VALUE, instead of src/main.
8080
# This can speed up compile times thanks to not running the mixin annotation processor on all input sources.
8181
# Mixin classes will have access to "main" classes, but not the other way around.
8282
separateMixinSourceSet =
8383

8484
# Adds some debug arguments like verbose output and class export.
85-
usesMixinDebug = false
85+
usesMixinDebug = true
8686

8787
# Specify the location of your implementation of IMixinConfigPlugin. Leave it empty otherwise.
8888
mixinPlugin =
8989

9090
# Specify the package that contains all of your Mixins. You may only place Mixins in this package or the build will fail!
91-
mixinsPackage =
91+
mixinsPackage = mixins
9292

9393
# Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin!
9494
# This parameter is for legacy compatibility only

src/main/java/com/hepdd/easytech/CommonProxy.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ public class CommonProxy {
1212
public void preInit(FMLPreInitializationEvent event) {
1313
Config.synchronizeConfiguration(event.getSuggestedConfigurationFile());
1414

15-
EasyTechnology.LOG.info(Config.greeting);
16-
EasyTechnology.LOG.info("I am EasyTechnology at version " + Tags.VERSION);
15+
// EasyTechnology.LOG.info(Config.greeting);
16+
// EasyTechnology.LOG.info("I am EasyTechnology at version " + Tags.VERSION);
1717
}
1818

1919
// load "Do your mod setup. Build whatever data structures you care about. Register recipes." (Remove if not needed)

src/main/java/com/hepdd/easytech/EasyTechnology.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import org.apache.logging.log4j.LogManager;
44
import org.apache.logging.log4j.Logger;
55

6+
import com.hepdd.easytech.loaders.preload.ETHLoaderItem;
67
import com.hepdd.easytech.loaders.preload.ETHLoaderMetaTileEntities;
78
import com.hepdd.easytech.loaders.preload.ETHLoaderRecipe;
89

@@ -38,6 +39,7 @@ public void preInit(FMLPreInitializationEvent event) {
3839
public void init(FMLInitializationEvent event) {
3940
proxy.init(event);
4041
new ETHLoaderMetaTileEntities().run();
42+
new ETHLoaderItem().run();
4143
new ETHLoaderRecipe().run();
4244
}
4345

src/main/java/com/hepdd/easytech/api/enums/ETHItemList.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ public enum ETHItemList {
2323
Hatch_Input_Bus_Primitive,
2424
Hatch_Output_Bus_Primitive,
2525

26+
ITEM_Void_Oil_Location_Card,
27+
2628
;
2729

2830
private boolean mHasNotBeenSet;

src/main/java/com/hepdd/easytech/api/metatileentity/implementations/base/ETHNonConsumMultiBase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public int getMaxEfficiency(ItemStack arg0) {
7474
public abstract void construct(ItemStack stackSize, boolean hintsOnly);
7575

7676
@Override
77-
public abstract IStructureDefinition getStructureDefinition();
77+
public abstract IStructureDefinition<T> getStructureDefinition();
7878

7979
@Override
8080
protected abstract MultiblockTooltipBuilder createTooltip();

src/main/java/com/hepdd/easytech/api/metatileentity/implementations/base/ETHVoidMinerBase.java

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,11 @@
4545
import com.gtnewhorizons.modularui.api.math.Pos2d;
4646
import com.gtnewhorizons.modularui.api.screen.ModularWindow;
4747
import com.gtnewhorizons.modularui.api.screen.UIBuildContext;
48-
import com.gtnewhorizons.modularui.common.widget.*;
48+
import com.gtnewhorizons.modularui.common.widget.ButtonWidget;
49+
import com.gtnewhorizons.modularui.common.widget.DynamicPositionedColumn;
50+
import com.gtnewhorizons.modularui.common.widget.FakeSyncWidget;
51+
import com.gtnewhorizons.modularui.common.widget.SlotWidget;
52+
import com.gtnewhorizons.modularui.common.widget.TextWidget;
4953

5054
import bwcrossmod.galacticgreg.VoidMinerUtility;
5155
import gregtech.api.GregTechAPI;
@@ -78,7 +82,12 @@ public abstract class ETHVoidMinerBase extends MTEEnhancedMultiBlockBase<ETHVoid
7882
private VoidMinerUtility.DropMap dropMap = null;
7983
private VoidMinerUtility.DropMap extraDropMap = null;
8084
private float totalWeight;
81-
private int multiplier;
85+
86+
public float getTotalWeight() {
87+
return totalWeight;
88+
}
89+
90+
public int multiplier;
8291
private int oreType;
8392
private boolean mBlacklist = false;
8493
private String dimensionName = "";
@@ -89,6 +98,7 @@ public abstract class ETHVoidMinerBase extends MTEEnhancedMultiBlockBase<ETHVoid
8998
protected boolean mChunkLoadingEnabled = true;
9099
protected ChunkCoordIntPair mCurrentChunk = null;
91100
protected boolean mWorkChunkNeedsReload = true;
101+
private int xDrill, yDrill, zDrill;
92102
// private @NotNull String shutdownReason = "";
93103
protected static final String STRUCTURE_PIECE_MAIN = "main";
94104
protected static final ClassValue<IStructureDefinition<ETHVoidMinerBase>> STRUCTURE_DEFINITION = new ClassValue<>() {
@@ -160,10 +170,6 @@ public CheckRecipeResult checkProcessing() {
160170
return SimpleCheckRecipeResult.ofFailure("none");
161171
}
162172

163-
public void setMultiplier(int tier) {
164-
this.multiplier = tier;
165-
}
166-
167173
public void setOreType(int type) {
168174
this.oreType = type;
169175
}
@@ -178,7 +184,20 @@ public void setOreType(int type) {
178184

179185
public abstract int getCasingTextureIndex();
180186

187+
private void updateCoordinates() {
188+
xDrill = getBaseMetaTileEntity().getXCoord();
189+
yDrill = getBaseMetaTileEntity().getYCoord();
190+
zDrill = getBaseMetaTileEntity().getZCoord();
191+
}
192+
181193
protected boolean workingAtBottom() {
194+
195+
if (mWorkChunkNeedsReload) {
196+
mCurrentChunk = new ChunkCoordIntPair(xDrill >> 4, zDrill >> 4);
197+
GTChunkManager.requestChunkLoad((TileEntity) getBaseMetaTileEntity(), null);
198+
mWorkChunkNeedsReload = false;
199+
}
200+
182201
// if the dropMap has never been initialised or if the dropMap is empty
183202
if (this.dropMap == null || this.totalWeight == 0) this.calculateDropMap();
184203

@@ -206,6 +225,7 @@ protected boolean workingAtBottom() {
206225

207226
@Override
208227
public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
228+
updateCoordinates();
209229
return checkPiece(STRUCTURE_PIECE_MAIN, 1, 6, 0) && checkHatches();
210230
}
211231

0 commit comments

Comments
 (0)