left shears mining sponge. Only pickaxe and glass left
This commit is contained in:
1 parent
daa2defb6b
commit
5efbbac663
2 files changed
+2
-11
No files matched your search
@@ -349,8 +349,7 @@ public class CarpetSettings
|
|||||||
public static boolean carpets = false;
|
public static boolean carpets = false;
|
||||||
|
|
||||||
@Rule(
|
@Rule(
|
||||||
desc = "Glass and Sponge can be broken faster with their appropriate tools",
|
desc = "Glass can be broken faster with pickaxes",
|
||||||
extra = "Glass is pickaxes, sponge is shears",
|
|
||||||
category = SURVIVAL
|
category = SURVIVAL
|
||||||
)
|
)
|
||||||
public static boolean missingTools = false;
|
public static boolean missingTools = false;
|
||||||
|
|||||||
@@ -13,13 +13,5 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
|||||||
@Mixin(ShearsItem.class)
|
@Mixin(ShearsItem.class)
|
||||||
public class ShearsItem_missingToolsMixin
|
public class ShearsItem_missingToolsMixin
|
||||||
{
|
{
|
||||||
@Inject(method = "getMiningSpeedMultiplier", at = @At("HEAD"), cancellable = true)
|
// left intentionally blank until this becomes in master branch
|
||||||
private void getCustomMaterial(ItemStack itemStack_1, BlockState blockState_1, CallbackInfoReturnable<Float> cir)
|
|
||||||
{
|
|
||||||
if (CarpetSettings.missingTools && (blockState_1.getMaterial() == Material.SPONGE))
|
|
||||||
{
|
|
||||||
cir.setReturnValue(15.0F);
|
|
||||||
cir.cancel();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user