HomeJavaModsDynamicItemScan Modded Bingo
ModsJava

DynamicItemScan Modded Bingo

by cat_2000 · on Modrinth

This server side mod lets you play bingo with items as bingo goals. It scans through all other loaded mods and identifies items that are obtainable in…

⬇ Download on Modrinth
DynamicItemScan Modded Bingo — screenshot 1DynamicItemScan Modded Bingo — screenshot 2DynamicItemScan Modded Bingo — screenshot 3

DynamicItemScan Modded Bingo

This is a 1.12.2 server side only forge mod.

What is this mod about?

This mod lets you play bingo in Minecraft, with all loaded vanilla and mod items that are obtainable in survival as goals. Each team or single player gets a copy of a bingo card that contains a grid of items. The square grid can be varied in size, from 3x3 to 9x9. Items in the card are crossed out by finding or crafting them in survival mode. The first team or single player to get a full row, column or diagonal, wins!

What´s so special about this mod?

The dynamic item scan

This mod goes through all loaded loot tables, crafting recipes, villager trades and furnace smelting recipes of all present mods and records all new items that it finds. It also tries out every possible combination of LootFunctions, that are applied on items in LootTables, by doing a binary permutation, to catch all items that can appear or be crafted in survival mode.

The full item registry is not searched, because it could contain mere creative mode items that cannot be obtained in survival mode.

Items are ensured to be unique, such that the probability of each item appearing in the bingo card is the same. To be added to the final item list, an item must not be identical in all registry name, metadata and NBT tag to an item already in the list.

Note that this works regardless of what mods are installed. All mods are scanned, if the contents of the mods folder change, after a server restart, the item pool adapts automatically.

Key caveats of the dynamic item scan:

The "at least" principle - how are items checked for equality?

The key idea is to treat the required item in the bingo card and the found item in the player´s inventory asymmetrically. Two items are called equal, when the found item meets at least all properties of the required item. The found item can have excess properties.

Note that:

Consider the following example:

Property found item required item
Registry name stone_hoe stone_hoe
Metadata 0 23
The items would not be considered equal, since the required item has a specified metadata, and the found item has not.
Property found item required item
Registry name stone_hoe stone_hoe
Metadata 23 0
Here however, the items would be considered equal, since the found item fulfills more properties than the required item has.

The same would be true if the found item is enchanted and the required item is not, or the found item has more enchantments than the required item.

Variable bingo card sizes

Normally, bingo is played with a 5x5 square card. Here, you can customize the bingo card size ranging from 3x3 up to 9x9.

Players can rejoin

When a player leaves, the mod will remember the team that he was in. Once he rejoins and the game is still running, he will be automatically put in the right team, with progress on the card updated.

Game Loop

SET TEAMS -----------> START --------> NATURAL FINISH (BINGO) / CANCEL -------> SET TEAMS

Commands

Usage:

Why the "z"´s?

The item scan implies that this mod needs to be loaded after all other mods have loaded in their items. Therefore, since the forge mod loader tends to load mods alphabetically, the modid as well as the jar name of this mod start with 3 "z".

Other

Packets

This mod modifies ingoing and outgoing packets that are necessary for client-server-communication. The mod was tested, but note that any error in the serverbound and clientbound packet pipeline will likely crash the server and/or the client.

Reflection

This project uses reflection to make its features work. Use of reflection is usually not recommended. Please note that this makes the project highly unstable and version specific. The mod was tested with forge version 1.12.2-14.23.5.2847. In theory, other 1.12.2 versions should also work, but weren´t tested. I do not take any responsibility.

Cloning and Building

This Mod was developed for Minecraft 1.12.2, and requires JDK 1.8.0 for building. Test case version was JDK version 1.8.0_302.

The generated mod jar file will be located in /build/libs and can be pasted into the mods folder of your server.

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

Verified by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more