Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

sigurd4

Members
  • Posts

    137
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • Personal Text
    I am a total noob and i dont know what i'm doing.

sigurd4's Achievements

Creeper Killer

Creeper Killer (4/8)

0

Reputation

  1. My item is a bauble, and i want to have full control over what properties it has and doesn't have. There are things that vanilla armor does that i may not want mine to do. Regardless, i figure this would be useful for a whole lot of other stuff where one might want an enchantment to be available for an item that doesn't extend any of the classes that are checked for. It would just be really nice to have control over this kind of thing. Also, i don't see how this would break anything. It should be perfectly capatible with earlier mods, and there are already plenty of similar hooks for other things to allow more control over otherwise unchangable vanilla functionalities.
  2. i could make my own algoritm for adding random enchantments, though the problem with that is that this algoritm would not be used when the item is enchanted trough an enchantment table, which is kinda what i want.
  3. well, it is possible already by using ItemStack.addEnchantment(), but the standard enchantment table can't do it as it will always check if wether or not the enchantment is valid. i don't think it's gonna be a massive problem at all! and if a modder makes some enchantments do some wierd funky stuff then that is on them, not forge. also i used to mess around with changing nbt tags in vanilla to stuff it shouldn't be and, for example, adding enchantments to an item that shouldn't work on it. adding, say, sharpness to a piece of armor will simply increase the damage dealt when you attack with the armor item (lol), nothing crashes or dies horribly in a fire or anything, so don't worry.
  4. here's a link to my modder support post that i made for asking if this was already a thing: http://www.minecraftforge.net/forum/index.php/topic,33398.0.html what i basically wanted to do was to allow vanilla, armor-specific enchantments to be applied to an item that doesn't extend ItemArmor. this is handled in net.minecraft.enchantment.EnumEnchantmentType.canEnchantItem() and there's nothing i can do about it because there are no hooks, events, interfaces or anything for it. so i suggest: a function in net.minecraft.item.Item kind of like this, that can be overridden and done whatever with (and would be called instead of EnumEnchantmentType.canEnchantItem()): public boolean isEnchantmentValid(Enchantment ench) { return ench.type.canEnchantItem(this); } [/Code] or an event that is called after EnumEnchantmentType.canEnchantItem() is, where one can change the value of it. the advantage of this would be that a mod could change the value for items that aren't a part of said mod (vanilla items or from other mods). or an interface that would basically work the same as the hook described in the first point, except it's an interface. EnumEnchantmentType.canEnchantItem() would now look like this: [Code] public boolean canEnchantItem(Item p_77557_1_) { if(p_77557_1_ instanceof IItemCustomEnchantsSomethingabob) { return ((IItemCustomEnchantsSomethingabob)p_77557_1_ ).isEnchantmentValid(this) //here the argument is an EnumEnchantmentType, not an Enchantment cuz why not } and then all the other stuff... [/Code] it would really make my life a whole lot easier.
  5. jeez really? i feel like i should suggest for the forge guys to add a hook or something like that for this. but thanks, though. i'll add one for every single vanilla enchantment for now. oh well. EDIT: just gonna put this here: http://www.minecraftforge.net/forum/index.php/topic,33408
  6. i have a bauble that i want to enchant with vanilla enchantments trough an enchantment table, but i do not want my item to extend ItemArmor. however the code for checking wether or not an enchantment is valid for in item checks if the item extends the classes ItemArmor, ItemSword, Item etc. and doesn't call an event or anything like that. the same thing would apply if i were to add a sword or or something that i don't want to extend ItemSword for some reason. is there a way to do this? i've been looking for an event or hook or such but i can't find one.
  7. You might be aware of the animation that happens when you switch to another item in the hotbar. The item bobs down, then up. Something that I find fairly annoying is that this animation also happens whenever any nbt data of the held itemstack is set. My item changes nbt data very frequently, so it gets somewhat frustrating. Therefore I would prefer if there was a way to prevent this animation. I found this other post (http://www.minecraftforge.net/forum/index.php?topic=28710.0) that asks about the same thing, but is without a proper answer, most likely due to the misunderstanding caused by his unclear language. I really didn't get the information I needed from it, and thus I made this post.
  8. like with stone, graphite, andesite etc. i found the code that does it in vanilla in net.minecraft.item.Item.registerItems(). it seems to be in the registration of the item of the block that you can choose to use a different unlocalized name based on itemstack, which again makes it possible to check for blockstate properties. registerItemBlock(Blocks.stone, (new ItemMultiTexture(Blocks.stone, Blocks.stone, new Function() { private static final String __OBFID = "CL_00002178"; public String apply(ItemStack stack) { return BlockStone.EnumType.byMetadata(stack.getMetadata()).getUnlocalizedName(); } public Object apply(Object p_apply_1_) { return this.apply((ItemStack)p_apply_1_); } })).setUnlocalizedName("stone")); however, this is impossible to do this way since forge's block registration thing seemingly won't allow this (i've looked in net.minecraftforge.fml.common.registry.GameRegistry). i might just be bad at searching, but i seriously have no idea what to do. or is there a much simpler way that i've overlooked?
  9. well nvm... i wont bother with that just for such a little detail.
  10. that's not really helpful at all. doesn't shaders change the rendering stuff for everything? because i only want the steve in the bottom-right corner to be in greyscale. also, i have no idea on how to make a new shader, though i have altered the vanilla ones before (without quite understanding what i was doing). surely there's an easier way?
  11. i've made a gui where i render a texture, but i want it to automatically be in greyscale, or preferably in an amber-like colour. this is what it looks like currently: it uses the skin of the owner of the item, thus i cannot alter the texture. i'm not very familiar with openGL, but i know how to do some things, like render 2D textures, change brightness of the image, change renderpass, rotate and offset, but not how to do this. i've been trying out the GL11.glColor3f() function, but i don't quite inderstand it yet. (i thought the three different values were rgb, but doing a bit of testing it doesnt seem like this is the case.) how do i do this?
  12. thank you! i can't believe i didnt see that. fyi im spawning a redstone particle for a laserbeam that i made. it's pretty neat.
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.