Skip to content

Commit

Permalink
1.18.1 version update
Browse files Browse the repository at this point in the history
  • Loading branch information
Draylar committed Feb 11, 2022
1 parent fe6b560 commit f74abf5
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 60 deletions.
54 changes: 23 additions & 31 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
plugins {
id 'fabric-loom' version '0.8-SNAPSHOT'
id 'fabric-loom' version '0.11-SNAPSHOT'
id 'maven-publish'
}

sourceCompatibility = JavaVersion.VERSION_16
targetCompatibility = JavaVersion.VERSION_16
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17

archivesBaseName = project.archives_base_name
version = project.mod_version + "-" + project.minecraft_version
group = project.maven_group

minecraft {
}

repositories {
maven { url "https://maven.shedaniel.me/" }
maven { url 'https://jitpack.io' }
Expand All @@ -32,55 +29,50 @@ dependencies {
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"

// Dev QOL utilities
modImplementation "me.shedaniel:RoughlyEnoughItems-fabric:${project.rei_version}"
// modImplementation "me.shedaniel:RoughlyEnoughItems-fabric:${project.rei_version}"

include modImplementation("com.jamieswhiteshirt:reach-entity-attributes:2.1.1")
}

processResources {
inputs.property "version", project.version

filesMatching('fabric.mod.json') {
filesMatching("fabric.mod.json") {
expand "version": project.version
}
}

// ensure that the encoding is set to UTF-8, no matter what the system default is
// this fixes some edge cases with special characters not displaying correctly
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
tasks.withType(JavaCompile).configureEach {
// Minecraft 1.18 (1.18-pre2) upwards uses Java 17.
it.options.release = 17
}

// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this task, sources will not be generated.
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = "sources"
from sourceSets.main.allSource
java {
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this line, sources will not be generated.
withSourcesJar()
}

jar {
from "LICENSE"
from("LICENSE") {
rename { "${it}_${project.archivesBaseName}"}
}
}

// configure the maven publication
publishing {
publications {
mavenJava(MavenPublication) {
// add all the jars that should be included when publishing to maven
artifact(remapJar) {
builtBy remapJar
}
artifact(sourcesJar) {
builtBy remapSourcesJar
}
from components.java
}
}

// select the repositories you want to publish to
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
repositories {
// uncomment to publish to the local maven
// mavenLocal()
// Add repositories to publish to here.
// Notice: This block does NOT have the same function as the block in the top level.
// The repositories here will be used for publishing your artifact, not for
// retrieving dependencies.
}
}
}
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ org.gradle.jvmargs=-Xmx1G

# Fabric Properties
# check these on https://fabricmc.net/use
minecraft_version=1.17.1
yarn_mappings=1.17.1+build.52
loader_version=0.11.6
minecraft_version=1.18.1
yarn_mappings=1.18.1+build.22
loader_version=0.13.1
fabric_version=0.46.4+1.18

# Mod Properties
mod_version=1.5.1
mod_version=1.6.0
maven_group=draylar
archives_base_name=gate-of-babylon

# Dependencies
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
fabric_version=0.40.0+1.17
rei_version=6.0.251-alpha
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
1 change: 0 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
pluginManagement {
repositories {
jcenter()
maven {
name = 'Fabric'
url = 'https://maven.fabricmc.net/'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public void render(YoyoEntity yoyo, float yaw, float tickDelta, MatrixStack matr

private <E extends Entity> void renderString(Entity player, float delta, MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, Entity yoyo) {
matrixStack.push();
Vec3d lerpedYoyoPosition = yoyo.method_30951(delta);
Vec3d lerpedYoyoPosition = yoyo.getLerpedPos(delta);
double d = 0;
Vec3d lerpedPlayerPosition = player.getLerpedPos(delta);
double e = Math.cos(d) * lerpedPlayerPosition.z + Math.sin(d) * lerpedPlayerPosition.x;
Expand All @@ -96,7 +96,7 @@ private <E extends Entity> void renderString(Entity player, float delta, MatrixS
float m = (float)(lerpedYoyoPosition.z - j);
float n = 0.025F;
VertexConsumer vertexConsumer = vertexConsumerProvider.getBuffer(RenderLayer.getLeash());
Matrix4f matrix4f = matrixStack.peek().getModel();
Matrix4f matrix4f = matrixStack.peek().getPositionMatrix();
float o = MathHelper.fastInverseSqrt(k * k + m * m) * 0.025F / 2.0F;
float p = m * o;
float q = k * o;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public void onStoppedUsing(ItemStack stack, World world, LivingEntity user, int
if (!world.isClient) {
ArrowItem arrowItem = (ArrowItem) (arrowStack.getItem() instanceof ArrowItem ? arrowStack.getItem() : Items.ARROW);
PersistentProjectileEntity arrowEntity = arrowItem.createArrow(world, arrowStack, playerEntity);
arrowEntity.setProperties(playerEntity, playerEntity.getPitch(), playerEntity.getYaw(), 0.0F, pullProgress * 3.0F, 1.0F);
arrowEntity.setVelocity(playerEntity, playerEntity.getPitch(), playerEntity.getYaw(), 0.0F, pullProgress * 3.0F, 1.0F);
((ProjectileManipulator) arrowEntity).setOrigin(stack);

// Make Arrow crit if pull progress is fully complete
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/draylar/gateofbabylon/item/SpearItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public void onStoppedUsing(ItemStack stack, World world, LivingEntity user, int

// Create initial Spear entity
SpearProjectileEntity spearEntity = new SpearProjectileEntity(world, player, stack);
spearEntity.setProperties(player, player.getPitch(), player.getYaw(), 0.0F, 2.5F, 1.0F);
spearEntity.setVelocity(player, player.getPitch(), player.getYaw(), 0.0F, 2.5F, 1.0F);
if (player.getAbilities().creativeMode) {
spearEntity.pickupType = PersistentProjectileEntity.PickupPermission.CREATIVE_ONLY;
}
Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@
"depends": {
"fabricloader": ">=0.8.2+build.194",
"fabric": "*",
"minecraft": ">=1.16.2"
"minecraft": ">=1.18"
}
}
3 changes: 1 addition & 2 deletions src/main/resources/gate-of-babylon.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"AreaEffectCloudEntityAccessor",
"AreaEffectCloudEntityMixin",
"BlockSoundGroupAccessor",
"ClientPlayerEntityYoyoUsageMixin",
"EnchantmentHelperMixin",
"EnchantmentMixin",
"FallingBlockEntityAccessor",
Expand All @@ -18,7 +17,7 @@
"PlayerEntityMixin"
],
"client": [
"DrawableHelperAccessor"
"ClientPlayerEntityYoyoUsageMixin"
],
"injectors": {
"defaultRequire": 1
Expand Down

0 comments on commit f74abf5

Please sign in to comment.