Jump to content

SanAndreaP

Forge Modder
  • Posts

    1689
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by SanAndreaP

  1. Ah ha! Sweet, thanks. Hadn't delved into the code that vanilla has to render items yet other than "hey, didn't I dup a mob that could do it?" and looking at that mob's render code (with no luck). Well, I had to use this for a custom item renderer with glowing parts of textures (if you wanna see what I mean: ) There's also some code in the RenderBiped or RenderLiving (can't remember which one) which deals with holding items by entities. If you want to do it easy on your Entity, I suggest you override the getHeldItem method in your entity class and return an ItemStack, containing the item which should be held. Is this what you mean about overriding the geHeldItem? no... It's a method. Its return value is an ItemStack, so you have to return an ItemStack, containing the item which should be held... @Override public ItemStack getHeldItem() { return new ItemStack(ItemInstance); }
  2. Ah ha! Sweet, thanks. Hadn't delved into the code that vanilla has to render items yet other than "hey, didn't I dup a mob that could do it?" and looking at that mob's render code (with no luck). Well, I had to use this for a custom item renderer with glowing parts of textures (if you wanna see what I mean: ) There's also some code in the RenderBiped or RenderLiving (can't remember which one) which deals with holding items by entities. If you want to do it easy on your Entity, I suggest you override the getHeldItem method in your entity class and return an ItemStack, containing the item which should be held.
  3. Just force-update in your launcher...
  4. My question is: What is it that I am rendering? I don't want to go into techne and try and figure out how to build the boxes so that it looks like a sword. Which means there's got to be some kind of model for items around somewhere already. You render items with ItemRenderer.renderItemIn2D
  5. 1. Use spoiler tags. 2. You should read your logs first next time: 2013-06-16 05:21:10 [sEVERE] [ForgeModLoader] There were errors during initial FML setup. Some files failed to download or were otherwise corrupted. You will need to manually obtain the following files from these download links and ensure your lib directory is clean. 2013-06-16 05:21:10 [sEVERE] [ForgeModLoader] *** Download http://files.minecraftforge.net/fmllibs/argo-small-3.2.jar 2013-06-16 05:21:10 [sEVERE] [ForgeModLoader] *** Download http://files.minecraftforge.net/fmllibs/guava-14.0-rc3.jar 2013-06-16 05:21:10 [sEVERE] [ForgeModLoader] *** Download http://files.minecraftforge.net/fmllibs/asm-all-4.1.jar 2013-06-16 05:21:10 [sEVERE] [ForgeModLoader] *** Download http://files.minecraftforge.net/fmllibs/bcprov-jdk15on-148.jar 2013-06-16 05:21:10 [sEVERE] [ForgeModLoader] *** Download http://files.minecraftforge.net/fmllibs/deobfuscation_data_missing.zip 2013-06-16 05:21:10 [sEVERE] [ForgeModLoader] *** Download http://files.minecraftforge.net/fmllibs/scala-library.jar EDIT: Wait, what is this? fml-universal-1.5.2-5.2.23.657.zip Also: 2013-06-16 05:21:10 [ForgeModLoader] Forge Mod Loader version missing.missing.missing.missing for Minecraft missing loading Seems like you didn't download the correct forge file...
  6. Hey there, I want to make some recipes, everything works as expected. I have planks which are registered as plankWood in the Ore Dictionary to let them be easily used as material for basic wooden items like working bench, wooden tools a.s.o. The problem I'm facing right now is that I have custom sticks and I want to use my planks to craft them, but if I "override" the current recipe for the wooden sticks with my own recipe for my own planks, it still gives me the wooden sticks as output. I also tried to register the recipe before the OreDictionary replaces the ore recipes, but with no avail. The second thing I wanted to do is to override the ShapedOreRecipe for the wooden sticks in the recipes list with a custom class which extends ShapedOreRecipe, let it return my custom sticks when my planks are used and return the wooden sticks (return the super method) if my planks are not used. The problem with this method however is that if a mod does the same kind of thing I do, my recipe will be overwritten by the mods recipe or vice versa. So what I'm asking is: Is there a way to "exclude" a specific recipe or overwrite it? Or something else which would work? Hints would be enough. Sincerly, SanAndreasP
  7. addition: You should use item1.isItemEqual(item2) instead of item1.equals(item2), since it compares only the Item ID and the metadata, and not the whole instance itself (which can cause problems). If you want to check if the NBT is equal, too then use ItemStack.areItemStacksEqual(item1, item2)
  8. You need to check before if both are not null, like: item1 != null
  9. No, you have to override getHeldItem() in your entity class and return your item that's supposed to be held.
  10. ((EntityLiving) par5Entity).getCurrentItemOrArmor(1) != new ItemStack(apocalypse.Respirator) This will always be true, because you compare two different instances, although the content of them may be the same. To do it right, use item1.isItemEqual(item2) and for any other object (like strings) use object1.equals(object2)
  11. Your structure must look like this: <zip root> |- net |- thelors |- creditmod |- <class files> |- mods |- MYMODNAME |- textures |- items |- <png files> The folder structure for one class file must match it's packet definition, meaning if you have the packet set to "mypacket.subpacket.mod", the folder structure must be "/mypacket/subpacket/mod/classfile.class" If you don't override the registerIcons method in your items and instead use the unlocalized name for texture specifying, you have to prepend MYMODNAME: (with the colon) to your unlocalized name, MYMODNAME is a custom mod name (in both, the unloc-name and the folder name). Here's an example: "ClaySoldiers:horseDoll"
  12. I see, do you properly set the xSize and ySize variables in your gui? They must match the size of the drawn background or you'll see this "tiling"if the variables are set too small.
  13. can we see al of your entity registrations? (all those lines where you register all of your entities)
  14. You'll need a graphicsLevel variable, set up as in BlockLeaves and BlockLeavesBase. if graphicsLevel = "fancy": return True else: return super(self, blah).shouldSideBeRendered() Look at the BlockLeaves class, you can adapt the code where graphicsLevel is used (it's a boolean). You don't need to declare a new variable in your block class, just use the Block.leaves.graphicsLevel reference, since the variable is public.
  15. 1. To actually implement such a system, you need to alter the save format, making it incompatible with vanilla saves and vanilla can't open modded worlds. 2. 4096 Block IDs (minus vanilla ones) are not enough? Use metadata (16 possible metadata values, ranging from 0-15). So you have (4096 - vanilla blocks) * 16 3. Item IDs are ranged from 0 - 32767 (if shifted - plus 256), so there are PLENTY of item IDs available. Like for blocks, you can use damage values (also ranging from 0-32767), so you have (32768 - vanilla items) * 32768
  16. seems more like your hoster somehow blocks downloading files to the server space. You have to talk with your hoster about this. if it can download the FML libraries, then I dunno, but you can copy the Pixelmon.db from your local server into your remote one and see if that works. EDIT Also java.lang.UnsatisfiedLinkError: /tmp/sqlite-3.7.2-libsqlitejdbc.so: /tmp/sqlite-3.7.2-libsqlitejdbc.so: failed to map segment from shared object: Operation not permitted Seems like the mc-server can't access those libraries from your server. Again, you have to talk about this with your hoster, or chmod those libraries and give the access rights needed, if you can access them yourself via FTP.
  17. You can look at my code for the turrets. You can ride them, although you can't move with them: https://github.com/SanAndreasP/TurretModv3/blob/master/sanandreasp/mods/TurretMod3/entity/turret/EntityTurret_Base.java
  18. hm, can I see your code with my answer included?
  19. 1. It's null if it has no enchantment or already defined data. 2. Do you create an entirely new instance of the NBTTagCompound for each item? Seems like not, because of the behavior. 3. Can we see a screenshot? or at least a bit more explanation, what do you mean by tiling, how exactly?
  20. glEnable(GL_BLEND) glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) renderOverlay(...) glDisable(GL_BLEND) This should work (warning: pseudocode)
  21. I have this problem too when I install the Forge src package on Linux 64bit. It's because the LWJGL needs to be the right architecture (x64). So I suggest you download the right LWJGL, and put all matching files from the download into the /mcp/jars/bin and /mcp/jars/bin/natives folders.
  22. your proxy variable is not instanciatd when you initialize your item that way. You have to initialize in one of your @init methods (preferably the @PreInit one)
  23. It is possible if you go through one of the EntityList arrays / lists available. You can then either print out the registered class names or the (un-)localized entity names. I would recommend to use both, like className => localized/unlocalized name Anyway, you have to be careful, I recommend to do this when Minecraft is fully loaded. If you do this one of your @init methods, it's likely that you'll miss entities added by mods.
  24. You know that the mod is for Minecraft 1.5.1, not for 1.5.2!?
  25. Besides the already cleared fact that there are already flower pots, you don't NEED a TileEntity with TESR. The vanilla pot uses IIRC simple block renderers.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.