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.

f1rSt1k25

Members
  • Joined

  • Last visited

  1. Create new file. public static Configuration config; public static void init(File configFile) { config = new Configuration(configFile); try { config.load(); //code } catch (Exception e) { FMLLog.log(Level.SEVERE, e, modid + " has had a problem loading its configuration"); } finally { config.save(); } } In FMLPreInitializationEvent: ConfigHandler.init(event.getSuggestedConfigurationFile());
  2. Iterator<IRecipe> iterator = CraftingManager.getInstance().getRecipeList().iterator(); while(iterator.hasNext()){ ItemStack r = iterator.next().getRecipeOutput(); if(r != null && r.itemID == Item.YourItem.itemID) iterator.remove(); }
  3. Why create a new entity? Just put a block inheritance from Blotsksand. P.S Sorry for my english.
  4. package f1rSt1k.blocks; import java.util.List; import java.util.Random; import f1rSt1k.Main; import net.minecraft.block.Block; import net.minecraft.block.BlockGlass; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.Icon; import net.minecraft.world.IBlockAccess; public class BlockDecorativeGlass extends BlockGlass { public static boolean connectedTexture = true; public static Icon[] textures = new Icon[47]; public static int[] textureRefByID = { 0, 0, 6, 6, 0, 0, 6, 6, 3, 3, 19, 15, 3, 3, 19, 15, 1, 1, 18, 18, 1, 1, 13, 13, 2, 2, 23, 31, 2, 2, 27, 14, 0, 0, 6, 6, 0, 0, 6, 6, 3, 3, 19, 15, 3, 3, 19, 15, 1, 1, 18, 18, 1, 1, 13, 13, 2, 2, 23, 31, 2, 2, 27, 14, 4, 4, 5, 5, 4, 4, 5, 5, 17, 17, 22, 26, 17, 17, 22, 26, 16, 16, 20, 20, 16, 16, 28, 28, 21, 21, 46, 42, 21, 21, 43, 38, 4, 4, 5, 5, 4, 4, 5, 5, 9, 9, 30, 12, 9, 9, 30, 12, 16, 16, 20, 20, 16, 16, 28, 28, 25, 25, 45, 37, 25, 25, 40, 32, 0, 0, 6, 6, 0, 0, 6, 6, 3, 3, 19, 15, 3, 3, 19, 15, 1, 1, 18, 18, 1, 1, 13, 13, 2, 2, 23, 31, 2, 2, 27, 14, 0, 0, 6, 6, 0, 0, 6, 6, 3, 3, 19, 15, 3, 3, 19, 15, 1, 1, 18, 18, 1, 1, 13, 13, 2, 2, 23, 31, 2, 2, 27, 14, 4, 4, 5, 5, 4, 4, 5, 5, 17, 17, 22, 26, 17, 17, 22, 26, 7, 7, 24, 24, 7, 7, 10, 10, 29, 29, 44, 41, 29, 29, 39, 33, 4, 4, 5, 5, 4, 4, 5, 5, 9, 9, 30, 12, 9, 9, 30, 12, 7, 7, 24, 24, 7, 7, 10, 10, 8, 8, 36, 35, 8, 8, 34, 11 }; public BlockDecorativeGlass() { super(502, Material.glass, false); setHardness(0.6F); setResistance(2.0F); setCreativeTab(Main.f1rSt1kCraftCreativeTab); setStepSound(soundGlassFootstep); } public int idDropped(int par1, Random par2Random, int par3) { return Item.stick.itemID; } public int quantityDropped(Random par1Random) { return 1 + par1Random.nextInt(4); } public void registerIcons(IconRegister iconRegistry) { for (int i = 0; i < 47; i++) textures[i] = iconRegistry.registerIcon("f1rst1kcraft:woodGlass_" + (i+1)); } public Icon getBlockTexture(IBlockAccess world, int x, int y, int z, int side) { if(connectedTexture){ boolean[] bitMatrix = new boolean[8]; if (side == 0 || side == 1) { bitMatrix[0] = world.getBlockId(x-1, y, z-1) == this.blockID; bitMatrix[1] = world.getBlockId(x, y, z-1) == this.blockID; bitMatrix[2] = world.getBlockId(x+1, y, z-1) == this.blockID; bitMatrix[3] = world.getBlockId(x-1, y, z) == this.blockID; bitMatrix[4] = world.getBlockId(x+1, y, z) == this.blockID; bitMatrix[5] = world.getBlockId(x-1, y, z+1) == this.blockID; bitMatrix[6] = world.getBlockId(x, y, z+1) == this.blockID; bitMatrix[7] = world.getBlockId(x+1, y, z+1) == this.blockID; } if (side == 2 || side == 3) { bitMatrix[0] = world.getBlockId(x+(side==2?1:-1), y+1, z) == this.blockID; bitMatrix[1] = world.getBlockId(x, y+1, z) == this.blockID; bitMatrix[2] = world.getBlockId(x+(side==3?1:-1), y+1, z) == this.blockID; bitMatrix[3] = world.getBlockId(x+(side==2?1:-1), y, z) == this.blockID; bitMatrix[4] = world.getBlockId(x+(side==3?1:-1), y, z) == this.blockID; bitMatrix[5] = world.getBlockId(x+(side==2?1:-1), y-1, z) == this.blockID; bitMatrix[6] = world.getBlockId(x, y-1, z) == this.blockID; bitMatrix[7] = world.getBlockId(x+(side==3?1:-1), y-1, z) == this.blockID; } if (side == 4 || side == 5) { bitMatrix[0] = world.getBlockId(x, y+1, z+(side==5?1:-1)) == this.blockID; bitMatrix[1] = world.getBlockId(x, y+1, z) == this.blockID; bitMatrix[2] = world.getBlockId(x, y+1, z+(side==4?1:-1)) == this.blockID; bitMatrix[3] = world.getBlockId(x, y, z+(side==5?1:-1)) == this.blockID; bitMatrix[4] = world.getBlockId(x, y, z+(side==4?1:-1)) == this.blockID; bitMatrix[5] = world.getBlockId(x, y-1, z+(side==5?1:-1)) == this.blockID; bitMatrix[6] = world.getBlockId(x, y-1, z) == this.blockID; bitMatrix[7] = world.getBlockId(x, y-1, z+(side==4?1:-1)) == this.blockID; } int idBuilder = 0; for (int i = 0; i <= 7; i++) idBuilder = idBuilder + (bitMatrix[i]?(i==0?1:(i==1?2:(i==2?4:(i==3?8:(i==4?16:(i==5?32:(i==6?64:128))))))):0); return idBuilder>255||idBuilder<0?textures[0]:textures[textureRefByID[idBuilder]]; } return textures[0]; } public Icon getIcon(int side, int meta) { return textures[0]; } }

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.