mirror of
https://github.com/GTNewHorizons/StructureLib.git
synced 2026-11-16 10:34:52 +00:00
Fix network code. Encapsulated API.
This commit is contained in:
1 parent
671da2dc1a
commit
8975c149c0
9 files changed
+210
-83
No files matched your search
@@ -5,3 +5,25 @@ A standalone version of [TecTech structure api](https://github.com/GTNewHorizons
|
||||
Originally created by TecTech authors, taken with permission. It's under MIT license anyway.
|
||||
|
||||

|
||||
|
||||
## Using
|
||||
|
||||
1. Add this to your build.gradle
|
||||
```groovy
|
||||
dependencies {
|
||||
compile "com.github.GTNewHorizons:StructureLib:master-SNAPSHOT:deobf"
|
||||
}
|
||||
repositories {
|
||||
maven {
|
||||
name = "jitpack.io"
|
||||
url = "https://jitpack.io"
|
||||
}
|
||||
}
|
||||
```
|
||||
Replace `master-SNAPSHOT` with a commit hash or a tag name (if any) of your choice to prevent unexpected upstream changes.
|
||||
2. Add `required-after:structurelib;` to your `@Mod(dependencies = "..")` tring.
|
||||
3. Add `structurelib` to your `mcmod.info`.
|
||||
|
||||
## Contribution
|
||||
|
||||
The project is developed using IDEA. Please manually configure the build to not delegate to gradle for textures to show up in dev.
|
||||
@@ -56,3 +56,10 @@ artifacts {
|
||||
archives jar
|
||||
}
|
||||
|
||||
idea {
|
||||
module {
|
||||
inheritOutputDirs = false
|
||||
outputDir = compileJava.destinationDir
|
||||
testOutputDir = compileTestJava.destinationDir
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.gtnewhorizon.structurelib;
|
||||
|
||||
import com.gtnewhorizon.structurelib.alignment.AlignmentMessage;
|
||||
import com.gtnewhorizon.structurelib.block.BlockHint;
|
||||
import com.gtnewhorizon.structurelib.item.ItemBlockHint;
|
||||
import com.gtnewhorizon.structurelib.proxy.CommonProxy;
|
||||
@@ -7,38 +8,63 @@ import com.gtnewhorizon.structurelib.util.XSTR;
|
||||
import cpw.mods.fml.common.Mod;
|
||||
import cpw.mods.fml.common.SidedProxy;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
/**
|
||||
* This class does not contain a stable API. Refrain from using this class.
|
||||
*/
|
||||
@Mod(modid = StructureLib.MOD_ID, name = "StructureLib", version = "${version}", acceptableRemoteVersions = "*")
|
||||
public class StructureLib {
|
||||
public static boolean DEBUG_MODE = true;
|
||||
public static Logger LOGGER = LogManager.getLogger("StructureLib");
|
||||
public static final String MOD_ID = "structurelib";
|
||||
|
||||
@SidedProxy(serverSide = "com.gtnewhorizon.structurelib.proxy.CommonProxy", clientSide = "com.gtnewhorizon.structurelib.proxy.ClientProxy")
|
||||
public static CommonProxy proxy;
|
||||
static CommonProxy proxy;
|
||||
static SimpleNetworkWrapper net = NetworkRegistry.INSTANCE.newSimpleChannel(MOD_ID);
|
||||
static {
|
||||
net.registerMessage(AlignmentMessage.ServerHandler.class, AlignmentMessage.AlignmentQuery.class, 0, Side.SERVER);
|
||||
net.registerMessage(AlignmentMessage.ClientHandler.class, AlignmentMessage.AlignmentData.class, 1, Side.CLIENT);
|
||||
}
|
||||
|
||||
public static final XSTR RANDOM = new XSTR();
|
||||
|
||||
public static Block blockHint;
|
||||
public static Item itemBlockHint;
|
||||
public static CreativeTabs creativeTab = new CreativeTabs("structurelib") {
|
||||
static Block blockHint;
|
||||
static Item itemBlockHint;
|
||||
public static final CreativeTabs creativeTab = new CreativeTabs("structurelib") {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Item getTabIconItem() {
|
||||
return itemBlockHint;
|
||||
return StructureLibAPI.getItemBlockHint();
|
||||
}
|
||||
};
|
||||
|
||||
@Mod.EventHandler
|
||||
public void preInit(FMLPreInitializationEvent e) {
|
||||
GameRegistry.registerBlock(blockHint = new BlockHint(), ItemBlockHint.class, "blockhint");
|
||||
itemBlockHint = ItemBlock.getItemFromBlock(blockHint);
|
||||
itemBlockHint = ItemBlock.getItemFromBlock(StructureLibAPI.getBlockHint());
|
||||
}
|
||||
|
||||
public static void addClientSideChatMessages(String... messages) {
|
||||
proxy.addClientSideChatMessages(messages);
|
||||
}
|
||||
|
||||
public static EntityPlayer getCurrentPlayer() {
|
||||
return proxy.getCurrentPlayer();
|
||||
}
|
||||
|
||||
public static boolean isCurrentPlayer(EntityPlayer player) {
|
||||
return proxy.isCurrentPlayer(player);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.gtnewhorizon.structurelib;
|
||||
|
||||
import com.gtnewhorizon.structurelib.alignment.AlignmentMessage;
|
||||
import com.gtnewhorizon.structurelib.alignment.IAlignmentProvider;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import static com.gtnewhorizon.structurelib.StructureLib.proxy;
|
||||
|
||||
public class StructureLibAPI {
|
||||
public static void hintParticleTinted(World w, int x, int y, int z, IIcon[] icons, short[] RGBa) {
|
||||
proxy.hintParticleTinted(w, x, y, z, icons, RGBa);
|
||||
}
|
||||
|
||||
public static void hintParticleTinted(World w, int x, int y, int z, Block block, int meta, short[] RGBa) {
|
||||
proxy.hintParticleTinted(w, x, y, z, block, meta, RGBa);
|
||||
}
|
||||
|
||||
public static void hintParticle(World w, int x, int y, int z, IIcon[] icons) {
|
||||
proxy.hintParticle(w, x, y, z, icons);
|
||||
}
|
||||
|
||||
public static void hintParticle(World w, int x, int y, int z, Block block, int meta) {
|
||||
proxy.hintParticle(w, x, y, z, block, meta);
|
||||
}
|
||||
|
||||
public static void queryAlignment(IAlignmentProvider provider) {
|
||||
StructureLib.net.sendToServer(new AlignmentMessage.AlignmentQuery(provider));
|
||||
}
|
||||
|
||||
public static void sendAlignment(IAlignmentProvider provider) {
|
||||
StructureLib.net.sendToAll(new AlignmentMessage.AlignmentData(provider));
|
||||
}
|
||||
|
||||
public static void sendAlignment(IAlignmentProvider provider, EntityPlayerMP player) {
|
||||
StructureLib.net.sendTo(new AlignmentMessage.AlignmentData(provider), player);
|
||||
}
|
||||
|
||||
public static void sendAlignment(IAlignmentProvider provider, NetworkRegistry.TargetPoint targetPoint) {
|
||||
StructureLib.net.sendToAllAround(new AlignmentMessage.AlignmentData(provider), targetPoint);
|
||||
}
|
||||
|
||||
public static void sendAlignment(IAlignmentProvider provider, World dimension) {
|
||||
StructureLib.net.sendToDimension(new AlignmentMessage.AlignmentData(provider), dimension.provider.dimensionId);
|
||||
}
|
||||
|
||||
public static Block getBlockHint() {
|
||||
return StructureLib.blockHint;
|
||||
}
|
||||
|
||||
public static Item getItemBlockHint() {
|
||||
return StructureLib.itemBlockHint;
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,18 @@
|
||||
package com.gtnewhorizon.structurelib.alignment;
|
||||
|
||||
import com.gtnewhorizon.structurelib.StructureLib;
|
||||
import com.gtnewhorizon.structurelib.alignment.enumerable.ExtendedFacing;
|
||||
import cpw.mods.fml.common.network.ByteBufUtils;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
|
||||
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.DimensionManager;
|
||||
|
||||
public class AlignmentMessage implements IMessage {
|
||||
public abstract class AlignmentMessage implements IMessage {
|
||||
int mPosX;
|
||||
int mPosY;
|
||||
int mPosZ;
|
||||
@@ -36,34 +43,39 @@ public class AlignmentMessage implements IMessage {
|
||||
|
||||
ByteBufUtils.writeTag(pBuffer, tFXTag);
|
||||
}
|
||||
/*
|
||||
private AlignmentMessage(GT_MetaTileEntity_MultiblockBase_EM metaTile) {
|
||||
IGregTechTileEntity base=metaTile.getBaseMetaTileEntity();
|
||||
mPosX=base.getXCoord();
|
||||
mPosY=base.getYCoord();
|
||||
mPosZ=base.getZCoord();
|
||||
mPosD=base.getWorld().provider.dimensionId;
|
||||
mAlign =metaTile.getExtendedFacing().getIndex();
|
||||
|
||||
private AlignmentMessage(IAlignmentProvider provider) {
|
||||
if (!(provider instanceof TileEntity))
|
||||
throw new IllegalArgumentException("Provider must be a TileEntity");
|
||||
IAlignment alignment = provider.getAlignment();
|
||||
if (alignment == null)
|
||||
throw new IllegalArgumentException("Passed in provider does not provide an alignment!");
|
||||
TileEntity base = (TileEntity) provider;
|
||||
mPosX = base.xCoord;
|
||||
mPosY = base.yCoord;
|
||||
mPosZ = base.zCoord;
|
||||
mPosD = base.getWorldObj().provider.dimensionId;
|
||||
mAlign = alignment.getExtendedFacing().getIndex();
|
||||
}
|
||||
|
||||
private AlignmentMessage(World world, int x, int y, int z, IAlignment front) {
|
||||
mPosX=x;
|
||||
mPosY=y;
|
||||
mPosZ=z;
|
||||
mPosD=world.provider.dimensionId;
|
||||
mAlign =front.getExtendedFacing().getIndex();
|
||||
mPosX = x;
|
||||
mPosY = y;
|
||||
mPosZ = z;
|
||||
mPosD = world.provider.dimensionId;
|
||||
mAlign = front.getExtendedFacing().getIndex();
|
||||
}
|
||||
|
||||
public static class AlignmentQuery extends AlignmentMessage {
|
||||
public AlignmentQuery() {
|
||||
}
|
||||
|
||||
public AlignmentQuery(GT_MetaTileEntity_MultiblockBase_EM metaTile) {
|
||||
super(metaTile);
|
||||
public AlignmentQuery(IAlignmentProvider provider) {
|
||||
super(provider);
|
||||
}
|
||||
|
||||
public AlignmentQuery(World world, int x, int y, int z, IAlignment front) {
|
||||
super(world,x,y,z,front);
|
||||
super(world, x, y, z, front);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,60 +83,54 @@ public class AlignmentMessage implements IMessage {
|
||||
public AlignmentData() {
|
||||
}
|
||||
|
||||
private AlignmentData(AlignmentQuery query){
|
||||
mPosX=query.mPosX;
|
||||
mPosY=query.mPosY;
|
||||
mPosZ=query.mPosZ;
|
||||
mPosD=query.mPosD;
|
||||
mAlign =query.mAlign;
|
||||
private AlignmentData(AlignmentQuery query) {
|
||||
mPosX = query.mPosX;
|
||||
mPosY = query.mPosY;
|
||||
mPosZ = query.mPosZ;
|
||||
mPosD = query.mPosD;
|
||||
mAlign = query.mAlign;
|
||||
}
|
||||
|
||||
public AlignmentData(GT_MetaTileEntity_MultiblockBase_EM metaTile) {
|
||||
super(metaTile);
|
||||
public AlignmentData(IAlignmentProvider provider) {
|
||||
super(provider);
|
||||
}
|
||||
|
||||
public AlignmentData(World world, int x, int y, int z, IAlignment front) {
|
||||
super(world,x,y,z,front);
|
||||
super(world, x, y, z, front);
|
||||
}
|
||||
}
|
||||
|
||||
public static class ClientHandler extends AbstractClientMessageHandler<AlignmentData> {
|
||||
public static class ClientHandler implements IMessageHandler<AlignmentData, IMessage> {
|
||||
@Override
|
||||
public IMessage handleClientMessage(EntityPlayer pPlayer, AlignmentData pMessage, MessageContext pCtx) {
|
||||
if(pPlayer.worldObj.provider.dimensionId==pMessage.mPosD){
|
||||
TileEntity te=pPlayer.worldObj.getTileEntity(pMessage.mPosX,pMessage.mPosY,pMessage.mPosZ);
|
||||
if(te instanceof IGregTechTileEntity){
|
||||
IMetaTileEntity meta = ((IGregTechTileEntity) te).getMetaTileEntity();
|
||||
if(meta instanceof IAlignment){
|
||||
((IAlignment) meta).setExtendedFacing(ExtendedFacing.byIndex(pMessage.mAlign));
|
||||
public IMessage onMessage(AlignmentData pMessage, MessageContext pCtx) {
|
||||
if (StructureLib.getCurrentPlayer().worldObj.provider.dimensionId == pMessage.mPosD) {
|
||||
TileEntity te = StructureLib.getCurrentPlayer().worldObj.getTileEntity(pMessage.mPosX, pMessage.mPosY, pMessage.mPosZ);
|
||||
if (te instanceof IAlignmentProvider) {
|
||||
IAlignment alignment = ((IAlignmentProvider) te).getAlignment();
|
||||
if (alignment != null) {
|
||||
alignment.setExtendedFacing(ExtendedFacing.byIndex(pMessage.mAlign));
|
||||
}
|
||||
}else if (te instanceof IAlignment){
|
||||
((IAlignment) te).setExtendedFacing(ExtendedFacing.byIndex(pMessage.mAlign));
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static class ServerHandler extends AbstractServerMessageHandler<AlignmentQuery> {
|
||||
public static class ServerHandler implements IMessageHandler<AlignmentQuery, AlignmentData> {
|
||||
@Override
|
||||
public IMessage handleServerMessage(EntityPlayer pPlayer, AlignmentQuery pMessage, MessageContext pCtx) {
|
||||
World world= DimensionManager.getWorld(pMessage.mPosD);
|
||||
if(world!=null) {
|
||||
public AlignmentData onMessage(AlignmentQuery pMessage, MessageContext pCtx) {
|
||||
World world = DimensionManager.getWorld(pMessage.mPosD);
|
||||
if (world != null) {
|
||||
TileEntity te = world.getTileEntity(pMessage.mPosX, pMessage.mPosY, pMessage.mPosZ);
|
||||
if (te instanceof IGregTechTileEntity) {
|
||||
IMetaTileEntity meta = ((IGregTechTileEntity) te).getMetaTileEntity();
|
||||
if (meta instanceof IAlignment) {
|
||||
pMessage.mAlign =((IAlignment) meta).getExtendedFacing().getIndex();
|
||||
return new AlignmentData(pMessage);
|
||||
}
|
||||
} else if (te instanceof IAlignment) {
|
||||
pMessage.mAlign =((IAlignment) te).getExtendedFacing().getIndex();
|
||||
if (te instanceof IAlignmentProvider) {
|
||||
IAlignment alignment = ((IAlignmentProvider) te).getAlignment();
|
||||
if (alignment == null)
|
||||
return null;
|
||||
pMessage.mAlign = alignment.getExtendedFacing().getIndex();
|
||||
return new AlignmentData(pMessage);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
+4
-4
@@ -43,18 +43,18 @@ public class ConstructableUtility {
|
||||
}
|
||||
}
|
||||
return true;
|
||||
} else if (StructureLib.proxy.isCurrentPlayer(aPlayer)) {//particles and text client side
|
||||
} else if (StructureLib.isCurrentPlayer(aPlayer)) {//particles and text client side
|
||||
//if ((!aPlayer.isSneaking() || !aPlayer.capabilities.isCreativeMode)) {
|
||||
if (tTileEntity instanceof IConstructableProvider) {
|
||||
IConstructable constructable = ((IConstructableProvider) tTileEntity).getConstructable();
|
||||
if (constructable != null) {
|
||||
constructable.construct(aStack, true);
|
||||
StructureLib.proxy.addClientSideChatMessages(constructable.getStructureDescription(aStack));
|
||||
StructureLib.addClientSideChatMessages(constructable.getStructureDescription(aStack));
|
||||
}
|
||||
} else if (tTileEntity instanceof IConstructable) {
|
||||
IConstructable constructable = (IConstructable) tTileEntity;
|
||||
constructable.construct(aStack, true);
|
||||
StructureLib.proxy.addClientSideChatMessages(constructable.getStructureDescription(aStack));
|
||||
StructureLib.addClientSideChatMessages(constructable.getStructureDescription(aStack));
|
||||
return false;
|
||||
} else if (IMultiblockInfoContainer.contains(tTileEntity.getClass())) {
|
||||
IMultiblockInfoContainer<TileEntity> iMultiblockInfoContainer = IMultiblockInfoContainer.get(tTileEntity.getClass());
|
||||
@@ -65,7 +65,7 @@ public class ConstructableUtility {
|
||||
iMultiblockInfoContainer.construct(aStack, true, tTileEntity,
|
||||
ExtendedFacing.of(ForgeDirection.getOrientation(aSide)));
|
||||
}
|
||||
StructureLib.proxy.addClientSideChatMessages(IMultiblockInfoContainer.get(tTileEntity.getClass()).getDescription(aStack));
|
||||
StructureLib.addClientSideChatMessages(IMultiblockInfoContainer.get(tTileEntity.getClass()).getDescription(aStack));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,6 +54,11 @@ public class ClientProxy extends CommonProxy {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public EntityPlayer getCurrentPlayer() {
|
||||
return Minecraft.getMinecraft().thePlayer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCurrentPlayer(EntityPlayer player) {
|
||||
return player == Minecraft.getMinecraft().thePlayer;
|
||||
|
||||
@@ -10,6 +10,9 @@ public class CommonProxy {
|
||||
public void hintParticleTinted(World w, int x, int y, int z, Block block, int meta, short[] RGBa){}
|
||||
public void hintParticle(World w, int x, int y, int z, IIcon[] icons){}
|
||||
public void hintParticle(World w, int x, int y, int z, Block block, int meta){}
|
||||
public EntityPlayer getCurrentPlayer() {
|
||||
return null;
|
||||
}
|
||||
public boolean isCurrentPlayer(EntityPlayer player) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.gtnewhorizon.structurelib.structure;
|
||||
|
||||
import com.gtnewhorizon.structurelib.StructureLib;
|
||||
import com.gtnewhorizon.structurelib.StructureLibAPI;
|
||||
import com.gtnewhorizon.structurelib.alignment.enumerable.ExtendedFacing;
|
||||
import com.gtnewhorizon.structurelib.structure.adders.IBlockAdder;
|
||||
import com.gtnewhorizon.structurelib.structure.adders.ITileAdder;
|
||||
@@ -38,7 +38,7 @@ public class StructureUtility {
|
||||
|
||||
@Override
|
||||
public boolean spawnHint(Object o, World world, int x, int y, int z, ItemStack trigger) {
|
||||
StructureLib.proxy.hintParticle(world, x, y, z, StructureLib.blockHint, 13);
|
||||
StructureLibAPI.hintParticle(world, x, y, z, StructureLibAPI.getBlockHint(), 13);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -57,13 +57,13 @@ public class StructureUtility {
|
||||
|
||||
@Override
|
||||
public boolean spawnHint(Object o, World world, int x, int y, int z, ItemStack trigger) {
|
||||
StructureLib.proxy.hintParticle(world, x, y, z, StructureLib.blockHint, 14);
|
||||
StructureLibAPI.hintParticle(world, x, y, z, StructureLibAPI.getBlockHint(), 14);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean placeBlock(Object o, World world, int x, int y, int z, ItemStack trigger) {
|
||||
world.setBlock(x, y, z, StructureLib.blockHint, 14, 2);
|
||||
world.setBlock(x, y, z, StructureLibAPI.getBlockHint(), 14, 2);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -76,7 +76,7 @@ public class StructureUtility {
|
||||
|
||||
@Override
|
||||
public boolean spawnHint(Object o, World world, int x, int y, int z, ItemStack trigger) {
|
||||
StructureLib.proxy.hintParticle(world, x, y, z, StructureLib.blockHint, 15);
|
||||
StructureLibAPI.hintParticle(world, x, y, z, StructureLibAPI.getBlockHint(), 15);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ public class StructureUtility {
|
||||
|
||||
@Override
|
||||
public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
|
||||
StructureLib.proxy.hintParticle(world, x, y, z, StructureLib.blockHint, meta);
|
||||
StructureLibAPI.hintParticle(world, x, y, z, StructureLibAPI.getBlockHint(), meta);
|
||||
return false;
|
||||
}
|
||||
};
|
||||
@@ -146,7 +146,7 @@ public class StructureUtility {
|
||||
|
||||
@Override
|
||||
public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
|
||||
StructureLib.proxy.hintParticle(world, x, y, z, icons.get());
|
||||
StructureLibAPI.hintParticle(world, x, y, z, icons.get());
|
||||
return false;
|
||||
}
|
||||
};
|
||||
@@ -165,7 +165,7 @@ public class StructureUtility {
|
||||
|
||||
@Override
|
||||
public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
|
||||
StructureLib.proxy.hintParticleTinted(world, x, y, z, icons.get(), RGBa);
|
||||
StructureLibAPI.hintParticleTinted(world, x, y, z, icons.get(), RGBa);
|
||||
return false;
|
||||
}
|
||||
};
|
||||
@@ -191,7 +191,7 @@ public class StructureUtility {
|
||||
|
||||
@Override
|
||||
public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
|
||||
StructureLib.proxy.hintParticle(world, x, y, z, hintBlock, hintMeta);
|
||||
StructureLibAPI.hintParticle(world, x, y, z, hintBlock, hintMeta);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -218,7 +218,7 @@ public class StructureUtility {
|
||||
|
||||
@Override
|
||||
public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
|
||||
StructureLib.proxy.hintParticle(world, x, y, z, hintBlock, hintMeta);
|
||||
StructureLibAPI.hintParticle(world, x, y, z, hintBlock, hintMeta);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -237,7 +237,7 @@ public class StructureUtility {
|
||||
|
||||
@Override
|
||||
public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
|
||||
StructureLib.proxy.hintParticle(world, x, y, z, hintBlock, hintMeta);
|
||||
StructureLibAPI.hintParticle(world, x, y, z, hintBlock, hintMeta);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -260,7 +260,7 @@ public class StructureUtility {
|
||||
|
||||
@Override
|
||||
public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
|
||||
StructureLib.proxy.hintParticle(world, x, y, z, hintBlock, hintMeta);
|
||||
StructureLibAPI.hintParticle(world, x, y, z, hintBlock, hintMeta);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -289,7 +289,7 @@ public class StructureUtility {
|
||||
|
||||
@Override
|
||||
public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
|
||||
StructureLib.proxy.hintParticle(world, x, y, z, defaultBlock, defaultMeta);
|
||||
StructureLibAPI.hintParticle(world, x, y, z, defaultBlock, defaultMeta);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -309,7 +309,7 @@ public class StructureUtility {
|
||||
|
||||
@Override
|
||||
public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
|
||||
StructureLib.proxy.hintParticle(world, x, y, z, defaultBlock, defaultMeta);
|
||||
StructureLibAPI.hintParticle(world, x, y, z, defaultBlock, defaultMeta);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -344,7 +344,7 @@ public class StructureUtility {
|
||||
|
||||
@Override
|
||||
public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
|
||||
StructureLib.proxy.hintParticle(world, x, y, z, defaultBlock, defaultMeta);
|
||||
StructureLibAPI.hintParticle(world, x, y, z, defaultBlock, defaultMeta);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -364,7 +364,7 @@ public class StructureUtility {
|
||||
|
||||
@Override
|
||||
public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
|
||||
StructureLib.proxy.hintParticle(world, x, y, z, defaultBlock, defaultMeta);
|
||||
StructureLibAPI.hintParticle(world, x, y, z, defaultBlock, defaultMeta);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -391,7 +391,7 @@ public class StructureUtility {
|
||||
|
||||
@Override
|
||||
public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
|
||||
StructureLib.proxy.hintParticle(world, x, y, z, defaultBlock, defaultMeta);
|
||||
StructureLibAPI.hintParticle(world, x, y, z, defaultBlock, defaultMeta);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -411,7 +411,7 @@ public class StructureUtility {
|
||||
|
||||
@Override
|
||||
public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
|
||||
StructureLib.proxy.hintParticle(world, x, y, z, defaultBlock, defaultMeta);
|
||||
StructureLibAPI.hintParticle(world, x, y, z, defaultBlock, defaultMeta);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -440,7 +440,7 @@ public class StructureUtility {
|
||||
|
||||
@Override
|
||||
public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
|
||||
StructureLib.proxy.hintParticle(world, x, y, z, defaultBlock, defaultMeta);
|
||||
StructureLibAPI.hintParticle(world, x, y, z, defaultBlock, defaultMeta);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -459,7 +459,7 @@ public class StructureUtility {
|
||||
|
||||
@Override
|
||||
public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
|
||||
StructureLib.proxy.hintParticle(world, x, y, z, defaultBlock, defaultMeta);
|
||||
StructureLibAPI.hintParticle(world, x, y, z, defaultBlock, defaultMeta);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -508,7 +508,7 @@ public class StructureUtility {
|
||||
|
||||
@Override
|
||||
public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
|
||||
StructureLib.proxy.hintParticle(world, x, y, z, defaultBlock, defaultMeta);
|
||||
StructureLibAPI.hintParticle(world, x, y, z, defaultBlock, defaultMeta);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -528,7 +528,7 @@ public class StructureUtility {
|
||||
|
||||
@Override
|
||||
public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
|
||||
StructureLib.proxy.hintParticle(world, x, y, z, defaultBlock, defaultMeta);
|
||||
StructureLibAPI.hintParticle(world, x, y, z, defaultBlock, defaultMeta);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -536,7 +536,7 @@ public class StructureUtility {
|
||||
}
|
||||
|
||||
public static <T> IStructureElement<T> ofBlockAdder(IBlockAdder<T> iBlockAdder, int dots) {
|
||||
return ofBlockAdder(iBlockAdder, StructureLib.blockHint, dots - 1);
|
||||
return ofBlockAdder(iBlockAdder, StructureLibAPI.getBlockHint(), dots - 1);
|
||||
}
|
||||
|
||||
public static <T> IStructureElementNoPlacement<T> ofTileAdder(ITileAdder<T> iTileAdder, Block hintBlock, int hintMeta) {
|
||||
@@ -553,7 +553,7 @@ public class StructureUtility {
|
||||
|
||||
@Override
|
||||
public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
|
||||
StructureLib.proxy.hintParticle(world, x, y, z, hintBlock, hintMeta);
|
||||
StructureLibAPI.hintParticle(world, x, y, z, hintBlock, hintMeta);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user