@@ -41,7 +41,7 @@ public abstract class MixinHopperBlockEntity extends LockableContainerBlockEntit
4141 @ Unique
4242 private Text customNameCache = null ;
4343 @ Unique
44- private Section section = null ;
44+ private Section limitation = null ;
4545
4646 protected MixinHopperBlockEntity (BlockEntityType <?> blockEntityType , BlockPos blockPos , BlockState blockState ) {
4747 super (blockEntityType , blockPos , blockState );
@@ -58,17 +58,17 @@ protected MixinHopperBlockEntity(BlockEntityType<?> blockEntityType, BlockPos bl
5858 }
5959
6060 @ Override
61- public Section qca$getSection () {
62- return this .section ;
61+ public Section qca$getLimitation () {
62+ return this .limitation ;
6363 }
6464
6565 @ Override
66- public void qca$setSection (Section section ) {
67- this .section = section ;
66+ public void qca$setLimitation (Section limitation ) {
67+ this .limitation = limitation ;
6868 }
6969
7070 @ Inject (method = "serverTick" , at = @ At ("TAIL" ))
71- private static void qca$updateRestrictionOnTick (
71+ private static void qca$updateLimitationOnTick (
7272 World world , BlockPos pos , BlockState state , HopperBlockEntity hopper , CallbackInfo ci
7373 ) {
7474 if (!QcaSettings .canLimit (QcaSettings .easyHopperLimitation )) return ;
@@ -100,9 +100,9 @@ protected MixinHopperBlockEntity(BlockEntityType<?> blockEntityType, BlockPos bl
100100 });
101101 }
102102 if (sections .size () > 1 ) {
103- hopper .qca$setSection (new AllSection (sections ));
103+ hopper .qca$setLimitation (new AllSection (sections ));
104104 } else if (sections .size () == 1 ) {
105- hopper .qca$setSection (sections .getFirst ());
105+ hopper .qca$setLimitation (sections .getFirst ());
106106 }
107107 }
108108
@@ -114,10 +114,10 @@ protected MixinHopperBlockEntity(BlockEntityType<?> blockEntityType, BlockPos bl
114114 + "canTransferTo(Lnet/minecraft/inventory/Inventory;"
115115 + "ILnet/minecraft/item/ItemStack;)Z"
116116 ))
117- private static boolean qca$restrictExtract (
117+ private static boolean qca$limitExtract (
118118 Inventory instance , Inventory inventory , int i , ItemStack stack , Operation <Boolean > original
119119 ) {
120- return original .call (instance , inventory , i , stack ) && qca$restrict (inventory , stack );
120+ return original .call (instance , inventory , i , stack ) && qca$limit (inventory , stack );
121121 }
122122
123123 @ WrapOperation (
@@ -127,14 +127,14 @@ protected MixinHopperBlockEntity(BlockEntityType<?> blockEntityType, BlockPos bl
127127 target = "Lnet/minecraft/inventory/Inventory;"
128128 + "isValid(ILnet/minecraft/item/ItemStack;)Z"
129129 ))
130- private static boolean qca$restrictInsert (Inventory instance , int i , ItemStack stack , Operation <Boolean > original ) {
131- return original .call (instance , i , stack ) && qca$restrict (instance , stack );
130+ private static boolean qca$limitInsert (Inventory instance , int i , ItemStack stack , Operation <Boolean > original ) {
131+ return original .call (instance , i , stack ) && qca$limit (instance , stack );
132132 }
133133
134134 @ Unique
135- private static boolean qca$restrict (Inventory inventory , ItemStack stack ) {
135+ private static boolean qca$limit (Inventory inventory , ItemStack stack ) {
136136 return !QcaSettings .canLimit (QcaSettings .easyHopperLimitation )
137137 || !(inventory instanceof HopperBlockEntity hopper )
138- || hopper .qca$getSection ().test (stack );
138+ || hopper .qca$getLimitation ().test (stack );
139139 }
140140}
0 commit comments