Frost2779
Members-
Posts
25 -
Joined
-
Last visited
Converted
-
Gender
Male
-
Personal Text
I am not new you liar!
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
Frost2779's Achievements
Tree Puncher (2/8)
0
Reputation
-
So currently I am trying to implement a little system where when an item has less than 10 seconds left before it despawn it's starts to blink, as in turn invisible then visible again. However, I can't seem to find the right event to tap into for this. I probably just over looked it when I was looking through all the event but the problem still stands.
-
Do you know of any way I would be able to do what it is I want without having to recreate portions of the source code?
-
Alright so in my mod there are going to be several types of elytra with tweaked stats, like durability, ability to be repaired ect. However I can't seem to get my elytra to function at all. My elytra already extends ItemElytra, but is there still more I need to do? Elytra class: Items Class:
-
[1.11] Destroy dropped item and a question about event handlers
Frost2779 replied to Frost2779's topic in Modder Support
Thanks, do you have any insight as to why my event handler isn't working? Edit: One problem is that if i kill it through onEntityItemUpdate it doesn't appear in your hand -
So there is an item in my mod that I want to be destroyed whenever it is dropped onto the ground. But I can't seem to find a way to accomplish this, any ideas? Secondly I am having a problem with initializing my event handler, as it doesn't give my item to players when they respawn. Event Handler: package com.Frost2779.AWillToLive.Init; import net.minecraft.item.ItemStack; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.PlayerEvent; @Mod.EventBusSubscriber public class EventHandler { @SubscribeEvent public void PlayerRespawnEvent(PlayerEvent.PlayerRespawnEvent event) { if (!event.player.world.isRemote) { event.player.inventory.addItemStackToInventory(new ItemStack(ModItems.fullWill)); } } }
-
[1.11] Make item lose durability every 100 ticks
Frost2779 replied to Frost2779's topic in Modder Support
What in your code from earlier should i change? -
[1.11] Make item lose durability every 100 ticks
Frost2779 replied to Frost2779's topic in Modder Support
My mistake package com.Frost2779.AWillToLive.Items; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.world.World; public class ItemFullWill extends Item { public ItemFullWill(){ this.setMaxDamage(100); this.setMaxStackSize(1); } @Override public boolean shouldCauseReequipAnimation(ItemStack oldStack, ItemStack newStack, boolean slotChanged) { return false; } @Override public void onUpdate(ItemStack stack, World worldIn, Entity entityIn, int itemSlot, boolean isSelected) { if(entityIn instanceof EntityLivingBase) { if (stack.hasTagCompound() && stack.getTagCompound().hasKey("TickCounter")) { int tickCounter = stack.getTagCompound().getInteger("TickCounter"); if (tickCounter <= 0) { stack.damageItem(1, ((EntityLivingBase) entityIn)); stack.getTagCompound().setInteger("TickCounter", 100); } else { stack.getTagCompound().setInteger("TickCounter", --tickCounter); } } else { stack.getTagCompound().setInteger("TickCounter", 100); } } } } -
[1.11] Make item lose durability every 100 ticks
Frost2779 replied to Frost2779's topic in Modder Support
Whenever I load a world with the code above in my item class I crash with this error. -
[1.11] Make item lose durability every 100 ticks
Frost2779 replied to Frost2779's topic in Modder Support
How do you go about adding the NBT tag to an item? and should i put it in the onCreated meathod? -
[1.11] Make item lose durability every 100 ticks
Frost2779 replied to Frost2779's topic in Modder Support
Bump -
So I have an item that I want to make lost a durability every 5 seconds, so every 100 ticks. I've done some looking around about implementing a tick counter into NBT to help track this, but so far I have been unsuccessful in getting this to work(as entire functions that are present in the tutorial are not there any more).
-
[1.11] Crafting recipes that include all meta data blocks.
Frost2779 replied to Frost2779's topic in Modder Support
Awesome, thanks -
Is there a way I can make my crafting recipes more efficient than this? Like what the title says can I make it include certain ranges of Meta values? GameRegistry.addShapelessRecipe(new ItemStack(ModItems.natureDust), ModItems.mysticPestle, new ItemStack(Blocks.SAPLING, 1, 1)); GameRegistry.addShapelessRecipe(new ItemStack(ModItems.natureDust), ModItems.mysticPestle, new ItemStack(Blocks.SAPLING, 1, 2)); GameRegistry.addShapelessRecipe(new ItemStack(ModItems.natureDust), ModItems.mysticPestle, new ItemStack(Blocks.SAPLING, 1, 3)); GameRegistry.addShapelessRecipe(new ItemStack(ModItems.natureDust), ModItems.mysticPestle, new ItemStack(Blocks.SAPLING, 1, 4)); GameRegistry.addShapelessRecipe(new ItemStack(ModItems.natureDust), ModItems.mysticPestle, new ItemStack(Blocks.SAPLING, 1, 5));
-
Okay thank you. I'll work my way through a few of the tutorials and come back if I come across any major problems I can't solve
-
Need some help figuring out how to create a custom dimension. I've done some looking around in the source code but can't seem to figure it out, and google results only come up with very outdated tutorials.