
MINERGUY67880
Members-
Posts
44 -
Joined
-
Last visited
Everything posted by MINERGUY67880
-
Thank you so much! Im such an idiot
-
How do I do that? event.entityPlayer.getHeldItem() returns an itemstack.
-
FMLCommonHandler.instance().bus().register(eventHandler); MinecraftForge.EVENT_BUS.register(eventHandler); That is in pre init. Also, I just did the println test and the event fires but it only works under if(event.action != null && event.action == Action.RIGHT_CLICK_BLOCK) if(event.entityPlayer.getHeldItem() != null && event.entityPlayer.getHeldItem() == new ItemStack(MinerCore.debugItem)) doesn't work though.
-
So, I'm trying to make a debug item that tells you information about the block you right click with it. I check if the player right clicks a block, then I check if the player is holding the debug item. It is supposed to say the unlocalized name of the item that I right click with the item in chat but it doesn't. My event handler: ChatHandler is a class I made just to make adding chat easier. The event handler is registered too.
-
Can I have the game detect if a player just spawned?
MINERGUY67880 replied to MINERGUY67880's topic in Modder Support
How can I change that to make it work? -
Can I have the game detect if a player just spawned?
MINERGUY67880 replied to MINERGUY67880's topic in Modder Support
Will this be sufficient? @EventHandler public void load(EntityJoinWorldEvent EntityPlayer){ System.out.println("A PLAYER JUST JOINED!"); } -
Can I have the game detect if a player just spawned?
MINERGUY67880 replied to MINERGUY67880's topic in Modder Support
What is it called and what class is it from? -
Hi, I need my mod to detect if a player just spawned into the world for the very first time so that I could do something like: if (playerJustSpawned = true) { System.out.println("Hey, A player just spawned!") } Is there one that is in the source code or do I have to make one? Please help me out with dis!
-
[Help!] How to make a block spawn another block
MINERGUY67880 replied to MINERGUY67880's topic in Modder Support
Still doesn't work. -
[Help!] How to make a block spawn another block
MINERGUY67880 replied to MINERGUY67880's topic in Modder Support
Im not sure why I did the +1 for the CurrentY. Heres my new code: //Smoke Spawning Method public void updateTick(World world, int x, int y, int z, Random rand) { TileEntity tileEntity = world.getBlockTileEntity(x, y, z); if (tileEntity instanceof TileEntityStoneCrusher) { TileEntityStoneCrusher crusher = (TileEntityStoneCrusher) tileEntity; if (crusher.active) { world.setBlock(x, y + 1, z, TechnicCraftCommon.SmokeGasBlock.blockID ); } } } -
[Help!] How to make a block spawn another block
MINERGUY67880 replied to MINERGUY67880's topic in Modder Support
i put in a system.out.println and it didnt write it in the console. It isn't getting called. -
Hi, I am trying to make my stone crusher machine make my smoke gas when it is activated. I am trying to use this code: //Smoke Spawning Method public void updateTick(World world, int x, int y, int z, Random rand) { int CurrentY = y + 1; TileEntity tileEntity = world.getBlockTileEntity(x, y, z); if (tileEntity instanceof TileEntityStoneCrusher) { TileEntityStoneCrusher crusher = (TileEntityStoneCrusher) tileEntity; if (crusher.active) { world.setBlock(x, CurrentY + 1, z, TechnicCraftCommon.SmokeGasBlock.blockID ); } } } But it doesn't work, what am I doing wrong?
-
Help with making a block that generates in the sky
MINERGUY67880 replied to MINERGUY67880's topic in Modder Support
Ah, thanks. -
Help with making a block that generates in the sky
MINERGUY67880 replied to MINERGUY67880's topic in Modder Support
That is exactly what I want! -
Help with making a block that generates in the sky
MINERGUY67880 replied to MINERGUY67880's topic in Modder Support
Heres my code for the Gas Block file: package miner.miner.technicraft.oceans.blocks; import java.util.Random; import miner.miner.technicraft.oceans.client.gui.creativetabs.TCOceansCreativeTabs; import miner.miner.technicraft.oceans.TechnicCraftOceans; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.entity.EntityLiving; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.fluids.BlockFluidClassic; import net.minecraftforge.fluids.BlockFluidFinite; import net.minecraftforge.fluids.Fluid; public class BlockGasSteam extends BlockFluidFinite { public String texture; public BlockGasSteam(int id, String key, Fluid fluid) { super(id, fluid, Material.water); this.texture = key; this.setCreativeTab(TCOceansCreativeTabs.blocksTab); fluid.setBlockID(this); setUnlocalizedName(key); } @Override public void registerIcons(IconRegister register) { blockIcon = register.registerIcon(TechnicCraftOceans.modID + ":" + texture); getFluid().setIcons(blockIcon); } @Override public int colorMultiplier(IBlockAccess world, int x, int y, int z) { return 0xaaaaaa; } public void updateTick() { if (par1World.getBlockId(par2, par3 + 1, par4) == 0 && par3 <= 255) { par1World.setBlock(par2, par3 + 1, par4, BlockGasSteam); par1World.setBlock(par2, par3, par4, 0); } } } I am getting errors on par1World, par2, par3, par4 then the other par3 and just about everything else! Is there anything I need to change or move? Or do i just need to add ints/variables? -
Help with making a block that generates in the sky
MINERGUY67880 replied to MINERGUY67880's topic in Modder Support
So do i put public void updateTick() { if (par1World.getBlockId(par2, par3 + 1, par4) == 0 && par3 <= 255) { par1World.setBlock(par2, par3 + 1, par4, BlockGasSteam); par1World.setBlock(par2, par3, par4, 0); } } -
Help with making a block that generates in the sky
MINERGUY67880 replied to MINERGUY67880's topic in Modder Support
Another nooby question, where do i put that code? -
Help with making a block that generates in the sky
MINERGUY67880 replied to MINERGUY67880's topic in Modder Support
Can anyone help me with the first question? -
Help with making a block that generates in the sky
MINERGUY67880 replied to MINERGUY67880's topic in Modder Support
Thanks -
Help with making a block that generates in the sky
MINERGUY67880 replied to MINERGUY67880's topic in Modder Support
Sorry, i have 2 more questions. 1. Is there a thing that returns the name of the block above another block? Example: C = custom block that returns the name of the above block, A = air A C It would say "air" in the eclipse console if you hooked it up to a printline thing? 2. How do I make the gas stop when the said air block is on layer 255? And can I please have some code pieces? I don't really know advanced java. -
Help with making a block that generates in the sky
MINERGUY67880 replied to MINERGUY67880's topic in Modder Support
Ah, thanks! -
Help with making a block that generates in the sky
MINERGUY67880 replied to MINERGUY67880's topic in Modder Support
Sorry to sound like a noob, but how do i do that? -
Help with making a block that generates in the sky
MINERGUY67880 replied to MINERGUY67880's topic in Modder Support
Does anyone know? Because i am completely stumped. -
Hello everybody! I am making a mod with gasses but I want them to stay in the world and not dissapear when they reach the top. I need to know how to make a block generate on 100% of layer 255?
-
Hey everyone, i need to know how to make a fluid finite. Yes, I googled it but all i get is the finite liquids mod. If you need anyone of my code, just tell me!