Giter VIP home page Giter VIP logo

bds-mod-mapping's Introduction

mapping

This is a BDS (Bedrock Dedicated Server) mod which allows generating mappings and tables of various kinds.

This includes (but is not limited to) the current block palette for a given version, blockstate upgrade tables from previous versions, item upgrade tables, and more besides.

Usage

Using bds-modding-devkit

bds-modding-devkit is the simplest way to use this mod. See instructions on its README.

Using the old way

If you don't like or don't want to use bds-modding-devkit, set up a BDS using modloader-helper. Once you've done this, clone this repository into the code subdirectory, run helper.sh build mapping Then, run the server using the run.sh script. The output files will be produced on server start.

Input files

Input files should be placed in input_files. The following files are used by this mod:

File name Description
r12_block_states.json JSON table of 1.12 block states as seen here. Used to generate r12_to_current_block_map.bin.
old_palettes/*.nbt Old blockstate tables in the same format as seen here. Used to generate blockstate mapping tables of old blockstates -> current version.

Output files

Output files are placed in the mapping_files directory.

File name Description Used for Sample
biome_id_map.json Map of biome string ID -> legacy numeric ID Validating and identifying biomes, network biome encoding Go to file
block_id_to_item_id_map.json Map of block IDs to their corresponding blockitem IDs (usually the same, but occasionally different) Saving itemstacks in inventories on disk Go to file
canonical_block_states.nbt Ordered list of blockstates required by the chosen version, in varint NBT format. Read TAG_Compounds until the end of file. Blockstate ID lookups for network, blockstate serializer testing, etc. Go to file
block_properties_table.json Map of block string ID -> various properties (hardness, light level etc.) Finding properties for implementing new blocks - sometimes these differ from the Minecraft wiki N/A
item_tags.json Item tags Crafting recipe validation and network serialization Go to file
level_sound_id_map.json Map of string LevelSoundEvent name -> numeric ID. NOTE: This is not complete since the game itself doesn't map all of them to strings. Broadcasting network sounds Go to file
old_palette_mappings/*_to_current_block_map.bin Map of old version's blockstates -> current version.
The files are an array of TAG_Compound, where the 0th, 2nd, 4th etc. indexes are the old NBT, and the 1st, 3rd, 5th etc. indexes are the new NBT. Only the versions provided in input_files/old_palettes are generated.
NOTE: These files contain mappings even for states that haven't changed.
You may wish to post-process them to remove unchanged states and reduce their size.
Generating schemas to upgrade old world saves N/A
particle_id_map.json Map of string particle name -> LevelEvent ID (without the 0x4000 flag). Broadcasting network particles Go to file
r12_to_current_block_map.bin Map of legacy 1.12 block ID+metadata -> blockstate NBT for the current version. (PM4 only, non-essential) Mapping legacy internal ID/meta to current version Go to file
r16_to_current_item_map.json Map of old item ID+meta -> current version IDs (where changed). Generating schemas to upgrade old world saves Go to file
block_state_meta_map.json List of meta values for each state ID in canonical_block_states.nbt Serializing network crafting recipes, which still require legacy meta for some reason Go to file
command_arg_types.json List of command symbol names, their descriptions, and network IDs Serializing command arguments in AvailableCommandsPacket Go to file

bds-mod-mapping's People

Contributors

dktapps avatar frago9876543210 avatar justtaldevelops avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.