Jump to content

Sythiex

Forge Modder
  • Posts

    8
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Location
    USA
  • Personal Text
    Author of Hearthstone Mod

Sythiex's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. In 1.13 I was using changePlayerDimension(EntityPlayerMP player, DimensionType dimensionIn, net.minecraftforge.common.util.ITeleporter teleporter) in PlayerList to use a custom teleporter. Is there a similar function in 1.14?
  2. I have tried putting @Override on just about everything, but it neither fixes the issue nor breaks my code, so I left them out. And I did read through ItemBow, but I didn't see anything I was missing.
  3. I tried that, but I didn't notice any changes so I took it back out. Thanks anyway
  4. I have an item with NBT data that I want to be reset to 0 when the player releases the right mouse button, but I can't figure out why onPlayerStoppedUsing() isn't being called. I'm probably overlooking something simple, here's the code: public void onPlayerStoppedUsing(ItemStack itemStack, World world, EntityPlayer player, int ticks) { System.out.println("working"); itemStack.stackTagCompound.setInteger("castTime", 0); } public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player) { if(!world.isRemote) { ChunkCoordinates coords = player.getBedLocation(player.dimension); if(coords != null) { if(itemStack.stackTagCompound.getInteger("cooldown") == 0) { player.setItemInUse(itemStack, getMaxItemUseDuration(itemStack)); if(itemStack.stackTagCompound.getInteger("castTime") >= maxCastTime) { player.setPositionAndUpdate(coords.posX + .5, coords.posY + 1, coords.posZ + .5); itemStack.stackTagCompound.setInteger("cooldown", maxCooldown); itemStack.stackTagCompound.setInteger("castTime", 0); } else { int timeCast = itemStack.stackTagCompound.getInteger("castTime") + 1; itemStack.stackTagCompound.setInteger("castTime", timeCast); } } return itemStack; } else { player.addChatMessage(new ChatComponentTranslation("msg.hearthstoneFailed.txt")); return itemStack; } } else return itemStack; } public int getMaxItemUseDuration(ItemStack itemStack) { return 100; }
  5. Ok, so I got the event check working, but how exactly do I add the new component? Sorry for asking for details, I'm a complete forge noob.
  6. How exactly should I do this? I haven't really done anything with events before.
  7. What is the easiest way to add a new component to the nether fortress generator? Thanks in advance.
×
×
  • Create New...

Important Information

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