Skip to content

Commit

Permalink
Update to 1.20.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Patbox committed Dec 5, 2023
1 parent b0eafc9 commit 1dab20b
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 14 deletions.
14 changes: 7 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '1.0-SNAPSHOT'
id 'fabric-loom' version '1.4.+'
id 'maven-publish'
id "com.modrinth.minotaur" version "2.+"
id 'com.matthewprenger.cursegradle' version '1.4.0'
Expand Down Expand Up @@ -34,13 +34,13 @@ dependencies {
// Fabric API. This is technically optional, but you probably want it anyway.
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"

modImplementation include('xyz.nucleoid:server-translations-api:2.1.0+1.20.2-rc2')
modImplementation include('eu.pb4:polymer-core:0.6.0-rc.1+1.20.2-rc2')
modImplementation include('eu.pb4:polymer-virtual-entity:0.6.0-rc.1+1.20.2-rc2')
modImplementation include('eu.pb4:polymer-resource-pack:0.6.0-rc.1+1.20.2-rc2')
modLocalRuntime 'eu.pb4:polymer-autohost:0.6.0-rc.1+1.20.2-rc2'
modImplementation include('xyz.nucleoid:server-translations-api:2.2.0+1.20.3-rc1')
modImplementation include('eu.pb4:polymer-core:0.7.0+1.20.3-rc1')
modImplementation include('eu.pb4:polymer-virtual-entity:0.7.0+1.20.3-rc1')
modImplementation include('eu.pb4:polymer-resource-pack:0.7.0+1.20.3-rc1')
modLocalRuntime 'eu.pb4:polymer-autohost:0.7.0+1.20.3-rc1'
modImplementation include("eu.pb4:sgui:1.3.0+1.20.2")
modImplementation include("eu.pb4:placeholder-api:2.2.0+1.20.2")
modImplementation include("eu.pb4:placeholder-api:2.3.0+1.20.3")
modImplementation include("eu.pb4:common-protection-api:1.0.0")
modImplementation include("eu.pb4:common-economy-api:1.1.1")
modImplementation include("me.lucko:fabric-permissions-api:0.2-SNAPSHOT")
Expand Down
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ org.gradle.jvmargs=-Xmx1G

# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.20.2-rc2
yarn_mappings=1.20.2-rc2+build.1
loader_version=0.14.21
minecraft_version=1.20.3-rc1
yarn_mappings=1.20.3-rc1+build.1
loader_version=0.15.0

# Mod Properties
mod_version = 1.4.0+1.20.2
mod_version = 1.5.0+1.20.3
maven_group = eu.pb4
archives_base_name = universal_shops

# Dependencies
fabric_version=0.89.0+1.20.2
fabric_version=0.91.1+1.20.3
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion src/main/java/eu/pb4/universalshops/gui/ExtraGui.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ default boolean hasTexture() {
}

static boolean hasTexture(ServerPlayerEntity player) {
return PolymerResourcePackUtils.hasPack(player) || PolymerServerNetworking.getMetadata(player.networkHandler, UniversalShopsMod.HELLO_PACKET, NbtInt.TYPE) != null;
return PolymerResourcePackUtils.hasMainPack(player) || PolymerServerNetworking.getMetadata(player.networkHandler, UniversalShopsMod.HELLO_PACKET, NbtInt.TYPE) != null;
}

static MutableText texture(ServerPlayerEntity player, Text possibleTexture) {
Expand Down
13 changes: 13 additions & 0 deletions src/main/java/eu/pb4/universalshops/registry/TradeShopBlock.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package eu.pb4.universalshops.registry;

import com.mojang.serialization.Codec;
import com.mojang.serialization.MapCodec;
import com.mojang.serialization.codecs.RecordCodecBuilder;
import eu.pb4.polymer.core.api.block.PolymerHeadBlock;
import net.fabricmc.fabric.api.block.BlockAttackInteractionAware;
import net.minecraft.block.*;
Expand Down Expand Up @@ -27,6 +30,11 @@ public class TradeShopBlock extends BlockWithEntity implements PolymerHeadBlock,
public static Property<Direction> ATTACHED = EnumProperty.of("attachment", Direction.class, (x) -> x != Direction.UP);
public final boolean isAdmin;

public static final MapCodec<TradeShopBlock> CODEC = RecordCodecBuilder.mapCodec(instance -> instance.group(
Codec.BOOL.fieldOf("is_admin").forGetter(x -> x.isAdmin),
createSettingsCodec()
).apply(instance, TradeShopBlock::new));

protected TradeShopBlock(boolean isAdmin, Settings settings) {
super(settings);
this.isAdmin = isAdmin;
Expand Down Expand Up @@ -131,4 +139,9 @@ public boolean onAttackInteraction(BlockState state, World world, BlockPos pos,

return true;
}

@Override
protected MapCodec<? extends BlockWithEntity> getCodec() {
return CODEC;
}
}

0 comments on commit 1dab20b

Please sign in to comment.