Everything posted by drok0920
-
Item texture not loading
I am using 1.12 but what do you mean by where i register my models. I didnt know i had to register them unless you mean where i register my item?
-
Item texture not loading
Hello, I have an item which needs to change texture based on a special property, like broken for elytra, but the texxture is never applied to the item and there are no errors relating to the item in the console, there are however errors for another item. I cant figure out why the texture isnt being displayed.
-
Change Item name when it gets damaged.
Ugh nevermind im an idiot it works i just didnt realize that i needed to spawn in new items for it to update. Thank you for all the help!
-
Change Item name when it gets damaged.
Ok the max stack size is 1 but both methods still return zero no matter what.
-
Change Item name when it gets damaged.
Hmm it seems that the two lines of code i tested both return 0 even though the item is clearly damaged ingame. I used: stack.getMetadata() and stack.getItemDamage() Is this not the proper way of getting how damaged the item is?
-
[1.11.2] Conversion Question for Ticks and Misc.
I cannot help you with questions 2 or 3 but for 1 possibly try using Math.ceil(value) instead of casting to an integer. For example this should return one if the value is greater than 0 and less than or equal to 1.
-
Change Item name when it gets damaged.
Ok i changed that but the unlocalized name still doesn't change.
-
Change Item name when it gets damaged.
Here is the full item class. And i did not know that could be a problem so i will fix it ASAP. package net.drok.poverhaul.item; import javax.annotation.Nullable; import net.drok.poverhaul.POHMod; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.IItemPropertyGetter; import net.minecraft.item.Item; import net.minecraft.item.ItemElytra; import net.minecraft.item.ItemStack; import net.minecraft.util.NonNullList; import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; public class ItemRock extends Item { public ItemRock() { this.setRegistryName(new ResourceLocation(POHMod.MODID, "rock")); this.setHasSubtypes(true); this.setMaxDamage(110); this.addPropertyOverride(new ResourceLocation("sharpness"), new IItemPropertyGetter() { @SideOnly(Side.CLIENT) public float apply(ItemStack stack, @Nullable World worldIn, @Nullable EntityLivingBase entityIn) { return stack.getMetadata(); } }); } @Override public boolean showDurabilityBar(ItemStack stack) { return true; } @Override public String getUnlocalizedName(ItemStack stack) { return "item." + this.getRegistryName().getResourcePath() + "_" + (stack.getMetadata() % 25); } @SideOnly(Side.CLIENT) public void getSubItems(CreativeTabs tab, NonNullList<ItemStack> items) { if (this.isInCreativeTab(tab)) { items.add(new ItemStack(this, 1, 0)); items.add(new ItemStack(this, 1, 25)); items.add(new ItemStack(this, 1, 50)); items.add(new ItemStack(this, 1, 100)); } } }
-
Change Item name when it gets damaged.
Sorry for the delay i took a short break from modding. Here is the code i use: @Override public String getUnlocalizedName(ItemStack stack) { return "item." + this.getRegistryName().getResourcePath() + "_" + (stack.getMetadata() % 25); } But it is always the same unlocalized name.
-
Change Item name when it gets damaged.
Hello again, I have a tool that i would like to change the name of as it gets damaged. I have tried overriding getUnlocalizeName but that does not give the expected results, it always gives the unlocalized name for the item with 0 damage. So my question is how can i accomplish this.
-
Set Item Meta Data From NBT
Thank you i suppose that would be much easier than what i though. I dont know why i thought my method was a good idea.
-
Set Item Meta Data From NBT
Ok ill try again i have an item that when rightclicked on a block gets sharper i want that sharpness to change the texture.
-
Set Item Meta Data From NBT
No Im sorry i guess i didnt explain very well. What i want is the value that controls for example the color of the dye in vanilla to be driven by the nbt data that i set. So i guess what i am really asking is where should i put check to change it because i'd like it to update on its own rather than whenever i set the nbt.
-
Set Item Meta Data From NBT
Hello, How would i go about setting the meta data of an item based on a custom nbt tag. For example i have an nbt tag that ranges from 0-100 how can i convert that to a meta data of lets say 0-4 without having to manually change the itemstack. Is there an automated way to achieve this?
-
MissingVarientException when variant is present?
Hello i have created a block state file that throws an error stating that it cannot find a variant which exists in the file. I cannot figure out why this is happening even after an hour of trying. Error: https://pastebin.com/9SRQnMJx BlockState: { "forge_marker": 1, "defaults": { "textures": { "#mat": "progressiveg:items/ak47_oak" //the identifier must be a name of a material defined by the "model" obj's .mtl file }, "model": "progressiveg:ak47_0.obj" }, "variants": { "acacia_0": [{ "textures": { "#mat": "progressiveg:items/ak47_acacia" //the identifier must be a name of a material defined by the "model" obj's .mtl file }, "model": "progressiveg:ak47_0.obj" }], "acacia_1": [{ "textures": { "#mat": "progressiveg:items/ak47_acacia" //the identifier must be a name of a material defined by the "model" obj's .mtl file }, "model": "progressiveg:ak47_1.obj" }] } }
-
Load Obj Models
Hmm the UV coords dont seem to import correctly and i doing something wrong? They work in my modelling soft ware but not in minecraft.
-
Change Texture of OBJ model through blockstate
Ok so i have finally gotten obj models to load but it seems that i can only set one texture per material through the MTL file rather than threw the blockstate file by using: "#mat": "progressiveg:items/ak47_oak" How can i use that above method to change the texture rather than having to use the MTL.
-
Load Obj Models
Hehe i just realized when i went to get the files for you that i have two copies of the files and i edited the wrong one which is why i still got the error. It works fine now thank you!
-
Load Obj Models
I made it in blender and it did have a material it just exported the material with the name None but i edited it and changed the name on both the obj and the mtl but i still get the other errors like the one on like 232
-
Load Obj Models
Ok here it is also does it matter if faces are triangulated or not? ak47_0.obj
-
Load Obj Models
https://pastebin.com/whCW3B2h Sorry about the last paste bin didnt realize it thought it was spam lol.
-
Load Obj Models
https://pastebin.com/R4HxgLqT I see that one of the problems is it's looking for the wrong material so ill fix that but there are alot of other errors
-
Load Obj Models
-
'Faceted' Aiming when velocity is high
Ok i have done some testing and it travels correctly when it comes to its position and collisions but visually it's incorrect. Why could this be happening and is there a way to fix it?
-
'Faceted' Aiming when velocity is high
I have made an item which shoots my custom projectile all is good until i bring the velocity of the projectile to around 15 or higher. At this point it begins to prefer aiming at 45 degree angles. rather than where i am actually aiming. I assume it has to do with how im calculating the motion of the projectile. Does anyone know how i can fix this problem.
IPS spam blocked by CleanTalk.