public class Recipes
{
public static void init()
{
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockfirestonepolished), "ff ", "ff ", " ", new ItemStack(ModItems.FireCrystal));
}
}
Im sure this a dumb little thing, I just cant find it
I was going to add a new ore to worldgen for my mod PhoenixCraft, but low and behold when I googled the name I had thought of "Firestone" it turned out railcraft had beaten me to it and on top of that the textures looked somewhat similar. I had not known of this before hand. What do you guys think are these textures too similar? I went for those diagonal stripes because of nether quartz ore and I like the idea of the crystal showing like it had clawed its way out from the stone. And also anyone know a better name than Firestone that will be less copy catish?
How hard would it be for my ore to shoot out little fire or red particles? I looked into the Metalurgy src, and it looks kinda complicated but is there an easy way to do it?
I just got started coding a mod yesterday so forgive me if this is obvious. I already have a block that has a rim of iron and an inside of glass. How would I get the textures for the glass to connect when it is next to another glass vertically/horizontally? I know it involves a sprite sheet but I'm lost on the implementation.
span>Why people just can't look up the code in the vanilla's source? I always look it up if I don't know what it is.
If you extend a class with an other for example Block your class will be able to override the Block's methods.
I did look it up but couldn't get it to work, I didn't think to override it...
0
Derp! I do, one sec I'm testing it with them added.
0
0
0
0
0
package com.Phoenix.PhoenixCraft.init;
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
public class Recipes
{
public static void init()
{
GameRegistry.addRecipe(new ItemStack(ModBlocks.blockfirestonepolished), "ff ", "ff ", " ", new ItemStack(ModItems.FireCrystal));
}
}
Im sure this a dumb little thing, I just cant find it
0
https://www.dropbox.com/s/c5x329sprbhpane/crash-2014-09-29_19.19.56-client.txt?dl=0
0
https://www.dropbox.com/s/1oamajm34p97h60/Screenshot 2014-09-25 16.22.00.png?dl=0
0
0
public BlockPortHole()
{
super("glass", false,500);
setHardness(0.5F);
}
public void registerIcons(IIconRegister iconRegistry)
{
for (int i = 0; i < 47; i++) textures = iconRegistry.registerIcon("ctm:woodGlass_" + (i+1));
}
0
I am following Pahimars tuts. Can anyone help me out with this. Obvoiusly the file structure is wrong but I don't know how to fix it...
package com.Phoenix.PhoenixCraft.block;
import net.minecraft.block.BlockGlass;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.IBlockAccess;
import net.minecraft.util.IIcon;
import net.minecraft.util.IRegistry;
import net.minecraft.util.RegistrySimple;
import javax.swing.*;
import java.util.List;
public class BlockPortHole extends BlockGlass
{
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 BlockPortHole()
{
super(500, Material.glass, false);
setHardness(0.5F);
}
public void addInformation(ItemStack itemstack, EntityPlayer player, List descriptiveList, boolean
{
descriptiveList.add("Decorative Block");
}
public void registerIcons(IconRegister iconRegistry)
{
for (int i = 0; i < 47; i++) textures = iconRegistry.registerIcon("ctm:woodGlass_" + (i+1));
}
public Icon getBlockTexture(IBlockAccess world, int x, int y, int z, int side)
{
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==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]];
}
public Icon getIcon(int side, int meta)
{
return textures[0];
}
}
0
0
I just got started coding a mod yesterday so forgive me if this is obvious. I already have a block that has a rim of iron and an inside of glass. How would I get the textures for the glass to connect when it is next to another glass vertically/horizontally? I know it involves a sprite sheet but I'm lost on the implementation.
0
I did look it up but couldn't get it to work, I didn't think to override it...
0
package com.Phoenix.PhoenixCraft.block;
import net.minecraft.block.BlockGlass;
import net.minecraft.block.material.Material;
import java.util.Random;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class BlockPortHole extends BlockPC
{
public BlockPortHole() {
super();
this.setBlockName("blockporthole");
this.setHardness(0.3F);
this.setBlockTextureName("blockporthole");
this.setStepSound(soundTypeGlass);
this.setLightOpacity(1);
this.
}