Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

Commit 62e5330

Browse files
NuclearfartsNuclearfarts
authored andcommitted
add an override annotation and a comment about IForgeBlock overrides
1 parent d4c8b53 commit 62e5330

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

patchwork-extensions-block/src/main/java/net/minecraftforge/common/extensions/IForgeBlock.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ default Block getBlock() {
8686
}
8787

8888
// Asterisks indicate IForgeBlockState calls. All methods can be assumed to be called from IForgeBlockState.
89+
// Note that some of these methods may be overridden in patches to vanilla blocks, but I can't figure out how to check for that easily. Just, well, check when you implement one.
8990

9091
// TODO Call locations: Patches: FlyingEntity*, LivingEntity*, BoatEntity*, ExperienceOrbEntity*, ItemEntity*
9192
/**

patchwork-extensions-block/src/main/java/net/patchworkmc/mixin/extensions/block/MixinBedBlock.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import javax.annotation.Nullable;
2323

2424
import org.spongepowered.asm.mixin.Mixin;
25+
import net.minecraftforge.common.extensions.IForgeBlock;
2526

2627
import net.minecraft.block.BedBlock;
2728
import net.minecraft.block.BlockState;
@@ -30,7 +31,8 @@
3031
import net.minecraft.world.BlockView;
3132

3233
@Mixin(BedBlock.class)
33-
public class MixinBedBlock {
34+
public abstract class MixinBedBlock implements IForgeBlock {
35+
@Override
3436
public boolean isBed(BlockState state, BlockView world, BlockPos pos, @Nullable Entity player) {
3537
return true;
3638
}

0 commit comments

Comments
 (0)