Skip to content

Commit

Permalink
Update MurdererDetector
Browse files Browse the repository at this point in the history
  • Loading branch information
Aspw-w committed Apr 21, 2024
1 parent b8e6d46 commit 5929f17
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 44 deletions.
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ dependencies {
include ("net.raphimc:ViaLegacy:${project.vialegacy_version}") {
exclude group: "com.google.code.gson", module: "gson"
}
include "net.raphimc:ViaAprilFools:${project.viaaprilfools_version}"
include "net.raphimc:ViaLoader:${project.vialoader_version}"

include "org.slf4j:slf4j-api:${project.slf4j_version}"
Expand Down
3 changes: 1 addition & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,4 @@ viaversion_version=4.9.3
viabackwards_version=4.9.2
viarewind_version=3.0.6
vialoader_version=2.2.12
vialegacy_version=2.2.22-SNAPSHOT
viaaprilfools_version=2.0.11-SNAPSHOT
vialegacy_version=2.2.22-SNAPSHOT
2 changes: 1 addition & 1 deletion src/main/java/net/aspw/client/Launch.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ object Launch {
// Client information
const val CLIENT_BEST = "NightX"
const val CLIENT_FOLDER = "NightX-Client"
const val CLIENT_VERSION = "B107"
const val CLIENT_VERSION = "B108"
const val CLIENT_CHAT = "§c[$CLIENT_BEST] §r"
const val CLIENT_PROTOCOL_RANGE = "1.7.2 to 1.20.4"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,44 +20,48 @@ class MurdererDetector : Module() {
var murderer1: EntityPlayer? = null
var murderer2: EntityPlayer? = null

private val murderItems = mutableListOf(
267, // Items.iron_sword,
272, // Items.stone_sword,
256, // Items.iron_shovel,
280, // Items.stick,
271, // Items.wooden_axe,
268, // Items.wooden_sword,
273, // Items.stone_shovel,
369, // Items.blaze_rod,
277, // Items.diamond_shovel,
359, // Items.shears,
400, // Items.pumpkin_pie,
285, // Items.golden_pickaxe,
398, // Items.carrot_on_a_stick,
357, // Items.cookie,
279, // Items.diamond_axe,
283, // Items.golden_sword,
276, // Items.diamond_sword,
293, // Items.diamond_hoe,
421, // Items.name_tag,
333, // Items.boat,
409, // Items.prismarine_shard,
349, // Items.fish,
364, // Items.cooked_beef,
382, // Items.speckled_melon,
351, // Items.dye,
340, // Items.book,
406, // Items.quartz,
396, // Items.golden_carrot,
260, // Items.apple,
// Murderer Items Updated 2024 04/21
private val murdererItems = mutableListOf(
267, // Items.iron_sword
130, // Blocks.ender_chest
272, // Items.stone_sword
256, // Items.iron_shovel
280, // Items.stick
271, // Items.wooden_axe
268, // Items.wooden_sword
32, // Blocks.deadbush
273, // Items.stone_shovel
369, // Items.blaze_rod
277, // Items.diamond_shovel
406, // Items.quartz
400, // Items.pumpkin_pie
285, // Items.golden_pickaxe
260, // Items.apple
421, // Items.name_tag
19, // Blocks.sponge
398, // Items.carrot_on_a_stick
352, // Items.bone
391, // Items.carrot
396, // Items.golden_carrot
357, // Items.cookie
279, // Items.diamond_axe
175, // Blocks.double_plant
409, // Items.prismarine_shard
364, // Items.cooked_beef
405, // Blocks.nether_brick
366, // Items.cooked_chicken
2258, // Items.record_blocks
76, // Blocks.redstone_torch,
32, // Blocks.deadbush,
19, // Blocks.sponge,
122, // Blocks.dragon_egg,
175, // Blocks.double_plant,
405, // Blocks.nether_brick,
130 // Blocks.ender_chest
294, // Items.golden_hoe
283, // Items.golden_sword
276, // Items.diamond_sword
293, // Items.diamond_hoe
359, // Items.shears
349, // Items.fish
351, // Items.dye
333, // Items.boat
382, // Items.speckled_melon
340, // Items.book
6 // Blocks.sapling
)

override fun onDisable() {
Expand All @@ -78,7 +82,7 @@ class MurdererDetector : Module() {
if (player.heldItem != null && (player.heldItem.displayName.contains(
"Knife",
ignoreCase = true
) || murderItems.contains(Item.getIdFromItem(player.heldItem.item)))
) || murdererItems.contains(Item.getIdFromItem(player.heldItem.item)))
) {
if (murderer1 == null) {
if (Launch.moduleManager.getModule(Interface::class.java)?.flagSoundValue!!.get()) {
Expand Down
7 changes: 5 additions & 2 deletions src/main/java/net/aspw/client/protocol/ProtocolBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
import net.aspw.client.protocol.api.*;
import net.aspw.client.utils.ClientUtils;
import net.raphimc.vialoader.ViaLoader;
import net.raphimc.vialoader.impl.platform.*;
import net.raphimc.vialoader.impl.platform.ViaBackwardsPlatformImpl;
import net.raphimc.vialoader.impl.platform.ViaLegacyPlatformImpl;
import net.raphimc.vialoader.impl.platform.ViaRewindPlatformImpl;
import net.raphimc.vialoader.impl.platform.ViaVersionPlatformImpl;
import net.raphimc.vialoader.netty.CompressionReorderEvent;
import net.raphimc.vialoader.util.VersionEnum;

Expand Down Expand Up @@ -39,7 +42,7 @@ public static void init(final VFPlatform platform) {

manager = new ProtocolBase();

ViaLoader.init(new ViaVersionPlatformImpl(null), new ProtocolVLLoader(platform), new ProtocolVLInjector(), null, ViaBackwardsPlatformImpl::new, ViaRewindPlatformImpl::new, ViaLegacyPlatformImpl::new, ViaAprilFoolsPlatformImpl::new);
ViaLoader.init(new ViaVersionPlatformImpl(null), new ProtocolVLLoader(platform), new ProtocolVLInjector(), null, ViaBackwardsPlatformImpl::new, ViaRewindPlatformImpl::new, ViaLegacyPlatformImpl::new, null);

versions.addAll(VersionEnum.SORTED_VERSIONS);

Expand Down

0 comments on commit 5929f17

Please sign in to comment.