Everything posted by KeeperofMee
-
Mods folder path?
Thanks both
-
Mods folder path?
How do I get the mods directory/path from code?
-
[1.7.10] Event Armor Equipped ?
PlayerTickEvent. player.inventory.armorItemInSlot(/*The slot.*/).getItem(); Slots: 0 = boots. 1 = leggings. 2 = chestplate. 3 = helmet.
-
ItemSmeltedEvent, keeping track of items smelted
I'm trying to use ItemSmeltedEvent in order to keep track of items smelted(I've added a few "rpg stats"), the problem is that the event differently on shift and normal pickup so I printed them: The problem is that in order to keep track of the items smelted I increase my own int with the stacksize of the event.smelting, but as you can see shift click triggers twice on server side with a stacksize of 0. Is there anyway else I can keep track of items smelted properly
-
Cross Mod Ore Usage
Items/Blocks: OreDictionary.registerOre(myInstance, "oreSilver"); Recipes: GameRegistry.addRecipe(new ShapedOreRecipe("QIW", " S ", " S ", 'Q', "oreCopper", 'I', "ingotSilver", 'W','"plankWood", 'S', "stickWood"));
-
-
Could you please use readable variable names...?
-
How to override base minecraft code
All the mods you had are possible to easily recreate in forge without base edits.
-
How to find out things by yourself.
Thank you, that's something at least, but what if it's something no one has never done? Then you study the minecraft code and learn java.
-
Using Eclipse on ipad? Or alternatives?
Well i just don't wan't to miss 2 weeks of coding, i would not like to test it, just code and then test it back home I found some programs, I only listed the ones with java syntax: https://itunes.apple.com/us/app/koder-code-editor/id439271237?mt=8 https://itunes.apple.com/us/app/codetogo/id382677229?mt=8 https://itunes.apple.com/us/app/for-i-code-editor-for-the-ipad/id363493710?mt=8 Then there's also simple text editors(no syntax but free): https://itunes.apple.com/us/app/edhita-open-source-text-editor/id398896655?mt=8 I don't know if the next one has java syntax but I'll list it anyway: https://itunes.apple.com/se/app/vim/id492668168?mt=8 There are probably more out there but hope I could be to any help.
-
Using Eclipse on ipad? Or alternatives?
Why would you want eclipse on an iPad, you can't test it anyway.
-
[SLOVED] 1.7.10 Are there a gui close event?
You can also use currentScreen in any class. Minecraft.getMinecraft().currentScreen
-
Can't move items in inventory using .displayGUIWorkbench
Simply copy the workbench gui classes and change the method from false to true. Don't forget the gui handler.
-
Crafting question
Heres a list of damages: http://pastebin.com/Pu4GJQMJ new ItemStack(Items.dye, 1, DAMAGE)
-
[1.7.10] A Block that recreates after destoryed
You're totally right I really shouldn't code while distracted. My new code probably isn't the best but it's better anyway, Here's the new code: @Override public void breakBlock(World world, int x, int y, int z, Block block, int meta) { super.breakBlock(world, x, y, z, block, meta); //List of drops List<ItemStack> drops = block.getDrops(world, x, y, z, meta, 0); //Loops through all drops. for(ItemStack itemstack : drops){ //Spawns the drops into the world. world.spawnEntityInWorld(new EntityItem(world, x, y, z, itemstack)); } //Sets the block to the current block. world.setBlock(x, y, z, this); }
-
[1.7.10] A Block that recreates after destoryed
I don't usually give code but anyway when I do I add comments.. It's your loss if you copy and paste without trying to understand so please don't if you're serious about modding. @Override public void breakBlock(World world, int x, int y, int z, Block block, int meta) { //Using random ints in the drops may cause a crash. Set amounts don't. //Loops through all drops. for(int i = 0; i < block.getDrops(world, x, y, z, meta, 0).size(); i++){ //Breaks the loop if i == size. if(i == block.getDrops(world, x, y, z, meta, 0).size()){ break; } //Spawns the drops into the world. world.spawnEntityInWorld(new EntityItem(world, x, y, z, block.getDrops(world, x, y, z, meta, 0).get(i))); } //Sets the block to the current block. world.setBlock(x, y, z, this); }
-
Walking on water
Not jumping as on land but you can add a check to see if the jump button is pressed and if so temporary disable it while you're pressing the jump keybind just replace player.motionY = 0.0D with this(it will also enable you to get onto land again without any problems(i.e. before you would have to find land at the same height w/o it)): if(!Minecraft.getMinecraft().gameSettings.keyBindJump.getIsKeyPressed()){ player.motionY = 0.0D; }
-
Walking on water
Try simply using (please not you will not be able to jump while walking on water due to the nature of setting the Y to 0 ) if(world.getBlock(x, y-1, z).getMaterial() == Material.water){ player.motionY = 0.0D; } Image(there should atleast be one):
-
Custom Ore Generation(HELP)
Make a class implementing IWorldGenerator then register it with GameRegistry.registerWorldGenerator(new MyWorldGeneratorClass(), 0);
-
Flipping texture? Horizontally/Vertically.
Is there anyway to flip a texture without having to flip it inside an editing software and save a new image?
-
Rotate block in inventory
If I remember correctly it was something like this inside your getIcon(int side, int meta){} method: if(side == 3 && meta == 0){ return frontIcon; }else{ //Your current code }
-
[SOLVED]@ForgeSubscribe not recognized and how to set player walking speed?
learn to java.
-
[1.7.10] Item icon only renders in hand
Could you post your log?
-
How to submit "unobfuscated names" of functions?
This may not be the correct place but I'm wondering how to submit "unobfuscated names" of function(if there is such a place)?
-
[1.7.2] Turn Off Pickaxe Recipe Mirroring?
Make your own IRecipe class... I made a similar mod yesterday and I needed the same so I copied the vanilla shaped recipe code and removed one of the match checks.
-
[SOLVED] Rendering BlockItem in inventory
You have access to the ItemBlock/ItemStack just make a new ItemBlock and register your block with it like so: GameRegistry.registerBlock(myBlockInstance, MyItemBlock.class, "myBlockName"); EDIT: nvm
IPS spam blocked by CleanTalk.