Skip to content

Commit

Permalink
Merge branch '1.19.4' into 1.20.1
Browse files Browse the repository at this point in the history
* 1.19.4:
  Bumped version, keep default mooblom variant

# Conflicts:
#	gradle.properties
  • Loading branch information
Faboslav committed Dec 17, 2023
2 parents 86d3417 + f16ce17 commit d1a159f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,19 @@ public final class MoobloomVariantManager extends JsonDataLoader
private static final MoobloomVariant DEFAULT_MOOBLOOM_VARIANT = new MoobloomVariant("buttercup", FriendsAndFoesBlocks.BUTTERCUP.get(), FriendsAndFoesTags.HAS_MOOBLOOMS);
public static final MoobloomVariantManager MOOBLOOM_VARIANT_MANAGER = new MoobloomVariantManager();

private List<MoobloomVariant> moobloomVariants = new ArrayList<>();
private List<MoobloomVariant> moobloomVariants = new ArrayList<>()
{
{
add(DEFAULT_MOOBLOOM_VARIANT);
}
};

private MoobloomVariantManager() {
super(GSON, "moobloom_variants");
}

@Override
protected void apply(Map<Identifier, JsonElement> loader, ResourceManager manager, Profiler profiler) {
moobloomVariants.clear();
List<MoobloomVariant> parsedMoobloomVariants = new ArrayList<>();
parsedMoobloomVariants.add(DEFAULT_MOOBLOOM_VARIANT);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.faboslav.friendsandfoes.entity;

import com.faboslav.friendsandfoes.init.FriendsAndFoesSoundEvents;
import net.minecraft.client.MinecraftClient;
import com.faboslav.friendsandfoes.util.client.PlayerProvider;
import net.minecraft.client.network.PlayerListEntry;
import net.minecraft.client.render.entity.PlayerModelPart;
import net.minecraft.client.util.DefaultSkinHelper;
Expand Down Expand Up @@ -174,7 +174,7 @@ private PlayerListEntry getPlayerListEntry() {
uuid = this.getUuid();
}

this.playerListEntry = MinecraftClient.getInstance().getNetworkHandler().getPlayerListEntry(uuid);
this.playerListEntry = PlayerProvider.getClientPlayerListEntry(uuid);
}

return this.playerListEntry;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
package com.faboslav.friendsandfoes.util.client;

import net.minecraft.client.MinecraftClient;
import net.minecraft.client.network.PlayerListEntry;
import net.minecraft.entity.player.PlayerEntity;

import java.util.UUID;

public final class PlayerProvider
{
public static PlayerEntity getClientPlayer() {
return MinecraftClient.getInstance().player;
}

public static PlayerListEntry getClientPlayerListEntry(UUID uuid) {
return MinecraftClient.getInstance().getNetworkHandler().getPlayerListEntry(uuid);
}

private PlayerProvider() {
}
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ org.gradle.configureondemand=false
# Mod
mod_name=Friends&Foes
mod_id=friendsandfoes
mod_version=2.0.4
mod_version=2.0.5
mod_author=Faboslav
mod_description=Adds outvoted and forgotten mobs from the mob votes in a believable vanilla plus style.
maven_group=com.faboslav.friendsandfoes
Expand Down

0 comments on commit d1a159f

Please sign in to comment.