generated from neoforged/MDK
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6c169db
commit bef7d0a
Showing
5 changed files
with
106 additions
and
4 deletions.
There are no files selected for viewing
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
40 changes: 40 additions & 0 deletions
40
src/main/java/io/github/realyusufismail/tutorialmod/blocks/chest/ExampleChestBlock.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,40 @@ | ||
package io.github.realyusufismail.tutorialmod.blocks.chest; | ||
|
||
import com.mojang.serialization.MapCodec; | ||
import net.minecraft.core.BlockPos; | ||
import net.minecraft.world.level.Level; | ||
import net.minecraft.world.level.block.AbstractChestBlock; | ||
import net.minecraft.world.level.block.DoubleBlockCombiner; | ||
import net.minecraft.world.level.block.SimpleWaterloggedBlock; | ||
import net.minecraft.world.level.block.entity.BlockEntity; | ||
import net.minecraft.world.level.block.entity.BlockEntityType; | ||
import net.minecraft.world.level.block.entity.ChestBlockEntity; | ||
import net.minecraft.world.level.block.state.BlockState; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
import java.util.function.Supplier; | ||
|
||
/** | ||
* @see net.minecraft.world.level.block.ChestBlock | ||
*/ | ||
public class ExampleChestBlock extends AbstractChestBlock<ExampleChestBlockEntity> implements SimpleWaterloggedBlock { | ||
protected ExampleChestBlock(Properties pProperties, Supplier<BlockEntityType<? extends ExampleChestBlockEntity>> pBlockEntityType) { | ||
super(pProperties, pBlockEntityType); | ||
} | ||
|
||
@Override | ||
protected MapCodec<? extends AbstractChestBlock<ExampleChestBlockEntity>> codec() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public DoubleBlockCombiner.NeighborCombineResult<? extends ChestBlockEntity> combine(BlockState pState, Level pLevel, BlockPos pPos, boolean pOverride) { | ||
return null; | ||
} | ||
|
||
@Nullable | ||
@Override | ||
public BlockEntity newBlockEntity(BlockPos pPos, BlockState pState) { | ||
return null; | ||
} | ||
} |
51 changes: 51 additions & 0 deletions
51
...main/java/io/github/realyusufismail/tutorialmod/blocks/chest/ExampleChestBlockEntity.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,51 @@ | ||
package io.github.realyusufismail.tutorialmod.blocks.chest; | ||
|
||
import net.minecraft.core.BlockPos; | ||
import net.minecraft.core.NonNullList; | ||
import net.minecraft.network.chat.Component; | ||
import net.minecraft.world.entity.player.Inventory; | ||
import net.minecraft.world.inventory.AbstractContainerMenu; | ||
import net.minecraft.world.item.ItemStack; | ||
import net.minecraft.world.level.block.entity.BlockEntityType; | ||
import net.minecraft.world.level.block.entity.LidBlockEntity; | ||
import net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity; | ||
import net.minecraft.world.level.block.state.BlockState; | ||
|
||
/** | ||
* @see net.minecraft.world.level.block.entity.ChestBlockEntity | ||
*/ | ||
public class ExampleChestBlockEntity extends RandomizableContainerBlockEntity implements LidBlockEntity { | ||
protected ExampleChestBlockEntity(BlockEntityType<?> pType, BlockPos pPos, BlockState pBlockState) { | ||
super(pType, pPos, pBlockState); | ||
} | ||
|
||
@Override | ||
protected Component getDefaultName() { | ||
return null; | ||
} | ||
|
||
@Override | ||
protected NonNullList<ItemStack> getItems() { | ||
return null; | ||
} | ||
|
||
@Override | ||
protected void setItems(NonNullList<ItemStack> pItems) { | ||
|
||
} | ||
|
||
@Override | ||
protected AbstractContainerMenu createMenu(int pContainerId, Inventory pInventory) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public int getContainerSize() { | ||
return 0; | ||
} | ||
|
||
@Override | ||
public float getOpenNess(float pPartialTicks) { | ||
return 0; | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
src/main/java/io/github/realyusufismail/tutorialmod/blocks/chest/ExampleChestMenu.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,7 @@ | ||
package io.github.realyusufismail.tutorialmod.blocks.chest; | ||
|
||
/** | ||
* @see net.minecraft.world.inventory.ChestMenu | ||
*/ | ||
public class ExampleChestMenu { | ||
} |
7 changes: 7 additions & 0 deletions
7
...main/java/io/github/realyusufismail/tutorialmod/blocks/crafting/ExampleCraftingBlock.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,7 @@ | ||
package io.github.realyusufismail.tutorialmod.blocks.crafting; | ||
|
||
/** | ||
* @see net.minecraft.world.level.block.CrafterBlock | ||
*/ | ||
public class ExampleCraftingBlock { | ||
} |