mirror of
https://github.com/TeamMidnightDust/BetterBeds.git
synced 2025-12-16 05:25:09 +01:00
port: MC 1.21.4
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
package eu.midnightdust.betterbeds.mixin;
|
||||
|
||||
import net.minecraft.block.*;
|
||||
import net.minecraft.block.BedBlock;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.HorizontalFacingBlock;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
|
||||
@Mixin(value = BedBlock.class, priority = 2000)
|
||||
public abstract class MixinBedBlock extends HorizontalFacingBlock {
|
||||
@@ -14,13 +13,7 @@ public abstract class MixinBedBlock extends HorizontalFacingBlock {
|
||||
super(settings);
|
||||
}
|
||||
|
||||
@Inject(at = @At("RETURN"), method = "getRenderType", cancellable = true)
|
||||
private void getRenderType(BlockState state, CallbackInfoReturnable<BlockRenderType> cir) {
|
||||
cir.setReturnValue(BlockRenderType.MODEL);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean isSideInvisible(BlockState state, BlockState neighborState, Direction offset) {
|
||||
return neighborState.getBlock() instanceof BedBlock;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "minecraft:item/black_bed"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "minecraft:item/blue_bed"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "minecraft:item/brown_bed"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "minecraft:item/cyan_bed"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "minecraft:item/gray_bed"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "minecraft:item/green_bed"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "minecraft:item/light_blue_bed"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "minecraft:item/light_gray_bed"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "minecraft:item/lime_bed"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "minecraft:item/magenta_bed"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "minecraft:item/orange_bed"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "minecraft:item/pink_bed"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "minecraft:item/purple_bed"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "minecraft:item/red_bed"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "minecraft:item/white_bed"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"model": {
|
||||
"type": "minecraft:model",
|
||||
"model": "minecraft:item/yellow_bed"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user