File tree Expand file tree Collapse file tree
java/dev/ryanhcode/sable/neoforge/mixin/compatibility/create/blueprint Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ package dev .ryanhcode .sable .neoforge .mixin .compatibility .create .blueprint ;
2+
3+ import com .simibubi .create .content .equipment .blueprint .BlueprintEntity ;
4+ import dev .ryanhcode .sable .annotation .MixinModVersionConstraint ;
5+ import net .minecraft .world .entity .Entity ;
6+ import net .minecraft .world .entity .EntityType ;
7+ import net .minecraft .world .entity .player .Player ;
8+ import net .minecraft .world .level .Level ;
9+ import org .spongepowered .asm .mixin .Mixin ;
10+ import org .spongepowered .asm .mixin .Overwrite ;
11+
12+ @ MixinModVersionConstraint ("(,6.0.11)" )
13+ @ Mixin (BlueprintEntity .class )
14+ public abstract class BlueprintEntityMixin extends Entity {
15+ public BlueprintEntityMixin (final EntityType <?> entityType , final Level level ) {
16+ super (entityType , level );
17+ }
18+
19+ /**
20+ * @author IThundxr
21+ * @reason Switch to Player#canInteractWithEntity, which is patched by sable.
22+ */
23+ @ Overwrite
24+ public boolean canPlayerUse (final Player player ) {
25+ return player .canInteractWithEntity (this , 8 );
26+ }
27+ }
Original file line number Diff line number Diff line change 8484 " compatibility.create.big_outlines_interaction.BigOutlinesMixin" ,
8585 " compatibility.create.block_breakers.BlockBreakingKineticBlockEntityDamageMixin" ,
8686 " compatibility.create.block_breakers.BlockBreakingKineticBlockEntityMixin" ,
87+ " compatibility.create.blueprint.BlueprintEntityMixin" ,
8788 " compatibility.create.chain_conveyor.ChainConveyorBlockEntityMixin" ,
8889 " compatibility.create.chain_conveyor.ChainConveyorBlockMixin" ,
8990 " compatibility.create.contraptions.AbstractContraptionEntityMixin" ,
You can’t perform that action at this time.
0 commit comments