Upload working sources
22
.gitignore
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
# eclipse
|
||||
bin
|
||||
*.launch
|
||||
.settings
|
||||
.metadata
|
||||
.classpath
|
||||
.project
|
||||
|
||||
# idea
|
||||
out
|
||||
*.ipr
|
||||
*.iws
|
||||
*.iml
|
||||
.idea
|
||||
|
||||
# gradle
|
||||
build
|
||||
.gradle
|
||||
|
||||
# other
|
||||
eclipse
|
||||
run
|
77
build.gradle
Normal file
@@ -0,0 +1,77 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
jcenter()
|
||||
maven { url = "http://files.minecraftforge.net/maven" }
|
||||
}
|
||||
dependencies {
|
||||
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
|
||||
}
|
||||
}
|
||||
apply plugin: 'net.minecraftforge.gradle.forge'
|
||||
//Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
|
||||
|
||||
|
||||
version = "1.0"
|
||||
group = "com.yourname.modid" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
archivesBaseName = "modid"
|
||||
|
||||
sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
|
||||
compileJava {
|
||||
sourceCompatibility = targetCompatibility = '1.8'
|
||||
}
|
||||
|
||||
minecraft {
|
||||
version = "1.12.2-14.23.4.2705"
|
||||
runDir = "run"
|
||||
|
||||
// the mappings can be changed at any time, and must be in the following format.
|
||||
// snapshot_YYYYMMDD snapshot are built nightly.
|
||||
// stable_# stables are built at the discretion of the MCP team.
|
||||
// Use non-default mappings at your own risk. they may not always work.
|
||||
// simply re-run your setup task after changing the mappings to update your workspace.
|
||||
mappings = "snapshot_20171003"
|
||||
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// you may put jars on which you depend on in ./libs
|
||||
// or you may define them like so..
|
||||
//compile "some.group:artifact:version:classifier"
|
||||
//compile "some.group:artifact:version"
|
||||
|
||||
// real examples
|
||||
//compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env
|
||||
//compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env
|
||||
|
||||
// the 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime.
|
||||
//provided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
|
||||
|
||||
// the deobf configurations: 'deobfCompile' and 'deobfProvided' are the same as the normal compile and provided,
|
||||
// except that these dependencies get remapped to your current MCP mappings
|
||||
//deobfCompile 'com.mod-buildcraft:buildcraft:6.0.8:dev'
|
||||
//deobfProvided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
|
||||
|
||||
// for more info...
|
||||
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
|
||||
// http://www.gradle.org/docs/current/userguide/dependency_management.html
|
||||
|
||||
}
|
||||
|
||||
processResources {
|
||||
// this will ensure that this task is redone when the versions change.
|
||||
inputs.property "version", project.version
|
||||
inputs.property "mcversion", project.minecraft.version
|
||||
|
||||
// replace stuff in mcmod.info, nothing else
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
include 'mcmod.info'
|
||||
|
||||
// replace version and mcversion
|
||||
expand 'version':project.version, 'mcversion':project.minecraft.version
|
||||
}
|
||||
|
||||
// copy everything else except the mcmod.info
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
exclude 'mcmod.info'
|
||||
}
|
||||
}
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
6
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
@@ -0,0 +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
|
164
gradlew
vendored
Normal file
@@ -0,0 +1,164 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
##
|
||||
##############################################################################
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS=""
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn ( ) {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die ( ) {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
esac
|
||||
|
||||
# For Cygwin, ensure paths are in UNIX format before anything is touched.
|
||||
if $cygwin ; then
|
||||
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
|
||||
fi
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
# Need this for relative symlinks.
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`"/$link"
|
||||
fi
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >&-
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >&-
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD="java"
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
MAX_FD="$MAX_FD_LIMIT"
|
||||
fi
|
||||
ulimit -n $MAX_FD
|
||||
if [ $? -ne 0 ] ; then
|
||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||
fi
|
||||
else
|
||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Darwin, add options to specify how the application appears in the dock
|
||||
if $darwin; then
|
||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin, switch paths to Windows format before running java
|
||||
if $cygwin ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
SEP=""
|
||||
for dir in $ROOTDIRSRAW ; do
|
||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||
SEP="|"
|
||||
done
|
||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||
# Add a user-defined pattern to the cygpath arguments
|
||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||
fi
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
i=0
|
||||
for arg in "$@" ; do
|
||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||
|
||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=$((i+1))
|
||||
done
|
||||
case $i in
|
||||
(0) set -- ;;
|
||||
(1) set -- "$args0" ;;
|
||||
(2) set -- "$args0" "$args1" ;;
|
||||
(3) set -- "$args0" "$args1" "$args2" ;;
|
||||
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
|
||||
function splitJvmOpts() {
|
||||
JVM_OPTS=("$@")
|
||||
}
|
||||
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
|
||||
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
|
||||
|
||||
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
|
90
gradlew.bat
vendored
Normal file
@@ -0,0 +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
|
81
src/main/java/net/yseven/findyourway/Client/AngleGetter.java
Normal file
@@ -0,0 +1,81 @@
|
||||
package net.yseven.findyourway.Client;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItemFrame;
|
||||
import net.minecraft.item.IItemPropertyGetter;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.yseven.findyourway.item.ModItems;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
import java.util.Objects;
|
||||
|
||||
public class AngleGetter implements IItemPropertyGetter {
|
||||
@SideOnly(Side.CLIENT)
|
||||
private double prevAngle = 0.0D;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private double prevWobble = 0.0D;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private long prevWorldTime = 0L;
|
||||
|
||||
double blockX;
|
||||
double blockZ;
|
||||
|
||||
@Override
|
||||
@ParametersAreNonnullByDefault
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float apply(ItemStack stack, @Nullable World worldIn, @Nullable EntityLivingBase entityIn) {
|
||||
|
||||
if (entityIn == null && !stack.isOnItemFrame()) return 0.0F;
|
||||
final boolean entityExists = entityIn != null;
|
||||
|
||||
final Entity entity = (Entity) (entityExists ? entityIn : stack.getItemFrame());
|
||||
|
||||
if (worldIn == null) worldIn = entity.world;
|
||||
|
||||
double rotation = entityExists ? (double) entity.rotationYaw : getFrameAngle((EntityItemFrame) entity);
|
||||
rotation %= 360.0D;
|
||||
|
||||
double adjusted = Math.PI - ((rotation - 90.0D) * 0.01745329238474369D - getAngle(worldIn, entity, stack));
|
||||
|
||||
if (entityExists) adjusted = wobble(worldIn, adjusted);
|
||||
|
||||
final float f = (float) (adjusted / (Math.PI * 2D));
|
||||
return MathHelper.positiveModulo(f, 1.0F);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private double wobble(World world, double angle) {
|
||||
long worldTime = world.getTotalWorldTime();
|
||||
if (worldTime != prevWorldTime) {
|
||||
prevWorldTime = worldTime;
|
||||
double angleDifference = angle - prevAngle;
|
||||
angleDifference = MathHelper.positiveModulo(angleDifference + 0.5D, 1.0D) - 0.5D;
|
||||
prevWobble += angleDifference * 0.1D;
|
||||
prevWobble *= 0.8D;
|
||||
prevAngle = MathHelper.positiveModulo(prevAngle + prevWobble, 1.0D);
|
||||
}
|
||||
return prevAngle;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private double getAngle(World world, Entity entity, ItemStack stack) {
|
||||
return Math.atan2((double) blockZ - entity.posZ, (double) blockX - entity.posX);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private double getFrameAngle(EntityItemFrame entity) {
|
||||
return (double) MathHelper.wrapDegrees(180 + (entity.facingDirection.getHorizontalIndex() * 90));
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private double getPosToAngle(BlockPos pos, Entity entity) {
|
||||
return Math.atan2((double)pos.getZ() - entity.posZ, (double)pos.getX() - entity.posX);
|
||||
}
|
||||
}
|
101
src/main/java/net/yseven/findyourway/Client/ClientProxy.java
Normal file
@@ -0,0 +1,101 @@
|
||||
package net.yseven.findyourway.Client;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.entity.EntityPlayerSP;
|
||||
import net.minecraft.client.multiplayer.WorldClient;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraftforge.client.event.ModelRegistryEvent;
|
||||
import net.minecraftforge.client.model.ModelLoader;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.client.FMLClientHandler;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.gameevent.TickEvent;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.yseven.findyourway.CommonProxy;
|
||||
import net.yseven.findyourway.FindYourWay;
|
||||
import net.yseven.findyourway.Network.PacketHandler;
|
||||
import net.yseven.findyourway.Network.PacketSendKey;
|
||||
import net.yseven.findyourway.item.ItemCompassBase;
|
||||
import net.yseven.findyourway.item.ModItems;
|
||||
|
||||
@Mod.EventBusSubscriber(Side.CLIENT)
|
||||
public class ClientProxy extends CommonProxy {
|
||||
|
||||
//Get information about the player and world
|
||||
public static Minecraft getMinecraft() {
|
||||
return FMLClientHandler.instance().getClient();
|
||||
}
|
||||
|
||||
public static WorldClient getWorld() {
|
||||
return getMinecraft().world;
|
||||
}
|
||||
|
||||
public static EntityPlayerSP getPlayer() {
|
||||
return getMinecraft().player;
|
||||
}
|
||||
|
||||
//TO-DO fill out the following methods
|
||||
public static boolean hasCompass(ItemCompassBase compass) {
|
||||
return getPlayer() != null && CommonProxy.containsCompass(getPlayer().inventory, compass);
|
||||
}
|
||||
|
||||
public static void setStructurePos(ItemCompassBase compassBase, BlockPos pos) {
|
||||
compassBase.setStructurePos(pos);
|
||||
}
|
||||
|
||||
public static BlockPos getStructurePos(ItemCompassBase compassBase) {
|
||||
return compassBase.getStructurePos();
|
||||
}
|
||||
|
||||
public static void resetStructurePos(ItemCompassBase compass) {
|
||||
compass.setStructurePos(null);
|
||||
compass.setStructureWorld(getWorld());
|
||||
PacketHandler.INSTANCE.sendToServer(new PacketSendKey(compass));
|
||||
}
|
||||
|
||||
//Proxy Info
|
||||
@Override
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
super.preInit(event);
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(FMLInitializationEvent event) {
|
||||
super.init(event);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postInit(FMLPostInitializationEvent event) {
|
||||
super.postInit(event);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerItemRenderer(Item item, int meta, String id) {
|
||||
ModelLoader.setCustomModelResourceLocation(item, meta, new ModelResourceLocation(FindYourWay.modId + ":" + id, "inventory"));
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onModelRegistry(ModelRegistryEvent event) {
|
||||
ModItems.ENDER_COMPASS.addPropertyOverride(new ResourceLocation(ModItems.ENDER_COMPASS.assetTag), new AngleGetter());
|
||||
ModelLoader.setCustomModelResourceLocation(ModItems.ENDER_COMPASS, 0, new ModelResourceLocation("findyourway:ender_compass", "inventory"));
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onClientTick(TickEvent.ClientTickEvent event) {
|
||||
for(int i = 0; i < CommonProxy.compassList.size(); i++) {
|
||||
if(hasCompass(CommonProxy.compassList.get(i))) {
|
||||
if(getWorld() != CommonProxy.compassList.get(i).getStructureWorld()) {
|
||||
resetStructurePos(CommonProxy.compassList.get(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
44
src/main/java/net/yseven/findyourway/CommonProxy.java
Normal file
@@ -0,0 +1,44 @@
|
||||
package net.yseven.findyourway;
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
||||
import net.yseven.findyourway.Network.PacketHandler;
|
||||
import net.yseven.findyourway.item.ItemCompassBase;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@Mod.EventBusSubscriber
|
||||
public class CommonProxy {
|
||||
|
||||
public static ArrayList<ItemCompassBase> compassList = new ArrayList<>();
|
||||
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
PacketHandler.registerMessages("findyourway");
|
||||
}
|
||||
|
||||
public void init(FMLInitializationEvent event) {
|
||||
|
||||
}
|
||||
|
||||
public void postInit(FMLPostInitializationEvent event) {
|
||||
|
||||
}
|
||||
|
||||
public void registerItemRenderer(Item item, int meta, String id) {
|
||||
}
|
||||
|
||||
public static boolean containsCompass(IInventory inventory, ItemCompassBase compass) {
|
||||
for(int slot = 0; slot < inventory.getSizeInventory(); slot++) {
|
||||
ItemStack stack = inventory.getStackInSlot(slot);
|
||||
if(!stack.isEmpty() && stack.getItem() == compass) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
62
src/main/java/net/yseven/findyourway/FindYourWay.java
Normal file
@@ -0,0 +1,62 @@
|
||||
package net.yseven.findyourway;
|
||||
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraftforge.client.event.ModelRegistryEvent;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.RegistryEvent;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.common.SidedProxy;
|
||||
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.network.NetworkRegistry;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.yseven.findyourway.Network.PacketSendKey;
|
||||
import net.yseven.findyourway.item.ModItems;
|
||||
|
||||
@Mod(modid = FindYourWay.modId, name = FindYourWay.name, version = FindYourWay.version)
|
||||
public class FindYourWay {
|
||||
public static final String modId = "findyourway";
|
||||
public static final String name = "Find Your Way";
|
||||
public static final String version = "1.0.0-beta";
|
||||
|
||||
@Mod.Instance(modId)
|
||||
public static FindYourWay instance;
|
||||
|
||||
@SidedProxy(serverSide = "net.yseven.findyourway.CommonProxy", clientSide = "net.yseven.findyourway.Client.ClientProxy")
|
||||
public static CommonProxy proxy;
|
||||
public static SimpleNetworkWrapper network;
|
||||
|
||||
@Mod.EventHandler
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
System.out.println(name + " is loading!");
|
||||
|
||||
proxy.preInit(event);
|
||||
}
|
||||
|
||||
@Mod.EventHandler
|
||||
public void init(FMLInitializationEvent event) {
|
||||
proxy.init(event);
|
||||
}
|
||||
|
||||
@Mod.EventHandler
|
||||
public void postInit(FMLPostInitializationEvent event) {
|
||||
proxy.postInit(event);
|
||||
}
|
||||
|
||||
@Mod.EventBusSubscriber
|
||||
public static class RegistrationHandler {
|
||||
@SubscribeEvent
|
||||
public static void registerItems(RegistryEvent.Register<Item> event) {
|
||||
ModItems.register(event.getRegistry());
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public static void registerModels(ModelRegistryEvent event) {
|
||||
ModItems.registerModels();
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,38 @@
|
||||
package net.yseven.findyourway.Network;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;
|
||||
import net.yseven.findyourway.Client.ClientProxy;
|
||||
import net.yseven.findyourway.item.ItemCompassBase;
|
||||
|
||||
public class PacketGetKey implements IMessage, IMessageHandler<PacketGetKey, IMessage> {
|
||||
private BlockPos structurePos;
|
||||
private ItemCompassBase compass;
|
||||
|
||||
public PacketGetKey() {}
|
||||
|
||||
public PacketGetKey(BlockPos pos, ItemCompassBase compassBase) {
|
||||
structurePos = pos;
|
||||
compass = compassBase;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toBytes(ByteBuf buf) {
|
||||
buf.writeLong(structurePos.toLong());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fromBytes(ByteBuf buf) {
|
||||
structurePos = BlockPos.fromLong(buf.readLong());
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMessage onMessage(PacketGetKey message, MessageContext ctx) {
|
||||
//Client Code
|
||||
ClientProxy.getMinecraft().addScheduledTask(() -> ClientProxy.setStructurePos(message.compass, message.structurePos));
|
||||
return null;
|
||||
}
|
||||
}
|
@@ -0,0 +1,30 @@
|
||||
package net.yseven.findyourway.Network;
|
||||
|
||||
import net.minecraftforge.fml.common.network.NetworkRegistry;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
|
||||
@SuppressWarnings("WeakerAccess")
|
||||
public class PacketHandler {
|
||||
private static int packetId = 0;
|
||||
|
||||
public static SimpleNetworkWrapper INSTANCE = null;
|
||||
|
||||
public PacketHandler() {
|
||||
}
|
||||
|
||||
public static int nextID() {
|
||||
return packetId++;
|
||||
}
|
||||
|
||||
public static void registerMessages(String channelName) {
|
||||
INSTANCE = NetworkRegistry.INSTANCE.newSimpleChannel(channelName);
|
||||
registerMessages();
|
||||
}
|
||||
|
||||
public static void registerMessages() {
|
||||
// Register messages which are sent from the client to the server here:
|
||||
INSTANCE.registerMessage(PacketSendKey.Handler.class, PacketSendKey.class, nextID(), Side.SERVER);
|
||||
INSTANCE.registerMessage(PacketGetKey.class, PacketGetKey.class, nextID(), Side.CLIENT);
|
||||
}
|
||||
}
|
@@ -0,0 +1,50 @@
|
||||
package net.yseven.findyourway.Network;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.WorldServer;
|
||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;
|
||||
import net.yseven.findyourway.item.ItemCompassBase;
|
||||
|
||||
public class PacketSendKey implements IMessage {
|
||||
private BlockPos structurePos;
|
||||
private final ItemCompassBase compass;
|
||||
|
||||
@Override
|
||||
public void fromBytes(ByteBuf buf) {
|
||||
structurePos = BlockPos.fromLong(buf.readLong());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toBytes(ByteBuf buf) {
|
||||
buf.writeLong(structurePos.toLong());
|
||||
}
|
||||
|
||||
public PacketSendKey(ItemCompassBase compassBase) {
|
||||
compass = compassBase;
|
||||
}
|
||||
|
||||
public static class Handler implements IMessageHandler<PacketSendKey, IMessage> {
|
||||
@Override
|
||||
public IMessage onMessage(PacketSendKey message, MessageContext ctx) {
|
||||
FMLCommonHandler.instance().getWorldThread(ctx.netHandler).addScheduledTask(() -> handle(message, ctx));
|
||||
return null;
|
||||
}
|
||||
|
||||
private void handle(PacketSendKey message, MessageContext ctx) {
|
||||
//server code
|
||||
EntityPlayerMP player = ctx.getServerHandler().player;
|
||||
WorldServer world = (WorldServer) player.world;
|
||||
if (message.compass != null) {
|
||||
message.structurePos = world.getChunkProvider().getNearestStructurePos(world, message.compass.getStructureType(), new BlockPos(player), false);
|
||||
if (message.structurePos != null) {
|
||||
PacketHandler.INSTANCE.sendTo(message, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
17
src/main/java/net/yseven/findyourway/Util.java
Normal file
@@ -0,0 +1,17 @@
|
||||
package net.yseven.findyourway;
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class Util {
|
||||
public static boolean checkInventoryForCompass(InventoryPlayer inventory, Item compass) {
|
||||
for(int x = 0; x < inventory.getSizeInventory(); x++) {
|
||||
ItemStack stack = inventory.getStackInSlot(x);
|
||||
if(!stack.isEmpty() && stack.getItem() == compass) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
@@ -0,0 +1,65 @@
|
||||
package net.yseven.findyourway.item;
|
||||
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.yseven.findyourway.Client.ClientProxy;
|
||||
import net.yseven.findyourway.CommonProxy;
|
||||
import net.yseven.findyourway.FindYourWay;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class ItemCompassBase extends Item {
|
||||
private final String structureType;
|
||||
private BlockPos structurePos;
|
||||
private World structureWorld;
|
||||
public final String assetTag;
|
||||
|
||||
ItemCompassBase(String name, String structureType, CreativeTabs tab) {
|
||||
this.setUnlocalizedName(name);
|
||||
this.setRegistryName(name);
|
||||
this.structureType = structureType;
|
||||
this.setCreativeTab(tab);
|
||||
this.setMaxStackSize(1);
|
||||
this.assetTag = name + "_angle";
|
||||
CommonProxy.compassList.add(this);
|
||||
}
|
||||
|
||||
public String getStructureType() {
|
||||
return structureType;
|
||||
}
|
||||
|
||||
public void setStructurePos(BlockPos pos) {
|
||||
structurePos = pos;
|
||||
}
|
||||
|
||||
public BlockPos getStructurePos() {
|
||||
return structurePos;
|
||||
}
|
||||
|
||||
public void setStructureWorld(World world) {
|
||||
structureWorld = world;
|
||||
}
|
||||
|
||||
public World getStructureWorld() {
|
||||
return structureWorld;
|
||||
}
|
||||
|
||||
public void registerItemModel() {
|
||||
FindYourWay.proxy.registerItemRenderer(this, 0, this.getUnlocalizedName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionResult<ItemStack> onItemRightClick(World world, EntityPlayer player, @Nonnull EnumHand hand) {
|
||||
if (world.isRemote) {
|
||||
ClientProxy.resetStructurePos(this);
|
||||
}
|
||||
return new ActionResult<>(EnumActionResult.SUCCESS, player.getHeldItem(hand));
|
||||
}
|
||||
}
|
20
src/main/java/net/yseven/findyourway/item/ModItems.java
Normal file
@@ -0,0 +1,20 @@
|
||||
package net.yseven.findyourway.item;
|
||||
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraftforge.registries.IForgeRegistry;
|
||||
|
||||
public class ModItems {
|
||||
|
||||
public static ItemCompassBase ENDER_COMPASS = new ItemCompassBase("ender_compass", "Stronghold", CreativeTabs.TOOLS);
|
||||
|
||||
public static void register(IForgeRegistry<Item> registry) {
|
||||
registry.registerAll(
|
||||
ENDER_COMPASS
|
||||
);
|
||||
}
|
||||
|
||||
public static void registerModels() {
|
||||
ENDER_COMPASS.registerItemModel();
|
||||
}
|
||||
}
|
2
src/main/resources/assets/findyourway/lang/en_US.lang
Normal file
@@ -0,0 +1,2 @@
|
||||
# Items
|
||||
item.ender_compass.name=Ender Compass
|
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "findyourway:item/ender_compass"
|
||||
},
|
||||
"overrides": [
|
||||
{ "predicate": { "ender_compass_angle": 0.000000 }, "model": "findyourway:item/ender_compass" },
|
||||
{ "predicate": { "ender_compass_angle": 0.015625 }, "model": "findyourway:item/ender_compass_17" },
|
||||
{ "predicate": { "ender_compass_angle": 0.046875 }, "model": "findyourway:item/ender_compass_18" },
|
||||
{ "predicate": { "ender_compass_angle": 0.078125 }, "model": "findyourway:item/ender_compass_19" },
|
||||
{ "predicate": { "ender_compass_angle": 0.109375 }, "model": "findyourway:item/ender_compass_20" },
|
||||
{ "predicate": { "ender_compass_angle": 0.140625 }, "model": "findyourway:item/ender_compass_21" },
|
||||
{ "predicate": { "ender_compass_angle": 0.171875 }, "model": "findyourway:item/ender_compass_22" },
|
||||
{ "predicate": { "ender_compass_angle": 0.203125 }, "model": "findyourway:item/ender_compass_23" },
|
||||
{ "predicate": { "ender_compass_angle": 0.234375 }, "model": "findyourway:item/ender_compass_24" },
|
||||
{ "predicate": { "ender_compass_angle": 0.265625 }, "model": "findyourway:item/ender_compass_25" },
|
||||
{ "predicate": { "ender_compass_angle": 0.296875 }, "model": "findyourway:item/ender_compass_26" },
|
||||
{ "predicate": { "ender_compass_angle": 0.328125 }, "model": "findyourway:item/ender_compass_27" },
|
||||
{ "predicate": { "ender_compass_angle": 0.359375 }, "model": "findyourway:item/ender_compass_28" },
|
||||
{ "predicate": { "ender_compass_angle": 0.390625 }, "model": "findyourway:item/ender_compass_29" },
|
||||
{ "predicate": { "ender_compass_angle": 0.421875 }, "model": "findyourway:item/ender_compass_30" },
|
||||
{ "predicate": { "ender_compass_angle": 0.453125 }, "model": "findyourway:item/ender_compass_31" },
|
||||
{ "predicate": { "ender_compass_angle": 0.484375 }, "model": "findyourway:item/ender_compass_00" },
|
||||
{ "predicate": { "ender_compass_angle": 0.515625 }, "model": "findyourway:item/ender_compass_01" },
|
||||
{ "predicate": { "ender_compass_angle": 0.546875 }, "model": "findyourway:item/ender_compass_02" },
|
||||
{ "predicate": { "ender_compass_angle": 0.578125 }, "model": "findyourway:item/ender_compass_03" },
|
||||
{ "predicate": { "ender_compass_angle": 0.609375 }, "model": "findyourway:item/ender_compass_04" },
|
||||
{ "predicate": { "ender_compass_angle": 0.640625 }, "model": "findyourway:item/ender_compass_05" },
|
||||
{ "predicate": { "ender_compass_angle": 0.671875 }, "model": "findyourway:item/ender_compass_06" },
|
||||
{ "predicate": { "ender_compass_angle": 0.703125 }, "model": "findyourway:item/ender_compass_07" },
|
||||
{ "predicate": { "ender_compass_angle": 0.734375 }, "model": "findyourway:item/ender_compass_08" },
|
||||
{ "predicate": { "ender_compass_angle": 0.765625 }, "model": "findyourway:item/ender_compass_09" },
|
||||
{ "predicate": { "ender_compass_angle": 0.796875 }, "model": "findyourway:item/ender_compass_10" },
|
||||
{ "predicate": { "ender_compass_angle": 0.828125 }, "model": "findyourway:item/ender_compass_11" },
|
||||
{ "predicate": { "ender_compass_angle": 0.859375 }, "model": "findyourway:item/ender_compass_12" },
|
||||
{ "predicate": { "ender_compass_angle": 0.890625 }, "model": "findyourway:item/ender_compass_13" },
|
||||
{ "predicate": { "ender_compass_angle": 0.921875 }, "model": "findyourway:item/ender_compass_14" },
|
||||
{ "predicate": { "ender_compass_angle": 0.953125 }, "model": "findyourway:item/ender_compass_15" },
|
||||
{ "predicate": { "ender_compass_angle": 0.984375 }, "model": "findyourway:item/ender_compass" }
|
||||
]
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "findyourway:item/ender_compass_00"
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "findyourway:item/ender_compass_01"
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "findyourway:item/ender_compass_02"
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "findyourway:item/ender_compass_03"
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "findyourway:item/ender_compass_04"
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "findyourway:item/ender_compass_05"
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "findyourway:item/ender_compass_06"
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "findyourway:item/ender_compass_07"
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "findyourway:item/ender_compass_08"
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "findyourway:item/ender_compass_09"
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "findyourway:item/ender_compass_10"
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "findyourway:item/ender_compass_11"
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "findyourway:item/ender_compass_12"
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "findyourway:item/ender_compass_13"
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "findyourway:item/ender_compass_14"
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "findyourway:item/ender_compass_15"
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "findyourway:item/ender_compass_04"
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "findyourway:item/ender_compass_17"
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "findyourway:item/ender_compass_18"
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "findyourway:item/ender_compass_19"
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "findyourway:item/ender_compass_20"
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "findyourway:item/ender_compass_21"
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "findyourway:item/ender_compass_22"
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "findyourway:item/ender_compass_23"
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "findyourway:item/ender_compass_24"
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "findyourway:item/ender_compass_25"
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "findyourway:item/ender_compass_26"
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "findyourway:item/ender_compass_27"
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "findyourway:item/ender_compass_28"
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "findyourway:item/ender_compass_29"
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "findyourway:item/ender_compass_30"
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "findyourway:item/ender_compass_31"
|
||||
}
|
||||
}
|
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
"GEG",
|
||||
"EBE",
|
||||
"GEG"
|
||||
],
|
||||
"key": {
|
||||
"G": {
|
||||
"item": "minecraft:gold_ingot"
|
||||
},
|
||||
"E": {
|
||||
"item": "minecraft:ender_eye"
|
||||
},
|
||||
"B": {
|
||||
"item": "minecraft:blaze_rod"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "findyourway:ender_compass"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 192 B |
After Width: | Height: | Size: 193 B |
After Width: | Height: | Size: 187 B |
After Width: | Height: | Size: 188 B |
After Width: | Height: | Size: 190 B |
After Width: | Height: | Size: 190 B |
After Width: | Height: | Size: 188 B |
After Width: | Height: | Size: 188 B |
After Width: | Height: | Size: 188 B |
After Width: | Height: | Size: 196 B |
After Width: | Height: | Size: 191 B |
After Width: | Height: | Size: 193 B |
After Width: | Height: | Size: 190 B |
After Width: | Height: | Size: 185 B |
After Width: | Height: | Size: 185 B |
After Width: | Height: | Size: 185 B |
After Width: | Height: | Size: 185 B |
After Width: | Height: | Size: 186 B |
After Width: | Height: | Size: 190 B |
After Width: | Height: | Size: 190 B |
After Width: | Height: | Size: 191 B |
After Width: | Height: | Size: 194 B |
After Width: | Height: | Size: 183 B |
After Width: | Height: | Size: 183 B |
After Width: | Height: | Size: 183 B |
After Width: | Height: | Size: 194 B |
After Width: | Height: | Size: 193 B |
After Width: | Height: | Size: 192 B |
After Width: | Height: | Size: 191 B |
After Width: | Height: | Size: 192 B |
After Width: | Height: | Size: 193 B |
12
src/main/resources/mcmod.info
Normal file
@@ -0,0 +1,12 @@
|
||||
[{
|
||||
"modid": "endercompass",
|
||||
"name": "Ender Compass",
|
||||
"description": "Provides a compass that points to the End Portal",
|
||||
"version": "1.0.0.0-beta",
|
||||
"mcversion": "1.12.2",
|
||||
"logoFile": "assets/endercompass/textures/logo.png",
|
||||
"url": "minecraftforge.net/",
|
||||
"updateJSON": "minecraftforge.net/versions.json",
|
||||
"authorList": ["Yavin7"],
|
||||
"credits": ""
|
||||
}]
|