Skip to content

Commit c5e8935

Browse files
committed
made everything run properly
1 parent 32baa11 commit c5e8935

File tree

387 files changed

+649
-599
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

387 files changed

+649
-599
lines changed

Diff for: src/generated/resources/data/curios/tags/items/belt.json

-6
This file was deleted.

Diff for: src/generated/resources/data/curios/tags/items/charm.json

-6
This file was deleted.

Diff for: src/generated/resources/data/curios/tags/items/necklace.json

-5
This file was deleted.

Diff for: src/generated/resources/data/curios/tags/items/ring.json

-5
This file was deleted.

Diff for: src/generated/resources/data/naturesaura/curios/slots/belt.json

-1
This file was deleted.

Diff for: src/generated/resources/data/naturesaura/curios/slots/charm.json

-1
This file was deleted.

Diff for: src/generated/resources/data/naturesaura/curios/slots/necklace.json

-1
This file was deleted.

Diff for: src/generated/resources/data/naturesaura/curios/slots/ring.json

-1
This file was deleted.

Diff for: src/generated/resources/data/naturesaura/loot_tables/blocks/ancient_leaves.json renamed to src/generated/resources/data/naturesaura/loot_table/blocks/ancient_leaves.json

+9-7
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,16 @@
77
{
88
"condition": "minecraft:match_tool",
99
"predicate": {
10-
"enchantments": [
11-
{
12-
"enchantment": "minecraft:silk_touch",
13-
"levels": {
14-
"min": 1
10+
"predicates": {
11+
"minecraft:enchantments": [
12+
{
13+
"enchantments": "minecraft:silk_touch",
14+
"levels": {
15+
"min": 1
16+
}
1517
}
16-
}
17-
]
18+
]
19+
}
1820
}
1921
}
2022
],

Diff for: src/generated/resources/data/naturesaura/loot_tables/blocks/decayed_leaves.json renamed to src/generated/resources/data/naturesaura/loot_table/blocks/decayed_leaves.json

+9-7
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,16 @@
77
{
88
"condition": "minecraft:match_tool",
99
"predicate": {
10-
"enchantments": [
11-
{
12-
"enchantment": "minecraft:silk_touch",
13-
"levels": {
14-
"min": 1
10+
"predicates": {
11+
"minecraft:enchantments": [
12+
{
13+
"enchantments": "minecraft:silk_touch",
14+
"levels": {
15+
"min": 1
16+
}
1517
}
16-
}
17-
]
18+
]
19+
}
1820
}
1921
}
2022
],

Diff for: src/generated/resources/data/naturesaura/loot_tables/blocks/nether_grass.json renamed to src/generated/resources/data/naturesaura/loot_table/blocks/nether_grass.json

+9-7
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,16 @@
1313
{
1414
"condition": "minecraft:match_tool",
1515
"predicate": {
16-
"enchantments": [
17-
{
18-
"enchantment": "minecraft:silk_touch",
19-
"levels": {
20-
"min": 1
16+
"predicates": {
17+
"minecraft:enchantments": [
18+
{
19+
"enchantments": "minecraft:silk_touch",
20+
"levels": {
21+
"min": 1
22+
}
2123
}
22-
}
23-
]
24+
]
25+
}
2426
}
2527
}
2628
],

Diff for: src/generated/resources/data/naturesaura/loot_tables/blocks/nether_wart_mushroom.json renamed to src/generated/resources/data/naturesaura/loot_table/blocks/nether_wart_mushroom.json

+9-7
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,16 @@
1313
{
1414
"condition": "minecraft:match_tool",
1515
"predicate": {
16-
"enchantments": [
17-
{
18-
"enchantment": "minecraft:silk_touch",
19-
"levels": {
20-
"min": 1
16+
"predicates": {
17+
"minecraft:enchantments": [
18+
{
19+
"enchantments": "minecraft:silk_touch",
20+
"levels": {
21+
"min": 1
22+
}
2123
}
22-
}
23-
]
24+
]
25+
}
2426
}
2527
}
2628
],
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"type": "neoforge:add_features",
3-
"biomes": "#forge:is_sandy",
3+
"biomes": "#c:is_sandy",
44
"features": "naturesaura:aura_cactus",
55
"step": "vegetal_decoration"
66
}
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"type": "neoforge:add_features",
3-
"biomes": "#forge:is_mushroom",
3+
"biomes": "#c:is_mushroom",
44
"features": "naturesaura:aura_mushroom",
55
"step": "vegetal_decoration"
66
}

Diff for: src/main/java/de/ellpeck/naturesaura/blocks/BlockAnimalGenerator.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public BlockAnimalGenerator() {
3333
}
3434

3535
@SubscribeEvent
36-
public void onLivingUpdate(EntityTickEvent event) {
36+
public void onLivingUpdate(EntityTickEvent.Post event) {
3737
var entity = event.getEntity();
3838
if (entity.level().isClientSide || entity.level().getGameTime() % 40 != 0 || !(entity instanceof Animal) || entity instanceof Npc)
3939
return;

Diff for: src/main/java/de/ellpeck/naturesaura/blocks/tiles/BlockEntityImpl.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public void writeNBT(CompoundTag compound, SaveType type, HolderLookup.Provider
4747

4848
public void readNBT(CompoundTag compound, SaveType type, HolderLookup.Provider registries) {
4949
if (type != SaveType.BLOCK) {
50-
super.loadWithComponents(compound, registries);
50+
super.loadAdditional(compound, registries);
5151
this.redstonePower = compound.getInt("redstone");
5252
}
5353
}

Diff for: src/main/java/de/ellpeck/naturesaura/blocks/tiles/render/RenderAuraTimer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public void render(BlockEntityAuraTimer tile, float partialTicks, PoseStack stac
4242
var r = (type.getColor() >> 16 & 255) / 255F;
4343
var g = (type.getColor() >> 8 & 255) / 255F;
4444
var b = (type.getColor() & 255) / 255F;
45-
this.model.renderToBuffer(stack, buffer.getBuffer(this.model.renderType(RenderAuraTimer.RES)), combinedLightIn, combinedOverlayIn, FastColor.ARGB32.colorFromFloat(r, g, b, 0.75F));
45+
this.model.renderToBuffer(stack, buffer.getBuffer(this.model.renderType(RenderAuraTimer.RES)), combinedLightIn, combinedOverlayIn, FastColor.ARGB32.colorFromFloat(0.75F, r, g, b));
4646
stack.popPose();
4747

4848
}

Diff for: src/main/java/de/ellpeck/naturesaura/blocks/tiles/render/RenderGeneratorLimitRemover.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public static void renderGlint(PoseStack stack, MultiBufferSource buffer, ModelL
4747
stack.translate(-0.002F + xOff, 1 + 0.002F + yOff, 1 + 0.002F + zOff);
4848
stack.mulPose(Axis.XP.rotationDegrees(180F));
4949
stack.scale(1.004F, 1.004F, 1.004F);
50-
model.renderToBuffer(stack, buffer.getBuffer(model.renderType(texture)), brightness, combinedOverlayIn, FastColor.ARGB32.colorFromFloat(1, 1, 1, alpha * maxAlpha));
50+
model.renderToBuffer(stack, buffer.getBuffer(model.renderType(texture)), brightness, combinedOverlayIn, FastColor.ARGB32.colorFromFloat(alpha * maxAlpha, 1, 1, 1));
5151
stack.popPose();
5252
}
5353

Diff for: src/main/java/de/ellpeck/naturesaura/events/ClientEvents.java

+7-3
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ public void onLevelRender(RenderLevelStageEvent event) {
187187
if (mc.getDebugOverlay().showDebugScreen() && (mc.player.isCreative() || mc.player.isSpectator()) && ModConfig.instance.debugLevel.get()) {
188188
var playerEye = mc.player.getEyePosition(event.getPartialTick().getGameTimeDeltaPartialTick(true));
189189
var playerView = mc.player.getViewVector(event.getPartialTick().getGameTimeDeltaPartialTick(true)).normalize();
190-
var range = mc.gameMode.getDestroyStage();
190+
var range = mc.player.blockInteractionRange();
191191
var builder = tesselator.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_COLOR);
192192
IAuraChunk.getSpotsInArea(mc.level, mc.player.blockPosition(), 64, (pos, spot) -> {
193193
Helper.renderWeirdBox(builder, pos.getX(), pos.getY(), pos.getZ(), 1, 1, 1, spot > 0 ? 0F : 1F, spot > 0 ? 1F : 0F, 0F, 0.35F);
@@ -202,7 +202,9 @@ public void onLevelRender(RenderLevelStageEvent event) {
202202
}
203203

204204
});
205-
BufferUploader.drawWithShader(builder.build());
205+
var data = builder.build();
206+
if (data != null)
207+
BufferUploader.drawWithShader(data);
206208
}
207209

208210
// range visualizer
@@ -224,7 +226,9 @@ public void onLevelRender(RenderLevelStageEvent event) {
224226
continue;
225227
this.renderVisualize(builder, (IVisualizable) entity, mc.level, entity.blockPosition());
226228
}
227-
BufferUploader.drawWithShader(builder.build());
229+
var data = builder.build();
230+
if (data != null)
231+
BufferUploader.drawWithShader(data);
228232
RenderSystem.enableCull();
229233
}
230234

Diff for: src/main/java/de/ellpeck/naturesaura/gen/ModFeatures.java

+13-12
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import net.minecraft.data.worldgen.features.FeatureUtils;
77
import net.minecraft.data.worldgen.placement.PlacementUtils;
88
import net.minecraft.resources.ResourceKey;
9+
import net.minecraft.resources.ResourceLocation;
910
import net.minecraft.world.level.levelgen.feature.ConfiguredFeature;
1011
import net.minecraft.world.level.levelgen.feature.Feature;
1112
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
@@ -25,13 +26,13 @@ public final class ModFeatures {
2526

2627
public static final class Configured {
2728

28-
public static final ResourceKey<ConfiguredFeature<?, ?>> ANCIENT_TREE = FeatureUtils.createKey(NaturesAura.MOD_ID + ":ancient_tree");
29-
public static final ResourceKey<ConfiguredFeature<?, ?>> NETHER_WART_MUSHROOM = FeatureUtils.createKey(NaturesAura.MOD_ID + ":nether_wart_mushroom");
30-
public static final ResourceKey<ConfiguredFeature<?, ?>> AURA_BLOOM = FeatureUtils.createKey(NaturesAura.MOD_ID + ":aura_bloom");
31-
public static final ResourceKey<ConfiguredFeature<?, ?>> AURA_CACTUS = FeatureUtils.createKey(NaturesAura.MOD_ID + ":aura_cactus");
32-
public static final ResourceKey<ConfiguredFeature<?, ?>> WARPED_AURA_MUSHROOM = FeatureUtils.createKey(NaturesAura.MOD_ID + ":warped_aura_mushroom");
33-
public static final ResourceKey<ConfiguredFeature<?, ?>> CRIMSON_AURA_MUSHROOM = FeatureUtils.createKey(NaturesAura.MOD_ID + ":crimson_aura_mushroom");
34-
public static final ResourceKey<ConfiguredFeature<?, ?>> AURA_MUSHROOM = FeatureUtils.createKey(NaturesAura.MOD_ID + ":aura_mushroom");
29+
public static final ResourceKey<ConfiguredFeature<?, ?>> ANCIENT_TREE = ResourceKey.create(Registries.CONFIGURED_FEATURE, ResourceLocation.parse(NaturesAura.MOD_ID + ":ancient_tree"));
30+
public static final ResourceKey<ConfiguredFeature<?, ?>> NETHER_WART_MUSHROOM = ResourceKey.create(Registries.CONFIGURED_FEATURE, ResourceLocation.parse(NaturesAura.MOD_ID + ":nether_wart_mushroom"));
31+
public static final ResourceKey<ConfiguredFeature<?, ?>> AURA_BLOOM = ResourceKey.create(Registries.CONFIGURED_FEATURE, ResourceLocation.parse(NaturesAura.MOD_ID + ":aura_bloom"));
32+
public static final ResourceKey<ConfiguredFeature<?, ?>> AURA_CACTUS = ResourceKey.create(Registries.CONFIGURED_FEATURE, ResourceLocation.parse(NaturesAura.MOD_ID + ":aura_cactus"));
33+
public static final ResourceKey<ConfiguredFeature<?, ?>> WARPED_AURA_MUSHROOM = ResourceKey.create(Registries.CONFIGURED_FEATURE, ResourceLocation.parse(NaturesAura.MOD_ID + ":warped_aura_mushroom"));
34+
public static final ResourceKey<ConfiguredFeature<?, ?>> CRIMSON_AURA_MUSHROOM = ResourceKey.create(Registries.CONFIGURED_FEATURE, ResourceLocation.parse(NaturesAura.MOD_ID + ":crimson_aura_mushroom"));
35+
public static final ResourceKey<ConfiguredFeature<?, ?>> AURA_MUSHROOM = ResourceKey.create(Registries.CONFIGURED_FEATURE, ResourceLocation.parse(NaturesAura.MOD_ID + ":aura_mushroom"));
3536

3637
public static void bootstrap(BootstrapContext<ConfiguredFeature<?, ?>> context) {
3738
FeatureUtils.register(context, ModFeatures.Configured.AURA_BLOOM, ModFeatures.AURA_BLOOM, NoneFeatureConfiguration.INSTANCE);
@@ -48,11 +49,11 @@ public static void bootstrap(BootstrapContext<ConfiguredFeature<?, ?>> context)
4849

4950
public static final class Placed {
5051

51-
public static final ResourceKey<PlacedFeature> AURA_BLOOM = PlacementUtils.createKey(NaturesAura.MOD_ID + ":aura_bloom");
52-
public static final ResourceKey<PlacedFeature> AURA_CACTUS = PlacementUtils.createKey(NaturesAura.MOD_ID + ":aura_cactus");
53-
public static final ResourceKey<PlacedFeature> WARPED_AURA_MUSHROOM = PlacementUtils.createKey(NaturesAura.MOD_ID + ":warped_aura_mushroom");
54-
public static final ResourceKey<PlacedFeature> CRIMSON_AURA_MUSHROOM = PlacementUtils.createKey(NaturesAura.MOD_ID + ":crimson_aura_mushroom");
55-
public static final ResourceKey<PlacedFeature> AURA_MUSHROOM = PlacementUtils.createKey(NaturesAura.MOD_ID + ":aura_mushroom");
52+
public static final ResourceKey<PlacedFeature> AURA_BLOOM = ResourceKey.create(Registries.PLACED_FEATURE, ResourceLocation.parse(NaturesAura.MOD_ID + ":aura_bloom"));
53+
public static final ResourceKey<PlacedFeature> AURA_CACTUS = ResourceKey.create(Registries.PLACED_FEATURE, ResourceLocation.parse(NaturesAura.MOD_ID + ":aura_cactus"));
54+
public static final ResourceKey<PlacedFeature> WARPED_AURA_MUSHROOM = ResourceKey.create(Registries.PLACED_FEATURE, ResourceLocation.parse(NaturesAura.MOD_ID + ":warped_aura_mushroom"));
55+
public static final ResourceKey<PlacedFeature> CRIMSON_AURA_MUSHROOM = ResourceKey.create(Registries.PLACED_FEATURE, ResourceLocation.parse(NaturesAura.MOD_ID + ":crimson_aura_mushroom"));
56+
public static final ResourceKey<PlacedFeature> AURA_MUSHROOM = ResourceKey.create(Registries.PLACED_FEATURE, ResourceLocation.parse(NaturesAura.MOD_ID + ":aura_mushroom"));
5657

5758
public static void bootstrap(BootstrapContext<PlacedFeature> context) {
5859
var holdergetter = context.lookup(Registries.CONFIGURED_FEATURE);

Diff for: src/main/java/de/ellpeck/naturesaura/items/ItemAuraBottle.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import net.minecraft.resources.ResourceLocation;
1818
import net.minecraft.sounds.SoundEvents;
1919
import net.minecraft.sounds.SoundSource;
20+
import net.minecraft.util.FastColor;
2021
import net.minecraft.world.entity.item.ItemEntity;
2122
import net.minecraft.world.item.Item;
2223
import net.minecraft.world.item.ItemStack;
@@ -69,7 +70,7 @@ public Component getName(ItemStack stack) {
6970
@Override
7071
@OnlyIn(Dist.CLIENT)
7172
public ItemColor getItemColor() {
72-
return (stack, tintIndex) -> tintIndex > 0 ? ItemAuraBottle.getType(stack).getColor() : 0xFFFFFF;
73+
return (stack, tintIndex) -> tintIndex > 0 ? FastColor.ARGB32.opaque(ItemAuraBottle.getType(stack).getColor()) : 0xFFFFFFFF;
7374
}
7475

7576
@Override

Diff for: src/main/java/de/ellpeck/naturesaura/items/ItemColorChanger.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import net.minecraft.core.component.DataComponentType;
1414
import net.minecraft.sounds.SoundEvents;
1515
import net.minecraft.sounds.SoundSource;
16+
import net.minecraft.util.FastColor;
1617
import net.minecraft.world.InteractionHand;
1718
import net.minecraft.world.InteractionResult;
1819
import net.minecraft.world.InteractionResultHolder;
@@ -119,10 +120,10 @@ public ItemColor getItemColor() {
119120
if (tintIndex > 0) {
120121
var color = ItemColorChanger.getStoredColor(stack);
121122
if (color != null) {
122-
return color.getFireworkColor();
123+
return FastColor.ARGB32.opaque(color.getFireworkColor());
123124
}
124125
}
125-
return 0xFFFFFF;
126+
return 0xFFFFFFFF;
126127
};
127128
}
128129

Diff for: src/main/java/de/ellpeck/naturesaura/items/ItemEffectPowder.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import net.minecraft.core.component.DataComponentType;
1111
import net.minecraft.network.chat.Component;
1212
import net.minecraft.resources.ResourceLocation;
13+
import net.minecraft.util.FastColor;
1314
import net.minecraft.world.InteractionResult;
1415
import net.minecraft.world.item.ItemStack;
1516
import net.minecraft.world.item.context.UseOnContext;
@@ -63,7 +64,7 @@ public Component getName(ItemStack stack) {
6364
@Override
6465
@OnlyIn(Dist.CLIENT)
6566
public ItemColor getItemColor() {
66-
return (stack, tintIndex) -> NaturesAuraAPI.EFFECT_POWDERS.getOrDefault(ItemEffectPowder.getEffect(stack), 0xFFFFFF);
67+
return (stack, tintIndex) -> FastColor.ARGB32.opaque(NaturesAuraAPI.EFFECT_POWDERS.getOrDefault(ItemEffectPowder.getEffect(stack), 0xFFFFFF));
6768
}
6869

6970
public record Data(String effect) {

Diff for: src/main/java/de/ellpeck/naturesaura/items/ItemGoldFiber.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public ItemGoldFiber() {
1414

1515
@Override
1616
public ItemColor getItemColor() {
17-
return (stack, tintIndex) -> 0xF2FF00;
17+
return (stack, tintIndex) -> 0xFFF2FF00;
1818
}
1919

2020
@Override

Diff for: src/main/java/de/ellpeck/naturesaura/items/ItemPetReviver.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public ItemPetReviver() {
3939
private static class Events {
4040

4141
@SubscribeEvent
42-
public void onEntityTick(EntityTickEvent event) {
42+
public void onEntityTick(EntityTickEvent.Post event) {
4343
var entity = event.getEntity();
4444
if (entity.level().isClientSide || entity.level().getGameTime() % 20 != 0 || !(entity instanceof TamableAnimal tameable))
4545
return;

Diff for: src/main/java/de/ellpeck/naturesaura/items/ModItems.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import net.minecraft.world.item.Item;
44

5-
@SuppressWarnings("NonConstantFieldWithUpperCaseName")
5+
@SuppressWarnings({"NonConstantFieldWithUpperCaseName", "FieldNamingConvention"})
66
public final class ModItems {
77

88
public static Item INFUSED_IRON_PICKAXE;
@@ -75,4 +75,5 @@ public final class ModItems {
7575
public static Item DEPTH_CHEST;
7676
public static Item DEPTH_PANTS;
7777
public static Item DEPTH_SHOES;
78+
7879
}

Diff for: src/main/java/de/ellpeck/naturesaura/items/tools/ItemArmor.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public static void onAttack(LivingIncomingDamageEvent event) {
8080
}
8181

8282
@SubscribeEvent
83-
public static void update(PlayerTickEvent event) {
83+
public static void update(PlayerTickEvent.Post event) {
8484
var player = event.getEntity();
8585
var speed = player.getAttribute(Attributes.MOVEMENT_SPEED);
8686
var step = player.getAttribute(Attributes.STEP_HEIGHT);

Diff for: src/main/resources/assets/naturesaura/patchouli_books/book/en_us/entries/effects/effect_powder.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Effect Powder",
3-
"icon": "naturesaura:effect_powder{effect:'naturesaura:plant_boost'}",
3+
"icon": "naturesaura:effect_powder[naturesaura:effect_powder_data={'effect':'naturesaura:plant_boost'}]",
44
"category": "naturesaura:effects",
55
"advancement": "naturesaura:positive_imbalance",
66
"priority": true,
@@ -14,4 +14,4 @@
1414
"text": "To use it, simply placing a stack of any size down on the ground will cause it to either stop its effect or create it, depending on the type of powder used. The $(thing)range$() the effect will have in blocks is equal to the size of the stack placed down. Hitting it while it is on the ground will cause it to go back into its item form.$(p)Each effect that has an $(item)Effect Powder$() attached to it will show the recipe in its chapter."
1515
}
1616
]
17-
}
17+
}

Diff for: src/main/resources/assets/naturesaura/patchouli_books/book/en_us/entries/intro/intro.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "This Book",
3-
"icon": "patchouli:guide_book{'patchouli:book':'naturesaura:book'}",
3+
"icon": "patchouli:guide_book[patchouli:book='naturesaura:book']",
44
"category": "naturesaura:intro",
55
"priority": true,
66
"pages": [
@@ -13,4 +13,4 @@
1313
"text": "Additionally, to guide the user through the development of their research, some chapters will display $(thing)orange icons$(). These notify the reader of the next step they will have to take to advance their research further. Additionally, there is a direct link to the $(item)Advancement menu$() on the front page, which allows a greater overview of the overall progress."
1414
}
1515
]
16-
}
16+
}

0 commit comments

Comments
 (0)