版本:1.18.2-1.4.8-beta

* 修复了原模组冰箱无法打开的问题
This commit is contained in:
叁玖领域 2025-03-25 15:28:57 +08:00
parent 9582e32f3a
commit 653920817a
2 changed files with 4 additions and 3 deletions

View File

@ -6,4 +6,4 @@ org.gradle.daemon=false
mod.id = modernlifepatch mod.id = modernlifepatch
mod.group = com.r3944realms.modernlifepatch mod.group = com.r3944realms.modernlifepatch
mod.author = r3944Realms mod.author = r3944Realms
mod.version = 1.18.2-1.4.7-beta mod.version = 1.18.2-1.4.8-beta

View File

@ -1,6 +1,7 @@
package com.r3944realms.modernlifepatch.mixin.block.kitchen; package com.r3944realms.modernlifepatch.mixin.block.kitchen;
import com.dairymoose.modernlife.blocks.RefrigeratorBlock; import com.dairymoose.modernlife.blocks.RefrigeratorBlock;
import com.dairymoose.modernlife.tileentities.RefrigeratorBlockEntity;
import com.dairymoose.modernlife.tileentities.SeedSpreaderBlockEntity; import com.dairymoose.modernlife.tileentities.SeedSpreaderBlockEntity;
import com.r3944realms.modernlifepatch.datagen.lang.ModLangKeyValue; import com.r3944realms.modernlifepatch.datagen.lang.ModLangKeyValue;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
@ -29,8 +30,8 @@ public class MixinRefrigerator {
@Override @Override
public AbstractContainerMenu createMenu(int paramInt, @NotNull Inventory paramInventory, @NotNull Player paramPlayer) { public AbstractContainerMenu createMenu(int paramInt, @NotNull Inventory paramInventory, @NotNull Player paramPlayer) {
BlockEntity tileEntity = level.getBlockEntity(blockPos); BlockEntity tileEntity = level.getBlockEntity(blockPos);
if (tileEntity instanceof SeedSpreaderBlockEntity seedSpreaderBlockEntity) { if (tileEntity instanceof RefrigeratorBlockEntity refrigeratorBlockEntity) {
return new ChestMenu(MenuType.GENERIC_9x1, paramInt, paramInventory, seedSpreaderBlockEntity, 1); return new ChestMenu(MenuType.GENERIC_9x4, paramInt, paramInventory, refrigeratorBlockEntity, 4);
} else { } else {
return null; return null;
} }