mirror of
https://github.com/squeek502/Squake.git
synced 2025-09-14 06:24:37 -04:00
astromine support yeef
This commit is contained in:
parent
0767c83625
commit
da6e99549e
16
build.gradle
16
build.gradle
@ -17,7 +17,22 @@ repositories {
|
|||||||
name = "ModMenu"
|
name = "ModMenu"
|
||||||
url = "https://maven.fabricmc.net/io/github/prospector/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()
|
jcenter()
|
||||||
|
maven { url 'https://jitpack.io' }
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
@ -33,6 +48,7 @@ dependencies {
|
|||||||
include "me.shedaniel.cloth:config-2:${project.cloth_version}"
|
include "me.shedaniel.cloth:config-2:${project.cloth_version}"
|
||||||
|
|
||||||
modImplementation "io.github.prospector:modmenu:${project.modmenu_version}"
|
modImplementation "io.github.prospector:modmenu:${project.modmenu_version}"
|
||||||
|
modImplementation "com.github.Chainmail-Studios:Astromine:1.3.5"
|
||||||
}
|
}
|
||||||
|
|
||||||
processResources {
|
processResources {
|
||||||
|
13
java/squeek/quakemovement/AstromineSupport.java
Normal file
13
java/squeek/quakemovement/AstromineSupport.java
Normal 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());
|
||||||
|
}
|
||||||
|
}
|
@ -1,5 +1,6 @@
|
|||||||
package squeek.quakemovement;
|
package squeek.quakemovement;
|
||||||
|
|
||||||
|
import net.fabricmc.loader.api.FabricLoader;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockRenderType;
|
import net.minecraft.block.BlockRenderType;
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
@ -280,8 +281,12 @@ public class QuakeClientPlayer
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// gravity
|
// gravity
|
||||||
|
if (FabricLoader.getInstance().isModLoaded("astromine")) {
|
||||||
|
velocityY -= AstromineSupport.getGravity(player);
|
||||||
|
} else {
|
||||||
velocityY -= 0.08D;
|
velocityY -= 0.08D;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// air resistance
|
// air resistance
|
||||||
velocityY *= 0.9800000190734863D;
|
velocityY *= 0.9800000190734863D;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user