Skip to content

Commit

Permalink
Update NeoForge
Browse files Browse the repository at this point in the history
  • Loading branch information
UnRealDinnerbone committed Jul 6, 2024
1 parent 831a117 commit 6d73c90
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 12 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
### 6.0.0
### 6.0.1

- Update to 1.21
- Update NeoForge
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id("dev.nanite.mlp") version("0.1.10")
id("dev.nanite.mlp") version("0.2.0")
id("java-library")
id("maven-publish")
id("me.modmuss50.mod-publish-plugin") version "0.3.0"
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Project
mod_version=6.0.0
mod_version=6.0.1
maven_group=com.unrealdinnerbone
mod_name=Trenzalore
mod_author=UnRealDinnerbone
Expand All @@ -12,7 +12,7 @@ minecraft_version=1.21
# Forge
#//forge_version=49.0.31

neo_version=21.0.0-beta
neo_version=21.0.61-beta
# Fabric
fabric_version=0.100.1+1.21
fabric_loader_version=0.15.11
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
public class TrenzaloreNeo {

public TrenzaloreNeo(IEventBus modEventBus) {
NeoPlatformHelper.setEventBus(modEventBus);
Trenzalore.init();
modEventBus.addListener(TrenzaloreNeo::onCreativeTab);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
@ApiStatus.Internal
public class NeoPlatformHelper implements IPlatformHelper {

private static IEventBus eventBus;
private static final Map<ResourceKey<CreativeModeTab>, List<Supplier<? extends Item>>> CREATIVE_TAB_MAP = new HashMap<>();

@Override
Expand All @@ -43,7 +42,11 @@ public boolean isModLoaded(String modId) {
public <T> void registryRegistryObjects(String modId, RegistryObjects<T> registryObjects) {
DeferredRegister<T> deferredRegister = DeferredRegister.create(registryObjects.registryKey(), modId);
registryObjects.objects().forEach(registryEntry -> deferredRegister.register(registryEntry.name(), registryEntry.entry()));
deferredRegister.register(eventBus);
IEventBus modEventBus = ModList.get().getModContainerById(modId).orElseThrow(() -> new IllegalArgumentException("Mod Not Found: " + modId)).getEventBus();
if(modEventBus == null) {
throw new IllegalArgumentException("Mod Does not have and event bus: " + modId);
}
deferredRegister.register(modEventBus);
}

@Override
Expand All @@ -60,8 +63,5 @@ public static Map<ResourceKey<CreativeModeTab>, List<Supplier<? extends Item>>>
return CREATIVE_TAB_MAP;
}

public static void setEventBus(IEventBus eventBus) {
NeoPlatformHelper.eventBus = eventBus;
}

}
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pluginManagement {

plugins {
id "org.jetbrains.gradle.plugin.idea-ext" version "1.1.7" apply(false)
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.5.0'
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.8.0'
}

}
Expand Down

0 comments on commit 6d73c90

Please sign in to comment.