Skip to content

Commit a283fab

Browse files
committed
修复bug啊哈哈哈
1 parent 75b328d commit a283fab

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/main/java/github/kasuminova/novaeng/common/handler/IEHandler.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package github.kasuminova.novaeng.common.handler;
22

33
import blusunrize.immersiveengineering.api.tool.ExcavatorHandler;
4-
import blusunrize.immersiveengineering.common.blocks.metal.BlockMetalDevice1;
4+
import blusunrize.immersiveengineering.common.IEContent;
55
import blusunrize.immersiveengineering.common.blocks.metal.BlockTypes_MetalDevice1;
66
import blusunrize.immersiveengineering.common.blocks.metal.TileEntitySampleDrill;
77
import codechicken.lib.util.ItemUtils;
@@ -40,7 +40,7 @@ public class IEHandler {
4040
};
4141

4242
private static void giveCoresample(PlayerInteractEvent.RightClickItem event, World world, BlockPos eventpos, EntityPlayer player, ItemStack item) {
43-
world.setBlockState(eventpos, BlockMetalDevice1.getStateById(BlockTypes_MetalDevice1.SAMPLE_DRILL.getMeta()));
43+
world.setBlockState(eventpos, IEContent.blockMetalDevice1.getStateFromMeta(BlockTypes_MetalDevice1.SAMPLE_DRILL.getMeta()));
4444
val drill = (TileEntitySampleDrill) world.getTileEntity(eventpos);
4545
val worldInfo = ExcavatorHandler.getMineralWorldInfo(
4646
world,
@@ -87,6 +87,7 @@ public void onPlayerRightClickItem(PlayerInteractEvent.RightClickItem event) {
8787
val eventpos = new BlockPos(event.getPos().getX(), 250, event.getPos().getZ());
8888
if (tky.equals(item.getItem().getRegistryName())) {
8989
giveCoresample(event, world, eventpos, player, item);
90+
item.shrink(1);
9091
} else if (scanner.equals(item.getItem().getRegistryName())) {
9192
var nbt = item.getTagCompound();
9293
var mode = nbt.getByte("mode");

src/main/java/github/kasuminova/novaeng/common/handler/MachineAssemblyHandler.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ object MachineAssemblyHandler {
8787
if (player is EntityPlayerMP && world.totalWorldTime % NovaEngCoreConfig.MACHINE_ASSEMBLY_TOOL.buildSpeed == 0L) {
8888
val ma = NEWMachineAssemblyManager.getMachineAssembly(player) ?: return
8989
var restart: Boolean
90-
for (i in 0..<NovaEngCoreConfig.MACHINE_ASSEMBLY_TOOL.buildQuantity) {
90+
repeat(NovaEngCoreConfig.MACHINE_ASSEMBLY_TOOL.buildQuantity) {
9191
do {
9292
restart = false
9393

0 commit comments

Comments
 (0)