Skip to content

Commit

Permalink
Port to 1.9.4
Browse files Browse the repository at this point in the history
  • Loading branch information
squeek502 committed Jul 27, 2016
1 parent 69fa089 commit aa77702
Show file tree
Hide file tree
Showing 4 changed files with 226 additions and 98 deletions.
207 changes: 174 additions & 33 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,40 +1,181 @@
# Builds & binaries
eclipse
run
libs
media
classes
*.bat
builds
sources

# Created by https://www.gitignore.io/api/gradle,intellij,eclipse,windows,osx,linux

### Gradle ###
gradle/
.gradle/
build/
gradlew

# Ignore Gradle GUI config
gradle-app.setting

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar

# Cache of project
.gradletasknamecache

### Intellij ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm

*.iml

## Directory-based project format:
.idea/
# if you remove the above rule, at least ignore the following:

# User-specific stuff:
# .idea/workspace.xml
# .idea/tasks.xml
# .idea/dictionaries
# .idea/shelf

# Sensitive or high-churn files:
# .idea/dataSources.ids
# .idea/dataSources.xml
# .idea/sqlDataSources.xml
# .idea/dynamic.xml
# .idea/uiDesigner.xml

# Gradle:
# .idea/gradle.xml
# .idea/libraries

# Mongo Explorer plugin:
# .idea/mongoSettings.xml

## File-based project format:
*.ipr
*.iws

## Plugin-specific files:

# IntelliJ
/out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties


### Eclipse ###
*.pydevproject
.metadata
bin/
target/
lib/
launcher/
.gradle/
*.zip
*.jar
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.settings/
.loadpath

# Misc mod files
media/
libs/
# Eclipse Core
.project

# Tmp files
*~
*#
# External tool builders
.externalToolBuilders/

# Locally stored "Eclipse launch configurations"
*.launch

# IDEs
# CDT-specific
.cproject

# JDT-specific (Eclipse Java Development Tools)
.classpath
.project
.settings
.pydevproject

# MCP Files
docs/
conf/
eclipse/
jars/
logs/
runtime/
temp/
reobf/
CHANGELOG
LICENSE.txt
*.bat
*.sh

# Misc
*.rej
# Java annotation processor (APT)
.factorypath

# PDT-specific
.buildpath

# sbteclipse plugin
.target

# TeXlipse plugin
.texlipse

# STS (Spring Tool Suite)
.springBeans


### Windows ###
# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msm
*.msp

# Windows shortcuts
*.lnk


### OSX ###
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk


### Linux ###
*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*
83 changes: 35 additions & 48 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,64 +1,51 @@
buildscript {
repositories {
mavenCentral()
maven {
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.2-SNAPSHOT'
}
repositories {
jcenter()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT'
}
}

apply plugin: 'forge'
apply plugin: 'net.minecraftforge.gradle.forge'

minecraft {
version = "1.8-11.14.1.1334"
mappings = "snapshot_20141130"
version = "1.9.4-12.17.0.1962"
mappings = "snapshot_20160518"
runDir = "run"

replace "\${version}", project.version
replaceIn "ModInfo.java"
}

group = project.projectDir.name.toLowerCase()
archivesBaseName = project.projectDir.name + "-mc" + project.minecraft.version

sourceSets.main{
java {
srcDirs 'java', 'apis'
}
resources {
srcDirs 'resources'
}
}
sourceSets.main.java.srcDirs += 'java'
sourceSets.main.resources.srcDirs += 'resources'

// variable substitution in java files
task processSourceMainJava(type:Copy) {
inputs.property "vars", project.version + project.minecraft.version
from('java')
{
include '**/ModInfo.java'
include '**/package-info.java'
expand 'version':project.version, 'mcversion':project.minecraft.version
}
into project.buildDir.getPath()+"/sources/java"
processResources {
inputs.property "vars", project.version + project.minecraft.version
from(sourceSets.main.resources.srcDirs) {
include '**/*.info'
expand 'version':project.version, 'mcversion':project.minecraft.version
}
from(sourceSets.main.resources.srcDirs) {
exclude '**/*.info'
}
}

// correct task ordering
afterEvaluate { project ->
sourceMainJava.finalizedBy(processSourceMainJava)
repositories {
ivy {
name "PlayerAPI"
artifactPattern "http://addons-origin.cursecdn.com/files/2318/180/[module]-[revision].[ext]"
}
}

processResources
{
inputs.property "vars", project.version + project.minecraft.version
from(sourceSets.main.resources.srcDirs) {
include '**/*.info'
expand 'version':project.version, 'mcversion':project.minecraft.version
}
from(sourceSets.main.resources.srcDirs) {
exclude '**/*.info'
}
dependencies {
deobfCompile group: 'playerapi', name: 'PlayerAPI', version: '1.9.4-1.0', ext: 'jar'
}
14 changes: 7 additions & 7 deletions java/squeek/quakemovement/ModQuakeMovement.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@

import api.player.client.ClientPlayerAPI;
import api.player.server.ServerPlayerAPI;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.living.LivingFallEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.Mod.Instance;
import net.minecraftforge.fml.common.event.FMLInterModComms;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.living.LivingFallEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.relauncher.Side;

@Mod(modid = ModInfo.MODID, version = ModInfo.VERSION, acceptedMinecraftVersions="[1.8,1.9)", dependencies = "required-after:PlayerAPI;after:Squeedometer")
@Mod(modid = ModInfo.MODID, version = ModInfo.VERSION, acceptedMinecraftVersions="[1.9,1.10)", dependencies = "required-after:PlayerAPI;after:Squeedometer")
public class ModQuakeMovement
{
// The instance of your mod that Forge uses.
Expand Down Expand Up @@ -42,12 +42,12 @@ public void postInit(FMLPostInitializationEvent event)
@SubscribeEvent
public void onLivingFall(LivingFallEvent event)
{
if (!(event.entity instanceof EntityPlayer))
if (!(event.getEntityLiving() instanceof EntityPlayer))
return;

if (ModConfig.INCREASED_FALL_DISTANCE != 0.0D)
{
event.distance = (float) (event.distance - ModConfig.INCREASED_FALL_DISTANCE);
event.setDistance((float) (event.getDistance() - ModConfig.INCREASED_FALL_DISTANCE));
}
}
}
Loading

0 comments on commit aa77702

Please sign in to comment.