mirror of
https://github.com/squeek502/Squake.git
synced 2025-09-16 23:44:40 -04:00
Updated to 1.7.x and added Version Checker support
This commit is contained in:
parent
4ebd72f147
commit
21fccc40d3
14
build.gradle
14
build.gradle
@ -5,16 +5,20 @@ buildscript {
|
||||
name = "forge"
|
||||
url = "http://files.minecraftforge.net/maven"
|
||||
}
|
||||
maven {
|
||||
name = "sonatype"
|
||||
url = "https://oss.sonatype.org/content/repositories/snapshots/"
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
classpath 'net.minecraftforge.gradle:ForgeGradle:1.0-SNAPSHOT'
|
||||
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'forge'
|
||||
|
||||
minecraft {
|
||||
version = "1.6.4-9.11.1.964"
|
||||
version = "1.7.2-10.12.1.1060"
|
||||
}
|
||||
|
||||
group = project.projectDir.name.toLowerCase()
|
||||
@ -34,7 +38,7 @@ dependencies {
|
||||
}
|
||||
|
||||
// variable replacement in source files
|
||||
task processSources(type:Copy){
|
||||
task processSourcesCustom(type:Copy){
|
||||
from('java')
|
||||
{
|
||||
include '**/ModInfo.java'
|
||||
@ -51,9 +55,9 @@ task cleanModInfo(type: Delete) {
|
||||
|
||||
// correct task ordering
|
||||
processResources.dependsOn cleanModInfo
|
||||
compileJava.dependsOn processSources
|
||||
compileJava.dependsOn processSourcesCustom
|
||||
afterEvaluate { project ->
|
||||
processSources.shouldRunAfter(sourceMainJava)
|
||||
processSourcesCustom.shouldRunAfter(sourceMainJava)
|
||||
}
|
||||
|
||||
processResources
|
||||
|
@ -1,7 +1,7 @@
|
||||
package squeek.quakemovement;
|
||||
|
||||
import java.io.File;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
|
||||
public class ModConfig
|
||||
{
|
||||
|
@ -5,13 +5,12 @@ import api.player.server.ServerPlayerAPI;
|
||||
import cpw.mods.fml.common.Mod;
|
||||
import cpw.mods.fml.common.Mod.EventHandler;
|
||||
import cpw.mods.fml.common.Mod.Instance;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import cpw.mods.fml.common.network.NetworkMod;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
|
||||
@Mod(modid = ModInfo.MODID, version = ModInfo.VERSION, dependencies = "required-after:PlayerAPI;after:Squeedometer")
|
||||
@NetworkMod(clientSideRequired = true)
|
||||
public class ModQuakeMovement
|
||||
{
|
||||
// The instance of your mod that Forge uses.
|
||||
@ -31,5 +30,7 @@ public class ModQuakeMovement
|
||||
|
||||
if (event.getSide() == Side.CLIENT)
|
||||
ClientPlayerAPI.register(ModInfo.MODID, QuakeClientPlayer.class);
|
||||
|
||||
FMLInterModComms.sendRuntimeMessage(ModInfo.MODID, "VersionChecker", "addVersionCheck", "http://www.ryanliptak.com/minecraft/versionchecker/squeek502/Squake");
|
||||
}
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import api.player.client.ClientPlayerAPI;
|
||||
@ -156,12 +157,9 @@ public class QuakeClientPlayer extends ClientPlayerBase
|
||||
|
||||
if (this.player.onGround)
|
||||
{
|
||||
int j = this.player.worldObj.getBlockId(MathHelper.floor_double(this.player.posX), MathHelper.floor_double(this.player.boundingBox.minY) - 1, MathHelper.floor_double(this.player.posZ));
|
||||
Block ground = this.player.worldObj.getBlock(MathHelper.floor_double(this.player.posX), MathHelper.floor_double(this.player.boundingBox.minY) - 1, MathHelper.floor_double(this.player.posZ));
|
||||
|
||||
if (j > 0)
|
||||
{
|
||||
f2 = 1.0F - Block.blocksList[j].slipperiness;
|
||||
}
|
||||
f2 = 1.0F - ground.slipperiness;
|
||||
}
|
||||
|
||||
return f2;
|
||||
@ -173,12 +171,10 @@ public class QuakeClientPlayer extends ClientPlayerBase
|
||||
if (this.player.onGround)
|
||||
{
|
||||
f2 = 0.54600006F;
|
||||
int j = this.player.worldObj.getBlockId(MathHelper.floor_double(this.player.posX), MathHelper.floor_double(this.player.boundingBox.minY) - 1, MathHelper.floor_double(this.player.posZ));
|
||||
Block ground = this.player.worldObj.getBlock(MathHelper.floor_double(this.player.posX), MathHelper.floor_double(this.player.boundingBox.minY) - 1, MathHelper.floor_double(this.player.posZ));
|
||||
|
||||
if (j > 0)
|
||||
{
|
||||
f2 = Block.blocksList[j].slipperiness * 0.91F;
|
||||
}
|
||||
if (ground != null)
|
||||
f2 = ground.slipperiness * 0.91F;
|
||||
}
|
||||
return f2;
|
||||
}
|
||||
@ -236,13 +232,13 @@ public class QuakeClientPlayer extends ClientPlayerBase
|
||||
int j = MathHelper.floor_double(this.player.posX);
|
||||
int i = MathHelper.floor_double(this.player.posY - 0.20000000298023224D - this.player.yOffset);
|
||||
int k = MathHelper.floor_double(this.player.posZ);
|
||||
int l = this.player.worldObj.getBlockId(j, i, k);
|
||||
Block ground = this.player.worldObj.getBlock(j, i, k);
|
||||
|
||||
if (l > 0)
|
||||
if (ground != null && ground.getMaterial() != Material.air)
|
||||
{
|
||||
for (int iParticle = 0; iParticle < numParticles; iParticle++)
|
||||
{
|
||||
this.player.worldObj.spawnParticle("tilecrack_" + l + "_" + this.player.worldObj.getBlockMetadata(j, i, k), this.player.posX + (this.playerAPI.getRandField().nextFloat() - 0.5D) * this.player.width, this.player.boundingBox.minY + 0.1D, this.player.posZ + (this.playerAPI.getRandField().nextFloat() - 0.5D) * this.player.width, -this.player.motionX * 4.0D, 1.5D, -this.player.motionZ * 4.0D);
|
||||
this.player.worldObj.spawnParticle("blockcrack_" + Block.getIdFromBlock(ground) + "_" + this.player.worldObj.getBlockMetadata(j, i, k), this.player.posX + (this.playerAPI.getRandField().nextFloat() - 0.5D) * this.player.width, this.player.boundingBox.minY + 0.1D, this.player.posZ + (this.playerAPI.getRandField().nextFloat() - 0.5D) * this.player.width, -this.player.motionX * 4.0D, 1.5D, -this.player.motionZ * 4.0D);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user