mirror of
https://github.com/GTNewHorizons/StructureLib.git
synced 2026-11-20 03:59:34 +00:00
Add option to related to hologram projection
Also made clear what's public api and what's not.
This commit is contained in:
1 parent
c4eb372cfb
commit
68c5436496
19 files changed
+457
-75
No files matched your search
+8
@@ -1,6 +1,7 @@
|
||||
package com.gtnewhorizon.structurelib.alignment.constructable;
|
||||
|
||||
import com.gtnewhorizon.structurelib.StructureLib;
|
||||
import com.gtnewhorizon.structurelib.StructureLibAPI;
|
||||
import com.gtnewhorizon.structurelib.alignment.IAlignment;
|
||||
import com.gtnewhorizon.structurelib.alignment.enumerable.ExtendedFacing;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -17,6 +18,13 @@ public class ConstructableUtility {
|
||||
}
|
||||
|
||||
public static boolean handle(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide) {
|
||||
StructureLibAPI.startHinting(aWorld);
|
||||
boolean ret = handle0(aStack, aPlayer, aWorld, aX, aY, aZ, aSide);
|
||||
StructureLibAPI.endHinting(aWorld);
|
||||
return ret;
|
||||
}
|
||||
|
||||
private static boolean handle0(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide) {
|
||||
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
|
||||
if (tTileEntity == null || aPlayer instanceof FakePlayer) {
|
||||
return aPlayer instanceof EntityPlayerMP;
|
||||
|
||||
+4
@@ -14,6 +14,10 @@ import java.util.HashMap;
|
||||
public interface IMultiblockInfoContainer<T> {
|
||||
HashMap<String, IMultiblockInfoContainer<?>> MULTIBLOCK_MAP = new HashMap<>();
|
||||
|
||||
/**
|
||||
* There is no specific loading phase restriction, but you should generally not call it before the tile entity is
|
||||
* properly registered.
|
||||
*/
|
||||
static <T extends TileEntity> void registerTileClass(Class<T> clazz, IMultiblockInfoContainer<?> info) {
|
||||
MULTIBLOCK_MAP.put(clazz.getCanonicalName(), info);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user