Skip to content

Commit

Permalink
0.0.9, fix server crash
Browse files Browse the repository at this point in the history
  • Loading branch information
TheWinABagel committed Nov 13, 2023
1 parent 06bc97b commit eff0bdd
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 5 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ task publishCurseForge(type: net.darkhax.curseforgegradle.TaskPublishCurseForge)
def mainFile = upload(853197, remapJar)
mainFile.changelog = "https://github.com/TheWinABagel/FakerLib/blob/master/changelog.md"
mainFile.releaseType = "beta"
//mainFile.addJavaVersion("17")
//mainFile.addJavaVersion("17") //doesn't work for reasons unknown to me
mainFile.addGameVersion("1.20.1")
mainFile.addModLoader("fabric")
mainFile.displayName = project.archives_base_name + "-" + project.version
mainFile.addRequirement("306612") //FAPI
mainFile.addRequirement("fabric-api") //FAPI
}
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@


## 0.0.9
* Fix crashing on servers

## 0.0.8
* Remove most dependencies on porting lib, remove some unneeded classes, breaking change
* Readd support for shadow's patreon wings and trails
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ minecraft_version=1.20.1
loader_version=0.14.22

# Mod Properties
mod_version=0.0.8
mod_version=0.0.9
maven_group=dev.shadowsoffire.placebo
archives_base_name=fakerlib

Expand Down
3 changes: 3 additions & 0 deletions src/main/java/dev/shadowsoffire/placebo/menu/MenuUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ public static <M extends AbstractContainerMenu> InteractionResult openGui(Player
return InteractionResult.CONSUME;
}




/**
* IIntArray can only send shorts, so we need to split int values in two.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import dev.shadowsoffire.placebo.patreon.PatreonUtils;
import dev.shadowsoffire.placebo.patreon.TrailsManager;
import dev.shadowsoffire.placebo.patreon.WingsManager;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.Minecraft;
import net.minecraft.network.chat.Component;
import net.minecraft.world.entity.player.Player;
Expand All @@ -22,8 +24,9 @@ public class PlayerMixin {
@Unique
private static int counter = 0;

@Environment(EnvType.CLIENT)
@Inject(method = "tick", at = @At("TAIL"))
private void patreonWings(CallbackInfo ci){
private void patreonWings(CallbackInfo ci) {
Player player = (Player) (Object) this;
if (player.level().isClientSide) {
if (player.tickCount >= 200) {
Expand Down Expand Up @@ -51,4 +54,5 @@ else if (PatreonPreview.WINGS) {
}
}
}

}
2 changes: 1 addition & 1 deletion src/main/resources/fakerlib.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
"EnchantmentHelperMixin",
"ItemStackMixin",
"LootTablesMixin",
"PlayerMixin",
"ReloadableServerResourcesMixin"
],
"injectors": {
"defaultRequire": 1
},
"client": [
"ChatComponentMixin",
"PlayerMixin",
"EntityRenderDispatcherMixin"
]
}

0 comments on commit eff0bdd

Please sign in to comment.