Skip to content

Commit

Permalink
v1.3.7 ActivatedSpawnerDetector made slightly better
Browse files Browse the repository at this point in the history
- Added a "Storage Blocks" list setting to define the blocks that the module is checking for when considering displaying a message about stashes or a rendered box.
- Added Barrels, Hoppers, and Dispensers to this list. The default was just chests.
  • Loading branch information
etianl authored Dec 25, 2024
1 parent 0790933 commit f75f93e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ yarn_mappings=1.21.3+build.2
loader_version=0.16.9

# Mod Properties
mod_version=1.3.6-1.21.3
mod_version=1.3.7-1.21.3
maven_group=pwn.noobs
archives_base_name=1trouser-streak

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ public class ActivatedSpawnerDetector extends Module {
.visible(() -> extramessage.get())
.build()
);
private final Setting<List<Block>> blocks = sgGeneral.add(new BlockListSetting.Builder()
.name("Storage Blocks")
.description("Storage Blocks the module checks for when considering displaying messages and renders.")
.defaultValue(Blocks.CHEST, Blocks.BARREL, Blocks.HOPPER, Blocks.DISPENSER)
.build()
);
private final Setting<Boolean> displaycoords = sgGeneral.add(new BoolSetting.Builder()
.name("DisplayCoords")
.description("Displays coords of activated spawners in chat.")
Expand Down Expand Up @@ -275,7 +281,7 @@ private void onPreTick(TickEvent.Pre event) {
for (int y = -16; y < 17; y++) {
for (int z = -16; z < 17; z++) {
BlockPos bpos = new BlockPos(pos.getX()+x, pos.getY()+y, pos.getZ()+z);
if (mc.world.getBlockState(bpos).getBlock() == Blocks.CHEST) {
if (blocks.get().contains(mc.world.getBlockState(bpos).getBlock())) {
chestfound = true;
break;
}
Expand Down Expand Up @@ -311,7 +317,7 @@ private void onPreTick(TickEvent.Pre event) {
for (int y = -14; y < 15; y++) {
for (int z = -14; z < 15; z++) {
BlockPos bpos = new BlockPos(tPos.getX()+x, tPos.getY()+y, tPos.getZ()+z);
if (mc.world.getBlockState(bpos).getBlock() == Blocks.CHEST) {
if (blocks.get().contains(mc.world.getBlockState(bpos).getBlock())) {
chestfound = true;
break;
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"schemaVersion": 1,
"id": "streak-addon",
"version": "1.3.6",
"version": "1.3.7",
"name": "TrouserStreak",
"description": "Trouser-Streak is a compilation of modules, updated to the latest version and optimized for maximum grief. I did not make all of these.",
"authors": [
Expand Down

0 comments on commit f75f93e

Please sign in to comment.