generated from neoforged/MDK
-
-
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.
- Loading branch information
1 parent
9f3c68a
commit 0fd6d52
Showing
12 changed files
with
142 additions
and
10 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
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
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
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
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
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
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
20 changes: 20 additions & 0 deletions
20
src/main/java/com/github/minecraftschurlimods/bibliocraft/client/ber/DinnerPlateBER.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,20 @@ | ||
package com.github.minecraftschurlimods.bibliocraft.client.ber; | ||
|
||
import com.github.minecraftschurlimods.bibliocraft.content.dinnerplate.DinnerPlateBlockEntity; | ||
import com.github.minecraftschurlimods.bibliocraft.util.ClientUtil; | ||
import com.mojang.blaze3d.vertex.PoseStack; | ||
import com.mojang.math.Axis; | ||
import net.minecraft.client.renderer.MultiBufferSource; | ||
import net.minecraft.client.renderer.blockentity.BlockEntityRenderer; | ||
|
||
public class DinnerPlateBER implements BlockEntityRenderer<DinnerPlateBlockEntity> { | ||
@Override | ||
public void render(DinnerPlateBlockEntity blockEntity, float partialTick, PoseStack stack, MultiBufferSource buffer, int light, int overlay) { | ||
stack.pushPose(); | ||
stack.translate(0.5, 0.0625, 0.5); | ||
stack.mulPose(Axis.XP.rotationDegrees(90)); | ||
stack.scale(0.4375f, 0.4375f, 0.4375f); | ||
ClientUtil.renderFixedItem(blockEntity.getItem(0), stack, buffer, light, overlay); | ||
stack.popPose(); | ||
} | ||
} |
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
18 changes: 18 additions & 0 deletions
18
...m/github/minecraftschurlimods/bibliocraft/content/dinnerplate/DinnerPlateBlockEntity.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,18 @@ | ||
package com.github.minecraftschurlimods.bibliocraft.content.dinnerplate; | ||
|
||
import com.github.minecraftschurlimods.bibliocraft.init.BCBlockEntities; | ||
import com.github.minecraftschurlimods.bibliocraft.util.content.BCBlockEntity; | ||
import net.minecraft.core.BlockPos; | ||
import net.minecraft.world.item.ItemStack; | ||
import net.minecraft.world.level.block.state.BlockState; | ||
|
||
public class DinnerPlateBlockEntity extends BCBlockEntity { | ||
public DinnerPlateBlockEntity(BlockPos pos, BlockState state) { | ||
super(BCBlockEntities.DINNER_PLATE.get(), 1, pos, state); | ||
} | ||
|
||
@Override | ||
public boolean canPlaceItem(int slot, ItemStack stack) { | ||
return stack.getItem().getFoodProperties(stack, null) != 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
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