Skip to content

Commit 3ac7685

Browse files
committed
1.20.4
1 parent 252f362 commit 3ac7685

20 files changed

+133
-115
lines changed

gradle.properties

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,37 @@
22
org.gradle.jvmargs=-Xmx1G
33
# Fabric Properties
44
# check these on https://fabricmc.net/develop
5-
minecraft_base_version=1.20.2
6-
minecraft_version=1.20.2
7-
yarn_mappings=1.20.2+build.2
8-
loader_version=0.14.22
5+
minecraft_base_version=1.20.3
6+
minecraft_version=1.20.4
7+
yarn_mappings=1.20.4+build.3
8+
loader_version=0.15.3
99
# Mod Properties
1010
mod_version=0.3.3
1111
maven_group=com.glisco
1212
archives_base_name=things
1313
# Dependencies
14-
fabric_version=0.89.3+1.20.2
14+
fabric_version=0.92.0+1.20.4
1515

1616
# https://maven.terraformersmc.com/releases/dev/emi/trinkets
1717
trinkets_version=3.8.0
1818

1919
# https://maven.wispforest.io/io/wispforest/lavender/
20-
lavender_version=0.1.0-pre.19+1.20.2
20+
lavender_version=0.1.0-pre.20+1.20.2
2121

2222
# https://github.com/OnyxStudios/Cardinal-Components-API/releases
23-
cca_version=5.3.0
23+
cca_version=5.4.0
2424

2525
# https://maven.shedaniel.me/me/shedaniel/RoughlyEnoughItems-fabric/
26-
rei_version=13.0.666
26+
rei_version=14.0.688
2727

2828
# https://maven.terraformersmc.com/releases/com/terraformersmc/modmenu
29-
modmenu_version=8.0.0
29+
modmenu_version=9.0.0
3030

3131
# https://maven.wispforest.io/io/wispforest/owo-lib/
32-
owo_version=0.11.3+1.20.2
32+
owo_version=0.12.0+1.20.3
3333

3434
# https://github.com/CrimsonDawn45/Fabric-Shield-Lib/releases
35-
fabric_shield_lib_version=v1.7.1-1.20.2
35+
fabric_shield_lib_version=v1.7.2-1.20.4
3636

3737
# https://github.com/JamiesWhiteShirt/reach-entity-attributes/blob/1.20/gradle.properties#L12
38-
reach_entity_attrs_version=2.4.0
38+
reach_entity_attrs_version=2.5.0-wf_pre.1

src/main/java/com/glisco/things/blocks/DiamondPressurePlateBlock.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@
1717
public class DiamondPressurePlateBlock extends PressurePlateBlock {
1818

1919
protected DiamondPressurePlateBlock() {
20-
super(ActivationRule.MOBS,
21-
FabricBlockSettings.copyOf(Blocks.HEAVY_WEIGHTED_PRESSURE_PLATE).sounds(BlockSoundGroup.METAL).mapColor(MapColor.DIAMOND_BLUE),
22-
BlockSetType.IRON);
20+
super(BlockSetType.IRON,
21+
FabricBlockSettings.copyOf(Blocks.HEAVY_WEIGHTED_PRESSURE_PLATE).sounds(BlockSoundGroup.METAL).mapColor(MapColor.DIAMOND_BLUE));
2322
}
2423

2524
@Override

src/main/java/com/glisco/things/blocks/GlowstoneFixtureBlock.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.glisco.things.blocks;
22

3+
import com.mojang.serialization.MapCodec;
34
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
45
import net.minecraft.block.*;
56
import net.minecraft.fluid.FluidState;
@@ -110,4 +111,8 @@ public BlockState getStateForNeighborUpdate(BlockState state, Direction directio
110111
return direction == state.get(FACING) && !state.canPlaceAt(world, pos) ? Blocks.AIR.getDefaultState() : state;
111112
}
112113

114+
@Override
115+
protected MapCodec<? extends FacingBlock> getCodec() {
116+
return null;
117+
}
113118
}

src/main/java/com/glisco/things/blocks/PlacedItemBlock.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.glisco.things.blocks;
22

3+
import com.mojang.serialization.MapCodec;
34
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
45
import net.minecraft.block.*;
56
import net.minecraft.block.entity.BlockEntity;
@@ -107,11 +108,16 @@ public void onStateReplaced(BlockState state, World world, BlockPos pos, BlockSt
107108
}
108109

109110
@Override
110-
public ItemStack getPickStack(BlockView world, BlockPos pos, BlockState state) {
111+
public ItemStack getPickStack(WorldView world, BlockPos pos, BlockState state) {
111112
if (world.getBlockEntity(pos) instanceof PlacedItemBlockEntity placedItem) {
112113
return placedItem.getItem().copy();
113114
} else {
114115
return super.getPickStack(world, pos, state);
115116
}
116117
}
118+
119+
@Override
120+
protected MapCodec<? extends BlockWithEntity> getCodec() {
121+
return null;
122+
}
117123
}

src/main/java/com/glisco/things/blocks/ThingsBlocks.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ public class ThingsBlocks implements BlockRegistryContainer {
2828
public static final Block QUARTZ_GLOWSTONE_FIXTURE = new GlowstoneFixtureBlock();
2929
public static final Block DEEPSLATE_GLOWSTONE_FIXTURE = new GlowstoneFixtureBlock();
3030

31-
public static final Block GLEAMING_ORE = new ExperienceDroppingBlock(FabricBlockSettings.copyOf(Blocks.DIAMOND_ORE).luminance(5).requiresTool(), UniformIntProvider.create(3, 7));
32-
public static final Block DEEPSLATE_GLEAMING_ORE = new ExperienceDroppingBlock(FabricBlockSettings.copyOf(Blocks.DEEPSLATE_DIAMOND_ORE).luminance(5).requiresTool(), UniformIntProvider.create(3, 7));
31+
public static final Block GLEAMING_ORE = new ExperienceDroppingBlock(UniformIntProvider.create(3, 7), FabricBlockSettings.copyOf(Blocks.DIAMOND_ORE).luminance(5).requiresTool());
32+
public static final Block DEEPSLATE_GLEAMING_ORE = new ExperienceDroppingBlock(UniformIntProvider.create(3, 7), FabricBlockSettings.copyOf(Blocks.DEEPSLATE_DIAMOND_ORE).luminance(5).requiresTool());
3333

3434
public static final Block DIAMOND_PRESSURE_PLATE = new DiamondPressurePlateBlock();
3535
public static final BlockItem DIAMOND_PRESSURE_PLATE_ITEM = new BlockItem(ThingsBlocks.DIAMOND_PRESSURE_PLATE, new OwoItemSettings().group(Things.THINGS_GROUP)) {

src/main/java/com/glisco/things/client/DisplacementTomeScreen.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ protected void build(FlowLayout rootComponent) {
5656
var targets = new HashSet<String>();
5757

5858
var newButton = rootComponent.childById(ButtonComponent.class, "new-button");
59-
newButton.active = inventory.containsAny(Set.of(ThingsItems.DISPLACEMENT_PAGE)) && bookNbt.get(DisplacementTomeItem.TARGETS).getSize() < 8;
59+
newButton.active = inventory.containsAny(Set.of(ThingsItems.DISPLACEMENT_PAGE)) && bookNbt.get(DisplacementTomeItem.TARGETS).size() < 8;
6060
if (!newButton.active) newButton.tooltip(Text.translatable("gui.things.displacement_tome.no_pages"));
6161

6262
newButton.onPress((ButtonComponent button) -> {
@@ -80,7 +80,7 @@ protected void build(FlowLayout rootComponent) {
8080
});
8181

8282
if (bookNbt.has(DisplacementTomeItem.TARGETS)) {
83-
for (var target : bookNbt.get(DisplacementTomeItem.TARGETS).getKeys()) {
83+
for (var target : bookNbt.get(DisplacementTomeItem.TARGETS).keySet()) {
8484
targets.add(target);
8585

8686
var teleportComponent = this.model.expandTemplate(FlowLayout.class, "teleport-button", Map.of());

src/main/java/com/glisco/things/client/ThingsClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public void onInitializeClient() {
5353
HandledScreens.register(Things.DISPLACEMENT_TOME_SCREEN_HANDLER, DisplacementTomeScreen::new);
5454

5555
ModelPredicateProviderRegistry.register(ThingsItems.DISPLACEMENT_TOME, new Identifier("pages"), new DisplacementTomeItem.PredicateProvider());
56-
ModelPredicateProviderRegistry.register(ThingsItems.SOCKS, new Identifier("jumpy"), (stack, world, entity, seed) -> stack.getOr(SocksItem.JUMPY_KEY, false) ? 1 : 0);
56+
ModelPredicateProviderRegistry.register(ThingsItems.SOCKS, new Identifier("jumpy"), (stack, world, entity, seed) -> stack.get(SocksItem.JUMPY_KEY) ? 1 : 0);
5757

5858
TrinketRendererRegistry.registerRenderer(Items.APPLE, new AppleTrinket.Renderer());
5959

src/main/java/com/glisco/things/items/ExtendableTooltipProvider.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.glisco.things.items;
22

3+
import com.mojang.serialization.MapCodec;
34
import net.fabricmc.api.EnvType;
45
import net.fabricmc.api.Environment;
56
import net.minecraft.client.MinecraftClient;
@@ -44,6 +45,9 @@ default void appendWrapped(List<Text> tooltip, Text toAppend) {
4445
}
4546

4647
record VisitableTextContent(StringVisitable content) implements TextContent {
48+
49+
private static final Type<VisitableTextContent> DUMMY_TYPE = new Type<>(MapCodec.unit(new VisitableTextContent(StringVisitable.EMPTY)), "idwtialsimmoedm:visitable_text");
50+
4751
@Override
4852
public <T> Optional<T> visit(StringVisitable.StyledVisitor<T> visitor, Style style) {
4953
return this.content.visit(visitor, style);
@@ -53,5 +57,10 @@ public <T> Optional<T> visit(StringVisitable.StyledVisitor<T> visitor, Style sty
5357
public <T> Optional<T> visit(StringVisitable.Visitor<T> visitor) {
5458
return this.content.visit(visitor);
5559
}
60+
61+
@Override
62+
public Type<?> getType() {
63+
return DUMMY_TYPE;
64+
}
5665
}
5766
}

src/main/java/com/glisco/things/items/generic/BaterWucketItem.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public boolean hasGlint(ItemStack stack) {
3232
}
3333

3434
public static void registerCauldronBehavior() {
35-
CauldronBehavior.EMPTY_CAULDRON_BEHAVIOR.put(ThingsItems.BATER_WUCKET, (state, world, pos, player, hand, stack) -> {
35+
CauldronBehavior.EMPTY_CAULDRON_BEHAVIOR.map().put(ThingsItems.BATER_WUCKET, (state, world, pos, player, hand, stack) -> {
3636
if (world.isClient) return ActionResult.SUCCESS;
3737

3838
world.setBlockState(pos, Blocks.WATER_CAULDRON.getDefaultState().with(LeveledCauldronBlock.LEVEL, 3));

src/main/java/com/glisco/things/items/generic/ContainerKeyItem.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
import com.glisco.things.mixin.access.ContainerLockAccessor;
66
import com.glisco.things.mixin.access.LockableContainerBlockEntityAccessor;
77
import io.wispforest.owo.itemgroup.OwoItemSettings;
8-
import io.wispforest.owo.nbt.NbtKey;
8+
import io.wispforest.owo.serialization.Endec;
9+
import io.wispforest.owo.serialization.endec.KeyedEndec;
910
import net.minecraft.block.ChestBlock;
1011
import net.minecraft.block.entity.BlockEntity;
1112
import net.minecraft.block.entity.ChestBlockEntity;
@@ -31,7 +32,7 @@
3132

3233
public class ContainerKeyItem extends ItemWithExtendableTooltip {
3334

34-
private static final NbtKey<Integer> LOCK_KEY = new NbtKey<>("Lock", NbtKey.Type.INT);
35+
private static final KeyedEndec<Integer> LOCK_KEY = Endec.INT.keyed("Lock", 0);
3536

3637
public ContainerKeyItem() {
3738
super(new OwoItemSettings().group(Things.THINGS_GROUP).maxCount(1));

0 commit comments

Comments
 (0)