Update version to 1.0.1.1
This commit is contained in:
parent
51043006b5
commit
4d25c900bb
6 changed files with 73 additions and 3 deletions
|
@ -4,5 +4,5 @@ org.gradle.jvmargs=-Xmx3G
|
||||||
org.gradle.daemon=false
|
org.gradle.daemon=false
|
||||||
|
|
||||||
mc_version=1.19.2
|
mc_version=1.19.2
|
||||||
forge_version=43.1.16
|
forge_version=43.1.43
|
||||||
myversion=1.0.1.0
|
myversion=1.0.1.1
|
|
@ -1,5 +1,7 @@
|
||||||
package dev.zontreck.libzontreck.vectors;
|
package dev.zontreck.libzontreck.vectors;
|
||||||
|
|
||||||
|
import net.minecraft.nbt.CompoundTag;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This is a non-serializable instanced Vector that is meant to slam positions down as a integer
|
* This is a non-serializable instanced Vector that is meant to slam positions down as a integer
|
||||||
*/
|
*/
|
||||||
|
@ -15,4 +17,32 @@ public class NonAbsVector3
|
||||||
y = Math.round(origin.y);
|
y = Math.round(origin.y);
|
||||||
z = Math.round(origin.z);
|
z = Math.round(origin.z);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public CompoundTag serialize()
|
||||||
|
{
|
||||||
|
CompoundTag tag = new CompoundTag();
|
||||||
|
tag.putLong("x", x);
|
||||||
|
tag.putLong("y", y);
|
||||||
|
tag.putLong("z", z);
|
||||||
|
|
||||||
|
return tag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public NonAbsVector3(CompoundTag tag) {
|
||||||
|
this.deserialize(tag);
|
||||||
|
}
|
||||||
|
public void deserialize(CompoundTag tag)
|
||||||
|
{
|
||||||
|
x=tag.getLong("x");
|
||||||
|
y=tag.getLong("y");
|
||||||
|
z=tag.getLong("z");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public boolean same(NonAbsVector3 other)
|
||||||
|
{
|
||||||
|
if(x == other.x && y==other.y && z==other.z)return true;
|
||||||
|
else return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package dev.zontreck.libzontreck.vectors;
|
package dev.zontreck.libzontreck.vectors;
|
||||||
|
|
||||||
import dev.zontreck.libzontreck.exceptions.InvalidDeserialization;
|
import dev.zontreck.libzontreck.exceptions.InvalidDeserialization;
|
||||||
|
import net.minecraft.nbt.CompoundTag;
|
||||||
import net.minecraft.world.phys.Vec2;
|
import net.minecraft.world.phys.Vec2;
|
||||||
import net.minecraft.world.phys.Vec3;
|
import net.minecraft.world.phys.Vec3;
|
||||||
|
|
||||||
|
@ -65,4 +66,29 @@ public class Vector2
|
||||||
{
|
{
|
||||||
return "<"+String.valueOf(x)+", "+String.valueOf(y) + ">";
|
return "<"+String.valueOf(x)+", "+String.valueOf(y) + ">";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public CompoundTag serialize()
|
||||||
|
{
|
||||||
|
CompoundTag tag = new CompoundTag();
|
||||||
|
tag.putFloat("x", x);
|
||||||
|
tag.putFloat("y", y);
|
||||||
|
|
||||||
|
return tag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Vector2(CompoundTag tag) {
|
||||||
|
this.deserialize(tag);
|
||||||
|
}
|
||||||
|
public void deserialize(CompoundTag tag)
|
||||||
|
{
|
||||||
|
x=tag.getFloat("x");
|
||||||
|
y=tag.getFloat("y");
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean same(Vector2 other)
|
||||||
|
{
|
||||||
|
if(x == other.x && y==other.y)return true;
|
||||||
|
else return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -137,4 +137,11 @@ public class Vector3
|
||||||
y=tag.getDouble("y");
|
y=tag.getDouble("y");
|
||||||
z=tag.getDouble("z");
|
z=tag.getDouble("z");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public boolean same(Vector3 other)
|
||||||
|
{
|
||||||
|
if(x == other.x && y==other.y && z==other.z)return true;
|
||||||
|
else return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,4 +92,11 @@ public class WorldPosition
|
||||||
|
|
||||||
return dimL;
|
return dimL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public boolean same(WorldPosition other)
|
||||||
|
{
|
||||||
|
if(Position.same(other.Position) && Dimension == other.Dimension)return true;
|
||||||
|
else return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ modId="libzontreck" #mandatory
|
||||||
# The version number of the mod - there's a few well known ${} variables useable here or just hardcode it
|
# The version number of the mod - there's a few well known ${} variables useable here or just hardcode it
|
||||||
# ${file.jarVersion} will substitute the value of the Implementation-Version as read from the mod's JAR file metadata
|
# ${file.jarVersion} will substitute the value of the Implementation-Version as read from the mod's JAR file metadata
|
||||||
# see the associated build.gradle script for how to populate this completely automatically during a build
|
# see the associated build.gradle script for how to populate this completely automatically during a build
|
||||||
version="1.0.1.0" #mandatory
|
version="1.0.1.1" #mandatory
|
||||||
# A display name for the mod
|
# A display name for the mod
|
||||||
displayName="LibZontreck" #mandatory
|
displayName="LibZontreck" #mandatory
|
||||||
# A URL to query for updates for this mod. See the JSON update specification https://mcforge.readthedocs.io/en/latest/gettingstarted/autoupdate/
|
# A URL to query for updates for this mod. See the JSON update specification https://mcforge.readthedocs.io/en/latest/gettingstarted/autoupdate/
|
||||||
|
|
Reference in a new issue