Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.20.5 port #10

Merged
merged 4 commits into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
matrix:
# Use these Java versions
java: [
17, # Current Java LTS & minimum supported by Minecraft
21, # Current Java LTS & minimum supported by Minecraft
]
# and run on both Linux and Windows
os: [ubuntu-22.04, windows-2022]
Expand Down
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
plugins {
id 'fabric-loom' version '1.2-SNAPSHOT'
id 'fabric-loom' version '1.6-SNAPSHOT'
id 'maven-publish'
}

sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21

archivesBaseName = project.archives_base_name
version = project.mod_version
Expand Down Expand Up @@ -42,7 +42,7 @@ processResources {

tasks.withType(JavaCompile).configureEach {
// Minecraft 1.18 (1.18-pre2) upwards uses Java 17.
it.options.release = 17
it.options.release = 21
}

java {
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ org.gradle.parallel=true

# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.19
yarn_mappings=1.19+build.4
loader_version=0.14.22
minecraft_version=1.20.5
yarn_mappings=1.20.5+build.1
loader_version=0.15.10

# Mod Properties
mod_version = 1.1.0
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public void onInitialize() {
}

public static BlockPos VEC_3D_TO_POS(Vec3d vec3d) {
return new BlockPos(vec3d.x, vec3d.y, vec3d.z);
return new BlockPos((int)Math.round(vec3d.x), (int)Math.round(vec3d.y), (int)Math.round(vec3d.z));
}

public static void log(Hand hand, Hand other_hand, ItemStack usedItemStack, ItemStack otherItemStack, Vec3d position, Vec3d velocity) {
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/nad2040/elytrabombing/mixin/ItemMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import net.minecraft.block.AnvilBlock;
import net.minecraft.block.Blocks;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.EquipmentSlot;
import net.minecraft.entity.FallingBlockEntity;
import net.minecraft.entity.TntEntity;
import net.minecraft.entity.player.PlayerEntity;
Expand Down Expand Up @@ -40,7 +41,7 @@ public void use(World world, PlayerEntity user, Hand hand, CallbackInfoReturnabl
world.playSound(null, tntEntity.getX(), tntEntity.getY(), tntEntity.getZ(), SoundEvents.ENTITY_TNT_PRIMED, SoundCategory.BLOCKS, 1.0f, 1.0f);
world.emitGameEvent(user, GameEvent.PRIME_FUSE, position);
if (!user.getAbilities().creativeMode) {
usedItemStack.damage(1, user, p -> p.sendToolBreakStatus(hand));
usedItemStack.damage(1, user, EquipmentSlot.MAINHAND);
otherItemStack.decrement(1);
}
user.incrementStat(Stats.USED.getOrCreateStat((FlintAndSteelItem) (Object) this));
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/elytrabombing.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"required": true,
"minVersion": "0.8",
"package": "com.nad2040.elytrabombing.mixin",
"compatibilityLevel": "JAVA_17",
"compatibilityLevel": "JAVA_21",
"mixins": [
"FallingBlockEntityMixin",
"ItemMixin"
Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
],

"depends": {
"fabricloader": ">=0.7",
"minecraft": ">=1.19",
"java": ">=17"
"fabricloader": ">=0.15.10",
"minecraft": ">=1.20.5",
"java": ">=21"
},
"suggests": {
"another-mod": ""
Expand Down
Loading