Skip to content

Commit

Permalink
Update to 1.20.1 (#439)
Browse files Browse the repository at this point in the history
---------

Co-authored-by: IchHabeHunger54 <[email protected]>
  • Loading branch information
Minecraftschurli and IchHabeHunger54 committed Apr 6, 2024
1 parent c7f04f6 commit b358727
Show file tree
Hide file tree
Showing 485 changed files with 2,643 additions and 1,524 deletions.
5 changes: 3 additions & 2 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@ body:
- 1.19.2-1.2.4
- 1.19.2-1.3.0
- 1.19.2-1.3.1
- 1.19.2-1.4.0
- 1.19.4-1.4.0
- 1.19.3-1.3.1
- 1.19.4-1.3.1
- 1.20.1-1.3.1
validations:
required: true
- type: input
Expand Down
20 changes: 10 additions & 10 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,8 @@ dependencies {
annotationProcessor(group = "org.spongepowered", name = "mixin", version = mixin_version, classifier = "processor")

// jei for integration
modAPI(fg.deobf("mezz.jei:jei-1.19.4-common-api:${jei_version}"))
runtimeMod(fg.deobf("mezz.jei:jei-1.19.4-forge:${jei_version}"))
modAPI(fg.deobf("mezz.jei:jei-1.20.1-common-api:${jei_version}"))
runtimeMod(fg.deobf("mezz.jei:jei-1.20.1-forge:${jei_version}"))

// curios for additional inventory slots
modAPI(fg.deobf("top.theillusivec4.curios:curios-forge:${curios_version}:api"))
Expand All @@ -291,8 +291,8 @@ dependencies {
runtimeMod(fg.deobf("vazkii.patchouli:Patchouli:${patchouli_version}"))

// geckolib for animations
modAPI(fg.deobf("software.bernie.geckolib:geckolib-forge-${mc_version}:${geckolib_version}"))
runtimeMod(fg.deobf("software.bernie.geckolib:geckolib-forge-${mc_version}:${geckolib_version}"))
modAPI(fg.deobf("software.bernie.geckolib:geckolib-forge-${mc_major_version}:${geckolib_version}"))
runtimeMod(fg.deobf("software.bernie.geckolib:geckolib-forge-${mc_major_version}:${geckolib_version}"))

// theoneprobe for integration
modAPI(fg.deobf("mcjty.theoneprobe:theoneprobe:${top_version}:api") { (this as ModuleDependency).setTransitive(false) })
Expand All @@ -312,17 +312,17 @@ dependencies {
}

// add internal libraries
include(fg.deobf("com.github.minecraftschurlimods:simplenetlib:1.19.4-1.0-SNAPSHOT") {
jarJar.ranged(this, "[1.19.4-1.0-SNAPSHOT,)")
include(fg.deobf("com.github.minecraftschurlimods:simplenetlib:1.20.1-1.0-SNAPSHOT") {
jarJar.ranged(this, "[1.20.1-1.0-SNAPSHOT,)")
})
include(fg.deobf("com.github.minecraftschurlimods:codeclib:1.19-1.0-SNAPSHOT") {
jarJar.ranged(this, "[1.19-1.0-SNAPSHOT,)")
include(fg.deobf("com.github.minecraftschurlimods:codeclib:1.20.1-1.0-SNAPSHOT") {
jarJar.ranged(this, "[1.20.1-1.0-SNAPSHOT,)")
})
include(fg.deobf("com.github.minecraftschurlimods:betterkeybindlib:1.19-1.1-SNAPSHOT") {
jarJar.ranged(this, "[1.19-1.1-SNAPSHOT,)")
})
include(fg.deobf("com.github.minecraftschurlimods:betterhudlib:1.19.4-1.0-SNAPSHOT") {
jarJar.ranged(this, "[1.19-1.0-SNAPSHOT,)")
include(fg.deobf("com.github.minecraftschurlimods:betterhudlib:1.20.1-1.0-SNAPSHOT") {
jarJar.ranged(this, "[1.20.1-1.0-SNAPSHOT,)")
})
modAPI(fg.deobf("com.github.minecraftschurlimods:easydatagenlib:1.19.3-1.1.1-SNAPSHOT"))
datagenLibrary(fg.deobf("com.github.minecraftschurlimods:easydatagenlib:1.19.3-1.1.1-SNAPSHOT"))
Expand Down
40 changes: 20 additions & 20 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ org.gradle.daemon=false
mod_group=com.github.minecraftschurlimods
mod_id=arsmagicalegacy
mod_name=Ars Magica: Legacy
mod_version=1.4.0
mod_version=1.3.1
mod_author=Minecraftschurli, IchHabeHunger54
mod_credits=Mithion for the original mod
mod_url=https://www.curseforge.com/minecraft/mc-mods/ars-magica-legacy
Expand All @@ -18,31 +18,31 @@ java_version=17
mixin_version=0.8.5

mappings_channel=parchment
mappings_version=2023.06.26-1.19.4
mappings_version=2023.06.26-1.20.1

mc_version=1.19.4
mc_major_version=1.19
forge_version=45.1.0
mc_version=1.20.1
mc_major_version=1.20
forge_version=47.0.34

loader_version_range=[45,)
forge_version_range=[45.1.0,)
mc_version_range=[1.19.4,1.20)
patchouli_version_range=[1.19-78,1.20)
loader_version_range=[47,)
forge_version_range=[47.0.34,)
mc_version_range=[1.20.1,1.20.2)
patchouli_version_range=[1.20.1-80,1.20.2)
geckolib_version_range=[4.2,5)
jade_version_range=[10.3.1,11)
jade_version_range=[11.7.0,12)
embeddium_version_range=[0.2.12,)
curios_version_range=[1.19.4,1.20)
jei_version_range=[13,)
curios_version_range=[5.2.0-beta.3+1.20.1,6)
jei_version_range=[15,)

jei_version=13.1.0.9
top_version=1.19.4-8.0.0-1
curios_version=1.19.4-5.1.5.3
patchouli_version=1.19.4-79-FORGE
jei_version=15.2.0.22
top_version=1.20.0-9.0.0-1
curios_version=5.2.0-beta.3+1.20.1
patchouli_version=1.20.1-80-FORGE-SNAPSHOT
geckolib_version=4.2
jade_version=10.3.1
embeddium_version=0.2.12+mc1.19.2
potionbundles_version=1.19.4-1.7
controlling_version=10.0+4
jade_version=11.7.0
embeddium_version=0.2.12+mc1.20.1
potionbundles_version=1.20-1.7
controlling_version=12.0.1

modrinth_project_id=hm4S7JIe
curse_project_id=350734
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import com.github.minecraftschurlimods.arsmagicalegacy.api.ArsMagicaAPI;
import com.google.gson.JsonObject;
import net.minecraft.advancements.critereon.AbstractCriterionTriggerInstance;
import net.minecraft.advancements.critereon.ContextAwarePredicate;
import net.minecraft.advancements.critereon.DeserializationContext;
import net.minecraft.advancements.critereon.EntityPredicate;
import net.minecraft.advancements.critereon.SerializationContext;
import net.minecraft.advancements.critereon.SimpleCriterionTrigger;
import net.minecraft.resources.ResourceLocation;
Expand All @@ -23,9 +23,9 @@ public ResourceLocation getId() {
}

@Override
protected TriggerInstance createInstance(JsonObject pJson, EntityPredicate.Composite pPlayer, DeserializationContext pContext) {
protected TriggerInstance createInstance(JsonObject pJson, ContextAwarePredicate pPredicate, DeserializationContext pDeserializationContext) {
ResourceLocation skill = pJson.has("skill") ? new ResourceLocation(GsonHelper.getAsString(pJson, "skill")) : null;
return new TriggerInstance(pPlayer, skill);
return new TriggerInstance(pPredicate, skill);
}

/**
Expand All @@ -40,8 +40,8 @@ public void trigger(ServerPlayer pPlayer, ResourceLocation skill) {
public static class TriggerInstance extends AbstractCriterionTriggerInstance {
private final ResourceLocation skill;

public TriggerInstance(EntityPredicate.Composite pPlayer, ResourceLocation skill) {
super(PlayerLearnedSkillTrigger.ID, pPlayer);
public TriggerInstance(ContextAwarePredicate pPredicate, ResourceLocation skill) {
super(PlayerLearnedSkillTrigger.ID, pPredicate);
this.skill = skill;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import com.github.minecraftschurlimods.arsmagicalegacy.api.ArsMagicaAPI;
import com.google.gson.JsonObject;
import net.minecraft.advancements.critereon.AbstractCriterionTriggerInstance;
import net.minecraft.advancements.critereon.ContextAwarePredicate;
import net.minecraft.advancements.critereon.DeserializationContext;
import net.minecraft.advancements.critereon.EntityPredicate;
import net.minecraft.advancements.critereon.MinMaxBounds;
import net.minecraft.advancements.critereon.SerializationContext;
import net.minecraft.advancements.critereon.SimpleCriterionTrigger;
Expand All @@ -23,8 +23,8 @@ public ResourceLocation getId() {
}

@Override
protected PlayerLevelUpTrigger.TriggerInstance createInstance(JsonObject pJson, EntityPredicate.Composite pPlayer, DeserializationContext pContext) {
return new PlayerLevelUpTrigger.TriggerInstance(pPlayer, MinMaxBounds.Ints.fromJson(pJson.get("level")));
protected PlayerLevelUpTrigger.TriggerInstance createInstance(JsonObject pJson, ContextAwarePredicate pPredicate, DeserializationContext pContext) {
return new PlayerLevelUpTrigger.TriggerInstance(pPredicate, MinMaxBounds.Ints.fromJson(pJson.get("level")));
}

/**
Expand All @@ -39,8 +39,8 @@ public void trigger(ServerPlayer pPlayer, int level) {
public static class TriggerInstance extends AbstractCriterionTriggerInstance {
private final MinMaxBounds.Ints level;

public TriggerInstance(EntityPredicate.Composite pPlayer, MinMaxBounds.Ints level) {
super(PlayerLevelUpTrigger.ID, pPlayer);
public TriggerInstance(ContextAwarePredicate pPredicate, MinMaxBounds.Ints level) {
super(PlayerLevelUpTrigger.ID, pPredicate);
this.level = level;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.github.minecraftschurlimods.arsmagicalegacy.api.spell.ISpellIngredient;
import com.github.minecraftschurlimods.arsmagicalegacy.api.spell.SpellIngredientType;
import com.mojang.blaze3d.vertex.PoseStack;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.client.renderer.MultiBufferSource;

/**
Expand All @@ -21,7 +22,7 @@ public interface ISpellIngredientRenderer<T extends ISpellIngredient> {
*
* @param ingredient The ingredient to render.
*/
void renderInGui(T ingredient, PoseStack poseStack, int x, int y, int mouseX, int mouseY);
void renderInGui(T ingredient, GuiGraphics graphics, int x, int y, int mouseX, int mouseY);

@SuppressWarnings("unchecked")
static ISpellIngredientRenderer<ISpellIngredient> getFor(SpellIngredientType<? extends ISpellIngredient> type) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.github.minecraftschurlimods.arsmagicalegacy.api.client;

import com.github.minecraftschurlimods.arsmagicalegacy.api.skill.OcculusTab;
import com.mojang.blaze3d.vertex.PoseStack;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.Font;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.client.gui.components.Renderable;
import net.minecraft.client.gui.components.events.AbstractContainerEventHandler;
import net.minecraft.client.gui.components.events.GuiEventListener;
Expand Down Expand Up @@ -41,18 +41,18 @@ protected OcculusTabRenderer(OcculusTab occulusTab, Screen parent) {
}

/**
* Don't call this method, use {@link OcculusTabRenderer#renderBg(PoseStack, int, int, float)} and {@link OcculusTabRenderer#renderFg(PoseStack, int, int, float)} instead.
* Don't call this method, use {@link OcculusTabRenderer#renderBg(GuiGraphics, int, int, float)} and {@link OcculusTabRenderer#renderFg(GuiGraphics, int, int, float)} instead.
*/
@Internal
@Override
public final void render(PoseStack pMatrixStack, int pMouseX, int pMouseY, float pPartialTicks) {
pMatrixStack.pushPose();
pMatrixStack.translate(7, 7, 0);
public final void render(GuiGraphics graphics, int pMouseX, int pMouseY, float pPartialTicks) {
graphics.pose().pushPose();
graphics.pose().translate(7, 7, 0);
pMouseX -= posX;
pMouseY -= posY;
renderBg(pMatrixStack, pMouseX, pMouseY, pPartialTicks);
renderFg(pMatrixStack, pMouseX, pMouseY, pPartialTicks);
pMatrixStack.popPose();
renderBg(graphics, pMouseX, pMouseY, pPartialTicks);
renderFg(graphics, pMouseX, pMouseY, pPartialTicks);
graphics.pose().popPose();
}

/**
Expand All @@ -72,12 +72,12 @@ public final void init(int width, int height, int screenWidth, int screenHeight,
/**
* Render the background in this method.
*/
protected abstract void renderBg(PoseStack stack, int mouseX, int mouseY, float partialTicks);
protected abstract void renderBg(GuiGraphics graphics, int mouseX, int mouseY, float partialTicks);

/**
* Render the foreground in this method.
*/
protected abstract void renderFg(PoseStack stack, int mouseX, int mouseY, float partialTicks);
protected abstract void renderFg(GuiGraphics graphics, int mouseX, int mouseY, float partialTicks);

@Override
public List<? extends GuiEventListener> children() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import com.github.minecraftschurlimods.arsmagicalegacy.api.advancement.PlayerLearnedSkillTrigger;
import com.github.minecraftschurlimods.arsmagicalegacy.api.skill.Skill;
import net.minecraft.advancements.Advancement;
import net.minecraft.advancements.critereon.EntityPredicate;
import net.minecraft.advancements.critereon.ContextAwarePredicate;
import net.minecraft.advancements.critereon.InventoryChangeTrigger;
import net.minecraft.core.HolderLookup;
import net.minecraft.data.PackOutput;
Expand Down Expand Up @@ -35,7 +35,7 @@ public void generate(HolderLookup.Provider registries, Consumer<Advancement> sav
registries.lookupOrThrow(Skill.REGISTRY_KEY).listElementIds().forEach(skill -> Advancement.Builder
.advancement()
.parent(root)
.addCriterion("knows", new PlayerLearnedSkillTrigger.TriggerInstance(EntityPredicate.Composite.ANY, skill.location()))
.addCriterion("knows", new PlayerLearnedSkillTrigger.TriggerInstance(ContextAwarePredicate.ANY, skill.location()))
.save(saver, ArsMagicaAPI.MOD_ID + ":book/" + skill.location().getPath()));
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
package com.github.minecraftschurlimods.arsmagicalegacy.data;

import com.github.minecraftschurlimods.arsmagicalegacy.api.ArsMagicaAPI;
import com.github.minecraftschurlimods.arsmagicalegacy.data.update120.Update120BlockTagsProvider;
import com.github.minecraftschurlimods.arsmagicalegacy.data.update120.Update120LootTableProvider;
import com.github.minecraftschurlimods.arsmagicalegacy.data.update120.Update120RecipeProvider;
import com.github.minecraftschurlimods.easydatagenlib.api.DatapackRegistryGenerator;
import com.mojang.datafixers.util.Function4;
import com.mojang.datafixers.util.Function5;
Expand Down Expand Up @@ -66,10 +63,6 @@ static void gatherData(GatherDataEvent evt) {
client.addProvider(wrapWith(AMParticleDefinitionsProvider::new, existingFileHelper));
client.addProvider(wrapWith(AMSoundDefinitionsProvider::new, existingFileHelper));
client.addProvider(wrapWith(AMEnglishLanguageProvider::new, lang));
DataGenerator.PackGenerator update120 = generator.getBuiltinDatapack(includeServer, "update_1_20");
update120.addProvider(Update120RecipeProvider::new);
update120.addProvider(wrapWith(Update120BlockTagsProvider::new, lookupProvider, existingFileHelper));
update120.addProvider(Update120LootTableProvider::new);
new AMCompatDataProvider(evt);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ protected void generate() {
dropSelf(AMBlocks.WITCHWOOD_BUTTON.get());
dropSelf(AMBlocks.WITCHWOOD_PRESSURE_PLATE.get());
dropSelf(AMBlocks.WITCHWOOD_SIGN.get());
add(AMBlocks.WITCHWOOD_HANGING_SIGN.get(), noDrop());
dropSelf(AMBlocks.WITCHWOOD_HANGING_SIGN.get());
dropSelf(AMBlocks.AUM.get());
dropSelf(AMBlocks.CERUBLOSSOM.get());
dropSelf(AMBlocks.DESERT_NOVA.get());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import net.minecraft.world.item.DyeColor;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
import net.minecraftforge.registries.ForgeRegistries;
import org.apache.commons.lang3.ObjectUtils;

Expand Down Expand Up @@ -134,9 +133,9 @@ protected void addBooks(HolderLookup.Provider provider, Consumer<BookBuilder<?,
.addSpotlightPage(new ItemStack(AMItems.DESERT_NOVA.get())).setText("Desert Novas grow in dry conditions. The Nova has extraordinary magical properties for a desert plant, and is highly sought after. It is one of the two plants used in the $(l:items/purified_vinteum_dust)purification process of Vinteum Dust$().").setAnchor("desert_nova").build()
.addSpotlightPage(new ItemStack(AMItems.TARMA_ROOT.get())).setText("Lighter than it looks, Tarma Root grows in mountain biomes. It is an ingredient in spells and air essences.").setAnchor("tarma_root").build()
.addSpotlightPage(new ItemStack(AMItems.WAKEBLOOM.get())).setText("Growing on the surface of water in warm climates, Wakebloom is used in water-based spells frequently, as well as being a component in water affinity essences.").setAnchor("wakebloom").build()
.addSimpleDoubleRecipePage("crafting", new ResourceLocation(ArsMagicaAPI.MOD_ID, key(Items.PINK_DYE).getPath()), new ResourceLocation(ArsMagicaAPI.MOD_ID, key(Items.BLUE_DYE).getPath()))
.addSimpleDoubleRecipePage("crafting", new ResourceLocation(ArsMagicaAPI.MOD_ID, key(Items.RED_DYE).getPath()), new ResourceLocation(ArsMagicaAPI.MOD_ID, key(Items.BROWN_DYE).getPath()))
.addSimpleRecipePage("crafting", new ResourceLocation(ArsMagicaAPI.MOD_ID, key(Items.MAGENTA_DYE).getPath()))
.addSimpleDoubleRecipePage("crafting", new ResourceLocation(ArsMagicaAPI.MOD_ID, "pink_dye_from_aum"), new ResourceLocation(ArsMagicaAPI.MOD_ID, "blue_dye_from_cerublossom"))
.addSimpleDoubleRecipePage("crafting", new ResourceLocation(ArsMagicaAPI.MOD_ID, "red_dye_from_desert_nova"), new ResourceLocation(ArsMagicaAPI.MOD_ID, "brown_dye_from_tarma_root"))
.addSimpleRecipePage("crafting", new ResourceLocation(ArsMagicaAPI.MOD_ID, "magenta_dye_from_wakebloom"))
.build()
.addEntry("inlays", "Inlays", new ItemStack(AMItems.IRON_INLAY.get()))
.addSimpleTextPage("Inlays are special, magically-enhanced rail variants. While their true purpose is currently unknown, they have already made themselves very useful for summoning bosses.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public AMRecipeProvider(PackOutput output) {
protected void buildRecipes(Consumer<FinishedRecipe> consumer) {
var helper = ArsMagicaAPI.get().getAffinityHelper();
generateRecipes(consumer, AMBlockFamilies.WITCHWOOD_PLANKS.get());
hangingSign(consumer, AMItems.WITCHWOOD_HANGING_SIGN.get(), AMBlocks.STRIPPED_WITCHWOOD_LOG.get());
planksFromLogs(consumer, AMBlocks.WITCHWOOD_PLANKS.get(), AMTags.Items.WITCHWOOD_LOGS, 4);
woodFromLogs(consumer, AMBlocks.WITCHWOOD.get(), AMBlocks.WITCHWOOD_LOG.get());
woodFromLogs(consumer, AMBlocks.STRIPPED_WITCHWOOD.get(), AMBlocks.STRIPPED_WITCHWOOD_LOG.get());
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit b358727

Please sign in to comment.