Skip to content

Commit

Permalink
add 1.7.10 code
Browse files Browse the repository at this point in the history
  • Loading branch information
bl4ckscor3 committed Feb 19, 2019
1 parent 717a5aa commit eaa3270
Show file tree
Hide file tree
Showing 8 changed files with 234 additions and 186 deletions.
44 changes: 35 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
buildscript {
repositories {
jcenter()
maven { url = "http://files.minecraftforge.net/maven" }
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:2.3-SNAPSHOT'
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
}
}
apply plugin: 'net.minecraftforge.gradle.forge'

version = "1.12.x-v1.1.2"
group= "bl4ckscor3.mod.sit" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
apply plugin: 'forge'

version = "1.7.10-v1.1"
group = "bl4ckscor3.mod.sit"
archivesBaseName = "sit"

sourceCompatibility = targetCompatibility = "1.8" // Need this here so eclipse task generates correctly.
Expand All @@ -19,14 +27,25 @@ compileJava {
}

minecraft {
version = "1.12.2-14.23.5.2768"
runDir = "run"
mappings = "stable_39"
version = "1.7.10-10.13.3.1420-1.7.10"
assetDir = "eclipse/assets"
}

dependencies {
}

task deobfJar(type: Jar) {
from sourceSets.main.output
classifier = 'deobf'
}

task sourceJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
}

tasks.build.dependsOn('sourceJar', 'deobfJar')

processResources
{
inputs.property "version", project.version
Expand All @@ -42,3 +61,10 @@ processResources
exclude 'mcmod.info'
}
}

artifacts {
archives deobfJar
archives sourceJar
archives jar
}

Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
12 changes: 6 additions & 6 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Mon Sep 14 12:28:28 PDT 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14-bin.zip
#Wed Jul 02 15:54:47 CDT 2014
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.0-bin.zip
180 changes: 90 additions & 90 deletions gradlew.bat
Original file line number Diff line number Diff line change
@@ -1,90 +1,90 @@
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################

@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto init

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:init
@rem Get command-line arguments, handling Windowz variants

if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args

:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2

:win9xME_args_slurp
if "x%~1" == "x" goto execute

set CMD_LINE_ARGS=%*
goto execute

:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$

:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1

:mainEnd
if "%OS%"=="Windows_NT" endlocal

:omega
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################

@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto init

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:init
@rem Get command-line arguments, handling Windowz variants

if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args

:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2

:win9xME_args_slurp
if "x%~1" == "x" goto execute

set CMD_LINE_ARGS=%*
goto execute

:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$

:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1

:mainEnd
if "%OS%"=="Windows_NT" endlocal

:omega
21 changes: 21 additions & 0 deletions src/main/java/bl4ckscor3/mod/sit/BlockPos.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package bl4ckscor3.mod.sit;

public class BlockPos
{
public int x;
public int y;
public int z;

public BlockPos(int xPos, int yPos, int zPos)
{
x = xPos;
y = yPos;
z = zPos;
}

@Override
public boolean equals(Object obj)
{
return obj instanceof BlockPos && x == ((BlockPos)obj).x && y == ((BlockPos)obj).y && z == ((BlockPos)obj).z;
}
}
30 changes: 20 additions & 10 deletions src/main/java/bl4ckscor3/mod/sit/EntitySit.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

import java.util.HashMap;

import net.minecraft.client.Minecraft;
import net.minecraft.entity.Entity;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;

public class EntitySit extends Entity
{
public static final HashMap<BlockPos,EntitySit> OCCUPIED = new HashMap<BlockPos,EntitySit>();
public static final HashMap<BlockPos, EntitySit> OCCUPIED = new HashMap<BlockPos, EntitySit>();

public EntitySit(World world)
{
Expand All @@ -18,26 +18,36 @@ public EntitySit(World world)
height = 0.0001F;
width = 0.0001F;
}

public EntitySit(World world, BlockPos pos)
{
super(world);
setPosition(pos.getX() + 0.5D, pos.getY() + 0.25D, pos.getZ() + 0.5D);
setPosition(pos.x + 0.5D, pos.y + 0.25D, pos.z + 0.5D);
noClip = true;
height = 0.0001F;
width = 0.0001F;
OCCUPIED.put(pos, this);
}

@Override
protected void entityInit()
{}
public void onUpdate()
{
if(worldObj.isRemote)
{
if(Minecraft.getMinecraft().gameSettings.keyBindSneak.getIsKeyPressed())
{
setDead();
EntitySit.OCCUPIED.remove(new BlockPos((int)posX, (int)posY, (int)posZ));
}
}
}

@Override
protected void entityInit(){}

@Override
protected void readEntityFromNBT(NBTTagCompound compound)
{}
protected void readEntityFromNBT(NBTTagCompound compound){}

@Override
protected void writeEntityToNBT(NBTTagCompound compound)
{}
protected void writeEntityToNBT(NBTTagCompound compound){}
}
Loading

0 comments on commit eaa3270

Please sign in to comment.