Jump to content

Caleb_ProO

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by Caleb_ProO

  1. Hello community. I am trying to check if a certain player is around, and if so, then spawn a lightning bolt on the coordinates of the EntityCreeper. This is what I have right now. package test.proxies; import java.util.EnumSet; import net.minecraft.entity.effect.EntityLightningBolt; import net.minecraft.entity.monster.EntityCreeper; import net.minecraft.entity.player.EntityPlayer; import cpw.mods.fml.common.ITickHandler; import cpw.mods.fml.common.TickType; public class ServerTickHandler implements ITickHandler { private void onPlayerTick(EntityPlayer player){ EntityCreeper target = new EntityCreeper(player.worldObj); chargeCreepers(player, target); } private void chargeCreepers(EntityPlayer player, EntityCreeper target) { if(Math.abs(target.posX - player.posX) < 20 && Math.abs(target.posZ - player.posZ) < 20 && target.canEntityBeSeen(player)){ player.worldObj.spawnEntityInWorld(new EntityLightningBolt(player.worldObj, target.posX, target.posY, target.posZ)); } } @Override public void tickStart(EnumSet<TickType> type, Object... tickData) { if(type.equals(EnumSet.of(TickType.PLAYER))){ onPlayerTick((EntityPlayer) tickData[0]); } } @Override public void tickEnd(EnumSet<TickType> type, Object... tickData) { // TODO Auto-generated method stub } @Override public EnumSet<TickType> ticks() { return EnumSet.of(TickType.PLAYER, TickType.SERVER); } @Override public String getLabel() { // TODO Auto-generated method stub return null; } } There is probably some elementary mistake I am overlooking.
  2. Thanks, just a code example really helps! I think im understanding what im seeing. Is there anyway I can add you on skype and ask a couple more questions about your code? If not, i'll just post it on here.
  3. Hello Guys! I have asked all around the modding community, looked through countless old posts, searched through pastebin, github and other various bits of source code but I still have not found a efficient, and understandable way to do this (for a noob, at least)! From what I have gathered, the BlockChest.class file checks to see if the block placed next to it is equal to the chest, then it does unifyAdjacentChests(). That part makes sense to me, but I do not see how I could apply this to my multi-block. Next, I found this link. https://github.com/Malorolam/Carbonization/tree/46b0f05d6256d0d7f722914e39cdd38a0c3cfddd/mal/carbonization/multiblock Either I do not understand it fully, or it is irrelevant to multi-blocks. My guess is that my knowledge is not extensive enough to understand it, even with all the comments. From another individual that wanted to know how to construct a multiblock, I found this forum. http://www.minecraftforge.net/forum/index.php/topic,3162.msg29667.html#msg29667 From Jdb100's post, I got that if the blocks to the x, y, and z coords of the block are the same, then it replaces it with the multiblock. However, won't this just give every block placed it's own TileEntity? I would like one single GUI for the entire structure. I am looking for something more like gcewing's post. This is the most information I could get out of it, and the other suggestions just hurt my mind to look at it. From these sources, especially the one from minecraftforge.net, I have gotten the gist of the multiblock, but I have more questions/requests. 1. can someone noobify it down for me? 2. If this doesnt work, would it be possible to place a single block, then have a setBlock function set the other blocks down for me and basically assemble the structure? 3. How would I be able to make a texture for my multi block, and have it run as one gui in a 3x4x3 structure? 4. Can someone supply me with the railcraft source code for coke ovens? At least the specific tid-bit that would help me better understand this. I hope someone is willing to help me with this, as I know from my searches that this is a highly sought after topic. Thanks and best regards!
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.