Skip to content

Commit

Permalink
Port to 1.20.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrbysco committed Jun 16, 2024
1 parent 09ad529 commit dbfddb4
Show file tree
Hide file tree
Showing 28 changed files with 90 additions and 409 deletions.
2 changes: 1 addition & 1 deletion .idea/scopes/Fabric_sources.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions .idea/scopes/Forge_sources.xml

This file was deleted.

3 changes: 3 additions & 0 deletions .idea/scopes/NeoForge_sources.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ A JEI addon that adds profession workstations

## License ##
* Just Enough Professions is licensed under the MIT License
- (c) 2021 Mrbysco, ShyNieke
- (c) 2024 Mrbysco, ShyNieke
- [![License](https://img.shields.io/badge/License-MIT-red.svg?style=flat)](http://opensource.org/licenses/MIT)

## Downloads ##
Expand Down
19 changes: 15 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
plugins {
// Required for NeoGradle
id "org.jetbrains.gradle.plugin.idea-ext" version "1.1.7"
id "net.darkhax.curseforgegradle" version "1.1.17" apply(false)
id "net.darkhax.curseforgegradle" version "1.1.24" apply(false)
id "com.modrinth.minotaur" version "2.+" apply(false)
}

subprojects {
apply plugin: 'java'

java.toolchain.languageVersion = JavaLanguageVersion.of(17)
java.toolchain.languageVersion = JavaLanguageVersion.of(21)
java.withSourcesJar()
java.withJavadocJar()

jar {
from(rootProject.file("LICENSE")) {
Expand Down Expand Up @@ -48,15 +49,25 @@ subprojects {
name = "Jared's maven"
url = "https://maven.blamejared.com/"
}
maven {
name = 'Roughly Enough Items'
url = "https://maven.shedaniel.me"
}
maven {
url = "https://maven.theillusivec4.top/"
content {
includeGroup "top.theillusivec4.curios"
}
}
}

tasks.withType(JavaCompile).configureEach {
it.options.encoding = 'UTF-8'
it.options.getRelease().set(17)
it.options.getRelease().set(21)
}

processResources {
filesMatching(['pack.mcmeta', 'fabric.mod.json', 'mods.toml', '*.mixins.json']) {
filesMatching(['pack.mcmeta', 'fabric.mod.json', 'neoforge.mods.toml', '*.mixins.json']) {
expand project.properties
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public static void renderEntity(GuiGraphics guiGraphics, int x, int y, double sc
livingEntity.yHeadRot = livingEntity.getYRot();
livingEntity.yHeadRotO = livingEntity.getYRot();

poseStack.translate(0.0F, livingEntity.getMyRidingOffset(livingEntity), 0.0F);
poseStack.translate(0.0F, livingEntity.getVehicleAttachmentPoint(livingEntity).y(), 0.0F);
EntityRenderDispatcher entityRenderDispatcher = Minecraft.getInstance().getEntityRenderDispatcher();
entityRenderDispatcher.overrideCameraOrientation(new Quaternionf(0.0F, 0.0F, 0.0F, 1.0F));
entityRenderDispatcher.setRenderShadow(false);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
package com.mrbysco.justenoughprofessions.compat;

import net.minecraft.nbt.CompoundTag;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.ItemStack;
import org.jetbrains.annotations.Nullable;

public class CompatibilityHelper {
public static ItemStack compatibilityCheck(ItemStack stack, @Nullable ResourceLocation profession) {
if (profession != null) {
if (profession.equals(new ResourceLocation("immersiveengineering", "outfitter"))) {
CompoundTag tag = stack.hasTag() ? stack.getTag() : new CompoundTag();
tag.putBoolean("JEP_outfitter", true);
stack.setTag(tag);
return stack;
}
}
// if (profession != null) { TODO: Re-implement if IE is back
// if (profession.equals(new ResourceLocation("immersiveengineering", "outfitter"))) {
// CompoundTag tag = stack.hasTag() ? stack.getTag() : new CompoundTag();
// tag.putBoolean("JEP_outfitter", true);
// stack.setTag(tag);
// return stack;
// }
// }
return stack;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public interface IPlatformHelper {
* @param entityType The entity type
* @return The registry name
*/
ResourceLocation getEntityKey(EntityType entityType);
ResourceLocation getEntityKey(EntityType<?> entityType);

/**
* Get the registry name of the profession
Expand Down
4 changes: 2 additions & 2 deletions common/src/main/resources/pack.mcmeta
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"description": "${mod_name} resources",
"pack_format": 18
"description": "Just Enough Professions resources",
"pack_format": 32
}
}
4 changes: 2 additions & 2 deletions fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ plugins {
id 'java'
id 'idea'
id 'maven-publish'
id 'fabric-loom' version '1.5-SNAPSHOT'
id 'fabric-loom' version '1.6-SNAPSHOT'
id 'net.darkhax.curseforgegradle'
id 'com.modrinth.minotaur'
}
Expand Down Expand Up @@ -89,7 +89,7 @@ if (System.getenv().CURSEFORGE_KEY) {
mainFile.releaseType = 'beta'
mainFile.addGameVersion "Fabric"
mainFile.addGameVersion "${minecraft_version}"
mainFile.addGameVersion "Java 17"
mainFile.addGameVersion "Java 21"

mainFile.changelog = file("$project.rootDir/changelog.md")
mainFile.changelogType = 'markdown'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
public class FabricPlatformHelper implements IPlatformHelper {

@Override
public ResourceLocation getEntityKey(EntityType entityType) {
public ResourceLocation getEntityKey(EntityType<?> entityType) {
return BuiltInRegistries.ENTITY_TYPE.getKey(entityType);
}

Expand Down
8 changes: 4 additions & 4 deletions fabric/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
]
},
"depends": {
"fabricloader": ">=0.15.3",
"minecraft": "~1.20.4",
"java": ">=17",
"fabricloader": ">=0.15.10",
"minecraft": "~1.20.6",
"java": ">=21",
"fabric-api": "*",
"jei": ">=17.0.0.29"
"jei": ">=18.0.0.62"
}
}

145 changes: 0 additions & 145 deletions forge/build.gradle

This file was deleted.

This file was deleted.

Loading

0 comments on commit dbfddb4

Please sign in to comment.