Skip to content

Instantly share code, notes, and snippets.

@thecatcore
Last active May 18, 2024 13:58
Show Gist options
  • Select an option

  • Save thecatcore/4eb4a1483d1b15cc451324b63cda901d to your computer and use it in GitHub Desktop.

Select an option

Save thecatcore/4eb4a1483d1b15cc451324b63cda901d to your computer and use it in GitHub Desktop.
LF API 1.9 Modules Infrastructure Review/Explainations

Modules

api-base

Submodules

  • common
  • 1.7.10-
  • 1.8+

Reasons for submodules

BlockPos class has a different intermediary name before 1.8 and after 1.7.10. We provide a Location<T> class which holds an object and its position.

command-api-v1

No submodules, work for at least 1.6-1.12.2.

command-api-v2 (sponge)

Submodules

  • 1.7.10
  • 1.8-1.8.9 (1.8.9)
  • 1.9-1.12.2 (1.12.2)

Reasons for submodules

Text uses inner classes for Events, because inner class or not declared as such before 1.8.2, 1.7 had to be split from 1.8 module.

Investigation needed for 1.8 vs 1.9+.

Some notes for pre-1.7:

  • 1.6 still has a Text class, but it works entirely differently from 1.7+ and Events aren't a thing.
  • I'm not entirely sure of this, but pre-1.6 just seems to use String directly.

crash-report

No submodules, work for at least 1.6-1.12.2.

entity-events

Submodules

  • common
  • 1.6-1.8.9 (1.8.9)
  • 1.9-1.10.2 (1.9.4)
  • 1.11-1.12.2 (1.12.2)

Reasons for submodules

Intermediary name of some method targets of Mixins are different between versions. The injection point might be slightly different in some cases.

Injection points shared: 3
Injection points versioned: 3

gamerule-api

No submodules, work for at least 1.6-1.12.2.

item-group-api

Submodules

  • common
  • 1.6.4
  • 1.7-1.10.2 (1.8.9)
  • 1.11-1.12.2 (1.12.2)

Reasons for submodules

1.6 vs 1.7: A method we use in the rendering process situated in a different class before 1.7. pre-1.11 vs 1.11+: An abstract method in ItemGroup that must be implemented has a different intermediary name in those versions.

keybinding-api

Submodules

  • common
  • 1.6.4
  • 1.7.10
  • 1.8-1.11.2 (1.8.9)
  • 1.12.2

Reasons for submodules

Modules 1.6.4, 1.7.10, 1.8-1.11.2 only exists because their test mods can't run on each other versions Module 1.12.2: 1.12.2 only fix for keybindings category.

lifecycle-events

Submodules

  • common
  • 1.6.4
  • 1.7.10
  • 1.8-1.8.9 (1.8.9)
  • 1.9-1.12.2 (1.12.2)

Reasons for submodules

Intermediary name of some method targets of Mixins are different between versions. The injection point might be lightly different in some cases.

Injection points shared: 17
Injection points versioned: 8

networking-api

Submodules

  • common
  • 1.7.10
  • 1.8-1.8.9 (1.8.9)
  • 1.9-1.12.2 (1.12.2)

Reasons for submodules

Even tho 1.7.10 is already post netty rewrite it is still the odd ball, with less utilities implemented in vanilla than later versions. Intermediary name of some method targets of Mixins are different between versions. The injection point might be lightly different in some cases.

Injection points shared: 19
Injection points versioned: 11-16

permission-api

Submodules

  • common
  • 1.6.4
  • 1.7-1.12.2 (1.8.9)

Reasons for submodules

Before 1.7, you get op informations from player username instead of its GameProfile.

registry-sync-v1

Submodules

  • common
  • 1.7.10
  • 1.8
  • 1.8.9
  • 1.9.4
  • 1.10.2
  • 1.11-1.12.2 (1.12.2)

Reasons for submodules

Vanilla registry types overtime:

1.7.10 1.8-1.8.9 1.9.4-1.10.2 1.11.2-1.12.2
Item SimpleRegistry SimpleRegistry SimpleRegistry SimpleRegistry
Block SimpleRegistry SimpleRegistry SimpleRegistry SimpleRegistry
BlockEntityType Fake BiMap-String, Class- Fake BiMap-String, Class- Fake BiMap-String, Class- SimpleRegistry (used only as MutableRegistry)
StatusEffect Array Array + Map-Identifier, StatusEffect- SimpleRegistry SimpleRegistry
Enchantment Array Array + Map-Identifier, Enchantment- SimpleRegistry SimpleRegistry
Biome Array Array + Map-String, Biome- SimpleRegistry SimpleRegistry
EntityType Triple map with: Integer, String, Class Triple map with: Integer, String, Class Triple map with: Integer, String, Class SimpleRegistry

Intermediary name of some method targets of Mixins are different between versions. The injection point might be lightly different in some cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment