generated from NeoForgeMDKs/MDK-1.21-ModDevGradle
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create block entity stuff for storage matrix
- Loading branch information
1 parent
fbd7e70
commit 4e90440
Showing
2 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
src/main/java/dev/wolfieboy09/qstorage/block/storage_matrix/StorageMatrixBlockEntity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package dev.wolfieboy09.qstorage.block.storage_matrix; | ||
|
||
import dev.wolfieboy09.qstorage.block.AbstractEnergyBlockEntity; | ||
import dev.wolfieboy09.qstorage.registries.QSBlockEntities; | ||
import net.minecraft.core.BlockPos; | ||
import net.minecraft.network.chat.Component; | ||
import net.minecraft.world.MenuProvider; | ||
import net.minecraft.world.entity.player.Inventory; | ||
import net.minecraft.world.entity.player.Player; | ||
import net.minecraft.world.inventory.AbstractContainerMenu; | ||
import net.minecraft.world.level.block.state.BlockState; | ||
import org.jetbrains.annotations.NotNull; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
import javax.annotation.ParametersAreNonnullByDefault; | ||
|
||
@ParametersAreNonnullByDefault | ||
public class StorageMatrixBlockEntity extends AbstractEnergyBlockEntity implements MenuProvider { | ||
private final Component TITLE = Component.translatable("block.qstorage.storage_matrix"); | ||
public StorageMatrixBlockEntity(BlockPos pos, BlockState blockState) { | ||
super(QSBlockEntities.STORAGE_MATRIX.get(), pos, blockState, 20000, 1000, 0); | ||
} | ||
|
||
@Override | ||
public @NotNull Component getDisplayName() { | ||
return TITLE; | ||
} | ||
|
||
@Override | ||
public boolean canExtract() { | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean canReceive() { | ||
return true; | ||
} | ||
|
||
@Override | ||
public @Nullable AbstractContainerMenu createMenu(int containerId, Inventory playerInventory, Player player) { | ||
return null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters