Skip to content

Commit 96c6f3f

Browse files
committed
Update to 24w11a.
- Update to 24w11a
1 parent 1c15086 commit 96c6f3f

File tree

5 files changed

+34
-72
lines changed

5 files changed

+34
-72
lines changed

client/src/main/java/com/terraformersmc/cinderscapes/CinderscapesClient.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
package com.terraformersmc.cinderscapes;
22

33
import com.terraformersmc.cinderscapes.init.CinderscapesBlocks;
4-
import com.terraformersmc.terraform.sign.SpriteIdentifierRegistry;
54
import net.fabricmc.api.ClientModInitializer;
65
import net.fabricmc.api.EnvType;
76
import net.fabricmc.api.Environment;
87
import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap;
98
import net.fabricmc.fabric.api.client.item.v1.ItemTooltipCallback;
109
import net.minecraft.client.render.RenderLayer;
11-
import net.minecraft.client.render.TexturedRenderLayers;
12-
import net.minecraft.client.util.SpriteIdentifier;
1310
import net.minecraft.text.Style;
1411
import net.minecraft.text.Text;
1512
import net.minecraft.util.Formatting;
@@ -81,10 +78,5 @@ public void onInitializeClient() {
8178
lines.add(Text.translatable("block.cinderscapes.nodzol.description").setStyle(Style.EMPTY.withColor(Formatting.GRAY)));
8279
}
8380
});
84-
85-
SpriteIdentifierRegistry.INSTANCE.addIdentifier(new SpriteIdentifier(TexturedRenderLayers.SIGNS_ATLAS_TEXTURE, CinderscapesBlocks.SCORCHED_SIGN.getTexture()));
86-
SpriteIdentifierRegistry.INSTANCE.addIdentifier(new SpriteIdentifier(TexturedRenderLayers.SIGNS_ATLAS_TEXTURE, CinderscapesBlocks.SCORCHED_HANGING_SIGN.getTexture()));
87-
SpriteIdentifierRegistry.INSTANCE.addIdentifier(new SpriteIdentifier(TexturedRenderLayers.SIGNS_ATLAS_TEXTURE, CinderscapesBlocks.UMBRAL_SIGN.getTexture()));
88-
SpriteIdentifierRegistry.INSTANCE.addIdentifier(new SpriteIdentifier(TexturedRenderLayers.SIGNS_ATLAS_TEXTURE, CinderscapesBlocks.UMBRAL_HANGING_SIGN.getTexture()));
8981
}
9082
}

common/src/main/java/com/terraformersmc/cinderscapes/data/CinderscapesBlockLootTableProvider.java

Lines changed: 13 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,14 @@
1414
import net.minecraft.loot.LootTable;
1515
import net.minecraft.loot.condition.BlockStatePropertyLootCondition;
1616
import net.minecraft.loot.condition.EntityPropertiesLootCondition;
17-
import net.minecraft.loot.condition.MatchToolLootCondition;
1817
import net.minecraft.loot.context.LootContext;
1918
import net.minecraft.loot.entry.AlternativeEntry;
2019
import net.minecraft.loot.entry.ItemEntry;
2120
import net.minecraft.loot.function.ApplyBonusLootFunction;
2221
import net.minecraft.loot.function.SetCountLootFunction;
2322
import net.minecraft.loot.provider.number.ConstantLootNumberProvider;
2423
import net.minecraft.loot.provider.number.UniformLootNumberProvider;
25-
import net.minecraft.predicate.NumberRange;
2624
import net.minecraft.predicate.StatePredicate;
27-
import net.minecraft.predicate.item.EnchantmentPredicate;
28-
import net.minecraft.predicate.item.ItemPredicate;
2925
import net.minecraft.registry.RegistryWrapper;
3026

3127
import java.util.concurrent.CompletableFuture;
@@ -172,35 +168,19 @@ public void generate() {
172168

173169
// multi-layer drops
174170
addDrop(CinderscapesBlocks.ASH, block -> LootTable.builder().pool(LootPool.builder().conditionally(
175-
EntityPropertiesLootCondition
176-
.create(LootContext.EntityTarget.THIS)).with(AlternativeEntry.builder(AlternativeEntry.builder(
177-
ItemEntry.builder(CinderscapesItems.ASH_PILE).conditionally(BlockStatePropertyLootCondition.builder(block).properties(StatePredicate.Builder.create().exactMatch(AshLayerBlock.LAYERS, 1))),
178-
ItemEntry.builder(CinderscapesItems.ASH_PILE).conditionally(BlockStatePropertyLootCondition.builder(block).properties(StatePredicate.Builder.create().exactMatch(AshLayerBlock.LAYERS, 2)))
179-
.apply(SetCountLootFunction.builder(ConstantLootNumberProvider.create(2))),
180-
ItemEntry.builder(CinderscapesItems.ASH_PILE).conditionally(BlockStatePropertyLootCondition.builder(block).properties(StatePredicate.Builder.create().exactMatch(AshLayerBlock.LAYERS, 3)))
181-
.apply(SetCountLootFunction.builder(ConstantLootNumberProvider.create(3))),
182-
ItemEntry.builder(CinderscapesItems.ASH_PILE).conditionally(BlockStatePropertyLootCondition.builder(block).properties(StatePredicate.Builder.create().exactMatch(AshLayerBlock.LAYERS, 4)))
183-
.apply(SetCountLootFunction.builder(ConstantLootNumberProvider.create(4))),
184-
ItemEntry.builder(CinderscapesItems.ASH_PILE).conditionally(BlockStatePropertyLootCondition.builder(block).properties(StatePredicate.Builder.create().exactMatch(AshLayerBlock.LAYERS, 5)))
185-
.apply(SetCountLootFunction.builder(ConstantLootNumberProvider.create(5))),
186-
ItemEntry.builder(CinderscapesItems.ASH_PILE).conditionally(BlockStatePropertyLootCondition.builder(block).properties(StatePredicate.Builder.create().exactMatch(AshLayerBlock.LAYERS, 6)))
187-
.apply(SetCountLootFunction.builder(ConstantLootNumberProvider.create(6))),
188-
ItemEntry.builder(CinderscapesItems.ASH_PILE).conditionally(BlockStatePropertyLootCondition.builder(block).properties(StatePredicate.Builder.create().exactMatch(AshLayerBlock.LAYERS, 7)))
189-
.apply(SetCountLootFunction.builder(ConstantLootNumberProvider.create(7))),
190-
ItemEntry.builder(CinderscapesItems.ASH_PILE).apply(SetCountLootFunction.builder(ConstantLootNumberProvider.create(8)))
191-
)
192-
.conditionally(MatchToolLootCondition.builder(ItemPredicate.Builder.create().enchantment(new EnchantmentPredicate(Enchantments.SILK_TOUCH, NumberRange.IntRange.atLeast(1)))).invert()),
193-
AlternativeEntry.builder(
194-
ItemEntry.builder(CinderscapesBlocks.ASH).conditionally(BlockStatePropertyLootCondition.builder(block).properties(StatePredicate.Builder.create().exactMatch(AshLayerBlock.LAYERS, 1))),
195-
ItemEntry.builder(CinderscapesBlocks.ASH).apply(SetCountLootFunction.builder(ConstantLootNumberProvider.create(2))).conditionally(BlockStatePropertyLootCondition.builder(block).properties(StatePredicate.Builder.create().exactMatch(AshLayerBlock.LAYERS, 2))),
196-
ItemEntry.builder(CinderscapesBlocks.ASH).apply(SetCountLootFunction.builder(ConstantLootNumberProvider.create(3))).conditionally(BlockStatePropertyLootCondition.builder(block).properties(StatePredicate.Builder.create().exactMatch(AshLayerBlock.LAYERS, 3))),
197-
ItemEntry.builder(CinderscapesBlocks.ASH).apply(SetCountLootFunction.builder(ConstantLootNumberProvider.create(4))).conditionally(BlockStatePropertyLootCondition.builder(block).properties(StatePredicate.Builder.create().exactMatch(AshLayerBlock.LAYERS, 4))),
198-
ItemEntry.builder(CinderscapesBlocks.ASH).apply(SetCountLootFunction.builder(ConstantLootNumberProvider.create(5))).conditionally(BlockStatePropertyLootCondition.builder(block).properties(StatePredicate.Builder.create().exactMatch(AshLayerBlock.LAYERS, 5))),
199-
ItemEntry.builder(CinderscapesBlocks.ASH).apply(SetCountLootFunction.builder(ConstantLootNumberProvider.create(6))).conditionally(BlockStatePropertyLootCondition.builder(block).properties(StatePredicate.Builder.create().exactMatch(AshLayerBlock.LAYERS, 6))),
200-
ItemEntry.builder(CinderscapesBlocks.ASH).apply(SetCountLootFunction.builder(ConstantLootNumberProvider.create(7))).conditionally(BlockStatePropertyLootCondition.builder(block).properties(StatePredicate.Builder.create().exactMatch(AshLayerBlock.LAYERS, 7))),
201-
ItemEntry.builder(CinderscapesBlocks.ASH_BLOCK)
202-
)
203-
))
171+
EntityPropertiesLootCondition.create(LootContext.EntityTarget.THIS))
172+
.with(AlternativeEntry.builder(
173+
AlternativeEntry.builder(
174+
AshLayerBlock.LAYERS.getValues(), layers -> ItemEntry.builder(CinderscapesItems.ASH_PILE)
175+
.conditionally(BlockStatePropertyLootCondition.builder(block).properties(StatePredicate.Builder.create().exactMatch(AshLayerBlock.LAYERS, layers)))
176+
.apply(SetCountLootFunction.builder(ConstantLootNumberProvider.create(layers)))
177+
).conditionally(WITHOUT_SILK_TOUCH),
178+
AlternativeEntry.builder(
179+
AshLayerBlock.LAYERS.getValues(), layers -> layers == 8 ? ItemEntry.builder(CinderscapesBlocks.ASH_BLOCK) : ItemEntry.builder(CinderscapesBlocks.ASH)
180+
.conditionally(BlockStatePropertyLootCondition.builder(block).properties(StatePredicate.Builder.create().exactMatch(AshLayerBlock.LAYERS, layers)))
181+
.apply(SetCountLootFunction.builder(ConstantLootNumberProvider.create(layers)))
182+
)
183+
))
204184
));
205185
}
206186
}

common/src/main/java/com/terraformersmc/cinderscapes/data/CinderscapesRecipeProvider.java

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import net.minecraft.data.server.recipe.ShapelessRecipeJsonBuilder;
1414
import net.minecraft.item.Item;
1515
import net.minecraft.item.Items;
16-
import net.minecraft.predicate.NumberRange;
1716
import net.minecraft.predicate.item.ItemPredicate;
1817
import net.minecraft.recipe.Ingredient;
1918
import net.minecraft.recipe.book.RecipeCategory;
@@ -23,7 +22,6 @@
2322
import net.minecraft.util.Identifier;
2423

2524
import java.util.List;
26-
import java.util.Optional;
2725
import java.util.concurrent.CompletableFuture;
2826

2927
public class CinderscapesRecipeProvider extends FabricRecipeProvider {
@@ -276,16 +274,7 @@ public void generate(RecipeExporter exporter) {
276274

277275
// Returns an ItemPredicate matching any item in the provided ItemTag key.
278276
private static ItemPredicate getItemTagPredicate(TagKey<Item> itemTagKey) {
279-
return new ItemPredicate(
280-
Optional.of(itemTagKey),
281-
Optional.empty(),
282-
NumberRange.IntRange.ANY,
283-
NumberRange.IntRange.ANY,
284-
List.of(),
285-
List.of(),
286-
Optional.empty(),
287-
Optional.empty()
288-
);
277+
return ItemPredicate.Builder.create().tag(itemTagKey).build();
289278
}
290279

291280
@Override

common/src/main/java/com/terraformersmc/cinderscapes/init/CinderscapesTrades.java

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import net.minecraft.loot.provider.number.UniformLootNumberProvider;
1010
import net.minecraft.util.Identifier;
1111
import net.minecraft.village.TradeOffer;
12+
import net.minecraft.village.TradedItem;
1213
import net.minecraft.village.VillagerProfession;
1314

1415
public class CinderscapesTrades {
@@ -27,18 +28,18 @@ public static void init() {
2728
});
2829

2930
TradeOfferHelper.registerVillagerOffers(VillagerProfession.MASON, 4, (factories) -> {
30-
factories.add((entity, random) -> new TradeOffer(new ItemStack(CinderscapesItems.ROSE_QUARTZ, 12), new ItemStack(Items.EMERALD), 12, 30, 0.05F));
31-
factories.add((entity, random) -> new TradeOffer(new ItemStack(CinderscapesItems.SULFUR_QUARTZ, 12), new ItemStack(Items.EMERALD), 12, 30, 0.05F));
32-
factories.add((entity, random) -> new TradeOffer(new ItemStack(CinderscapesItems.SMOKY_QUARTZ, 12), new ItemStack(Items.EMERALD), 12, 30, 0.05F));
31+
factories.add((entity, random) -> new TradeOffer(new TradedItem(CinderscapesItems.ROSE_QUARTZ, 12), new ItemStack(Items.EMERALD), 12, 30, 0.05F));
32+
factories.add((entity, random) -> new TradeOffer(new TradedItem(CinderscapesItems.SULFUR_QUARTZ, 12), new ItemStack(Items.EMERALD), 12, 30, 0.05F));
33+
factories.add((entity, random) -> new TradeOffer(new TradedItem(CinderscapesItems.SMOKY_QUARTZ, 12), new ItemStack(Items.EMERALD), 12, 30, 0.05F));
3334
});
3435

3536
TradeOfferHelper.registerVillagerOffers(VillagerProfession.MASON, 5, (factories) -> {
36-
factories.add((entity, random) -> new TradeOffer(new ItemStack(Items.EMERALD, 1), new ItemStack(CinderscapesBlocks.ROSE_QUARTZ_PILLAR, 1), 12, 30, 0.05F));
37-
factories.add((entity, random) -> new TradeOffer(new ItemStack(Items.EMERALD, 1), new ItemStack(CinderscapesBlocks.ROSE_QUARTZ_BLOCK, 1), 12, 30, 0.05F));
38-
factories.add((entity, random) -> new TradeOffer(new ItemStack(Items.EMERALD, 1), new ItemStack(CinderscapesBlocks.SULFUR_QUARTZ_PILLAR, 1), 12, 30, 0.05F));
39-
factories.add((entity, random) -> new TradeOffer(new ItemStack(Items.EMERALD, 1), new ItemStack(CinderscapesBlocks.SULFUR_QUARTZ_BLOCK, 1), 12, 30, 0.05F));
40-
factories.add((entity, random) -> new TradeOffer(new ItemStack(Items.EMERALD, 1), new ItemStack(CinderscapesBlocks.SMOKY_QUARTZ_PILLAR, 1), 12, 30, 0.05F));
41-
factories.add((entity, random) -> new TradeOffer(new ItemStack(Items.EMERALD, 1), new ItemStack(CinderscapesBlocks.SMOKY_QUARTZ_BLOCK, 1), 12, 30, 0.05F));
37+
factories.add((entity, random) -> new TradeOffer(new TradedItem(Items.EMERALD, 1), new ItemStack(CinderscapesBlocks.ROSE_QUARTZ_PILLAR, 1), 12, 30, 0.05F));
38+
factories.add((entity, random) -> new TradeOffer(new TradedItem(Items.EMERALD, 1), new ItemStack(CinderscapesBlocks.ROSE_QUARTZ_BLOCK, 1), 12, 30, 0.05F));
39+
factories.add((entity, random) -> new TradeOffer(new TradedItem(Items.EMERALD, 1), new ItemStack(CinderscapesBlocks.SULFUR_QUARTZ_PILLAR, 1), 12, 30, 0.05F));
40+
factories.add((entity, random) -> new TradeOffer(new TradedItem(Items.EMERALD, 1), new ItemStack(CinderscapesBlocks.SULFUR_QUARTZ_BLOCK, 1), 12, 30, 0.05F));
41+
factories.add((entity, random) -> new TradeOffer(new TradedItem(Items.EMERALD, 1), new ItemStack(CinderscapesBlocks.SMOKY_QUARTZ_PILLAR, 1), 12, 30, 0.05F));
42+
factories.add((entity, random) -> new TradeOffer(new TradedItem(Items.EMERALD, 1), new ItemStack(CinderscapesBlocks.SMOKY_QUARTZ_BLOCK, 1), 12, 30, 0.05F));
4243
});
4344
}
4445
}

gradle.properties

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ fabric.loom.multiProjectOptimisation=true
44
maven_group=com.terraformersmc
55
archive_name=cinderscapes
66

7-
minecraft_version=24w07a
8-
yarn_mappings=24w07a+build.4
7+
minecraft_version=24w11a
8+
yarn_mappings=24w11a+build.2
99
loader_version=0.15.7
10-
fabric_version=0.96.3+1.20.5
10+
fabric_version=0.96.10+1.20.5
1111

1212
# Terraform modules
13-
terraform_biome_remapper_api_version=10.0.0-alpha.6
14-
terraform_shapes_api_version=10.0.0-alpha.6
15-
terraform_surfaces_api_version=10.0.0-alpha.6
16-
terraform_wood_api_version=10.0.0-alpha.6
13+
terraform_biome_remapper_api_version=10.0.0-alpha.7
14+
terraform_shapes_api_version=10.0.0-alpha.7
15+
terraform_surfaces_api_version=10.0.0-alpha.7
16+
terraform_wood_api_version=10.0.0-alpha.7
1717

1818
# Biolith for worldgen module and testing
1919
biolith_version=1.3.0-alpha.2
@@ -22,8 +22,8 @@ biolith_version=1.3.0-alpha.2
2222
terrablender_version=1.20.4-3.3.0.12
2323

2424
# Other Things
25-
clothconfig_version=13.0.121
26-
modmenu_version=9.0.0
25+
clothconfig_version=14.0.122
26+
modmenu_version=10.0.0-alpha.3
2727
vistas_version=2.5.2
2828

2929
# Project Metadata
@@ -44,7 +44,7 @@ curseforge_optional_dependencies=
4444
# Modrinth Metadata
4545
modrinth_slug=cinderscapes
4646
modrinth_id=QC4wcUXZ
47-
modrinth_game_versions=24w07a
47+
modrinth_game_versions=24w11a
4848
modrinth_mod_loaders=fabric, quilt
4949
#modrinth_embedded_dependencies=biolith
5050

0 commit comments

Comments
 (0)