Jump to content

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

Tree Puncher (2/8)

0

Reputation

  1. 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.
  2. 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?
  3. 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:
  4. 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
  5. 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)); } } }
  6. 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); } } } }
  7. Whenever I load a world with the code above in my item class I crash with this error.
  8. How do you go about adding the NBT tag to an item? and should i put it in the onCreated meathod?
  9. 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).
  10. 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));
  11. 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
  12. 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.
×
×
  • Create New...

Important Information

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