Skip to content

Commit

Permalink
Merge pull request #42 from UselessBullets/recipeFixes
Browse files Browse the repository at this point in the history
BlockSound validation Fix + Server gameStart entrypoints
  • Loading branch information
UselessBullets authored Dec 20, 2023
2 parents 3c5fab7 + 917ccd2 commit 1bf019d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
org.gradle.jvmargs=-Xmx2G

# BTA
bta_version=7.1-pre1
bta_version=7.1-pre1a

# Loader
loader_version=0.14.19-babric.2-bta
loader_version=0.14.19-babric.3-bta

# Mod
mod_version=3.0.3
mod_version=3.0.4
mod_group=turniplabs
mod_name=halplibe

Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import turniplabs.halplibe.util.GameStartEntrypoint;
import turniplabs.halplibe.util.RecipeEntrypoint;

@Mixin(value = MinecraftServer.class, remap = false)
Expand All @@ -14,4 +15,13 @@ public class MinecraftServerMixin {
public void recipeEntrypoint(CallbackInfoReturnable<Boolean> cir){
FabricLoader.getInstance().getEntrypoints("recipesReady", RecipeEntrypoint.class).forEach(RecipeEntrypoint::onRecipesReady);
}
@Inject(method = "startServer", at = @At("HEAD"))
public void beforeGameStartEntrypoint(CallbackInfoReturnable<Boolean> cir){
FabricLoader.getInstance().getEntrypoints("beforeGameStart", GameStartEntrypoint.class).forEach(GameStartEntrypoint::beforeGameStart);
}

@Inject(method = "startServer", at = @At("TAIL"))
public void afterGameStartEntrypoint(CallbackInfoReturnable<Boolean> cir){
FabricLoader.getInstance().getEntrypoints("afterGameStart", GameStartEntrypoint.class).forEach(GameStartEntrypoint::afterGameStart);
}
}
2 changes: 1 addition & 1 deletion src/main/resources/halplibe.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"accessors.EntityListAccessor",
"accessors.LanguageAccessor",
"accessors.TileEntityAccessor",
"mixins.BlockSoundDispatcherMixin",
"mixins.BlockFireMixin",
"mixins.I18nMixin",
"mixins.ItemStackJsonAdapterMixin",
Expand All @@ -23,7 +24,6 @@
"client": [
"accessors.RenderManagerAccessor",
"accessors.TileEntityRendererAccessor",
"mixins.BlockSoundDispatcherMixin",
"mixins.EntityClientPlayerMPMixin",
"mixins.GuiIngameMenuMixin",
"mixins.MinecraftMixin",
Expand Down

0 comments on commit 1bf019d

Please sign in to comment.