Everything posted by Lord_Rius
-
[1.10] renderItemIntoGUI enchanted glint effect
Hi! When i render an item into gui and it is enchanted, the glint effect appears like that... Here's my code i've disabled depth before item rendering because i want to render it behind any thing, in this case from chat section. If i don't disable depth, effect looks fine but on top of chat... How can if fix this?, also by other hand, using the same code, when shield is rendered, appears flipped when depth is disabled and fine when enabled... Can anybody help me, please? Thanks.
-
[1.9.4] Torches drops when rain
Hi! What is the correct event/code to make torches drop when rain strikes them? i'm also currently using BlockPlaceEvent to avoid torches placement when is raining. Here is my code for BlockPlaceEvent: @SubscribeEvent public void BlockPlaceEvent(PlaceEvent e) { EntityPlayer player = e.getPlayer(); World world = e.getWorld(); BlockPos pos = e.getPos(); Block block = e.getPlacedBlock().getBlock(); //Al poner una antorcha al aire libre mientras llueve, ésta dropeará// if (block != null && block == Blocks.TORCH) { if (world.isRainingAt(pos) && world.canBlockSeeSky(pos)) { world.destroyBlock(pos, true); player.addChatMessage(new TextComponentString(TextFormatting.RED + "ATENCIÓN: " + TextFormatting.RESET + "La lluvia apaga las antorchas!")); } } } Thanks in advance.
-
[Forge 1.8] Count total number of items
Many thanks Failender, now works perfectly!
-
[Forge 1.8] Count total number of items
Many thanks for your answer, with your help i'm using this piece of code and works, but it shows me by one hand total count of items in inventory and by other hand independent count of every stack i have... int count = 0; for (int slot = 0; slot < player.inventory.getSizeInventory(); slot++) { ItemStack Stack = player.inventory.getStackInSlot(slot); if (Stack != null && Stack.getItem().equals(Items.arrow)) { int total = count += Stack.stackSize; String arrowsCount = String.valueOf(total); Some screenshots, i've different string color depending count number [spoiler=only 1 stack] http://i.imgur.com/CoLGhBP.png][/img] [spoiler=two or more stacks] http://i.imgur.com/99YNuO9.png][/img] Any ideas to get a single integer? Many thanks agains.
-
[Forge 1.8] Count total number of items
Hi! I'm interested i know how to calculate the total count of specified items in player's inventory and then print it in integer number. Many thanks.
-
[1.8.8] Keyboard.key Switch
Hi! I'm trying to make that when i press some key and then release it draw some GUI or not in ingame screen, this is my code: public void RenderGameOverlayEvent(RenderGameOverlayEvent event) { if (event.type == RenderGameOverlayEvent.ElementType.TEXT && !Minecraft.getMinecraft().gameSettings.showDebugInfo) { new GuiArmorStatus(Minecraft.getMinecraft()); new GuiToolStatus(Minecraft.getMinecraft()); new GuiPlayerStats(Minecraft.getMinecraft()); new GuiPotionEffect(Minecraft.getMinecraft()); new GuiEntityInfo(Minecraft.getMinecraft()); new GuiBlockInfo(Minecraft.getMinecraft()); new GuiFPS(Minecraft.getMinecraft()); } } I have tried with Keyboard.isKeyDown variable but only works with that tapped key. Any ideas? Many thanks in advance.
-
[1.8.8] Breaking animation texture
Hi! I've noticed that breaking animation texture have any problem with alpha transparency or something. I'm using Forge 11.15.0.1635. Look at these screenshots to compare: [spoiler=Minecraft Vanilla - Grass Block] [spoiler=Forge 1.8.8 - Grass Block] [spoiler=Minecraft Vanilla - Birch Log Block] [spoiler=Forge 1.8.8 - Birch Log Block]
-
[1.8] Getting the attack value from current equipped item
Hi! I'm trying to get an integer or double value from the current held item attack attribute, i've just found the way to get the base value from an entity using getEntityAttribute(SharedMonsterAttributes.attackDamage).getAttributeValue() but i need the value of every held item. Any ideas? Many thanks.
-
[Solved] [1.8.8] Custom Armor Textures Fail to Load After Mod Update
Hi! Seems like in 1610 version LexManos fixed it, many thanks Lex!.
-
[Solved] [1.8.8] Custom Armor Textures Fail to Load After Mod Update
Hi! I've the same problem, upgraded from 1.8-11.14.4.1569 and the same error in console and any custom armor renders well. Seems like in 1.8.8, when you use custom domain in custom armor texture in EnumHelper.addArmorMaterial line, forge use this domain to get the path from custom armor texture and also search for domain:material_layer_x.png Maybe the problem is in LayerArmorBase.class ResourceLocation getArmorResource forge hook?
-
[FORGE] 1.5.1 Crafting With Damaged Items In Recipes
Thanks to all the code that for now works for me is public static final int WILDCARD_VALUE = Short.MAX_VALUE; then GameRegistry.addShapelessRecipe(new ItemStack(Item.swordIron), new ItemStack(Item.swordIron, 1, WILDCARD_VALUE), Item.ingotIron);
-
[FORGE] 1.5.1 Crafting With Damaged Items In Recipes
Hello guys i've a problem with 1.5 coding. Some time ago, i made a simple mod that able you to "repair " damaged items, look at this piece of code: GameRegistry.addRecipe(new ItemStack(Item.swordWood), new Object[] {" Y ", " X ", " ", 'X', new ItemStack(Item.swordWood, 1, -1), 'Y', Block.planks}); Well, with this code you can craft one brand new wooden sword with one damaged wooden sword and whatever block of planks, this works well in 1.4.7, but not in 1.5.1. Anybody can help me please. Thanks.
-
1.5 Killed Customized Item crafting with negative damge by zeroing Item damage!?
Hey, i think i've the same problem with my piece of code that works well in 1.4.7. GameRegistry.addRecipe(new ItemStack(Item.swordWood), new Object[] {" Y ", " X ", " ", 'X', new ItemStack(Item.swordWood, 1, -1), 'Y', Block.planks}); I'm using Forge 1.5.1-7.7.0.605. Any ideas?
IPS spam blocked by CleanTalk.