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.

deantonious

Members
  • Joined

  • Last visited

Everything posted by deantonious

  1. I know it, but it's dor my server, nobody is going to change them... I just want the way of doing it.
  2. Hi, I'm looking for someone to help me making a bike in minecraft. Thanks
  3. The Explorer kit is an item from my mod... What I want is to say something like addItemStackToInventory(1); instead of Item.stone.itemID I want a way to give an Item to the player with just the ID (number) instead of the name
  4. I fixed the second one by this way: package deantonious.blocks; import java.util.ArrayList; import java.util.Random; import deantonious.ModPowderCraft; import net.minecraft.block.material.Material; import net.minecraft.block.Block; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.monster.EntityCreeper; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.server.MinecraftServer; import net.minecraft.src.ModLoader; import net.minecraft.world.World; import net.minecraftforge.client.MinecraftForgeClient; import net.minecraftforge.common.MinecraftForge; public class BlockMenaSubsuelo extends Block { public BlockMenaSubsuelo(int id, Material material) { super(id, material); } /* public void breakBlock(World world, int x, int y, int z, int blockID, int metadata) { world.setBlock(x, y, z, Block.dirt.blockID); } */ @Override public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) { if(par5EntityPlayer.getHeldItem() == null) { if(par1World.isRemote){ ModLoader.getMinecraftInstance().thePlayer.addChatMessage("Necesitas un Cincel"); } return super.onBlockActivated(par1World, par2, par3, par4, par5EntityPlayer, par6, par7, par8, par9); } if(par5EntityPlayer.getHeldItem().itemID == ModPowderCraft.cincel.itemID) { par5EntityPlayer.getHeldItem().stackSize -= 1; //only if you want to use the item when you do this. if(par1World.isRemote) { int rand = par1World.rand.nextInt(99); if(rand<=5 && rand>=1){ ModLoader.getMinecraftInstance().thePlayer.addChatMessage("You found a... 1"); } else if(rand<=100 && rand>=1){ ModLoader.getMinecraftInstance().thePlayer.addChatMessage("You found a... 2"); ((EntityPlayer)MinecraftServer.getServer().getConfigurationManager().playerEntityList.get(0)).inventory.addItemStackToInventory(new ItemStack(ModPowderCraft.explorerKit)); } else if(rand<=40 && rand>=21){ ModLoader.getMinecraftInstance().thePlayer.addChatMessage("You found a... 3"); } else if(rand<=50 && rand>=41){ ModLoader.getMinecraftInstance().thePlayer.addChatMessage("You found a... 4"); } else if(rand<=70 && rand>=51){ ModLoader.getMinecraftInstance().thePlayer.addChatMessage("You found a... 5"); } else if(rand<=100 && rand>=71){ ModLoader.getMinecraftInstance().thePlayer.addChatMessage("You found a... 6"); } return true; } par1World.setBlock(par2, par3, par4, Block.dirt.blockID); return false; } return false; } But where i give the "Explorer Kit", I want instead to say the ID of the itemi want to give... just because the item is from other mod
  5. Hi, I'm making a Spanish Pixelmon server, and I'm creating my own mod to complete the server. Anybody who has played Pokemon games in the Sinnoh region, knows the underground multiplayer game. In this "dimension" there are traps, that when they are activated, make something like moving the player 6m... I made one of this using the motionX += 1; Everything was Ok until I tested it into my server, when someone activates the pressure plate, minecraft crashes... I have a seco d question... Im making a new block, and I want to make this actions in this order: - Right click on it Checks if you have or not the Pickaxe - If yes, it gives a random item to the player with the message "You found..." - Then the block changes into dirt - After X time it reapears I got the first step... Thanks and sorry for my english
  6. This was the one of my 2x2x1 block . The right one is this: public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4) { return !super.canPlaceBlockAt(par1World, par2, par3, par4) ? false : this.canBlockStay(par1World, par2, par3, par4); } public boolean canBlockStay(World par1World, int par2, int par3, int par4) { if (par1World.getBlockMaterial(par2 + 1, par3, par4).isSolid()) { return false; } else if (par1World.getBlockMaterial(par2, par3, par4 + 1).isSolid()) { return false; } else if (par1World.getBlockMaterial(par2 +1 , par3, par4 + 1).isSolid()) { return false; } else if (par1World.getBlockMaterial(par2 + 1, par3 + 1, par4).isSolid()) { return false; } else if (par1World.getBlockMaterial(par2, par3 + 1, par4 + 1).isSolid()) { return false; } else if (par1World.getBlockMaterial(par2 + 1, par3 + 1, par4 + 1).isSolid()) { return false; } else if (par1World.getBlockMaterial(par2, par3 + 1, par4).isSolid()) { return false; } else { int l = par1World.getBlockId(par2, par3 - 1, par4); return true; } }
  7. I fixed it! Code for checking if there is any block near the block: public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4) { return !super.canPlaceBlockAt(par1World, par2, par3, par4) ? false : this.canBlockStay(par1World, par2, par3, par4); } public boolean canBlockStay(World par1World, int par2, int par3, int par4) { if (par1World.getBlockMaterial(par2 + 1, par3, par4).isSolid()) { return false; } else if (par1World.getBlockMaterial(par2, par3, par4 + 1).isSolid()) { return false; } else if (par1World.getBlockMaterial(par2 +1 , par3, par4 + 1).isSolid()) { return false; } else { int l = par1World.getBlockId(par2, par3 - 1, par4); return true; } }
  8. When I place the block, it removes the near blocks. How I fix that?
  9. Thanks, I works!
  10. Thanks, it really helped me. The only thing I don't understand is the way of removing the hole block with one click. I don't know how to make the other cases...
  11. I know what you mean, but I don't know how to make it... I've looked for it, but no result
  12. Not working, I still walking into de block...
  13. I cant figure how to return the new AABB...
  14. I know that, the problem was how to use it... (Thanks for the reply)
  15. Hi, I made a new block using this tutorial http://www.minecraftforge.net/wiki/Rendering_a_Techne_Model_as_a_Block .The model was a 2x2x2 block. Everything was ok until I placed the block, I can walk throw the block... The bounds are all ok but I don't know why the only part y can't walk throw is the right corner BigBoxBlock package deantonious.blocks; import java.util.List; 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.Entity; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.World; public class BigBoxBlock extends BlockContainer { //Treat it like a normal block here. The Block Bounds are a good idea - the first three are X Y and Z of the botton-left corner, //And the second three are the top-right corner. public BigBoxBlock(int id) { super(id, Material.iron); this.setCreativeTab(CreativeTabs.tabBlock); this.setBlockBounds(0.0F, 0.0F, 0.0F, 2.0F, 2.0F, 2.0F); } //Make sure you set this as your TileEntity class relevant for the block! @Override public TileEntity createNewTileEntity(World world) { return new BigBoxEntity(); } //You don't want the normal render type, or it wont render properly. @Override public int getRenderType() { return -1; } //It's not an opaque cube, so you need this. @Override public boolean isOpaqueCube() { return false; } //It's not a normal block, so you need this too. public boolean renderAsNormalBlock() { return false; } //This is the icon to use for showing the block in your hand. public void registerIcons(IconRegister icon) { this.blockIcon = icon.registerIcon("bigbox"); } } BigBoxEntity package deantonious.blocks; import net.minecraft.tileentity.TileEntity; public class BigBoxEntity extends TileEntity { } BigBoxModel package deantonious.blocks; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; public class BigBoxModel extends ModelBase { //fields ModelRenderer Shape1; public BigBoxModel() { textureWidth = 128; textureHeight = 128; Shape1 = new ModelRenderer(this, 0, 0); Shape1.addBox(0F, 0F, 0F, 32, 32, 32); Shape1.setRotationPoint(-24F, -8F, -7F); Shape1.setTextureSize(128, 128); Shape1.mirror = true; setRotation(Shape1, 0F, 0F, 0F); } public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); Shape1.render(f5); } private void setRotation(ModelRenderer model, float x, float y, float z) { model.rotateAngleX = x; model.rotateAngleY = y; model.rotateAngleZ = z; } public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); } } BigBoxRenderer package deantonious.blocks; import org.lwjgl.opengl.GL11; import net.minecraft.block.Block; import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.entity.Entity; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; public class BigBoxRenderer extends TileEntitySpecialRenderer { //The model of your block private final BigBoxModel model; public BigBoxRenderer() { this.model = new BigBoxModel(); } private void adjustRotatePivotViaMeta(World world, int x, int y, int z) { int meta = world.getBlockMetadata(x, y, z); GL11.glPushMatrix(); GL11.glRotatef(meta * (-90), 0.0F, 0.0F, 1.0F); GL11.glPopMatrix(); } @Override public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale) { //The PushMatrix tells the renderer to "start" doing something. GL11.glPushMatrix(); //This is setting the initial location. GL11.glTranslatef((float) x + 0.5F, (float) y + 1.5F, (float) z + 0.5F); //This is the texture of your block. It's pathed to be the same place as your other blocks here. //Use in 1.6.2 this bindTexture(new ResourceLocation("textures/blocks/bigboxtext.png")); //the ':' is very important //This rotation part is very important! Without it, your model will render upside-down! And for some reason you DO need PushMatrix again! GL11.glPushMatrix(); GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); //A reference to your Model file. Again, very important. this.model.render((Entity)null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F); //Tell it to stop rendering for both the PushMatrix's GL11.glPopMatrix(); GL11.glPopMatrix(); } //Set the lighting stuff, so it changes it's brightness properly. private void adjustLightFixture(World world, int i, int j, int k, Block block) { Tessellator tess = Tessellator.instance; float brightness = block.getBlockBrightness(world, i, j, k); int skyLight = world.getLightBrightnessForSkyBlocks(i, j, k, 0); int modulousModifier = skyLight % 65536; int divModifier = skyLight / 65536; tess.setColorOpaque_F(brightness, brightness, brightness); OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float) modulousModifier, divModifier); } } Sorry for my english and thanks for any help
  16. Hi, I'm looking for someone to help me with something that I'm unable to make. I want to change the full HUD position to get something like this: If someone can help me with the full code, please contact me by PM Thanks
  17. Thank you for the help. I'm really noob at this... I think I'll leave this for later and I'll try other things.
  18. I'm not able to make it. Someone can help me with the code? Please
  19. Yes, I've registered some events in my mods
  20. I don't understand what you mean...
  21. Hi, I've tried to change the position of the HUD , but I didn't get anything... I would like to move the full HUD to the upside to get something like this: I really need help with this... Thanks

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.