left shears mining sponge. Only pickaxe and glass left

This commit is contained in:
gnembon committed 2020-03-18 16:21:10 -03:00
1 parent daa2defb6b
commit 5efbbac663
2 files changed
+2 -11

No files matched your search

+1 -2
View File
@@ -349,8 +349,7 @@ public class CarpetSettings
public static boolean carpets = false;
@Rule(
desc = "Glass and Sponge can be broken faster with their appropriate tools",
extra = "Glass is pickaxes, sponge is shears",
desc = "Glass can be broken faster with pickaxes",
category = SURVIVAL
)
public static boolean missingTools = false;
@@ -13,13 +13,5 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
@Mixin(ShearsItem.class)
public class ShearsItem_missingToolsMixin
{
@Inject(method = "getMiningSpeedMultiplier", at = @At("HEAD"), cancellable = true)
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();
}
}
// left intentionally blank until this becomes in master branch
}