Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ jobs:

- uses: actions/upload-artifact@v4
with:
name: Malts
name: Insights
path: |
build/libs/Insights-*.jar
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import dev.frankheijden.insights.api.util.MaterialTags;
import dev.frankheijden.insights.api.utils.BlockUtils;
import dev.frankheijden.insights.api.utils.ChunkUtils;
import io.papermc.paper.event.block.BlockBreakBlockEvent;
import org.bukkit.Material;
import org.bukkit.Tag;
import org.bukkit.block.Block;
Expand Down Expand Up @@ -120,12 +121,10 @@ public void onBlockBreak(BlockBreakEvent event) {

if (Tag.BEDS.isTagged(material)) {
Optional<Block> blockOptional = BlockUtils.getOtherHalf(block);
if (blockOptional.isPresent()) {
var otherHalf = blockOptional.get();

// Update the other half's location
// Update the other half's location
blockOptional.ifPresent(otherHalf -> {
handleModification(otherHalf.getLocation(), material, -1);
}
});
}

// Handle the removal
Expand Down Expand Up @@ -274,6 +273,16 @@ public void onBlockExplode(BlockExplodeEvent event) {
}
}

/**
* Handles blocks breaking other blocks (like flowing water breaking redstone/torches).
*/
@AllowDisabling
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onBlockBreakBlock(BlockBreakBlockEvent event) {
var block = event.getBlock();
handleModification(block, -1);
}

/**
* Handles blocks melting/fading.
*/
Expand Down
2 changes: 1 addition & 1 deletion Insights-NMS/Current/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
dependencies {
paperweight.paperDevBundle("1.21.10-R0.1-SNAPSHOT")
paperweight.paperDevBundle("1.21.11-R0.1-SNAPSHOT")
}
7 changes: 4 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ plugins {


group = "dev.frankheijden.insights"
version = "6.20.1"
version = "6.20.2"
val dependencyDir = "$group.dependencies"
val targetMinecraftVersions = listOf("1.21.10", "1.21.9")

Expand Down Expand Up @@ -132,8 +132,9 @@ dependencies {
.list(rootProject.projectDir.toPath().resolve("Insights-NMS"))
.filter { !it.fileName.toString().startsWith(".") }
.forEach {
val configuration = if (it.fileName.toString() == "Core") "shadow" else "reobf"
implementation(project(":Insights-NMS-${it.fileName}", configuration))
//val configuration = if (it.fileName.toString() == "Core") "shadow" else "reobf"
// reobf is no longer needed as we don't support spigot servers and minecraft is no longer obfuscated
implementation(project(":Insights-NMS-${it.fileName}", "shadow"))
}
}

Expand Down