Skip to content

Commit

Permalink
Updated to 1.17
Browse files Browse the repository at this point in the history
  • Loading branch information
TurtleArmyMc committed Jun 11, 2021
1 parent 85edd0a commit 3c50303
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 19 deletions.
13 changes: 4 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
plugins {
id 'fabric-loom' version '0.5-SNAPSHOT'
id 'fabric-loom' version '0.8-SNAPSHOT'
id 'maven-publish'
}

sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_16
targetCompatibility = JavaVersion.VERSION_16

archivesBaseName = project.archives_base_name
version = project.mod_version + "+mc" + project.minecraft_version
Expand All @@ -23,14 +23,9 @@ dependencies {
processResources {
inputs.property "version", project.version

from(sourceSets.main.resources.srcDirs) {
include "fabric.mod.json"
filesMatching("fabric.mod.json") {
expand "version": project.version
}

from(sourceSets.main.resources.srcDirs) {
exclude "fabric.mod.json"
}
}

// ensure that the encoding is set to UTF-8, no matter what the system default is
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
org.gradle.jvmargs = -Xmx1G

#Fabric properties
minecraft_version = 1.16.5
yarn_mappings = 1.16.5+build.9
minecraft_version = 1.17
yarn_mappings = 1.17+build.1
loader_version = 0.11.3

#Mod properties
Expand Down
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-6.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import java.util.stream.Stream;

import org.lwjgl.system.CallbackI.S;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
Expand Down Expand Up @@ -39,7 +38,8 @@ ReusableStream<VoxelShape> adjustMovementForCollisions(ReusableStream<VoxelShape
if (!item.getStack().isEmpty() && item.isFireImmune()) {
return new ReusableStream<VoxelShape>(Stream.concat(rs.stream(),
Stream.of(VoxelShapes.cuboid(Double.NEGATIVE_INFINITY, Double.NEGATIVE_INFINITY,
Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, 0, Double.POSITIVE_INFINITY))));
Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, item.world.getBottomY(),
Double.POSITIVE_INFINITY))));
}
}
return rs;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

import net.minecraft.entity.ItemEntity;
import net.minecraft.entity.damage.DamageSource;
import net.minecraft.util.math.Direction;

@Mixin(ItemEntity.class)
public abstract class ItemEntityMixin {
Expand All @@ -15,9 +15,9 @@ public abstract class ItemEntityMixin {
@Inject(method = "tick()V", at = @At("HEAD"))
protected void tick(CallbackInfo ci) {
ItemEntity item = (ItemEntity) (Object) this;
if (item.isFireImmune() && item.getY() < 0) {
item.setBoundingBox(item.getBoundingBox().offset(0, 0 - item.getY(), 0));
item.moveToBoundingBoxCenter();
if (item.isFireImmune() && item.getY() < item.world.getBottomY()) {
item.setBoundingBox(item.getBoundingBox().offset(0, item.world.getBottomY() - item.getY(), 0));
item.setPos(item.getX(), item.getBoundingBox().getMin(Direction.Axis.Y), item.getZ());
item.setVelocity(item.getVelocity().multiply(1, 0, 1));
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/blastproof_netherite.mixins.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"required": true,
"package": "com.turtlearmymc.blastproofnetherite.mixin",
"compatibilityLevel": "JAVA_8",
"compatibilityLevel": "JAVA_16",
"mixins": [
"EntityMixin",
"ItemEntityMixin"
Expand Down

0 comments on commit 3c50303

Please sign in to comment.