Skip to content

Commit

Permalink
registry and inventory work
Browse files Browse the repository at this point in the history
  • Loading branch information
ix0rai committed Apr 4, 2024
1 parent 46d7b2e commit f41a378
Show file tree
Hide file tree
Showing 12 changed files with 49 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ download_task = "4.1.1"
guava = "31.1-jre"
jackson_xml = "2.14.1"
launchermeta_parser = "1.0.0"
enigma = "2.2.1"
enigma = "2.2.1+local"
enigma_plugin = "2.2.0"
tiny_remapper = "0.7.2"
stitch = "0.6.1"
Expand Down
6 changes: 6 additions & 0 deletions mappings/net/minecraft/inventory/Inventories.mapping
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ CLASS net/minecraft/unmapped/C_encuwkkg net/minecraft/inventory/Inventories
ARG 0 nbt
ARG 1 stacks
ARG 2 lookupProvider
METHOD m_goclvinq writeNbt (Lnet/minecraft/unmapped/C_hhlwcnih;Lnet/minecraft/unmapped/C_rnrfftze;ZLnet/minecraft/unmapped/C_vtbxyypo$C_etmlgbig;)Lnet/minecraft/unmapped/C_hhlwcnih;
ARG 0 nbt
ARG 1 stacks
ARG 2 putIfEmpty
ARG 3 lookupProvider
METHOD m_hltkhklh remove (Lnet/minecraft/unmapped/C_pjtstjoq;Ljava/util/function/Predicate;IZ)I
COMMENT Removes a number, not exceeding {@code maxCount}, of items from an inventory based on a predicate and returns that number.
COMMENT @return the number of items removed
Expand All @@ -27,3 +32,4 @@ CLASS net/minecraft/unmapped/C_encuwkkg net/minecraft/inventory/Inventories
METHOD m_rczebuiz removeStack (Ljava/util/List;I)Lnet/minecraft/unmapped/C_sddaxwyk;
ARG 0 stacks
ARG 1 slot
METHOD m_yjhimrox writeNbt (Lnet/minecraft/unmapped/C_hhlwcnih;Lnet/minecraft/unmapped/C_rnrfftze;Lnet/minecraft/unmapped/C_vtbxyypo$C_etmlgbig;)Lnet/minecraft/unmapped/C_hhlwcnih;
2 changes: 2 additions & 0 deletions mappings/net/minecraft/inventory/Inventory.mapping
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ CLASS net/minecraft/unmapped/C_pjtstjoq net/minecraft/inventory/Inventory
COMMENT Fetches the stack currently stored at the given slot. If the slot is empty,
COMMENT or is outside the bounds of this inventory, returns see {@link ItemStack#EMPTY}.
ARG 1 slot
METHOD m_kvljutzx getMaxCountPerSlot (Lnet/minecraft/unmapped/C_sddaxwyk;)I
METHOD m_mwetohsb getMaxCountPerSlot ()I
METHOD m_noresdqq canPlayerUse (Lnet/minecraft/unmapped/C_jzrpycqo;)Z
ARG 1 player
METHOD m_ofgoacbo canTransferTo (Lnet/minecraft/unmapped/C_pjtstjoq;ILnet/minecraft/unmapped/C_sddaxwyk;)Z
Expand Down
2 changes: 2 additions & 0 deletions mappings/net/minecraft/inventory/LootableInventory.mapping
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
CLASS net/minecraft/unmapped/C_ehawoasn net/minecraft/inventory/LootableInventory
FIELD f_yeibkfzd LOOT_TABLE_SEED_KEY Ljava/lang/String;
FIELD f_ztchflsp LOOT_TABLE_KEY Ljava/lang/String;
METHOD m_dmdivonx setLootTable (Lnet/minecraft/unmapped/C_xhhleach;)V
METHOD m_drfdhyfv getLootTableId ()Lnet/minecraft/unmapped/C_xhhleach;
METHOD m_mtzsyvbu setupLoot (Lnet/minecraft/unmapped/C_jzrpycqo;)V
ARG 1 player
Expand All @@ -12,5 +13,6 @@ CLASS net/minecraft/unmapped/C_ehawoasn net/minecraft/inventory/LootableInventor
ARG 1 seed
METHOD m_uxrpqxab getLootTableSeed ()J
METHOD m_vhsehsrn setupLootTable (Lnet/minecraft/unmapped/C_peaveboq;Lnet/minecraft/unmapped/C_rlomrsco;Lnet/minecraft/unmapped/C_hynzadkk;Lnet/minecraft/unmapped/C_xhhleach;)V
METHOD m_xukvibrq setLootTable (Lnet/minecraft/unmapped/C_xhhleach;J)V
METHOD m_ycwokqel writeLootTableNbt (Lnet/minecraft/unmapped/C_hhlwcnih;)Z
ARG 1 nbt
2 changes: 2 additions & 0 deletions mappings/net/minecraft/inventory/SimpleInventory.mapping
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ CLASS net/minecraft/unmapped/C_rsloiwzx net/minecraft/inventory/SimpleInventory
METHOD m_hdajgqnv removeListener (Lnet/minecraft/unmapped/C_uaqlxobv;)V
ARG 1 listener
METHOD m_hzsqwpzp toNbtList (Lnet/minecraft/unmapped/C_vtbxyypo$C_etmlgbig;)Lnet/minecraft/unmapped/C_hqhtfwlr;
ARG 1 lookupProvider
METHOD m_iqnieoui clearToList ()Ljava/util/List;
COMMENT Clears this inventory and return all the non-empty stacks in a list.
METHOD m_kcvdipnh stacks ()Lnet/minecraft/unmapped/C_rnrfftze;
Expand All @@ -20,6 +21,7 @@ CLASS net/minecraft/unmapped/C_rsloiwzx net/minecraft/inventory/SimpleInventory
ARG 2 count
METHOD m_mrxizevu readNbtList (Lnet/minecraft/unmapped/C_hqhtfwlr;Lnet/minecraft/unmapped/C_vtbxyypo$C_etmlgbig;)V
ARG 1 nbtList
ARG 2 lookupProvider
METHOD m_ofqehuzw (Lnet/minecraft/unmapped/C_sddaxwyk;)Z
ARG 0 stack
METHOD m_ozbredpu addToNewSlot (Lnet/minecraft/unmapped/C_sddaxwyk;)V
Expand Down
3 changes: 2 additions & 1 deletion mappings/net/minecraft/registry/HolderLookup.mapping
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ CLASS net/minecraft/unmapped/C_vtbxyypo net/minecraft/registry/HolderLookup
CLASS C_etmlgbig Provider
METHOD m_dnidhibf create (Ljava/util/stream/Stream;)Lnet/minecraft/unmapped/C_vtbxyypo$C_etmlgbig;
ARG 0 lookups
METHOD m_ejzrnhrb getHolderProvider ()Lnet/minecraft/unmapped/C_pzdchrcy$C_pbvqpmst;
METHOD m_ejzrnhrb createLookupProvider ()Lnet/minecraft/unmapped/C_pzdchrcy$C_pbvqpmst;
METHOD m_iwetggkj getLookup (Lnet/minecraft/unmapped/C_xhhleach;)Ljava/util/Optional;
METHOD m_onxuqmul getLookupOrThrow (Lnet/minecraft/unmapped/C_xhhleach;)Lnet/minecraft/unmapped/C_vtbxyypo$C_drwjtlvl;
METHOD m_pbceiquw streamRegistryKeys ()Ljava/util/stream/Stream;
METHOD m_uwaazyzq createSerializationContext (Lcom/mojang/serialization/DynamicOps;)Lnet/minecraft/unmapped/C_piadqmzm;
CLASS C_ikewmnmv
METHOD m_axtnqmym (Lnet/minecraft/unmapped/C_vtbxyypo$C_drwjtlvl;)Lnet/minecraft/unmapped/C_pzdchrcy;
Expand Down
2 changes: 2 additions & 0 deletions mappings/net/minecraft/registry/RegistrationInfo.mapping
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CLASS net/minecraft/unmapped/C_jhxfjegj net/minecraft/registry/RegistrationInfo
FIELD f_hakwatyg DEFAULT Lnet/minecraft/unmapped/C_jhxfjegj;
5 changes: 5 additions & 0 deletions mappings/net/minecraft/registry/Registry.mapping
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,25 @@ CLASS net/minecraft/unmapped/C_tqxyjqsk net/minecraft/registry/Registry
ARG 1 key
METHOD m_keyttxmd getTagOrEmpty (Lnet/minecraft/unmapped/C_ednuhnnn;)Ljava/lang/Iterable;
ARG 1 tag
METHOD m_ksueyykv getReferenceHolderWithLifecycle ()Lcom/mojang/serialization/Codec;
METHOD m_leajtcub stream ()Ljava/util/stream/Stream;
METHOD m_mazpxlja get (Lnet/minecraft/unmapped/C_ncpywfca;)Ljava/lang/Object;
ARG 1 id
METHOD m_nlhggctm getRegistrationInfo (Lnet/minecraft/unmapped/C_xhhleach;)Ljava/util/Optional;
METHOD m_nqhcjajy register (Lnet/minecraft/unmapped/C_tqxyjqsk;Lnet/minecraft/unmapped/C_ncpywfca;Ljava/lang/Object;)Ljava/lang/Object;
ARG 0 registry
ARG 1 id
ARG 2 entry
METHOD m_nqoydeav getEntries ()Ljava/util/Set;
METHOD m_nxhthmir getHolder (Lnet/minecraft/unmapped/C_ncpywfca;)Ljava/util/Optional;
ARG 1 id
METHOD m_nzuihlla getRandomElement (Lnet/minecraft/unmapped/C_ednuhnnn;Lnet/minecraft/unmapped/C_rlomrsco;)Ljava/util/Optional;
METHOD m_ojrrpohi getTagKeys ()Ljava/util/stream/Stream;
METHOD m_pquqhkot holderByNameCodec ()Lcom/mojang/serialization/Codec;
METHOD m_pvyfqcdo getCodec ()Lcom/mojang/serialization/Codec;
METHOD m_qeyctvgm asHolderIdMap ()Lnet/minecraft/unmapped/C_feaetnaz;
METHOD m_qkhirdbw validateReference (Lnet/minecraft/unmapped/C_cjzoxshv;)Lcom/mojang/serialization/DataResult;
ARG 1 holder
METHOD m_qomglfhh getOrThrow (Lnet/minecraft/unmapped/C_xhhleach;)Ljava/lang/Object;
COMMENT Gets an entry from the registry.
COMMENT
Expand Down
1 change: 1 addition & 0 deletions mappings/net/minecraft/registry/RegistryFixedCodec.mapping
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ CLASS net/minecraft/unmapped/C_qosrsbdy net/minecraft/registry/RegistryFixedCode
ARG 1 registryKey
METHOD decode decode (Lcom/mojang/serialization/DynamicOps;Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
ARG 1 dynamicOps
ARG 2 input
METHOD encode encode (Ljava/lang/Object;Lcom/mojang/serialization/DynamicOps;Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
ARG 1 holder
ARG 2 dynamicOps
Expand Down
1 change: 1 addition & 0 deletions mappings/net/minecraft/registry/RegistryKey.mapping
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ CLASS net/minecraft/unmapped/C_xhhleach net/minecraft/registry/RegistryKey
ARG 2 value
METHOD m_achtcauh (Lnet/minecraft/unmapped/C_xhhleach;Lnet/minecraft/unmapped/C_ncpywfca;)Lnet/minecraft/unmapped/C_xhhleach;
ARG 1 value
METHOD m_acppaety registryKey ()Lnet/minecraft/unmapped/C_xhhleach;
METHOD m_bbzwrvpr packetCodec (Lnet/minecraft/unmapped/C_xhhleach;)Lnet/minecraft/unmapped/C_qsrmwluu;
METHOD m_fvrtwzrl of (Lnet/minecraft/unmapped/C_xhhleach;Lnet/minecraft/unmapped/C_ncpywfca;)Lnet/minecraft/unmapped/C_xhhleach;
COMMENT Creates a registry key for a value in a registry with a registry key for
Expand Down
4 changes: 4 additions & 0 deletions mappings/net/minecraft/registry/RegistryLoader.mapping
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
CLASS net/minecraft/unmapped/C_ratuauki net/minecraft/registry/RegistryLoader
FIELD f_cwqigkbo EXPERIMENTAL_REGISTRATION_INFO Lnet/minecraft/unmapped/C_jhxfjegj;
FIELD f_jezobqyr SYNCED_REGISTRIES Ljava/util/List;
FIELD f_mbwjyulc WORLDGEN_REGISTRIES Ljava/util/List;
FIELD f_mwvwmgqu REGISTRATION_INFO_CACHE Ljava/util/function/Function;
FIELD f_ytrbmnwo DIMENSION_REGISTRIES Ljava/util/List;
METHOD m_bszcilsu printExceptions (Ljava/util/Map;)V
ARG 0 collectedExceptions
Expand All @@ -10,6 +13,7 @@ CLASS net/minecraft/unmapped/C_ratuauki net/minecraft/registry/RegistryLoader
METHOD m_mcjxwvrf createContext (Lnet/minecraft/unmapped/C_wqxmvzdq;Ljava/util/List;)Lnet/minecraft/unmapped/C_piadqmzm$C_raywzonl;
ARG 1 registriesAndLoaders
METHOD m_rlsjdntz createInfoForContextRegistry (Lnet/minecraft/unmapped/C_tqxyjqsk;)Lnet/minecraft/unmapped/C_piadqmzm$C_sznlrmbg;
METHOD m_utyouqei load (Lnet/minecraft/unmapped/C_ratuauki$C_kprmzsuj;Lnet/minecraft/unmapped/C_wqxmvzdq;Ljava/util/List;)Lnet/minecraft/unmapped/C_wqxmvzdq$C_ggmzysrd;
CLASS C_kfdvqtiv ContentLoader
CLASS C_qpshoosu DecodingData
METHOD m_qxfeaogn createRegistryAndLoader (Lcom/mojang/serialization/Lifecycle;Ljava/util/Map;)Lnet/minecraft/unmapped/C_ratuauki$C_kfdvqtiv;
Expand Down
21 changes: 21 additions & 0 deletions mappings/net/minecraft/registry/ReloadableRegistries.mapping
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
CLASS net/minecraft/unmapped/C_ihseotxf net/minecraft/registry/ReloadableRegistries
FIELD f_mtejqtll GSON Lcom/google/gson/Gson;
FIELD f_tziodfyh DEFAULT_REGISTRATION_INFO Lnet/minecraft/unmapped/C_jhxfjegj;
METHOD m_nnifhcon reload (Lnet/minecraft/unmapped/C_bcpxdrik;Lnet/minecraft/unmapped/C_tmnrpasf;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;
METHOD m_spiepebv withUpdatedRegistries (Lnet/minecraft/unmapped/C_bcpxdrik;Ljava/util/List;)Lnet/minecraft/unmapped/C_bcpxdrik;
ARG 0 registryManager
METHOD m_uxxtvsuw scheduleParsing (Lnet/minecraft/unmapped/C_gvzqwcwq;Lnet/minecraft/unmapped/C_piadqmzm;Lnet/minecraft/unmapped/C_tmnrpasf;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;
ARG 0 type
ARG 1 ops
METHOD m_wrwpezud apply (Lnet/minecraft/unmapped/C_bcpxdrik;Ljava/util/List;)Lnet/minecraft/unmapped/C_bcpxdrik;
ARG 0 registryManager
METHOD m_xrkbdssc validateRegistry (Lnet/minecraft/unmapped/C_eumtgsbp;Lnet/minecraft/unmapped/C_gvzqwcwq;Lnet/minecraft/unmapped/C_wqxmvzdq;)V
ARG 0 reporter
ARG 1 lootDataType
CLASS C_eetbager TagAwareLookupWrapper
CLASS C_hnvzydbq Holder
FIELD f_uxidcgck registryManager Lnet/minecraft/unmapped/C_wqxmvzdq$C_ggmzysrd;
METHOD m_lrvgvrfo getIds (Lnet/minecraft/unmapped/C_xhhleach;)Ljava/util/Collection;
METHOD m_ootvrhbi getRegistryManager ()Lnet/minecraft/unmapped/C_wqxmvzdq$C_ggmzysrd;
METHOD m_rgbjhfac getLootTable (Lnet/minecraft/unmapped/C_xhhleach;)Lnet/minecraft/unmapped/C_inwsuliy;
METHOD m_ssljecqh createLookupProvider ()Lnet/minecraft/unmapped/C_pzdchrcy$C_pbvqpmst;

0 comments on commit f41a378

Please sign in to comment.