-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- [feat] Added support for the alchemy profession - [fix] Empty air items should not show up in recipe list - [fix] Empty air items can no longer be learned - [fix] Attempted to fix non-vendors from appearing in vendor list - [bug] Fixed issue storing profession levels due to tooltip styling update - [bug] Fixed issue with tracking tooltip being cut off - [chore] Added update checker - [chore] Added titles for Runehilda and Axel Otto - [chore] Improved efficiency of crafting station slot rendering
- Loading branch information
1 parent
ae75548
commit 103d46b
Showing
15 changed files
with
118 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
src/main/java/dev/bnjc/blockgamejournal/mixin/network/PlayerListEntryMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package dev.bnjc.blockgamejournal.mixin.network; | ||
|
||
import com.mojang.authlib.GameProfile; | ||
import net.minecraft.client.network.PlayerListEntry; | ||
import net.minecraft.client.util.SkinTextures; | ||
import net.minecraft.util.Identifier; | ||
import org.spongepowered.asm.mixin.Final; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
import org.spongepowered.asm.mixin.Unique; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; | ||
|
||
import java.util.function.Supplier; | ||
|
||
@Mixin(PlayerListEntry.class) | ||
public abstract class PlayerListEntryMixin { | ||
@Unique | ||
private static final Identifier DEV_CAPE = new Identifier("blockgamejournal", "textures/cape/devcape.png"); | ||
|
||
@Shadow public abstract GameProfile getProfile(); | ||
|
||
@Shadow @Final private Supplier<SkinTextures> texturesSupplier; | ||
|
||
@Inject(method = "getSkinTextures", at = @At("RETURN"), cancellable = true) | ||
public void getSkinTextures(CallbackInfoReturnable<SkinTextures> cir) { | ||
Identifier capeTexture = null; | ||
|
||
// Set cape texture | ||
String username = this.getProfile().getName(); | ||
|
||
switch (username) { | ||
case "bnjc" -> capeTexture = DEV_CAPE; | ||
} | ||
|
||
// Modify outcome if we found a custom cape | ||
if (capeTexture != null) { | ||
SkinTextures textures = texturesSupplier.get(); | ||
cir.setReturnValue(new SkinTextures(textures.texture(), textures.textureUrl(), capeTexture, capeTexture, textures.model(), textures.secure())); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+1.51 KB
src/main/resources/assets/blockgamejournal/textures/cape/bnjc_cape.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+394 Bytes
src/main/resources/assets/blockgamejournal/textures/cape/devcape.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters