mirror of
https://github.com/GTNewHorizons/StructureLib.git
synced 2026-11-22 04:52:09 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b669cbecf1 | ||
|
|
6283931667 | ||
|
|
3b3bc4b9ad |
No files matched your search
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
// Add your dependencies here
|
// Add your dependencies here
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api("com.github.GTNewHorizons:GTNHLib:0.6.37:dev")
|
api("com.github.GTNewHorizons:GTNHLib:0.6.39:dev")
|
||||||
implementation("com.github.GTNewHorizons:NotEnoughItems:2.7.62-GTNH:dev")
|
implementation("com.github.GTNewHorizons:NotEnoughItems:2.7.84-GTNH:dev")
|
||||||
|
|
||||||
testImplementation(platform('org.junit:junit-bom:5.9.2'))
|
testImplementation(platform('org.junit:junit-bom:5.9.2'))
|
||||||
testImplementation('org.junit.jupiter:junit-jupiter')
|
testImplementation('org.junit.jupiter:junit-jupiter')
|
||||||
|
|||||||
+1
-1
@@ -17,7 +17,7 @@ pluginManagement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.40'
|
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.42'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -14,8 +14,28 @@ import com.gtnewhorizon.structurelib.alignment.enumerable.Rotation;
|
|||||||
|
|
||||||
public interface IAlignmentLimits {
|
public interface IAlignmentLimits {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Can be placed in any orientation.
|
||||||
|
*/
|
||||||
IAlignmentLimits UNLIMITED = (direction, rotation, flip) -> true;
|
IAlignmentLimits UNLIMITED = (direction, rotation, flip) -> true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Must be standing upright; i.e., top side of the block facing up.
|
||||||
|
*/
|
||||||
|
IAlignmentLimits UPRIGHT = (direction, rotation, flip) -> direction.offsetY == 0
|
||||||
|
&& (flip.isVerticallyFliped() ? rotation.isUpsideDown() : rotation.isNotRotated());
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Can be in any orientation except upside down; i.e., top side of the block facing down.
|
||||||
|
*/
|
||||||
|
IAlignmentLimits NOT_UPSIDE_DOWN = (direction, rotation, flip) -> direction.offsetY != 0
|
||||||
|
|| (flip.isVerticallyFliped() ? !rotation.isNotRotated() : !rotation.isUpsideDown());
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Front side of the block must be facing up.
|
||||||
|
*/
|
||||||
|
IAlignmentLimits FACING_UP = (direction, rotation, flip) -> direction == ForgeDirection.UP;
|
||||||
|
|
||||||
boolean isNewExtendedFacingValid(ForgeDirection direction, Rotation rotation, Flip flip);
|
boolean isNewExtendedFacingValid(ForgeDirection direction, Rotation rotation, Flip flip);
|
||||||
|
|
||||||
default boolean isNewExtendedFacingValid(ExtendedFacing alignment) {
|
default boolean isNewExtendedFacingValid(ExtendedFacing alignment) {
|
||||||
|
|||||||
@@ -28,11 +28,11 @@ public class ItemConstructableTrigger extends Item {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
|
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
|
||||||
if (!world.isRemote && getMovingObjectPositionFromPlayer(world, player, true) == null) {
|
if (getMovingObjectPositionFromPlayer(world, player, true) == null) {
|
||||||
if (player.isSneaking()) {
|
if (!world.isRemote) {
|
||||||
StructureLib.instance().proxy().displayConfigGUI("registries");
|
|
||||||
} else {
|
|
||||||
player.openGui(StructureLib.instance(), 0, world, player.inventory.currentItem, 0, 0);
|
player.openGui(StructureLib.instance(), 0, world, player.inventory.currentItem, 0, 0);
|
||||||
|
} else if (player.isSneaking()) {
|
||||||
|
StructureLib.instance().proxy().displayConfigGUI("registries");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return super.onItemRightClick(stack, world, player);
|
return super.onItemRightClick(stack, world, player);
|
||||||
|
|||||||
Reference in new issue
Block a user