Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

jeremy450

Members
  • Joined

  • Last visited

Everything posted by jeremy450

  1. I have tried that with no luck public firepit(int id, Material Material) { super(id, Material); setHardness(0.5F); setStepSound(Block.soundGlassFootstep); setLightOpacity(255); setLightValue(1.0F); //blockFireSpreadSpeed[this.blockID] = 0; //blockFlammability[this.blockID] = 20; //setBlockBounds(0.0F,0.0F,0.0F,1.0F,1.0F,1.0F); //setBlockBounds(0.0f, 0.0f, 0.0f, 0.6875f, 0.9000f,0.6875f); } @Override public boolean isFireSource(World world, int x, int y, int z, int metadata, ForgeDirection side) { return true; } @Override public TileEntity createNewTileEntity(World world) { // TODO Auto-generated method stub return new TileEntityfirepitsteel(); } /** * Called whenever the block is added into the world. Args: world, x, y, z */ @Override public void onBlockAdded(World par1World, int par2, int par3, int par4) { super.onBlockAdded(par1World, par2, par3, par4); //par1World.setBlockToAir(par2 + 1, par3, par4); par1World.setBlock(par2, par3 + 1, par4, Block.fire.blockID); }
  2. i got it to work with blockFireSpreadSpeed[this.blockID] = 0; blockFlammability[this.blockID] = 20; the issue is it destroys the item after a certain time. is there a way to make it not destroy it?
  3. Blocks.fire.setFireInfo is for 1.7 not 1.6.4 sorry i should of said that
  4. where would i put that?
  5. i have tried to do it. i can make it render besides it, etc. but not on top. i think it could be causes its a blockcontainer. is there a way to do it with a blockcontainer and make it last forever? package glowsblocksandlights; import java.util.Random; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.MathHelper; import net.minecraft.world.World; import glowsblocksandlights.TileEntityfirepitsteel; public class firepit extends BlockContainer{ public firepit(int id, Material Material) { super(id, Material); setHardness(0.5F); setStepSound(Block.soundGlassFootstep); setLightOpacity(255); setLightValue(1.0F); //setBlockBounds(0.0F,0.0F,0.0F,1.0F,1.0F,1.0F); //setBlockBounds(0.0f, 0.0f, 0.0f, 0.6875f, 0.9000f,0.6875f); } @Override public TileEntity createNewTileEntity(World world) { // TODO Auto-generated method stub return new TileEntityfirepitsteel(); } /** * Called whenever the block is added into the world. Args: world, x, y, z */ @Override public void onBlockAdded(World par1World, int par2, int par3, int par4) { super.onBlockAdded(par1World, par2, par3, par4); //par1World.setBlockToAir(par2 + 1, par3, par4); par1World.setBlock(par2, par3 + 1, par4, Block.fire.blockID); } @Override @SideOnly(Side.CLIENT) public void registerIcons(IconRegister IconRegister) { blockIcon = IconRegister.registerIcon(Basicinfo.ID.toLowerCase() + ":firepitsteel"); } @Override public boolean isOpaqueCube() { return false; } @Override public int getRenderType() { return -1; } @Override public boolean renderAsNormalBlock() { return false; } }
  6. but how exactly though. theres nothing in the block.fire that allows you to set the location you want to place it.
  7. i kinda know that but i want to place a certain block on top of the one the user places. for example i have a firepit and when the user places it down the fireblock is automaticly placed ontop of it.
  8. Hi there how can i add a block ontop of the block that is placed by user? thanks jeremy
  9. i want to be able to put it ontop but pare inside my block. its like a pot. as you can see i can put a flame in it. but i cant find anyway to do fire.
  10. Hi there i'm trying to find a way to add fire the block i'm making. i know and can do a flame. but i havent been able to find any code on how to put fire in a block. i'm making like a firepit type of block and want the fire kinda ontop of it. i'm not good with coding and would like help. thanks jeremy
  11. hi mean is while the item/block is in the players hand it lights up the area around the player
  12. Hi there is there a way to make a item/block light up without using other mods? regards Jeremy
  13. Hope you understand what i am meaning
  14. it is 64px at the moment my hitbox/mousebox is only at 1 block high. if i want o break it i have to go to the bottom of the block to break it. want to be able to break it anyway on the block
  15. Hi Jacky2611 if you looked at my code you would see i already have that in my code setBlockBounds(0.3F, 0.0F, 0.3F, 0.7F, 4.0F, 0.7F); regards Jeremy
  16. Hi there I have a block that is 4.0F high the problem is i cant click/mouse over on it past 1 block from the ground how can i it so i can mouse over it and click it for its full height. Please do be warned i'm not good with coding yet and wont understand if you say use this or that. this is my current code for it thank you package glowsblocksandlights; import java.util.Random; import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.client.Minecraft; import net.minecraft.client.particle.EntityFX; import net.minecraft.client.particle.EntityFlameFX; import net.minecraft.client.particle.EntityNoteFX; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.MathHelper; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; public class outsidelightgassteel extends BlockContainer { public outsidelightgassteel(int id, Material Material) { super(id, Material); setHardness(0.5F); setStepSound(Block.soundGlassFootstep); setLightOpacity(255); setLightValue(1.0F); setBlockBounds(0.3F, 0.0F, 0.3F, 0.7F, 4.0F, 0.7F); setTickRandomly(true); // setBlockBounds(0.0f, 0.0f, 0.0f, 0.6875f, 0.9000f,0.6875f); } @Override public TileEntity createNewTileEntity(World world) { // TODO Auto-generated method stub return new TileEntityoutsidelightgassteel(); } @Override public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) { super.updateTick(par1World, par2, par3, par4, par5Random); //par1World.scheduleBlockUpdate(par2, par3, par4, blockID, tickRate()); if (par1World.getBlockMetadata(par2, par3, par4) == 0) { par1World.scheduleBlockUpdate(par2, par3, par4, blockID, tickRate()); this.onBlockAdded(par1World, par2, par3, par4); } } /** * Called whenever the block is added into the world. Args: world, x, y, z */ @Override public void onBlockAdded(World par1World, int par2, int par3, int par4) { super.onBlockAdded(par1World, par2, par3, par4); } @Override @SideOnly(Side.CLIENT) public void registerIcons(IconRegister IconRegister) { blockIcon = IconRegister.registerIcon(Basicinfo.ID.toLowerCase() + ":outsidelightgassteel"); } @Override public boolean isOpaqueCube() { return false; } @Override public int getRenderType() { return -1; } @Override public boolean renderAsNormalBlock() { return false; } public int tickRate() { return 1; } @Override public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random) { Minecraft.getMinecraft().effectRenderer.addEffect(new EntitycusflamesFX(par1World, par2 + 0.5F, par3 + 3.25F, par4 + 0.5F, 0.0D, 0.0D, 0.0D)); } }
  17. Hi SanAndreasP Thanks for that i actually fixed that out a few hours before i read your reply. Stupid mistake.
  18. yes you did say it. Sorry didnt see your reply to this post how exactly would i do it?
  19. Make the techne model in techne 32 high. for example i made a model that is 64 high. that is equal to 4 blocks.
  20. Hi Guys i have a techne block and issue is i can get my block to rotate in 4 directions. only in 2 directions. i'm not sure why its happen. I'm not very good at coding help would be appreciated thanks. my classes are below. Block Class package glowsblocksandlights; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.MathHelper; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; public class outsidelightsteel extends BlockContainer { public outsidelightsteel(int id, Material Material) { super(id, Material); setHardness(0.5F); setStepSound(Block.soundGlassFootstep); setLightOpacity(255); setLightValue(1.0F); setBlockBounds(0.3F, 0.0F, 0.3F, 0.7F, 4.0F, 0.7F); // setBlockBounds(0.0f, 0.0f, 0.0f, 0.6875f, 0.9000f,0.6875f); } @Override public TileEntity createNewTileEntity(World world) { // TODO Auto-generated method stub return new TileEntityoutsidelightsteel(); } /** * Called whenever the block is added into the world. Args: world, x, y, z */ @Override public void onBlockAdded(World par1World, int par2, int par3, int par4) { super.onBlockAdded(par1World, par2, par3, par4); this.setDefaultDirection(par1World, par2, par3, par4); } /** * set a blocks direction */ private void setDefaultDirection(World par1World, int par2, int par3, int par4) { if (!par1World.isRemote) { int l = par1World.getBlockId(par2, par3, par4 - 1); int i1 = par1World.getBlockId(par2, par3, par4 + 1); int j1 = par1World.getBlockId(par2 - 1, par3, par4); int k1 = par1World.getBlockId(par2 + 1, par3, par4); byte b0 = 3; if (Block.opaqueCubeLookup[l] && !Block.opaqueCubeLookup[i1]) { b0 = 3; } if (Block.opaqueCubeLookup[i1] && !Block.opaqueCubeLookup[l]) { b0 = 2; } if (Block.opaqueCubeLookup[j1] && !Block.opaqueCubeLookup[k1]) { b0 = 5; } if (Block.opaqueCubeLookup[k1] && !Block.opaqueCubeLookup[j1]) { b0 = 4; } par1World.setBlockMetadataWithNotify(par2, par3, par4, b0, 2); } } // public void onBlockPlacedBy(World world, int i, int j, int k, // EntityLiving entityliving){ // int rotation = MathHelper.floor_double((double)((entityliving.rotationYaw // * 4F) / 360F) + 2.5D) & 3; // } /** * Called when the block is placed in the world. */ @Override public void onBlockPlacedBy(World par1World, int par2, int par3, int par4, EntityLivingBase par5EntityLivingBase, ItemStack par6ItemStack) { int l = MathHelper .floor_double((double) (par5EntityLivingBase.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; if (l == 0) { par1World.setBlockMetadataWithNotify(par2, par3, par4, 2, 2); } if (l == 1) { par1World.setBlockMetadataWithNotify(par2, par3, par4, 5, 2); } if (l == 2) { par1World.setBlockMetadataWithNotify(par2, par3, par4, 3, 2); } if (l == 3) { par1World.setBlockMetadataWithNotify(par2, par3, par4, 4, 2); } } @Override @SideOnly(Side.CLIENT) public void registerIcons(IconRegister IconRegister) { blockIcon = IconRegister.registerIcon(Basicinfo.ID.toLowerCase() + ":outsidelightsteel"); } @Override public boolean isOpaqueCube() { return false; } @Override public int getRenderType() { return -1; } @Override public boolean renderAsNormalBlock() { return false; } } my Entity render Class package glowsblocksandlights; import org.lwjgl.opengl.GL11; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; public class TileEntityoutsidelightsteelRenderer extends TileEntitySpecialRenderer{ private static final ResourceLocation outsidelightsteel = new ResourceLocation(Basicinfo.ID.toLowerCase() + ":/textures/blocks/modeloutsidelightsteel.png"); private final Modeloutsidelight model = new Modeloutsidelight(); public void renderAModelAt(TileEntityoutsidelightsteel par1EntityForge, double par2, double par4, double par6, float par8){ int metadata = par1EntityForge.getBlockMetadata(); int rotationAngle = 0; if(metadata%4 == 0){ rotationAngle = 0; }if(metadata%4 == 1){ rotationAngle = 270; }if(metadata%4 == 2){ rotationAngle = 180; }if(metadata%4 == 3){ rotationAngle = 90; } GL11.glPushMatrix(); GL11.glTranslated((float)par2 + 0.5F, (float)par4 + 1.5F, (float)par6 + 0.5F); GL11.glScaled(1.0F, -1F, -1F); GL11.glRotated(rotationAngle*90, 0.0F, 1.0F, 0.0F); this.bindTexture(outsidelightsteel); this.model.renderAll(); GL11.glPopMatrix(); } @Override public void renderTileEntityAt(TileEntity par1tileentity, double par2, double par4, double par6, float par8) { this.renderAModelAt((TileEntityoutsidelightsteel)par1tileentity, par2, par4, par6, par8); } }
  21. yes. how would i go about doing that?

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.