Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
921a997cef | ||
![]() |
d737b57983 | ||
![]() |
ca5121ae74 | ||
![]() |
11b922f7d1 |
6
.gitignore
vendored
6
.gitignore
vendored
@@ -20,3 +20,9 @@ build
|
||||
# other
|
||||
eclipse
|
||||
run
|
||||
libs
|
||||
|
||||
# Files from Forge MDK
|
||||
forge*changelog.txt
|
||||
|
||||
# Example Mod
|
159
build.gradle
159
build.gradle
@@ -1,72 +1,131 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
maven { url = 'https://files.minecraftforge.net/maven' }
|
||||
jcenter()
|
||||
maven { url = "http://files.minecraftforge.net/maven" }
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
|
||||
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
|
||||
}
|
||||
}
|
||||
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.
|
||||
apply plugin: 'net.minecraftforge.gradle'
|
||||
// Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
|
||||
apply plugin: 'eclipse'
|
||||
apply plugin: 'maven-publish'
|
||||
|
||||
version = '2.0.0-beta'
|
||||
group = 'net.yavin.findyourway' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
archivesBaseName = 'findyourway'
|
||||
|
||||
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'
|
||||
}
|
||||
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
|
||||
|
||||
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.
|
||||
// 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"
|
||||
// Simply re-run your setup task after changing the mappings to update your workspace.
|
||||
mappings channel: 'snapshot', version: '20190608-1.14.2'
|
||||
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
|
||||
|
||||
// accessTransformer = file('build/resources/main/META-INF/accesstransformer.cfg')
|
||||
|
||||
// Default run configurations.
|
||||
// These can be tweaked, removed, or duplicated as needed.
|
||||
runs {
|
||||
client {
|
||||
workingDirectory project.file('run')
|
||||
|
||||
// Recommended logging data for a userdev environment
|
||||
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
|
||||
|
||||
// Recommended logging level for the console
|
||||
property 'forge.logging.console.level', 'debug'
|
||||
|
||||
mods {
|
||||
examplemod {
|
||||
source sourceSets.main
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
workingDirectory project.file('run')
|
||||
|
||||
// Recommended logging data for a userdev environment
|
||||
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
|
||||
|
||||
// Recommended logging level for the console
|
||||
property 'forge.logging.console.level', 'debug'
|
||||
|
||||
mods {
|
||||
examplemod {
|
||||
source sourceSets.main
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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...
|
||||
// Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed
|
||||
// that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied.
|
||||
// The userdev artifact is a special name and will get all sorts of transformations applied to it.
|
||||
minecraft 'net.minecraftforge:forge:1.14.2-26.0.43'
|
||||
|
||||
// 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'
|
||||
|
||||
// These dependencies get remapped to your current MCP mappings
|
||||
// deobf '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'
|
||||
// Example for how to get properties into the manifest for reading by the runtime..
|
||||
jar {
|
||||
manifest {
|
||||
attributes([
|
||||
"Specification-Title": "findyourway",
|
||||
"Specification-Vendor": "Yavin7",
|
||||
"Specification-Version": "2.0.0-beta",
|
||||
"Implementation-Title": project.name,
|
||||
"Implementation-Version": "${version}",
|
||||
"Implementation-Vendor" :"Yavin7",
|
||||
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
// Example configuration to allow publishing using the maven-publish task
|
||||
// we define a custom artifact that is sourced from the reobfJar output task
|
||||
// and then declare that to be published
|
||||
// Note you'll need to add a repository here
|
||||
def reobfFile = file("$buildDir/reobfJar/output.jar")
|
||||
def reobfArtifact = artifacts.add('default', reobfFile) {
|
||||
type 'jar'
|
||||
builtBy 'reobfJar'
|
||||
}
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
artifact reobfArtifact
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
maven {
|
||||
url "file:///${project.projectDir}/mcmodsrepo"
|
||||
}
|
||||
}
|
||||
}
|
4
gradle.properties
Normal file
4
gradle.properties
Normal file
@@ -0,0 +1,4 @@
|
||||
# Sets default memory used for gradle commands. Can be overridden by user or command line properties.
|
||||
# This is required to provide enough memory for the Minecraft decompilation process.
|
||||
org.gradle.jvmargs=-Xmx3G
|
||||
org.gradle.daemon=false
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,6 @@
|
||||
#Mon Sep 14 12:28:28 PDT 2015
|
||||
#Fri Jun 28 08:25:56 CDT 2019
|
||||
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
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-all.zip
|
||||
|
110
gradlew
vendored
110
gradlew
vendored
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/usr/bin/env sh
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
@@ -6,47 +6,6 @@
|
||||
##
|
||||
##############################################################################
|
||||
|
||||
# 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"
|
||||
@@ -61,9 +20,49 @@ while [ -h "$PRG" ] ; do
|
||||
fi
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >&-
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >&-
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS=""
|
||||
|
||||
# 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
|
||||
nonstop=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
NONSTOP* )
|
||||
nonstop=true
|
||||
;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
@@ -90,7 +89,7 @@ location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
@@ -114,6 +113,7 @@ fi
|
||||
if $cygwin ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
@@ -154,11 +154,19 @@ if $cygwin ; then
|
||||
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=("$@")
|
||||
# Escape application args
|
||||
save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
|
||||
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
|
||||
APP_ARGS=$(save "$@")
|
||||
|
||||
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
|
||||
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
|
||||
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
|
||||
cd "$(dirname "$0")"
|
||||
fi
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
|
14
gradlew.bat
vendored
14
gradlew.bat
vendored
@@ -8,14 +8,14 @@
|
||||
@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 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=
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
@@ -46,10 +46,9 @@ echo location of your Java installation.
|
||||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windowz variants
|
||||
@rem Get command-line arguments, handling Windows 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.
|
||||
@@ -60,11 +59,6 @@ set _SKIP=2
|
||||
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
|
||||
|
8
local.properties
Normal file
8
local.properties
Normal file
@@ -0,0 +1,8 @@
|
||||
## This file must *NOT* be checked into Version Control Systems,
|
||||
# as it contains information specific to your local configuration.
|
||||
#
|
||||
# Location of the SDK. This is only used by Gradle.
|
||||
# For customization when using a Version Control System, please read the
|
||||
# header note.
|
||||
#Sat Jun 22 00:35:58 CDT 2019
|
||||
sdk.dir=C\:\\Users\\Brenten\\AppData\\Local\\Android\\Sdk
|
@@ -1,120 +0,0 @@
|
||||
package net.yseven.findyourway.Client;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItemFrame;
|
||||
import net.minecraft.entity.passive.EntityChicken;
|
||||
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.CommonProxy;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
|
||||
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;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private BlockPos blockPos;
|
||||
|
||||
@Override
|
||||
@ParametersAreNonnullByDefault
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float apply(ItemStack stack, @Nullable World worldIn, @Nullable EntityLivingBase entityIn) {
|
||||
|
||||
boolean isLiving = entityIn != null;
|
||||
Entity errorChicken = new EntityChicken(Minecraft.getMinecraft().world);
|
||||
|
||||
Entity entity;
|
||||
if(isLiving) {
|
||||
entity = entityIn;
|
||||
} else if(stack.getItemFrame() != null) {
|
||||
entity = stack.getItemFrame();
|
||||
} else {
|
||||
entity = errorChicken;
|
||||
}
|
||||
|
||||
if (worldIn == null) worldIn = entity.world;
|
||||
|
||||
double angle;
|
||||
setBlockPos(stack);
|
||||
|
||||
if(blockPos != null) {
|
||||
if (blockPos.getY() == 0) return 0.0F;
|
||||
double entityAngle;
|
||||
if(isLiving) {
|
||||
entityAngle = entity.rotationYaw;
|
||||
} else if(stack.getItemFrame() != null) {
|
||||
entityAngle = getFrameAngle((EntityItemFrame) entity);
|
||||
} else {
|
||||
return 0.0F;
|
||||
}
|
||||
|
||||
entityAngle /= 360.0D;
|
||||
entityAngle = MathHelper.positiveModulo(entityAngle, 1.0D);
|
||||
double posAngle = getAngle(blockPos, entity);
|
||||
posAngle /= Math.PI * 2D;
|
||||
angle = 0.5D - (entityAngle - 0.25D - posAngle);
|
||||
} else {
|
||||
if(!ClientProxy.hasAngleErrrored()) {
|
||||
System.out.println("Compass angle is random due to an unexpected error");
|
||||
ClientProxy.AngleHasErrored();
|
||||
}
|
||||
angle = 0.0D;
|
||||
}
|
||||
|
||||
if(isLiving) {
|
||||
angle = wobble(worldIn, angle);
|
||||
}
|
||||
|
||||
|
||||
return MathHelper.positiveModulo((float) angle, 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 void setBlockPos(ItemStack stack) {
|
||||
for (int i = 0; i < CommonProxy.compassList.size(); i++) {
|
||||
if (stack.getItem().getUnlocalizedName().equals(CommonProxy.compassList.get(i).getUnlocalizedName())) {
|
||||
blockPos = CommonProxy.compassList.get(i).getStructurePos();
|
||||
} else {
|
||||
if (!ClientProxy.hasAngleErrrored()) {
|
||||
System.out.println("unable to get blockPos from compassList in AngleGetter class");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private double getAngle(BlockPos pos, Entity ent) {
|
||||
return MathHelper.atan2(pos.getZ() - ent.posZ, pos.getX() - ent.posX);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private double getFrameAngle(EntityItemFrame entity) {
|
||||
return (double) MathHelper.wrapDegrees(180 + (entity.facingDirection.getHorizontalIndex() * 90));
|
||||
}
|
||||
}
|
@@ -1,93 +0,0 @@
|
||||
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.util.ResourceLocation;
|
||||
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.MessageHandlerOnClient;
|
||||
import net.yseven.findyourway.Network.MessageToClient;
|
||||
import net.yseven.findyourway.Network.MessageToServer;
|
||||
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;
|
||||
}
|
||||
private static boolean angleError = false;
|
||||
|
||||
public static boolean hasAngleErrrored() {
|
||||
return angleError;
|
||||
}
|
||||
|
||||
public static void AngleHasErrored() {
|
||||
angleError = true;
|
||||
}
|
||||
|
||||
public static boolean hasCompass(ItemCompassBase compass) {
|
||||
return getPlayer() != null && CommonProxy.containsCompass(getPlayer().inventory, compass);
|
||||
}
|
||||
|
||||
public static void resetStructurePos(ItemCompassBase compass) {
|
||||
compass.setStructurePos(null);
|
||||
compass.setStructureWorld(getWorld());
|
||||
CommonProxy.simpleNetworkWrapper.sendToServer(new MessageToServer(compass));
|
||||
}
|
||||
|
||||
//Proxy Info
|
||||
@Override
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
super.preInit(event);
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
CommonProxy.simpleNetworkWrapper.registerMessage(MessageHandlerOnClient.class, MessageToClient.class, CommonProxy.MESSAGE_TO_CLIENT_ID, Side.CLIENT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(FMLInitializationEvent event) {
|
||||
super.init(event);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postInit(FMLPostInitializationEvent event) {
|
||||
super.postInit(event);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public static void registerModels(ModelRegistryEvent event) {
|
||||
ModItems.registerModels();
|
||||
}
|
||||
|
||||
@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));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,63 +0,0 @@
|
||||
package net.yseven.findyourway;
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.event.RegistryEvent;
|
||||
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.network.NetworkRegistry;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.yseven.findyourway.Network.MessageHandlerOnServer;
|
||||
import net.yseven.findyourway.Network.MessageHandlerOnServerDummy;
|
||||
import net.yseven.findyourway.Network.MessageToClient;
|
||||
import net.yseven.findyourway.Network.MessageToServer;
|
||||
import net.yseven.findyourway.item.ItemCompassBase;
|
||||
import net.yseven.findyourway.item.ModItems;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@Mod.EventBusSubscriber
|
||||
public class CommonProxy {
|
||||
|
||||
public static ArrayList<ItemCompassBase> compassList = new ArrayList<ItemCompassBase>();
|
||||
public static SimpleNetworkWrapper simpleNetworkWrapper;
|
||||
|
||||
public static final byte MESSAGE_TO_SERVER_ID = 71;
|
||||
public static final byte MESSAGE_TO_CLIENT_ID = 72;
|
||||
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
ModItems.init();
|
||||
|
||||
simpleNetworkWrapper = NetworkRegistry.INSTANCE.newSimpleChannel(FindYourWay.modId);
|
||||
simpleNetworkWrapper.registerMessage(MessageHandlerOnServer.class, MessageToServer.class, MESSAGE_TO_SERVER_ID, Side.SERVER);
|
||||
simpleNetworkWrapper.registerMessage(MessageHandlerOnServerDummy.class, MessageToClient.class, MESSAGE_TO_CLIENT_ID, Side.SERVER);
|
||||
}
|
||||
|
||||
public void init(FMLInitializationEvent event) {
|
||||
|
||||
}
|
||||
|
||||
public void postInit(FMLPostInitializationEvent event) {
|
||||
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public static void registerItems(RegistryEvent.Register<Item> event) {
|
||||
ModItems.registerItems(event);
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
37
src/main/java/net/yseven/findyourway/Config.java
Normal file
37
src/main/java/net/yseven/findyourway/Config.java
Normal file
@@ -0,0 +1,37 @@
|
||||
package net.yseven.findyourway;
|
||||
|
||||
public class Config {
|
||||
/*
|
||||
private static final String CATEGORY_GENERAL = "ggeneral";
|
||||
|
||||
public static boolean useEnderCompass = true;
|
||||
public static boolean useFortressCompass = true;
|
||||
public static boolean useMansionCompass = true;
|
||||
public static boolean useMonumentCompass = true;
|
||||
public static boolean useVillageCompass = true;
|
||||
|
||||
public static void readConfig() {
|
||||
Configuration cfg = ServerProxy.config;
|
||||
try {
|
||||
cfg.load();
|
||||
initGeneralConfig(cfg);
|
||||
} catch (Exception e) {
|
||||
System.out.println("Could not load config for Find Your Way");
|
||||
} finally {
|
||||
if (cfg.hasChanged()) {
|
||||
cfg.save();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void initGeneralConfig(Configuration cfg) {
|
||||
cfg.addCustomCategoryComment(CATEGORY_GENERAL, "General configuration");
|
||||
useEnderCompass = cfg.getBoolean("enderCompass", CATEGORY_GENERAL, useEnderCompass, "Leave as true to enable Ender Compass");
|
||||
useFortressCompass = cfg.getBoolean("fortressCompass", CATEGORY_GENERAL, useEnderCompass, "Leave as true to enable Fortress Compass");
|
||||
useMansionCompass = cfg.getBoolean("mansionCompass", CATEGORY_GENERAL, useEnderCompass, "Leave as true to enable Mansion Compass");
|
||||
useMonumentCompass = cfg.getBoolean("monumentCompass", CATEGORY_GENERAL, useEnderCompass, "Leave as true to enable Monument Compass");
|
||||
useVillageCompass = cfg.getBoolean("villageCompass", CATEGORY_GENERAL, useEnderCompass, "Leave as true to enable Village Compass");
|
||||
}
|
||||
|
||||
*/
|
||||
}
|
@@ -1,37 +1,72 @@
|
||||
package net.yseven.findyourway;
|
||||
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemGroup;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.RegistryEvent;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.fml.DistExecutor;
|
||||
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.network.simpleimpl.SimpleNetworkWrapper;
|
||||
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
|
||||
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
|
||||
import net.minecraftforge.fml.network.simple.SimpleChannel;
|
||||
import net.yseven.findyourway.item.ItemCompassBase;
|
||||
import net.yseven.findyourway.item.ModItems;
|
||||
import net.yseven.findyourway.network.PacketHandler;
|
||||
import net.yseven.findyourway.setup.ClientProxy;
|
||||
import net.yseven.findyourway.setup.IProxy;
|
||||
import net.yseven.findyourway.setup.ServerProxy;
|
||||
import org.apache.logging.log4j.Level;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
@Mod(modid = FindYourWay.modId, name = FindYourWay.name, version = FindYourWay.version)
|
||||
import java.util.ArrayList;
|
||||
|
||||
@Mod("findyourway")
|
||||
@Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD)
|
||||
public class FindYourWay {
|
||||
public static final String modId = "findyourway";
|
||||
public static final String name = "Find Your Way";
|
||||
public static final String version = "1.1.0";
|
||||
public static final String MOD_NAME = "Find Your Way";
|
||||
public static final String MODID = "findyourway";
|
||||
public static final String VERSION = "2.0.0-beta";
|
||||
|
||||
@Mod.Instance(modId)
|
||||
public static FindYourWay instance;
|
||||
public static IProxy proxy = DistExecutor.runForDist(() -> () -> new ClientProxy(), () -> () -> new ServerProxy());
|
||||
|
||||
@SidedProxy(serverSide = "net.yseven.findyourway.CommonProxy", clientSide = "net.yseven.findyourway.Client.ClientProxy")
|
||||
public static CommonProxy proxy;
|
||||
public static final Logger LOGGER = LogManager.getLogger();
|
||||
|
||||
@Mod.EventHandler
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
proxy.preInit(event);
|
||||
public static ItemGroup creativeTab = new ItemGroup("FindYourWay") {
|
||||
@Override
|
||||
public ItemStack createIcon() {
|
||||
return new ItemStack(ModItems.ENDER_COMPASS);
|
||||
}
|
||||
};
|
||||
|
||||
public static ArrayList<ItemCompassBase> compassList = new ArrayList<ItemCompassBase>();
|
||||
|
||||
public static SimpleChannel networkHandler;
|
||||
|
||||
public FindYourWay() {
|
||||
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup);
|
||||
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
}
|
||||
|
||||
@Mod.EventHandler
|
||||
public void init(FMLInitializationEvent event) {
|
||||
private void setup(final FMLCommonSetupEvent event) {
|
||||
PacketHandler.registerMessages(FindYourWay.MODID);
|
||||
proxy.init(event);
|
||||
}
|
||||
|
||||
@Mod.EventHandler
|
||||
public void postInit(FMLPostInitializationEvent event) {
|
||||
proxy.postInit(event);
|
||||
@SubscribeEvent
|
||||
public static void onItemsRegistry(final RegistryEvent.Register<Item> event) {
|
||||
ModItems.init();
|
||||
|
||||
LOGGER.log(Level.INFO, "Registering items");
|
||||
|
||||
event.getRegistry().register(ModItems.ENDER_COMPASS);
|
||||
event.getRegistry().register(ModItems.FORTRESS_COMPASS);
|
||||
event.getRegistry().register(ModItems.MANSION_COMPASS);
|
||||
event.getRegistry().register(ModItems.MONUMENT_COMPASS);
|
||||
event.getRegistry().register(ModItems.VILLAGE_COMPASS);
|
||||
}
|
||||
}
|
||||
|
@@ -1,31 +0,0 @@
|
||||
package net.yseven.findyourway.Network;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
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.minecraftforge.fml.relauncher.Side;
|
||||
import net.yseven.findyourway.item.ItemCompassBase;
|
||||
|
||||
public class MessageHandlerOnClient implements IMessageHandler<MessageToClient, IMessage> {
|
||||
|
||||
public IMessage onMessage(final MessageToClient message, MessageContext ctx) {
|
||||
if (ctx.side != Side.CLIENT) {
|
||||
System.err.println("MessageToClient received on wrong side: " + ctx.side);
|
||||
return null;
|
||||
}
|
||||
if(!message.isMessageIsValid()) {
|
||||
System.err.println("MessageToClient is not valid: " + message.toString());
|
||||
return null;
|
||||
}
|
||||
|
||||
Minecraft minecraft = Minecraft.getMinecraft();
|
||||
minecraft.addScheduledTask(() -> processMessage(message.getCompass(), message.getStructurePos()));
|
||||
return null;
|
||||
}
|
||||
|
||||
private void processMessage(ItemCompassBase compass, BlockPos pos) {
|
||||
compass.setStructurePos(pos);
|
||||
}
|
||||
}
|
@@ -1,49 +0,0 @@
|
||||
package net.yseven.findyourway.Network;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.WorldServer;
|
||||
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.minecraftforge.fml.relauncher.Side;
|
||||
import net.yseven.findyourway.CommonProxy;
|
||||
|
||||
public class MessageHandlerOnServer implements IMessageHandler<MessageToServer, IMessage> {
|
||||
public IMessage onMessage(final MessageToServer message, MessageContext ctx) {
|
||||
if(ctx.side != Side.SERVER) {
|
||||
System.err.println("MessageToServer received on wrong side: " + ctx.side);
|
||||
return null;
|
||||
}
|
||||
if(!message.isMessageIsValid()) {
|
||||
System.err.println("MessageToServer is not valid: " + message.toString());
|
||||
}
|
||||
|
||||
final EntityPlayerMP sendingPlayer = ctx.getServerHandler().player;
|
||||
if(sendingPlayer == null) {
|
||||
System.err.println("EntityPlayerMP was null MessageToServer was received!");
|
||||
return null;
|
||||
}
|
||||
final WorldServer playerWorldServer = sendingPlayer.getServerWorld();
|
||||
playerWorldServer.addScheduledTask(() -> processMessage(message, sendingPlayer));
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private void processMessage(MessageToServer message, EntityPlayerMP sendingPlayer) {
|
||||
int dimension = sendingPlayer.dimension;
|
||||
WorldServer world = (WorldServer)sendingPlayer.world;
|
||||
BlockPos structurePos;
|
||||
|
||||
if(world.getChunkProvider().getNearestStructurePos(world, message.getStructureType(), sendingPlayer.getPosition(), true) != null) {
|
||||
structurePos = world.getChunkProvider().getNearestStructurePos(world, message.getStructureType(), sendingPlayer.getPosition(), true);
|
||||
} else {
|
||||
structurePos = new BlockPos(0, 0, 0);
|
||||
}
|
||||
|
||||
MessageToClient msg = new MessageToClient(structurePos, message.getCompass());
|
||||
if (dimension == sendingPlayer.dimension) {
|
||||
CommonProxy.simpleNetworkWrapper.sendTo(msg, sendingPlayer);
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,12 +0,0 @@
|
||||
package net.yseven.findyourway.Network;
|
||||
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;
|
||||
|
||||
public class MessageHandlerOnServerDummy implements IMessageHandler<MessageToClient, IMessage> {
|
||||
public IMessage onMessage(final MessageToClient message, MessageContext ctx) {
|
||||
System.err.println("TargetEffectMessageToClient received on wrong side:" + ctx.side);
|
||||
return null;
|
||||
}
|
||||
}
|
@@ -1,63 +0,0 @@
|
||||
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.yseven.findyourway.item.ItemCompassBase;
|
||||
|
||||
public class MessageToClient implements IMessage {
|
||||
private ItemCompassBase compass;
|
||||
private BlockPos structurePos;
|
||||
private boolean messageIsValid;
|
||||
|
||||
public boolean isMessageIsValid() {
|
||||
return messageIsValid;
|
||||
}
|
||||
|
||||
public ItemCompassBase getCompass() {
|
||||
return compass;
|
||||
}
|
||||
|
||||
public BlockPos getStructurePos() {
|
||||
return structurePos;
|
||||
}
|
||||
|
||||
public MessageToClient() {
|
||||
messageIsValid = false;
|
||||
}
|
||||
|
||||
public MessageToClient(BlockPos pos, ItemCompassBase compassBase) {
|
||||
structurePos = pos;
|
||||
compass = compassBase;
|
||||
messageIsValid = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fromBytes(ByteBuf buf) {
|
||||
try {
|
||||
double x = buf.readDouble();
|
||||
double y = buf.readDouble();
|
||||
double z = buf.readDouble();
|
||||
structurePos = new BlockPos(x, y, z);
|
||||
compass = ItemCompassBase.fromBytes(buf);
|
||||
} catch (IndexOutOfBoundsException ioe) {
|
||||
System.err.println("Error while reading MessageToClient: " + ioe);
|
||||
return;
|
||||
}
|
||||
messageIsValid = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toBytes(ByteBuf buf) {
|
||||
if(!isMessageIsValid()) return;
|
||||
buf.writeDouble(structurePos.getX());
|
||||
buf.writeDouble(structurePos.getY());
|
||||
buf.writeDouble(structurePos.getZ());
|
||||
compass.toBytes(buf);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Structure Position is: " + structurePos.toString() + "!";
|
||||
}
|
||||
}
|
@@ -1,55 +0,0 @@
|
||||
package net.yseven.findyourway.Network;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
|
||||
import net.yseven.findyourway.item.ItemCompassBase;
|
||||
|
||||
public class MessageToServer implements IMessage {
|
||||
private ItemCompassBase compass;
|
||||
private String structureType;
|
||||
private boolean messageIsValid;
|
||||
|
||||
public MessageToServer(ItemCompassBase compassItem) {
|
||||
compass = compassItem;
|
||||
messageIsValid = true;
|
||||
}
|
||||
|
||||
public String getStructureType() {
|
||||
return structureType;
|
||||
}
|
||||
|
||||
public ItemCompassBase getCompass() {
|
||||
return compass;
|
||||
}
|
||||
|
||||
public boolean isMessageIsValid() {
|
||||
return messageIsValid;
|
||||
}
|
||||
|
||||
public MessageToServer() {
|
||||
messageIsValid = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fromBytes(ByteBuf buf) {
|
||||
try {
|
||||
compass = ItemCompassBase.fromBytes(buf);
|
||||
} catch (IndexOutOfBoundsException ioe) {
|
||||
System.err.println("Exception while reading MessageToServer: " + ioe);
|
||||
return;
|
||||
}
|
||||
structureType = compass.getStructureType();
|
||||
messageIsValid = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toBytes(ByteBuf buf){
|
||||
if(!isMessageIsValid()) return;
|
||||
compass.toBytes(buf);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MessageToServer[compass=" + String.valueOf(compass) + ", structurePos=]";
|
||||
}
|
||||
}
|
@@ -0,0 +1,42 @@
|
||||
package net.yseven.findyourway.network;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.ServerWorld;
|
||||
import net.minecraftforge.common.DimensionManager;
|
||||
import net.minecraftforge.fml.network.NetworkDirection;
|
||||
import net.minecraftforge.fml.network.NetworkEvent;
|
||||
import net.yseven.findyourway.item.ItemCompassBase;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public class PacketGetCompassBlockPos {
|
||||
private ItemCompassBase compass;
|
||||
|
||||
public PacketGetCompassBlockPos() {
|
||||
|
||||
}
|
||||
|
||||
public PacketGetCompassBlockPos(ByteBuf buf) {
|
||||
compass = ItemCompassBase.getCompassFromId(buf.readInt());
|
||||
}
|
||||
|
||||
public void toBytes(ByteBuf buf) {
|
||||
buf.writeInt(compass.getItemCompassID());
|
||||
}
|
||||
|
||||
public PacketGetCompassBlockPos(ItemCompassBase compass) {
|
||||
this.compass = compass;
|
||||
}
|
||||
|
||||
public void handle(Supplier<NetworkEvent.Context> ctx) {
|
||||
ctx.get().enqueueWork(() -> {
|
||||
ServerWorld world = DimensionManager.getWorld(ctx.get().getSender().server, compass.getStructureDimension(), true, false);
|
||||
if(world.getDimension().getType() == compass.getStructureDimension()) {
|
||||
BlockPos structurePos = world.getWorld().getChunkProvider().getChunkGenerator().findNearestStructure(world, compass.getStructureType(), ctx.get().getSender().getPosition(), 10000, true);
|
||||
PacketHandler.INSTANCE.sendTo(new PacketReturnCompassBlockPos(structurePos, compass), ctx.get().getSender().connection.getNetworkManager(), NetworkDirection.PLAY_TO_CLIENT);
|
||||
}
|
||||
});
|
||||
ctx.get().setPacketHandled(true);
|
||||
}
|
||||
}
|
@@ -0,0 +1,31 @@
|
||||
package net.yseven.findyourway.network;
|
||||
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fml.network.NetworkRegistry;
|
||||
import net.minecraftforge.fml.network.simple.SimpleChannel;
|
||||
import net.yseven.findyourway.FindYourWay;
|
||||
|
||||
public class PacketHandler {
|
||||
public static SimpleChannel INSTANCE;
|
||||
private static int ID = 0;
|
||||
|
||||
public static int nextPacketId() {
|
||||
return ID++;
|
||||
}
|
||||
|
||||
public static void registerMessages(String channelName) {
|
||||
INSTANCE = NetworkRegistry.newSimpleChannel(new ResourceLocation(FindYourWay.MODID, channelName), () -> "1.0", s -> true, s -> true);
|
||||
|
||||
//Server Side
|
||||
INSTANCE.registerMessage(nextPacketId(), PacketReturnCompassBlockPos.class,
|
||||
PacketReturnCompassBlockPos::toBytes,
|
||||
PacketReturnCompassBlockPos::new,
|
||||
PacketReturnCompassBlockPos::handle);
|
||||
|
||||
//Client Side
|
||||
INSTANCE.registerMessage(nextPacketId(), PacketGetCompassBlockPos.class,
|
||||
PacketGetCompassBlockPos::toBytes,
|
||||
PacketGetCompassBlockPos::new,
|
||||
PacketGetCompassBlockPos::handle);
|
||||
}
|
||||
}
|
@@ -0,0 +1,40 @@
|
||||
package net.yseven.findyourway.network;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraftforge.fml.network.NetworkEvent;
|
||||
import net.yseven.findyourway.FindYourWay;
|
||||
import net.yseven.findyourway.item.ItemCompassBase;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public class PacketReturnCompassBlockPos {
|
||||
private BlockPos pos;
|
||||
private ItemCompassBase compass;
|
||||
|
||||
public PacketReturnCompassBlockPos() {
|
||||
|
||||
}
|
||||
|
||||
public PacketReturnCompassBlockPos(BlockPos pos, ItemCompassBase compass) {
|
||||
this.pos = pos;
|
||||
this.compass = compass;
|
||||
}
|
||||
|
||||
public PacketReturnCompassBlockPos(ByteBuf buf) {
|
||||
pos = BlockPos.fromLong(buf.readLong());
|
||||
compass = ItemCompassBase.getCompassFromId(buf.readInt());
|
||||
}
|
||||
|
||||
public void toBytes(ByteBuf buf) {
|
||||
buf.writeLong(pos.toLong());
|
||||
buf.writeInt(compass.getItemCompassID());
|
||||
}
|
||||
|
||||
public void handle(Supplier<NetworkEvent.Context> ctx) {
|
||||
ctx.get().enqueueWork(() -> {
|
||||
compass.setStructurePos(pos);
|
||||
});
|
||||
ctx.get().setPacketHandled(true);
|
||||
}
|
||||
}
|
@@ -1,105 +1,4 @@
|
||||
package net.yseven.findyourway.item;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
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.ResourceLocation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.ModelRegistryEvent;
|
||||
import net.minecraftforge.client.model.ModelLoader;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.yseven.findyourway.Client.AngleGetter;
|
||||
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 String structureType;
|
||||
private BlockPos structurePos;
|
||||
private World structureWorld;
|
||||
private final int ItemCompassID;
|
||||
|
||||
public ItemCompassBase(String name, String structureName) {
|
||||
setUnlocalizedName(FindYourWay.modId + "." + name);
|
||||
setRegistryName(name);
|
||||
structureType = structureName;
|
||||
setCreativeTab(CreativeTabs.TOOLS);
|
||||
setMaxStackSize(1);
|
||||
CommonProxy.compassList.add(this);
|
||||
ItemCompassID = CommonProxy.compassList.indexOf(this);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return getUnlocalizedName();
|
||||
}
|
||||
|
||||
//getters
|
||||
|
||||
public String getStructureType() {
|
||||
return structureType;
|
||||
}
|
||||
public BlockPos getStructurePos() {
|
||||
return structurePos;
|
||||
}
|
||||
public World getStructureWorld() {
|
||||
return structureWorld;
|
||||
}
|
||||
public int getCompassID() {
|
||||
return ItemCompassID;
|
||||
}
|
||||
|
||||
//setters
|
||||
|
||||
public void setStructureType(String type) {
|
||||
structureType= type;
|
||||
}
|
||||
public void setStructurePos(BlockPos pos) {
|
||||
structurePos = pos;
|
||||
}
|
||||
public void setStructureWorld(World world) {
|
||||
structureWorld = world;
|
||||
}
|
||||
|
||||
//netcode implementation
|
||||
|
||||
public void toBytes(ByteBuf buf) {
|
||||
if(CommonProxy.compassList.contains(this)) {
|
||||
buf.writeInt(ItemCompassID);
|
||||
}
|
||||
}
|
||||
|
||||
public static ItemCompassBase fromBytes(ByteBuf buf) {
|
||||
int ID = buf.readInt();
|
||||
for(int i = 0; i <= CommonProxy.compassList.size(); i++) {
|
||||
if(ID == CommonProxy.compassList.get(i).getCompassID()) return CommonProxy.compassList.get(i);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
//Client Code (mostly registration)
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SubscribeEvent
|
||||
public void registerItemModel() {
|
||||
this.addPropertyOverride(new ResourceLocation("angle"), new AngleGetter());
|
||||
ModelLoader.setCustomModelResourceLocation(this, 0, new ModelResourceLocation(FindYourWay.modId + ":" + this.getUnlocalizedName(), "inventory"));
|
||||
}
|
||||
|
||||
@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));
|
||||
}
|
||||
public class ItemCompassBase {
|
||||
}
|
||||
|
@@ -1,43 +1,49 @@
|
||||
package net.yseven.findyourway.item;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.world.dimension.DimensionType;
|
||||
import net.minecraftforge.event.RegistryEvent;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraftforge.registries.ObjectHolder;
|
||||
import net.yseven.findyourway.FindYourWay;
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import static net.yseven.findyourway.FindYourWay.modId;
|
||||
import java.io.Console;
|
||||
|
||||
public class ModItems {
|
||||
@ObjectHolder("findyourway:ender_compass")
|
||||
public static ItemCompassBase ENDER_COMPASS;
|
||||
public static ItemCompassBase VILLAGE_COMPASS;
|
||||
@ObjectHolder("findyourway:fortress_compass")
|
||||
public static ItemCompassBase FORTRESS_COMPASS;
|
||||
@ObjectHolder("findyourway:monument_compass")
|
||||
public static ItemCompassBase MONUMENT_COMPASS;
|
||||
@ObjectHolder("findyourway:mansion_compass")
|
||||
public static ItemCompassBase MANSION_COMPASS;
|
||||
@ObjectHolder("findyourway:village_compass")
|
||||
public static ItemCompassBase VILLAGE_COMPASS;
|
||||
|
||||
public static void init(){
|
||||
ENDER_COMPASS = new ItemCompassBase("ender_compass", "Stronghold");
|
||||
VILLAGE_COMPASS = new ItemCompassBase("village_compass", "Village");
|
||||
FORTRESS_COMPASS = new ItemCompassBase("fortress_compass", "Fortress");
|
||||
MONUMENT_COMPASS = new ItemCompassBase("monument_compass", "Monument");
|
||||
MANSION_COMPASS = new ItemCompassBase("mansion_compass", "Mansion");
|
||||
}
|
||||
/*
|
||||
if(Config.useEnderCompass) {
|
||||
ENDER_COMPASS = new ItemCompassBase("ender_compass", "Stronghold", DimensionType.OVERWORLD);
|
||||
}
|
||||
if(Config.useFortressCompass) {
|
||||
FORTRESS_COMPASS = new ItemCompassBase("fortress_compass", "Fortress", DimensionType.NETHER);
|
||||
}
|
||||
if(Config.useMansionCompass) {
|
||||
MANSION_COMPASS = new ItemCompassBase("mansion_compass", "Mansion", DimensionType.OVERWORLD);
|
||||
}
|
||||
if(Config.useMonumentCompass) {
|
||||
MONUMENT_COMPASS = new ItemCompassBase("monument_compass", "Monument", DimensionType.OVERWORLD);
|
||||
}
|
||||
if(Config.useVillageCompass) {
|
||||
VILLAGE_COMPASS = new ItemCompassBase("village_compass", "Village", DimensionType.OVERWORLD);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static void registerModels() {
|
||||
ENDER_COMPASS.registerItemModel();
|
||||
VILLAGE_COMPASS.registerItemModel();
|
||||
FORTRESS_COMPASS.registerItemModel();
|
||||
MONUMENT_COMPASS.registerItemModel();
|
||||
MANSION_COMPASS.registerItemModel();
|
||||
}
|
||||
|
||||
public static void registerItems(RegistryEvent.Register<Item> event) {
|
||||
event.getRegistry().register(ENDER_COMPASS);
|
||||
event.getRegistry().register(VILLAGE_COMPASS);
|
||||
event.getRegistry().register(FORTRESS_COMPASS);
|
||||
event.getRegistry().register(MONUMENT_COMPASS);
|
||||
event.getRegistry().register(MANSION_COMPASS);
|
||||
*/
|
||||
ENDER_COMPASS = new ItemCompassBase("ender_compass", "Stronghold", DimensionType.OVERWORLD);
|
||||
FORTRESS_COMPASS = new ItemCompassBase("fortress_compass", "Fortress", DimensionType.NETHER);
|
||||
MANSION_COMPASS = new ItemCompassBase("mansion_compass", "Mansion", DimensionType.OVERWORLD);
|
||||
MONUMENT_COMPASS = new ItemCompassBase("monument_compass", "Monument", DimensionType.OVERWORLD);
|
||||
VILLAGE_COMPASS = new ItemCompassBase("village_compass", "Village", DimensionType.OVERWORLD);
|
||||
}
|
||||
}
|
23
src/main/java/net/yseven/findyourway/setup/ClientProxy.java
Normal file
23
src/main/java/net/yseven/findyourway/setup/ClientProxy.java
Normal file
@@ -0,0 +1,23 @@
|
||||
package net.yseven.findyourway.setup;
|
||||
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
|
||||
|
||||
public class ClientProxy implements IProxy {
|
||||
@Override
|
||||
public void init(FMLCommonSetupEvent event) {
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
}
|
||||
/*
|
||||
@SubscribeEvent
|
||||
public void onClientTick(TickEvent.ClientTickEvent event) {
|
||||
for(int i = 0; i < ServerProxy.compassList.size(); i++) {
|
||||
if(hasCompass(ServerProxy.compassList.get(i))) {
|
||||
if(getWorld() != ServerProxy.compassList.get(i).getStructureWorld()) {
|
||||
resetStructurePos(ServerProxy.compassList.get(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
7
src/main/java/net/yseven/findyourway/setup/IProxy.java
Normal file
7
src/main/java/net/yseven/findyourway/setup/IProxy.java
Normal file
@@ -0,0 +1,7 @@
|
||||
package net.yseven.findyourway.setup;
|
||||
|
||||
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
|
||||
|
||||
public interface IProxy {
|
||||
void init(FMLCommonSetupEvent event);
|
||||
}
|
13
src/main/java/net/yseven/findyourway/setup/ServerProxy.java
Normal file
13
src/main/java/net/yseven/findyourway/setup/ServerProxy.java
Normal file
@@ -0,0 +1,13 @@
|
||||
package net.yseven.findyourway.setup;
|
||||
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
|
||||
|
||||
@Mod.EventBusSubscriber
|
||||
public class ServerProxy implements IProxy {
|
||||
|
||||
@Override
|
||||
public void init(FMLCommonSetupEvent event) {
|
||||
|
||||
}
|
||||
}
|
56
src/main/resources/META-INF/mods.toml
Normal file
56
src/main/resources/META-INF/mods.toml
Normal file
@@ -0,0 +1,56 @@
|
||||
# This is an example mods.toml file. It contains the data relating to the loading mods.
|
||||
# There are several mandatory fields (#mandatory), and many more that are optional (#optional).
|
||||
# The overall format is standard TOML format, v0.5.0.
|
||||
# Note that there are a couple of TOML lists in this file.
|
||||
# Find more information on toml format here: https://github.com/toml-lang/toml
|
||||
# The name of the mod loader type to load - for regular FML @Mod mods it should be javafml
|
||||
modLoader="javafml" #mandatory
|
||||
# A version range to match for said mod loader - for regular FML @Mod it will be the forge version
|
||||
loaderVersion="[26,)" #mandatory (26 is current forge version)
|
||||
# A URL to refer people to when problems occur with this mod
|
||||
#issueTrackerURL="http://my.issue.tracker/" #optional
|
||||
# A list of mods - how many allowed here is determined by the individual mod loader
|
||||
[[mods]] #mandatory
|
||||
# The modid of the mod
|
||||
modId="findyourway" #mandatory
|
||||
# The version number of the mod - there's a few well known ${} variables useable here or just hardcode it
|
||||
version="2.0.0-beta" #mandatory
|
||||
# A display name for the mod
|
||||
displayName="Find Your Way" #mandatory
|
||||
# A URL to query for updates for this mod. See the JSON update specification <here>
|
||||
#updateJSONURL="http://myurl.me/" #optional
|
||||
# A URL for the "homepage" for this mod, displayed in the mod UI
|
||||
displayURL="https://www.curseforge.com/minecraft/mc-mods/find-your-way" #optional
|
||||
# A file name (in the root of the mod JAR) containing a logo for display
|
||||
logoFile="logo.png" #optional
|
||||
# A text field displayed in the mod UI
|
||||
credits="Thank you Nightmali for your love and support" #optional
|
||||
# A text field displayed in the mod UI
|
||||
authors="Yavin7" #optional
|
||||
# The description text for the mod (multi line!) (#mandatory)
|
||||
description='''
|
||||
Find Your Way provides several compasses to structures generated by Minecraft.
|
||||
|
||||
Current compasses include:
|
||||
- Ender Compass
|
||||
- Fortress Compass
|
||||
- Mansion Compass
|
||||
- Monument Compass
|
||||
- Village Compass
|
||||
|
||||
The compasses automatically point to the nearest structure for the world you are in, and always point forwards if the structure does not exist in your world. You can right-click to re-scan for new structures, such as new Villages.
|
||||
|
||||
The Stronghold Compass points to the same location as Ender Eyes, so you still need to explore the actual stronghold to find the End Portal.
|
||||
'''
|
||||
# A dependency - use the . to indicate dependency for a specific modid. Dependencies are optional.
|
||||
[[dependencies.findyourway]] #optional
|
||||
# the modid of the dependency
|
||||
modId="forge" #mandatory
|
||||
# Does this dependency have to exist - if not, ordering below must be specified
|
||||
mandatory=true #mandatory
|
||||
# The version range of the dependency
|
||||
versionRange="[26,)" #mandatory
|
||||
# An ordering relationship for the dependency - BEFORE or AFTER required if the relationship is not mandatory
|
||||
ordering="NONE"
|
||||
# Side this dependency is applied on - BOTH, CLIENT or SERVER
|
||||
side="BOTH"
|
10
src/main/resources/assets/findyourway/lang/en_US.json
Normal file
10
src/main/resources/assets/findyourway/lang/en_US.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"key.categories.findyourway": "Find Your Way",
|
||||
"item.findyourway.ender_compass": "Ender Compass",
|
||||
"item.findyourway.village_compass": "Village Compass",
|
||||
"item.findyourway.fortress_compass": "Fortress Compass",
|
||||
"item.findyourway.monument_compass": "Monument Compass",
|
||||
"item.findyourway.mansion_compass": "Mansion Compass",
|
||||
|
||||
"itemGroup.FindYourWay": "Find Your Way"
|
||||
}
|
@@ -1,6 +0,0 @@
|
||||
# Items
|
||||
item.findyourway.ender_compass.name=Ender Compass
|
||||
item.findyourway.village_compass.name=Village Compass
|
||||
item.findyourway.fortress_compass.name=Fortress Compass
|
||||
item.findyourway.monument_compass.name=Monument Compass
|
||||
item.findyourway.mansion_compass.name=Mansion Compass
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/ender_compass_16"
|
||||
},
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/fortress_compass_16"
|
||||
},
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/ender_compass_00"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/ender_compass_01"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/ender_compass_02"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/ender_compass_03"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/ender_compass_04"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/ender_compass_05"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/ender_compass_06"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/ender_compass_07"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/ender_compass_08"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/ender_compass_09"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/ender_compass_10"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/ender_compass_11"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/ender_compass_12"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/ender_compass_13"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/ender_compass_14"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/ender_compass_15"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/ender_compass_16"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/ender_compass_17"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/ender_compass_18"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/ender_compass_19"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/ender_compass_20"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/ender_compass_21"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/ender_compass_22"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/ender_compass_23"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/ender_compass_24"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/ender_compass_25"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/ender_compass_26"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/ender_compass_27"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/ender_compass_28"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/ender_compass_29"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/ender_compass_30"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/ender_compass_31"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/fortress_compass_00"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/fortress_compass_01"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/fortress_compass_02"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/fortress_compass_03"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/fortress_compass_04"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/fortress_compass_05"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/fortress_compass_06"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/fortress_compass_07"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/fortress_compass_08"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/fortress_compass_09"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/fortress_compass_10"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/fortress_compass_11"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/fortress_compass_12"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/fortress_compass_13"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/fortress_compass_14"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/fortress_compass_15"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/fortress_compass_16"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/fortress_compass_17"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/fortress_compass_18"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/fortress_compass_19"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/fortress_compass_20"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/fortress_compass_21"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/fortress_compass_22"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/fortress_compass_23"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/fortress_compass_24"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/fortress_compass_25"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/fortress_compass_26"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/fortress_compass_27"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/fortress_compass_28"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/fortress_compass_29"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/fortress_compass_30"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/fortress_compass_31"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/mansion_compass_00"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/mansion_compass_01"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/mansion_compass_02"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/mansion_compass_03"
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"parent": "item/handheld",
|
||||
"textures": {
|
||||
"layer0": "findyourway:items/mansion_compass_04"
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user