I like the RPG realism. I like it a lot but is there any way you can make a 32x32 texture pack version because my computer likes that a bit better thnx!
but mop in your first message cant bebe referenced it says be referenced before it is defined. and "player" is nt a field (I am using 1.2.5 if this makes a difference)
will turn the player's line of sight, into something where the hit point is detectable. 1500D is the range (1500 blocks, you can change it).
if (mop = null){ return;}
changed the !=null to this because i'm too lazy to encompass the rest of the code in it
Vec3 VECTORNAME = mop.hitVec;//turns mop into a vector with the tip being the first block mop hits
int x = (int) VECTORNAME.xcoord;//x coord of block
int y = (int) VECTORNAME.ycoord;//y coord of block
int z = (int) VECTORNAME.zcoord;//z coord of block
MetroSaskwatch i did that first step complete. NukedPanda I looked up vec3d and it just fazes me it has multiple integers and methods. I'm not sure which one's the right one. you mind pointing me in the right direction? I do have a base mod. Thnx everyone for helping this is a big help and i am very thankful!
I won't do any work for you here because if I do you wont learn anything but i'll set you on the right track, first don't extend ItemReed, switch that to item, then poke around Item classes in the source, you should quickly find a method called onItemRightClick. Hope this helps you get started !!
ive seen that i thought itemreed was right casue of the cake type style i have also seen the onRightClick i used it but sadly i migh tbe able to get it to place a block idk but i can only make it return the item not take away a use. Im going to create a material class for it but im not sure what exactly the right cde should be ill poke around and hope i can something. thnx for your help!
I am making a wand/staff. I want it to when you right click it places a block. I also want to know how if you hold right click it sends a continuous stream of fire charges. I am posting my code below. I want it to acte like a tool but im not sure how i should make the material class or enum or whaterver. I'm sry i have almost nothing in the class im having trial iand error with trying other peoples ideas but they didnt work so any ideas on this part of my mod?
package
net.minecraft.src;
public
classItemWizardStaffextends ItemReed{
sry for the akward paste if anyone has any ideas on makeing it a picture or soomething tell me and yah also sry for my virtually no code.
I am making a mod for minecraft. It is currently 1.2.5 but will be updated but anyway I am making a custom furnace using Eclipse Juno. I hit run and pull up minecraft then i open a new world. The only problem is when i open the furnace where the gui should be it is white and in large pixel letters it says "missing". I am posting the Gui Code below. If anyone can plz help me!
package
net.minecraft.src;
class GuiGrill extends GuiContainer{
public GuiGrill(InventoryPlayer player, TileEntityGrill tileEntity) {
Mods loaded: 2
ModLoader 1.2.5
mod_MoreBlocks MoreBlocks v1.0
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
--- BEGIN ERROR REPORT 9d5db8d1 --------
Generated 7/27/12 10:00 AM
Minecraft: Minecraft 1.2.5
OS: Windows Vista (x86) version 6.0
Java: 1.7.0_05, Oracle Corporation
VM: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: GeForce 6150SE nForce 430/PCI/SSE2/3DNOW! version 2.1.2, NVIDIA Corporation
java.lang.ArrayIndexOutOfBoundsException: 1550
at net.minecraft.src.ModLoader.initStats(ModLoader.java:905)
at net.minecraft.src.ModLoader.init(ModLoader.java:878)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:157)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:85)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:12)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:424)
at net.minecraft.client.Minecraft.run(Minecraft.java:786)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT c01ff4f5 ----------
I got this error when I did lowercase mod_MoreBlocks
can u guys help at all?
I created a mod that adds a block (this is my first mod). I hit run on eclipse and it pulled up minecraft but when i tried to craft my item it wouldnt appear im posting my codes here. Plz look at it and see if you can help.
Mod_MoreBlocks.java
package
net.minecraft.src;
publicclass Mod_MoreBlocks extends BaseMod{
publicstaticfinal Block panelBlock = new BlockPanelBlock(1550, Material.pumpkin).setBlockName("Panel");
i created a mod which adds a block but when i craft it on minecraft it wont appear i cant get it in any shape or form. im posting my code here lz help me if you know what to do.
Mod_MoreBloks.java
package
net.minecraft.src;
publicclass Mod_MoreBlocks extends BaseMod{
publicstaticfinal Block panelBlock = new BlockPanelBlock(1550, Material.pumpkin).setBlockName("Panel");
0
0
0
Thnx a lot but how do u make it to where it uses a button like V insted of right click.
0
0
0
package
net.minecraft.src;
public
class ItemWizardStaff extends Item
{
public ItemWizardStaff(int par1)
{
super(par1);
maxStackSize = 1;
setMaxDamage(1700);
}
public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7)
{
if (par7 == 0)
{
par5--;
}
if (par7 == 1)
{
par5++;
}
if (par7 == 2)
{
par6--;
}
if (par7 == 3)
{
par6++;
}
if (par7 == 4)
{
par4--;
}
if (par7 == 5)
{
par4++;
}
if (!par2EntityPlayer.canPlayerEdit(par4, par5, par6))
{
return false;
}
int i = par3World.getBlockId(par4, par5, par6);
if (i == 0)
{
par3World.setBlockWithNotify(par4, par5, par6, Block.
waterStill.blockID);
}
par1ItemStack.damageItem(1, par2EntityPlayer);
return true;
}
}
0
ive seen that i thought itemreed was right casue of the cake type style i have also seen the onRightClick i used it but sadly i migh tbe able to get it to place a block idk but i can only make it return the item not take away a use. Im going to create a material class for it but im not sure what exactly the right cde should be ill poke around and hope i can something. thnx for your help!
0
package
net.minecraft.src;
public
class ItemWizardStaff extends ItemReed{
sry for the akward paste if anyone has any ideas on makeing it a picture or soomething tell me and yah also sry for my virtually no code.
}
0
package
net.minecraft.src;
class GuiGrill extends GuiContainer{
public GuiGrill(InventoryPlayer player, TileEntityGrill tileEntity) {
GrillInventory = tileEntity;
}
protected void drawGuiContainerForegroundLayer(){
fontRenderer.drawString("Grill", 60, 6, 0x404040);
fontRenderer.drawString("Inventory", 8, (ySize - 96), 0x404040);
}
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
int i = mc.renderEngine.getTexture("/gui/Furnace.png");
GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
mc.renderEngine.bindTexture(i);
int j = (width - xSize) / 2;
int k = (height - ySize) / 2;
drawTexturedModalRect(j, k, 0, 0,
xSize, ySize);
if(GrillInventory.isBurning()){
int l = GrillInventory.getCookTimeRemainingScaled(12);
drawTexturedModalRect(j + 56, (k + 36 + 12) - l, 176, 12 - l, 14, l + 2);
}
int i1 = GrillInventory.getCookProgressScaled(24);
drawTexturedModalRect(j + 79, k + 34, 176, 14, i1 + 1, 16);
}
}
0
ModLoader 1.2.5
mod_MoreBlocks MoreBlocks v1.0
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
--- BEGIN ERROR REPORT 9d5db8d1 --------
Generated 7/27/12 10:00 AM
Minecraft: Minecraft 1.2.5
OS: Windows Vista (x86) version 6.0
Java: 1.7.0_05, Oracle Corporation
VM: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: GeForce 6150SE nForce 430/PCI/SSE2/3DNOW! version 2.1.2, NVIDIA Corporation
java.lang.ArrayIndexOutOfBoundsException: 1550
at net.minecraft.src.ModLoader.initStats(ModLoader.java:905)
at net.minecraft.src.ModLoader.init(ModLoader.java:878)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:157)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:85)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:12)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:424)
at net.minecraft.client.Minecraft.run(Minecraft.java:786)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT c01ff4f5 ----------
I got this error when I did lowercase mod_MoreBlocks
can u guys help at all?
0
0
Sadly that didnt fix it any other ideas?
0
Mod_MoreBlocks.java
package
net.minecraft.src;
public class Mod_MoreBlocks extends BaseMod{
public static final Block panelBlock = new BlockPanelBlock(1550, Material.pumpkin).setBlockName("Panel");
@Override
public String getVersion() {
return "MoreBlocks v1.0";
}
@Override
public void load() {
ModLoader.registerBlock(
panelBlock);
ModLoader.addName(
panelBlock, "Panel");
panelBlock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "panels.png");
ModLoader.addRecipe(
new ItemStack(panelBlock, 64), new Object[]{
"WWW", "WWW", "WWW",
'W', Block.planks,
});
}
}
BockPanelBlock.java
package
net.minecraft.src;
public
class BlockPanelBlock extends Block{
protected BlockPanelBlock(int i, Material material) {
super(i, material);
}
}
thnx for the help!
0
Mod_MoreBloks.java
package
net.minecraft.src;
public class Mod_MoreBlocks extends BaseMod{
public static final Block panelBlock = new BlockPanelBlock(1550, Material.pumpkin).setBlockName("Panel");
@Override
public String getVersion() {
return "MoreBlocks v1.0";
}
@Override
public void load() {
ModLoader.registerBlock(
panelBlock);
ModLoader.addName(
panelBlock, "Panel");
panelBlock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "panels.png");
ModLoader.addRecipe(
new ItemStack(panelBlock, 64), new Object[]{
"WWW", "WWW", "WWW",
'W', Block.planks,
});
}
}
BlockPanelBlock.java
package
net.minecraft.src;
public
class BlockPanelBlock extends Block{
protected BlockPanelBlock(int i, Material material) {
super(i, material);
}
}
0