Skip to content

Commit c532c31

Browse files
committed
Add support for a modded block: rockwool from Thermal Expansion (#153)
The first in support for modded content, a simple custom block: "rockwool" from the Thermal Expansion and Thermal Foundation mods for Forge: https://ftb.gamepedia.com/Rockwool_(Thermal_Expansion_3) This makes use of the Forge handshake (#88 #134 #144), matching the mod block names from the negotiation to numeric identifiers in the world to steven_blocks. Rockwool was chosen due to ease of implementation, it looks like wool from vanilla (except is fire-proof), and by supporting it the groundwork necessary is laid for more sophisticated mod support. Tested with Thermal Expansion on 1.7.10, 1.10.2 (FTB Beyond), and 1.12.2 Forge servers. * Add `modid` macro token, skipped from vanilla mappings * Add ThermalExpansionRockwool block (1.7.10) * Register modded blocks by modid->[data], and lookup block metadata * Save block IDs from ModIdData/RegistryData to World modded_block_ids * Add namespaced mod ids for ModIdData, \u{1}=block \u{2}=item * Add ThermalFoundation's Rockwool (1.12.2)
1 parent 3bbab7a commit c532c31

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

protocol/src/protocol/forge.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ impl Serializable for ModIdMapping {
8585
}
8686
}
8787

88+
pub static BLOCK_NAMESPACE: &'static str = "\u{1}";
89+
pub static ITEM_NAMESPACE: &'static str = "\u{2}";
90+
8891
#[derive(Debug)]
8992
pub enum FmlHs {
9093
ServerHello {

0 commit comments

Comments
 (0)