Skip to content

Commit

Permalink
feat: update past neo breaking changes
Browse files Browse the repository at this point in the history
  • Loading branch information
klikli-dev committed Jul 8, 2024
1 parent 444caf5 commit 802b1cd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
16 changes: 8 additions & 8 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ minecraft_version_range=[1.21,1.22)

## Neo
# The neo version must agree with the Minecraft version to get a valid artifact
neo_version=21.0.43-beta
neo_version=21.0.76-beta
# The neo version range can use any version of neo as bounds or match the loader version range
neo_version_range=[21.0.6-beta,)
# The loader version range can only use the major version of Neo/FML as bounds
neo_loader_version_range=[3,)
neogradle_version=7.0.145
neogradle_version=7.0.153

# neo directly reads these properties
# the version the mappings were created for, does not need to match the current mc version
Expand All @@ -39,19 +39,19 @@ mod_description=An open-source magic mod built around classical alchemy to repli

## Dependency Properties

jei_version=19.0.0.13
jei_version_range=[19.0.0.1,)
modonomicon_version=1.92.2
modonomicon_version_range=[1.90.0,)
jei_version=19.3.1.24
jei_version_range=[19.3.1.0,)
modonomicon_version=1.95.1
modonomicon_version_range=[1.95.0,)
almost_unified_version=0.5.0
almost_unified_version_range=[0.5.0,)
# geckolib currently names their files after 1.20
geckolib_minecraft_version=1.21
geckolib_version=4.5.5
geckolib_version_range=[4.5.5,)
jade_version=15.1.2
jade_version=15.1.3
jade_version_range=[15.0.4,)
emi_version=1.1.8
emi_version=1.1.10
rei_version=16.0.729
architectury_version=13.0.1
cloth_config_version=15.0.127
Original file line number Diff line number Diff line change
Expand Up @@ -200,16 +200,14 @@ public static void onBuildCreativeModTabs(BuildCreativeModeTabContentsEvent even
var recipeManager = level.getRecipeManager();
var liquefactionRecipes = recipeManager.getAllRecipesFor(RecipeTypeRegistry.LIQUEFACTION.get());

//From: EventHooks#onCreativeModeTabBuildContents
//we need to use it here to test before inserting, because event.getEntries().contains uses a different hashing strategy and is thus not reliable
final var searchDupes = new ObjectLinkedOpenCustomHashSet<ItemStack>(ItemStackLinkedSet.TYPE_AND_TAG);
//Register only sulfurs that have a liquefaction recipe
liquefactionRecipes.forEach(r -> {
var result = r.value().getResultItem(level.registryAccess());
if (result != null && !result.isEmpty() && result.getItem() instanceof AlchemicalSulfurItem && !event.getEntries().contains(result)){
if (result != null && !result.isEmpty() && result.getItem() instanceof AlchemicalSulfurItem && !event.getParentEntries().contains(result)){
var stack = result.copyWithCount(1);
if (searchDupes.add(stack)) {
event.accept(stack, event.getTabKey() == CreativeModeTabs.SEARCH ? CreativeModeTab.TabVisibility.SEARCH_TAB_ONLY : CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS);

if (!event.getParentEntries().contains(stack)) {
event.accept(stack, CreativeModeTab.TabVisibility.PARENT_AND_SEARCH_TABS);
}
}
});
Expand Down

0 comments on commit 802b1cd

Please sign in to comment.