astromine support yeef

This commit is contained in:
CoolMineman 2020-08-01 22:08:39 -05:00
parent 0767c83625
commit da6e99549e
No known key found for this signature in database
GPG Key ID: 2439F5FE115256DD
3 changed files with 35 additions and 1 deletions

View File

@ -17,7 +17,22 @@ repositories {
name = "ModMenu"
url = "https://maven.fabricmc.net/io/github/prospector/modmenu/"
}
//Begin Astromine
maven {
name = "Spinnery"
url = "https://dl.bintray.com/spinnery/Spinnery"
}
maven {
name = "Jared"
url = "https://maven.blamejared.com"
}
maven {
name = "BuildCraft"
url = "https://mod-buildcraft.com/maven"
}
//End Astromine
jcenter()
maven { url 'https://jitpack.io' }
}
dependencies {
@ -33,6 +48,7 @@ dependencies {
include "me.shedaniel.cloth:config-2:${project.cloth_version}"
modImplementation "io.github.prospector:modmenu:${project.modmenu_version}"
modImplementation "com.github.Chainmail-Studios:Astromine:1.3.5"
}
processResources {

View File

@ -0,0 +1,13 @@
package squeek.quakemovement;
import com.github.chainmailstudios.astromine.common.registry.GravityRegistry;
import net.minecraft.entity.player.PlayerEntity;
public class AstromineSupport {
private AstromineSupport(){}
public static double getGravity(PlayerEntity player) {
return GravityRegistry.INSTANCE.get(player.world.getDimensionRegistryKey());
}
}

View File

@ -1,5 +1,6 @@
package squeek.quakemovement;
import net.fabricmc.loader.api.FabricLoader;
import net.minecraft.block.Block;
import net.minecraft.block.BlockRenderType;
import net.minecraft.block.BlockState;
@ -280,7 +281,11 @@ public class QuakeClientPlayer
else
{
// gravity
velocityY -= 0.08D;
if (FabricLoader.getInstance().isModLoaded("astromine")) {
velocityY -= AstromineSupport.getGravity(player);
} else {
velocityY -= 0.08D;
}
}
// air resistance