Everything posted by deadrecon98
-
[SOLVED][1.7.10]Cancelling Crafting?
I just want to check a normal recipe like 111, 222, 323, but I am trying to figure out a way of doing this. The recipe(3 in specific) would be the block but I cannot get the block by itself so I tried using ItemStacks. With ItemStacks however, I need to check if they are null and then it just goes downhill from there.
-
blocks in recipies.
Okay, let me explain every bit of this to you. GameRegistry.addRecipe(new ItemStack(ITEM, QUANTITY, META-DATA), "123", "456", "789", '1', ITEM/BLOCK, etc...); ITEM = The item OR block you wish to add. QUANTITY = Amount of that item OR block. META-DATA = Meta-data of the item and or block "123", "456", "789" = Corresponding on the crafting grid. 1 = left, 2 = mid, 3 = right. Each seperate one is a new line. Ex 456 is in the middle and 789 is on the bottom. '1', ITEM/BLOCK = You need one of these for every (different) character in the recipe. The second part is the item or block it stands for. Ex: GameRegistry.addRecipe(new ItemStack(Items.stick, 3), "121", "131", "121", '1', Blocks.wood, '2', Items.diamond, '3', Items.carrot); This will make a recipe for 3 stick by using wood, diamonds, and carrots. Just place them in the order shown. The recipe to make this is now: TOP: Wood, Diamond, Wood MIDDLE: Wood, Carrot, Wood BOTTOM: Wood, Diamond, Wood
-
[SOLVED][1.7.10]Cancelling Crafting?
I can't figure this out. How would I check if there is a specific recipe in it? I have looked at your code for the dirt block but it is completely useless unless I am looking for just one Item.
-
[1.8] Custom walls displaying duplicate creative tab items *SOLVED*
Could we get more than that small chunk of code? Also, try giving the block a texture like ^that person said. That might be the issue.
-
[SOLVED][1.7.10]Cancelling Crafting?
Oooh, so that's where Notch made everything overly-complicated. Thanks a ton, I would've known to use reflection. (because I didn't know it existed)
-
[SOLVED][1.7.10]Cancelling Crafting?
Could you give me an example of how this could be achieved? What you want to do is create a class implementing IRecipe. Fill in the methods appropriately. Check all conditions under the matches() method and return false if any of your conditions are false. Return the crafting result under getRecipeResult(). See net.minecraft.item.crafting for more details. EDIT: Forgot the most important part: register your recipe using GameRegistry.addRecipe(new YourIRecipe()); Thank you, I've never bothered with something like this before but turns out it's very simple!
-
[SOLVED][1.7.10]Cancelling Crafting?
Could you give me an example of how this could be achieved?
-
[1.7.10]Fire Rate on guns
You are much better off creating a tick handler and then sending packets than using nbt. Nbt saves to a file so it takes longer, but using a variable in your ram causes much less lag.
-
[SOLVED][1.7.10]Cancelling Crafting?
I am trying to make a mod(duh) and I am getting stuck on one bit where it checks whether the player has the requirements and if not I want it to cancel the crafting (or at least get rid of the product('s)) and give the player back their items. I am currently looking into the onCreated method but I don't think it is possible here. Any help would be greatly appreciated. Here is my code btw, just in case you are confused as to what I am trying to do. @Override public void onCreated(ItemStack is, World world, EntityPlayer player){ super.onCreated(is, world, player); if(!world.isRemote){ if(Levels.getMagicLevel(player) >= levelNeeded){ Levels.addMagicXP(player, this.xpGiven); player.addChatComponentMessage(new ChatComponentText(EnumChatFormatting.GREEN + "+" + this.xpGiven + EnumChatFormatting.GOLD + " to Magic! Only " + Levels.getRemainingXpToLevel(player) + " to go!")); player.addChatComponentMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Total XP: " + EnumChatFormatting.GOLD + Levels.getMagicXP(player))); }else{ if(this.craftingReagentsI.size() > 0){ for(int i=0;i<this.craftingReagentsI.size();i++){ player.dropItem(this.craftingReagentsI.get(i), 1); } } if(this.craftingReagentsB.size() > 0){ for(int i=0;i<this.craftingReagentsB.size();i++){ player.dropItem(new ItemStack(this.craftingReagentsB.get(i)).getItem(), 1); } } } } }
-
How to make a water mob swimming on place (perfectly still, no gravity)
You need to get the movement event(From forge) and then whenever the mob is moving, if it is on the y axis, cancel it.
-
[1.7.10] TileEntity Texture doesn't load
You need to give the block itself a texture with block.setTextureName("modid:texturename"). This will be the texture for it while it is in your inventory.
-
[1.7.10]Realistic Deaths
I guess you take the term Frequently Asked Questions very seriously. Who needs answers anyway? Made my morning. Lol well spotted. I didn't even see that mistake.
-
[1.7.10]Realistic Deaths
Whoops, I just took the information from my other post. I better change that.
-
[1.7.10]Realistic Deaths
Welcome https://dl.dropboxusercontent.com/u/73396944/Dragon%20Update%20Logo.png[/img] Welcome to my mod page! This is an old idea of mine recently brought to minecraft! Have you ever been bored of the way that mobs drop items? Me to, that is why I created this mod. Now instead of worrying about the mobs dropping just a few items you can much, much, more! Youtube videos wanted! Please create one and PM it to me! NEWS WELCOME TO 1.7.10 and a new version of Realistic Deaths! I have finally found the bit of inspiration that I needed to push another update of this mod and this one is much, much, better than some of the others. I have added some new things, some over powered, some not so powered whatsoever. I hope that you guys enjoy this version as much as I did making it. Newest Lore After decades of research you have finally found a way to take those old, stale dragon eggs and fertilize them! With this you are able to hatch babies from it but the babies are a bit different. Due to them being in the egg for such an extended period of time "Long Term Mutation" has kicked in and the baby is an entirely new species! This species is stronger, faster, and more dangerous than it's mother. You better watch out, this dragon makes his mother look like cotton. Description This mod adds in a new function to mob deaths! Whenever they die there is now a quarter chance that they will drop a "body" or head. With this head you can either mine it to get rid of it or carve into it with a Carving Knife! This will remove the block and leave you with more drops than before! Download The Mod Crafting Recipes Now in the guide book! Visit us on Github! To Be Added Before you get the list I want you to leave your ideas below! *Iron Golem Head *Wolf Head *Any other mobs that are in mc... ;3 Modpacks and Videos You may use this mod in any public or private modpack as long as it is free of charge, has this license shown below in the main page of the modpack and has a link to this page on the main page of the modpack. This mod may be used in any videos, public or private, as long as there is a link to this page in the video description. Screenshots Screnshots can be viewed here. Support The Mod! Leave your name in the comments when you add the banner and I will add your name to a list on this page! Your name will also be added to the mod so that you recieve an achievement and item that can only be gotten this way! NOTE: You can also get supporter by creating a youtube video and sending me the link and your minecraft username. License Copyright 2015. All rights reserved. Warning If you advertise on this post your comment will be removed and you blocked from posting on ANY of my submissions! F.A.Q Q: Whats up with the pink images?
-
[SOLVED][1.7.10]Gui Button not working properly?
Wow, I had no idea about that one. Thanks a ton! I will definitely hold onto this page for future reference.
-
[SOLVED][1.7.10]Gui Button not working properly?
Hmm... It still doesn't seem to have any effect on it. I have tried placing it in both my initGui Method and my main class method. I've put it before it loads the button and after but with the same results. Here is my class now, tell me if you see anything wrong. package com.Cyphereion.Endurance.GUI; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.resources.I18n; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; import com.Cyphereion.API.Config.ConfigManager; public class GUIClassChoose extends GuiScreen{ public GUIClassChoose(){ super(); } @Override public void actionPerformed(GuiButton button){ switch(button.id){ default: break; case 0: System.out.println("Mage!"); break; } } @Override public void initGui(){ super.initGui(); super.drawScreen(0, 0, 0); int posX = (this.width) / 2; int posY = (this.height) / 2; this.buttonList.add(new GuiButton(0, posX - 150, posY - 75, 25, 25, "Mage")); } @Override public void drawScreen(int x, int y, float f){ Minecraft mc = Minecraft.getMinecraft(); EntityPlayer player = mc.thePlayer; int posX = (this.width) / 2; int posY = (this.height) / 2; this.drawString(this.mc.fontRenderer, EnumChatFormatting.LIGHT_PURPLE + "Mage", posX - 150, posY - 75, 200); this.drawString(this.mc.fontRenderer, EnumChatFormatting.YELLOW + "" + EnumChatFormatting.BOLD + "Choose your class!", posX - 50, posY - 110, 200); } }
-
[SOLVED][1.7.10]Gui Button not working properly?
As I already said, it acts the same way, I was just putting it there to see if it made a difference.
-
[SOLVED][1.7.10]Gui Button not working properly?
Hello. I am currently trying to create a mod but I seem to be stuck on the GUI. For some reason the button that I add to it doesn't actually show up (but retains function). Any help would be greatly appreciated! Here is the code for the GUI. (I realize that the button is in the wrong place, same thing when it is in the right spot) package com.Cyphereion.Endurance.GUI; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.resources.I18n; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; import com.Cyphereion.API.Config.ConfigManager; public class GUIClassChoose extends GuiScreen{ public GUIClassChoose(){ super(); } private static int tick = 0; @Override public void actionPerformed(GuiButton button){ switch(button.id){ default: break; case 0: System.out.println("Mage!"); break; } } @Override public void drawScreen(int x, int y, float f){ tick ++; Minecraft mc = Minecraft.getMinecraft(); EntityPlayer player = mc.thePlayer; int posX = (this.width) / 2; int posY = (this.height) / 2; this.drawString(this.mc.fontRenderer, EnumChatFormatting.LIGHT_PURPLE + "Mage", posX - 150, posY - 75, 200); this.drawString(this.mc.fontRenderer, EnumChatFormatting.YELLOW + "" + EnumChatFormatting.BOLD + "Choose your class!", posX - 50, posY - 110, 200); if(tick >= 50){ tick = 0; this.buttonList.add(new GuiButton(0, posX - 150, posY - 75, 25, 75, "Mage")); } } }
-
[SOLVED] [1.7.10] Saving NBT to World?
Nevermind my last post('s). I have figured it out after a few hours of looking at the javadocs . Here is the src for anyone who is having issues! World Data.java package package; import java.util.Iterator; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.village.Village; import net.minecraft.world.World; import net.minecraft.world.WorldSavedData; import net.minecraft.world.storage.MapStorage; public class WorldData extends WorldSavedData { final static String key = MODID; public static WorldData forWorld(World world) { MapStorage storage = world.perWorldStorage; WorldData result = (WorldData)storage.loadData(WorldData.class, key); if (result == null) { result = new WorldData(key); storage.setData(key, result); } return result; } private NBTTagCompound data = new NBTTagCompound(); public WorldData(String tagName) { super(tagName); } @Override public void readFromNBT(NBTTagCompound compound) { data = compound.getCompoundTag(key); } @Override public void writeToNBT(NBTTagCompound compound) { compound.setTag(key, data); } public NBTTagCompound getData() { return data; } } How to invoke the NBTTagCompound WorldData data = WorldData.forWorld(player.worldObj); NBTTagCompound tag = data.getData(); tag.setString("5", "3"); data.markDirty(); //Save the data to the disc. NEEDED TO WORK!
-
[SOLVED] [1.7.10] Saving NBT to World?
That wouldn't help me as it is uses a map.
-
[SOLVED] [1.7.10] Saving NBT to World?
Could you give me some advice as to how this would be implemented? I have seen a tutorial using this but he wasn't using it in a static context which is what I need.
-
[SOLVED] [1.7.10] Saving NBT to World?
Is there any possible way to save data to the world? I understand the basics of how it works but I can't figure out how to save it to the world. Going the rout of world.getWorldInfo().getNBTTagCompound() does not actually save it to the disc. Any help is much appreciated!
-
[1.7.2] Problem with Inventory in custom GUI
Could you elaborate a bit more? You were very vague on your description.
-
[SOLVED][1.6.4]Model rendering sideways?
Thanks, I did not realize that using 3 different rotation methods would help. OpenGL is confusing.
-
[SOLVED][1.6.4]Model rendering sideways?
That rotates it around my body, not in the direction I need.
IPS spam blocked by CleanTalk.