Skip to content

Commit

Permalink
Merge pull request #341 from MCTian-mi/bdsm
Browse files Browse the repository at this point in the history
fix bdsandm crates like drums
  • Loading branch information
trainvoi authored Nov 29, 2024
2 parents d381be4 + 96c9adc commit 32491a5
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,7 @@ public void init(FMLInitializationEvent event) {
SusyLog.logger.info("BDSAndM found. Enabling integration...");
CustomBlockRotations.registerCustomRotation(BDSM.blockMetalBarrel, BDSAndM_BARREL_BEHAVIOR);
CustomBlockRotations.registerCustomRotation(BDSM.blockWoodBarrel, BDSAndM_BARREL_BEHAVIOR);
CustomBlockRotations.registerCustomRotation(BDSM.blockMetalCrate, BDSAndM_BARREL_BEHAVIOR);
CustomBlockRotations.registerCustomRotation(BDSM.blockWoodCrate, BDSAndM_BARREL_BEHAVIOR);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package supersymmetry.mixins.bdsandm;

import funwayguy.bdsandm.blocks.tiles.TileEntityCrate;
import net.minecraft.block.state.IBlockState;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import org.jetbrains.annotations.NotNull;
import org.spongepowered.asm.mixin.Mixin;

@Mixin(TileEntityCrate.class)
public abstract class TileEntityCrateMixin extends TileEntity {

@Override
public boolean shouldRefresh(@NotNull World world, @NotNull BlockPos pos, @NotNull IBlockState oldState, @NotNull IBlockState newSate) {
return oldState.getBlock() != newSate.getBlock();
}
}
3 changes: 2 additions & 1 deletion src/main/resources/mixins.susy.bdsandm.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"mixins" : [
"BlockBarrelBaseMixin",
"ItemBarrelMixin",
"TileEntityBarrelMixin"
"TileEntityBarrelMixin",
"TileEntityCrateMixin"
]
}

0 comments on commit 32491a5

Please sign in to comment.