
Cutter
Members-
Posts
47 -
Joined
-
Last visited
Everything posted by Cutter
-
they more than likely already have jobs. btw, are you trying to compliment them or is this an actual suggestion? because if this is a suggestion, telling forge developers will not make it happen (you would have to tell mojang).
-
[HELP]Why do I get errors when I change the Mainmenu screen name
Cutter replied to pixelzee's topic in General Discussion
nope the basics of minecraft will still be there, it will be essentially like minez but a whole lot bigger, and yes I do , just wondering has the release date of 1.3 been announced? Yes, it's scheduled for August 1st. Also, this thread has gone way off topic in the last few minutes... actually, what we have been talking about could well have been a solution to his problem as it would mean he would no longer have to do what he started the thread about. -
[HELP]Why do I get errors when I change the Mainmenu screen name
Cutter replied to pixelzee's topic in General Discussion
The reason people sue is because Mojang is a big opponent, if i was to copy some of his code to create a mod for minecraft why would mojang sue me if the mod would increase sales and is a free way advertising? I'm not planning of earning money since I own a media server and it is nearly all run of renewable power well the way you put it to me is that your completely overwriting minecraft. and you do know about patch 1.3, which makes the game essentially multiplayer only right? -
My First Block Made on forge Isn't working, Please Help!
Cutter replied to Wik3d Warrior's topic in General Discussion
have you edited the EnumToolMaterial base class to add in your RAVIRE EnumToolMaterial? because i dont see a variable anywhere in your code for it. -
[HELP]Why do I get errors when I change the Mainmenu screen name
Cutter replied to pixelzee's topic in General Discussion
surely if those base classes are changed to a large scale then those classes are not made by mojang? hah. take a look at the current front page of the minecraftforum.com. mojang are being sued by a company over software infringement for the exact same thinking, except mojang more than likely developed the whole thing from the start rather than copy pasting classes like you are. -
[HELP]Why do I get errors when I change the Mainmenu screen name
Cutter replied to pixelzee's topic in General Discussion
you will also be infringing on a looooooooot of stuff if you do this and could get sued. the only reason mods are allowed to exist in the first place is because they do not release many of the base classes in the mods. -
[HELP]Why do I get errors when I change the Mainmenu screen name
Cutter replied to pixelzee's topic in General Discussion
perhaps you should look at the .translateKey method and make sure its not generating an actual key from the string. other than that, some piece of code must be looking specifically for the name that mojang placed in there since its being added to a list. -
as far as i can tell, hes only got thaumcraft installed. so thats not possible.
-
Thank you SOOOOO much! This is my finished code that works: public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World world, int x, int y, int z, int par7) { int i = world.getBlockId(x, y, z); if (y != 0 && i == Block.planks.blockID) { int metaDataOfTargetBlock = world.getBlockMetadata(x, y, z); if(metaDataOfTargetBlock == 1){ Block block = Block.cloth; world.playSoundEffect((float)x + 0.5F, (float)y + 0.5F, (float)z + 0.5F, block.stepSound.getStepSound(), (block.stepSound.getVolume() + 1.0F) / 2.0F, block.stepSound.getPitch() * 0.8F); world.setBlockAndMetadataWithNotify(x, y, z, Block.cloth.blockID, 3); return true; } } return false; } The only wrong thing in your code there was the world.setBlockAndMetadata, it shouldve been world.setBlockAndMetadataWithNotify but i've fixed that up now! ah, in my original code im using world.setBlockAndMetadataWithNotify, not sure how it changed. anyways, np, glad i could help
-
public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World world, int x, int y, int z, int par7) { int metaDataOfTargetBlock = world.getBlockMetadata(x, y, z); if(metaDataOfTargetBlock==1){ world.setBlockAndMetadata(x, y, z, Block.cloth.blockID, 3); return true; } return false; } this code works if you just add it to an item as an overide. BECAREFUL though, if you set the metaDataOfTargetBlock == 0, all blocks in the world will be changed as most have a metadata of 0. although, im pretty sure if you just add in the target blocks blockID into the if statement aswell, you can prevent that. i think par7 is metaData being provided from the tool itself, but i dont know.
-
world.setBlockAndMetadata(x, y, z,blockID, metaData); say planks blockID is 50, and the metaData for the birch is 3 and you want to change the block at (0,0,0) world.setBlockAndMetadata(0, 0, 0, 50, 3) if you dont understand that method, then i think you should go back over metadata and relearn it. Read the first post and my first code. I cant 'set' it because its not the block that it sets its the block that is already there; thats why I have GETBlockId there at the first block however on the second one(the one that i set when right clicked) logically enough has SET because it sets the block there. The birch planks, taking my example are not the block that gets set when the first one gets clicked but its actually the block getting clicked. What I have problems with is to make it so that birch planks in this case and not any of the other planks gets turned into magenta wool;and as said before, I already have the damage value for the block It TURNS INTO. So before you start being a dick, get your facts straight. EDIT: If i am just misunderstanding what you've said, I deeply apologize and I can only ask of you to maybe tell me where to put the setBlockMetadata method and in what context, also; can you then make your code example like how we discussed it, with the birch plank/magenta wool thing? Thanks! no, i was being an idiot. but from the sounds of it, all your looking for is an if condition checking to make sure that the metadata is of a certain value, yes? in which case int birchPlankMetaData = world.getBlockMetadata(x, y, z); will get the metadata of the block being clicked on because you get the location of the block from the parameters of blockActivated. then use a simple if statement to check whether birchPlankMetaData is equal to the metadata value you need. public boolean blockActivated(World world, int x, int y, int z, EntityPlayer par5EntityPlayer){ int birchPlankMetaData = world.getBlockMetadata(x, y, z); if(birchPlankMetaData==0){ world.setBlockAndMetadata(x, y, z, Block.cloth.blockID, 3); return true; } return false; } as simple as that i think. worked for changing a meta data item i had into lightblue wool.
-
thanks, thats great. i thought id checked RenderBlock, but i must have missed it among the 5700 lines of code in there =.=
-
Im trying to make a metadata block into another metadata block by right clicking said block with an item. I already got the block that it turns into working with metadata but not the one you click. I dont know how to add in a damage value to the block that you right click to make into the second block. SetBlockMetadataWithNotify only works on the block that it turns into not the actual block you click. Thank you! BTW there should've been a getBlockIdAndMetadata... "BTW there should've been a getBlockIdAndMetadata..." = int a = world.getBlockMetadata(x, y, z); "Im trying to make a metadata block into another metadata block by right clicking said block with an item." = world.setBlockAndMetadataWithNotify(x, y, z, mod_cutter.storageTank.blockID, a+1); the "a+1" part changes the current blocks metadata to 1 higher, which is exactly what your looking for. unless the problem is different to what you described.
-
so, im looking at recreating a storage tank similar to buildcrafts without looking at any of their code, and iv managed to make it up to using the metadata to store how much water is in the storage tank, but i ran into the problems of textures not working the way i want it to. so i started thinking of how else it could be done, and remembered that cauldrons seem to hold actual water, but i cannot for the life of me see where the coding for this is as it is not in BlockCauldron (i checked multiple times with every method). does anyone know of the class that handles the water within a cauldron? and the class where it is rendered? i know it uses render type 24, but i do not know where it is used. thanks.
-
ItemStack item = par5EntityPlayer.getCurrentEquippedItem(); int a = world.getBlockMetadata(x, y, z); if(item!=null){ int itemID = item.itemID; if(itemID == Item.bucketWater.shiftedIndex){ if(a < 4){ world.setBlockAndMetadataWithNotify(x, y, z, mod_cutter.storageTank.blockID, a+1); par5EntityPlayer.inventory.setInventorySlotContents(par5EntityPlayer.inventory.currentItem, new ItemStack(Item.bucketEmpty)); return true; } }else if(itemID == Item.bucketEmpty.shiftedIndex){ if(a > 0){ world.setBlockAndMetadataWithNotify(x, y, z, mod_cutter.storageTank.blockID, a-1); par5EntityPlayer.inventory.setInventorySlotContents(par5EntityPlayer.inventory.currentItem, new ItemStack(Item.bucketWater)); return true; } } } return false; works for me. i have been messing around with the code for the past few days, trying to recreate a storage tank similar to buildcrafts without looking at their code. having problems with filling it with actual water though (about to post a thread for help)
-
oh the error wasnt what i was needing answering. i was just wondering how it was working thats all, thanks.
-
now i feel like an idiot, but when mods say they are dependent on forge and not modloader anymore, does that mean they are now not adding blocks to the game using the ModLoader.addName()/ModLoader.RegisterBlock() or are functions like these used in forge? i started attempting to learn how to mod like 6 months ago and barely touched it, and at the time i installed modloader into the jar with forge after it, but i remember it being a huge hastle to install so im not wanting to attempt it now as i would lose my experimentation i have done over the last few hours so i thought it would be much easier to ask =) thanks. oh and the reason for asking is that im getting "java.lang.NullPointerException at net.minecraft.src.ItemStack.getIconIndex(ItemStack.java:106)" error when trying to craft a custom recipe which know is because i have not used the methods i was talking about (they worked when i added them).