mirror of
https://github.com/Xiao-MoMi/Custom-Crops.git
synced 2025-12-19 15:09:25 +00:00
remove break check
This commit is contained in:
@@ -114,14 +114,16 @@ public class CropBlock extends AbstractCustomCropsBlock {
|
||||
|
||||
context.updateLocation(location);
|
||||
|
||||
// check requirements
|
||||
if (!RequirementManager.isSatisfied(context, cropConfig.breakRequirements())) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
if (!RequirementManager.isSatisfied(context, stageConfig.breakRequirements())) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
// check requirements only if it's triggered by direct events
|
||||
if (event.reason() == BreakReason.BREAK) {
|
||||
if (!RequirementManager.isSatisfied(context, cropConfig.breakRequirements())) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
if (!RequirementManager.isSatisfied(context, stageConfig.breakRequirements())) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
CropBreakEvent breakEvent = new CropBreakEvent(event.entityBreaker(), event.blockBreaker(), cropConfig, event.brokenID(), event.location(),
|
||||
|
||||
@@ -34,7 +34,7 @@ rtag_version=1.5.8
|
||||
exp4j_version=0.4.8
|
||||
placeholder_api_version=2.11.6
|
||||
anti_grief_version=0.13
|
||||
zstd_version=1.5.6-6
|
||||
zstd_version=1.5.6-8
|
||||
flow_nbt_version=2.0.2
|
||||
guava_version=33.3.1-jre
|
||||
vault_version=1.7
|
||||
|
||||
@@ -35,7 +35,8 @@ dependencies {
|
||||
implementation("com.github.Xiao-MoMi:Sparrow-Heart:${rootProject.properties["sparrow_heart_version"]}")
|
||||
implementation("com.saicone.rtag:rtag:${rootProject.properties["rtag_version"]}")
|
||||
implementation("com.saicone.rtag:rtag-item:${rootProject.properties["rtag_version"]}")
|
||||
implementation("com.flowpowered:flow-nbt:${rootProject.properties["flow_nbt_version"]}") // do not relocate for compatibility with SWM
|
||||
// TODO use sparrow-nbt
|
||||
implementation("com.flowpowered:flow-nbt:${rootProject.properties["flow_nbt_version"]}") // do not relocate (compatibility with AdvancedSlimePaper)
|
||||
compileOnly("org.incendo:cloud-core:${rootProject.properties["cloud_core_version"]}")
|
||||
compileOnly("org.incendo:cloud-minecraft-extras:${rootProject.properties["cloud_minecraft_extras_version"]}")
|
||||
compileOnly("org.incendo:cloud-paper:${rootProject.properties["cloud_paper_version"]}")
|
||||
|
||||
Reference in New Issue
Block a user