Jump to content

Recommended Posts

Posted

Not wanting too much preamble I was a little bored this morning and decided to make a constructor/class that could 'theoretically' allow me to make 'new' crops very easily, basically just started with my working crop file and added variables that I can control in the constructor; it was working, possibly, but when I returned to my computer It was erroring, It's possible I made some edit between then and the 'run' but I couldn't work out the source so I thought I'd come to the forge community for a little guidance -

 

Constructor from the main class -

 

cropblock = new BlockCrop(231, 0, Main.cropseed.shiftedIndex, Main.cropseed, Main.itemFlax.shiftedIndex, Block.grass.blockID, 0).setStepSound(Block.soundGrassFootstep).setHardness(0.0F).setBlockName("cropblock");

 

The crop class -

 

public class BlockCrop extends BlockFlower {

private int seedtype;

private Item seedtype2;

private int droppedblock;

private int underblock;

private int indent;

protected BlockCrop(int par1, int par2, int par3, Item par4,
		int par5, int par6, int par7) {
        super(par1, par2);
        blockIndexInTexture = par2;
        setTickRandomly(true);
        float f = 0.5F;
        setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, 0.25F, 0.5F + f);
        this.setCreativeTab((CreativeTabs)null);
        this.disableStats();
        this.setRequiresSelfNotify();
        seedtype = par3;
        seedtype2 = par4;
        droppedblock = par5;
        underblock = par6;
        indent = par7 + 2;
    }

protected boolean canThisPlantGrowOnThisBlockID(int par1) {
        return par1 == underblock;
    }

public String getTextureFile() {
            return CommonProxy.BLOCK_PNG;
    }

public int getRenderType() {
        return 6;
    }

public int idPicked(World par1World, int par2, int par3, int par4) {
        return seedtype;
    }

public void fertilize(World par1World, int par2, int par3, int par4) {
        par1World.setBlockMetadataWithNotify(par2, par3, par4, 2);
    }

public int getBlockTextureFromSideAndMetadata(int par1, int par2) {
  switch(par2) {
   case 0:
    return 0 + indent;
   case 1:
    return 1 + indent;
   case 2:
    return 2 + indent;
   default:
    return 0 + indent;
  }
    }

public int idDropped(int par1, Random par2Random, int par3) {
        if (par1 == 2) {
            return droppedblock;
        }
        else {
            return 0;
        }
    }

public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) {
        super.updateTick(par1World, par2, par3, par4, par5Random);

        if (par1World.getBlockLightValue(par2, par3 + 1, par4) >= 9) {
            int i = par1World.getBlockMetadata(par2, par3, par4);

            if (i < 2) {
                float f = getGrowthRate(par1World, par2, par3, par4);

                if (par5Random.nextInt((int)(25F / f) + 1) == 0) {
                    i++;
                    par1World.setBlockMetadataWithNotify(par2, par3, par4, i);
                }
            }
        }
    }

private float getGrowthRate(World par1World, int par2, int par3, int par4) {
        float f = 1.0F;
        int i = par1World.getBlockId(par2, par3, par4 - 1);
        int j = par1World.getBlockId(par2, par3, par4 + 1);
        int k = par1World.getBlockId(par2 - 1, par3, par4);
        int l = par1World.getBlockId(par2 + 1, par3, par4);
        int i1 = par1World.getBlockId(par2 - 1, par3, par4 - 1);
        int j1 = par1World.getBlockId(par2 + 1, par3, par4 - 1);
        int k1 = par1World.getBlockId(par2 + 1, par3, par4 + 1);
        int l1 = par1World.getBlockId(par2 - 1, par3, par4 + 1);
        boolean flag = k == blockID || l == blockID;
        boolean flag1 = i == blockID || j == blockID;
        boolean flag2 = i1 == blockID || j1 == blockID || k1 == blockID || l1 == blockID;

        for (int i2 = par2 - 1; i2 <= par2 + 1; i2++) {
            for (int j2 = par4 - 1; j2 <= par4 + 1; j2++) {
                int k2 = par1World.getBlockId(i2, par3 - 1, j2);
                float f1 = 0.0F;

                if (k2 == underblock) {
                    f1 = 1.0F;

                    if (par1World.getBlockMetadata(i2, par3 - 1, j2) > 0) {
                        f1 = 3F;
                    }
                }

                if (i2 != par2 || j2 != par4) {
                    f1 /= 4F;
                }

                f += f1;
            }
        }

        if (flag2 || flag && flag1) {
            f /= 2.0F;
        }

        return f;
    }
public void dropBlockAsItemWithChance(World par1World, int par2, int par3, int par4, int par5, float par6, int par7) {
        super.dropBlockAsItemWithChance(par1World, par2, par3, par4, par5, par6, 0);

        if (par1World.isRemote) {
            return;
        }

        int i = 3 + par7;

        for (int j = 0; j < i; j++) {
            if (par1World.rand.nextInt(5) == 0) {
                float f = 0.7F;
                float f1 = par1World.rand.nextFloat() * f + (1.0F - f) * 0.5F;
                float f2 = par1World.rand.nextFloat() * f + (1.0F - f) * 0.5F;
                float f3 = par1World.rand.nextFloat() * f + (1.0F - f) * 0.5F;
                EntityItem entityitem = new EntityItem(par1World, (float)par2 + f1, (float)par3 + f2, (float)par4 + f3, new ItemStack(seedtype2));
                entityitem.delayBeforeCanPickup = 10;
                par1World.spawnEntityInWorld(entityitem);
            }
        }
    }
}

 

And finally the error -

 

java.lang.NullPointerException
at metocraft.common.Main.load(Main.java:44)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:440)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)
at com.google.common.eventbus.EventBus.post(EventBus.java:268)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:140)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)
at com.google.common.eventbus.EventBus.post(EventBus.java:268)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:83)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:651)
at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:196)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:469)
at net.minecraft.client.Minecraft.run(Minecraft.java:756)
at java.lang.Thread.run(Unknown Source)

 

Note: line 44 is the constructor; also should point out it's in no way a finished product, just a little project.

 

EDIT: If the constructor's removed it works, hence why I thought the issue's probably there.

EDIT2: MCP version 722 - Forge version 6.3.0.372

Posted

Looks like you didn't initialize "Main.cropseed" and/or "Main.itemFlax" before you call that constructor.

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

  Quote

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

Posted

Okay, I understand the initialization of variables in java... but I'm still new enough to forge/minecraft modding, how would I go about initializing it before the constructor's called?

 

@Mod(modid="metocraft", name="Metocraft", version="0.1")
@NetworkMod(clientSideRequired=true, serverSideRequired=false)

public class Main {

public static Block cropblock;
public static Item cropseed;
public static Item itemFlax;

@Instance("metocraft")
public static Main instance;

@SidedProxy(clientSide="metocraft.client.ClientProxy", serverSide="metocraft.common.CommonProxy")
public static CommonProxy proxy;

@PreInit
public void preInit(FMLPreInitializationEvent event) {

}

@Init
public void load(FMLInitializationEvent event) {

	proxy.registerRenderers();

	cropblock = new BlockCrop(231, 0, Main.cropseed.shiftedIndex, Main.cropseed, Main.itemFlax.shiftedIndex, Block.grass.blockID, 0).setStepSound(Block.soundGrassFootstep).setHardness(0.0F).setBlockName("cropblock");

	cropseed = new ItemCropSeed(555, Main.cropblock.blockID, Block.grass.blockID).setIconIndex(0).setItemName("flaxseed");

	itemFlax = new ItemFlax(556).setIconIndex(1).setItemName("Flaxfood");

	GameRegistry.registerBlock(cropblock);

	LanguageRegistry.addName(cropblock, "Custom Crop");
	LanguageRegistry.addName(cropseed, "Flax Seed");
	LanguageRegistry.addName(itemFlax, "Flax");

}

@PostInit
public void postInit(FMLPostInitializationEvent event) {

}
}

 

That's more or less my main class.

Posted
  On 11/20/2012 at 5:06 PM, Zedicus said:

Okay, I understand the initialization of variables in java... but I'm still new enough to forge/minecraft modding, how would I go about initializing it before the constructor's called?

 

@Mod(modid="metocraft", name="Metocraft", version="0.1")
@NetworkMod(clientSideRequired=true, serverSideRequired=false)

public class Main {

public static Block cropblock;
public static Item cropseed;
public static Item itemFlax;

@Instance("metocraft")
public static Main instance;

@SidedProxy(clientSide="metocraft.client.ClientProxy", serverSide="metocraft.common.CommonProxy")
public static CommonProxy proxy;

@PreInit
public void preInit(FMLPreInitializationEvent event) {

}

@Init
public void load(FMLInitializationEvent event) {

	proxy.registerRenderers();

	cropblock = new BlockCrop(231, 0, Main.cropseed.shiftedIndex, Main.cropseed, Main.itemFlax.shiftedIndex, Block.grass.blockID, 0).setStepSound(Block.soundGrassFootstep).setHardness(0.0F).setBlockName("cropblock");

	cropseed = new ItemCropSeed(555, Main.cropblock.blockID, Block.grass.blockID).setIconIndex(0).setItemName("flaxseed");

	itemFlax = new ItemFlax(556).setIconIndex(1).setItemName("Flaxfood");

	GameRegistry.registerBlock(cropblock);

	LanguageRegistry.addName(cropblock, "Custom Crop");
	LanguageRegistry.addName(cropseed, "Flax Seed");
	LanguageRegistry.addName(itemFlax, "Flax");

}

@PostInit
public void postInit(FMLPostInitializationEvent event) {

}
}

 

That's more or less my main class.

 

Tha errort has nothing to do with Forge modding, it's a simple syntax error you made. Put this line:

cropblock = new BlockCrop(231, 0, Main.cropseed.shiftedIndex, Main.cropseed, Main.itemFlax.shiftedIndex, Block.grass.blockID, 0).setStepSound(Block.soundGrassFootstep).setHardness(0.0F).setBlockName("cropblock");

 

below this line:

itemFlax = new ItemFlax(556).setIconIndex(1).setItemName("Flaxfood");

 

Just to explain that to you: the cropblock constructor gives you an NPE, because the variables cropseed and itemFlax are null when you call them. You try to initialize them after initializing cropblock and because cropblock needs these two variables, it simply doesn't work.

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

  Quote

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

Posted

Well, the reason I brought up my knowledge of 'forge modding' was because, I was fairly certain that's what you meant... I did it... and it still sent the same error message the difference being it's now on like 45, due to the move, I also attempted to put every single notice of 'cropblock' below the ItemFlax e.t.c. and it still gave the error message, hence why I edited my post, what ever have I done wrong xD

Posted

Okay then, maybe this works:

Remove all "Main." references from your variables, like in this one: "Main.cropseed.shiftedIndex"

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

  Quote

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

Posted

I'm afraid that also didn't work, still the exact same error... this is ever so slightly frustrating, but I'm sure it'll work out eventually ;)

Posted
  On 11/20/2012 at 6:08 PM, Zedicus said:

I'm afraid that also didn't work, still the exact same error... this is ever so slightly frustrating, but I'm sure it'll work out eventually ;)

 

So you said you moved the line like I told you. Could you provide the changed code?

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

  Quote

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

Posted

Currently -

public class Main {

public static Item cropseed;
public static Item itemFlax;
public static Block cropblock;


@Instance("metocraft")
public static Main instance;

@SidedProxy(clientSide="metocraft.client.ClientProxy", serverSide="metocraft.common.CommonProxy")
public static CommonProxy proxy;

@PreInit
public void preInit(FMLPreInitializationEvent event) {

}

@Init
public void load(FMLInitializationEvent event) {

	cropseed = new ItemCropSeed(555, cropblock.blockID, Block.grass.blockID).setIconIndex(0).setItemName("flaxseed");

	itemFlax = new ItemFlax(556).setIconIndex(1).setItemName("Flaxfood");

	cropblock = new BlockCrop(231, 0, cropseed.shiftedIndex, cropseed, itemFlax.shiftedIndex, Block.grass.blockID, 0).setStepSound(Block.soundGrassFootstep).setHardness(0.0F).setBlockName("blockcrop");

	GameRegistry.registerBlock(cropblock);

	LanguageRegistry.addName(cropblock, "Custom Crop");
	LanguageRegistry.addName(cropseed, "Flax Seed");
	LanguageRegistry.addName(itemFlax, "Flax");

	proxy.registerRenderers();

}

@PostInit
public void postInit(FMLPostInitializationEvent event) {

}
}

Posted
  On 11/20/2012 at 7:26 PM, Zedicus said:

Currently -

public class Main {

public static Item cropseed;
public static Item itemFlax;
public static Block cropblock;


@Instance("metocraft")
public static Main instance;

@SidedProxy(clientSide="metocraft.client.ClientProxy", serverSide="metocraft.common.CommonProxy")
public static CommonProxy proxy;

@PreInit
public void preInit(FMLPreInitializationEvent event) {

}

@Init
public void load(FMLInitializationEvent event) {

	cropseed = new ItemCropSeed(555, cropblock.blockID, Block.grass.blockID).setIconIndex(0).setItemName("flaxseed");

	itemFlax = new ItemFlax(556).setIconIndex(1).setItemName("Flaxfood");

	cropblock = new BlockCrop(231, 0, cropseed.shiftedIndex, cropseed, itemFlax.shiftedIndex, Block.grass.blockID, 0).setStepSound(Block.soundGrassFootstep).setHardness(0.0F).setBlockName("blockcrop");

	GameRegistry.registerBlock(cropblock);

	LanguageRegistry.addName(cropblock, "Custom Crop");
	LanguageRegistry.addName(cropseed, "Flax Seed");
	LanguageRegistry.addName(itemFlax, "Flax");

	proxy.registerRenderers();

}

@PostInit
public void postInit(FMLPostInitializationEvent event) {

}
}

 

I see the problem now. Replace

cropblock.blockID

 

in your seed initialization with the actual Block ID

231

 

If you grab the IDs from a config file in the future, grab the actual number and put it there.

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

  Quote

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

Posted

Thanks! So my code wasn't 'too' bad, haha.

Awesome, technically I could make a mod using that crop template make others with different growth stages etc, that'd be a little dull, wouldn't want to pretty much rip of Pam's, though an idea comes to mind... grow-able 'ores' iron plant, that kind of thing, anyway, enough rambling. Configs for the IDs are easy enough, as I mentioned this was just a little project I attempted this morning, may actually do something with it. ;)

 

Thanks again

Guest
This topic is now closed to further replies.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • After some time minecraft crashes with an error. Here is the log https://drive.google.com/file/d/1o-2R6KZaC8sxjtLaw5qj0A-GkG_SuoB5/view?usp=sharing
    • The specific issue is that items in my inventory wont stack properly. For instance, if I punch a tree down to collect wood, the first block I collected goes to my hand. So when I punch the second block of wood to collect it, it drops, but instead of stacking with the piece of wood already in my hand, it goes to the second slot in my hotbar instead. Another example is that I'll get some dirt, and then when I'm placing it down later I'll accidentally place a block where I don't want it. When I harvest it again, it doesn't go back to the stack that it came from on my hotbar, where it should have gone, but rather into my inventory. That means that if my inventory is full, then the dirt wont be picked up even though there should be space available in the stack I'm holding. The forge version I'm using is 40.3.0, for java 1.18.2. I'll leave the mods I'm using here, and I'd appreciate it if anybody can point me in the right direction in regards to figuring out how to fix this. I forgot to mention that I think it only happens on my server but I&#39;m not entirely sure. PLEASE HELP ME! LIST OF THE MODS. aaa_particles Adorn AdvancementPlaques AI-Improvements AkashicTome alexsdelight alexsmobs AmbientSounds amwplushies Animalistic another_furniture AppleSkin Aquaculture aquamirae architectury artifacts Atlas-Lib AutoLeveling AutoRegLib auudio balm betterfpsdist biggerstacks biomancy BiomesOPlenty blockui blueprint Bookshelf born_in_chaos Botania braincell BrassAmberBattleTowers brutalbosses camera CasinoCraft cfm (MrCrayfish’s Furniture Mod) chat_heads citadel cloth-config Clumps CMDCam CNB cobweb collective comforts convenientcurioscontainer cookingforblockheads coroutil CosmeticArmorReworked CozyHome CrabbersDelight crashexploitfixer crashutilities Create CreativeCore creeperoverhaul cristellib crittersandcompanions Croptopia CroptopiaAdditions CullLessLeaves curios curiouslanterns curiouslights Curses' Naturals CustomNPCs CyclopsCore dannys_expansion decocraft Decoration Mod DecorationDelightRefurbished Decorative Blocks Disenchanting DistantHorizons doubledoors DramaticDoors drippyloadingscreen durabilitytooltip dynamic-fps dynamiclights DynamicTrees DynamicTreesBOP DynamicTreesPlus Easy Dungeons EasyAnvils EasyMagic easy_npc eatinganimation ecologics effective_fg elevatorid embeddium emotecraft enchantlimiter EnchantmentDescriptions EnderMail engineersdecor entityculling entity_model_features entity_texture_features epicfight EvilCraft exlinefurniture expandability explosiveenhancement factory-blocks fairylights fancymenu FancyVideo FarmersDelight fast-ip-ping FastSuite ferritecore finsandtails FixMySpawnR Forge Middle Ages fossil FpsReducer2 furnish GamingDeco geckolib goblintraders goldenfood goodall H.e.b habitat harvest-with-ease hexerei hole_filler huge-structure-blocks HunterIllager iammusicplayer Iceberg illuminations immersive_paintings incubation infinitybuttons inventoryhud InventoryProfilesNext invocore ItemBorders itemzoom Jade jei (Just Enough Items) JetAndEliasArmors journeymap JRFTL justzoom kiwiboi Kobolds konkrete kotlinforforge lazydfu LegendaryTooltips libIPN lightspeed lmft lodestone LongNbtKiller LuckPerms Lucky77 MagmaMonsters malum ManyIdeasCore ManyIdeasDoors marbledsarsenal marg mcw-furniture mcw-lights mcw-paths mcw-stairs mcw-trapdoors mcw-windows meetyourfight melody memoryleakfix Mimic minecraft-comes-alive MineTraps minibosses MmmMmmMmmMmm MOAdecor (ART, BATH, COOKERY, GARDEN, HOLIDAYS, LIGHTS, SCIENCE) MobCatcher modonomicon mods_optimizer morehitboxes mowziesmobs MutantMonsters mysticalworld naturalist NaturesAura neapolitan NekosEnchantedBooks neoncraft2 nerb nifty NightConfigFixes nightlights nocube's_villagers_sell_animals NoSeeNoTick notenoughanimations obscure_api oculus oresabovediamonds otyacraftengine Paraglider Patchouli physics-mod Pillagers Gun PizzaCraft placeableitems Placebo player-animation-lib pneumaticcraft-repressurized polymorph PrettyPipes Prism projectbrazier Psychadelic-Chemistry PuzzlesLib realmrpg_imps_and_demons RecipesLibrary reeves-furniture RegionsUnexplored restrictedportals revive-me Scary_Mobs_And_Bosses selene shetiphiancore ShoulderSurfing smoothboot
    • Hi everyone, I'm currently developing a Forge 1.21 mod for Minecraft and I want to display a custom HUD overlay for a minigame. My goal: When the game starts, all players should see an item/block icon (from the base game, not a custom texture) plus its name/text in the HUD – similar to how the bossbar overlay works. The HUD should appear centered above the hotbar (or at a similar prominent spot), and update dynamically (icon and name change as the target item changes). What I've tried: I looked at many online tutorials and several GitHub repos (e.g. SeasonHUD, MiniHUD), but most of them use NeoForge or Forge versions <1.20 that provide the IGuiOverlay API (e.g. implements IGuiOverlay, RegisterGuiOverlaysEvent). In Forge 1.21, it seems that neither IGuiOverlay nor RegisterGuiOverlaysEvent exist anymore – at least, I can't import them and they are missing from the docs and code completion. I tried using RenderLevelStageEvent as a workaround but it is probably not intended for custom HUDs. I am not using NeoForge, and switching the project to NeoForge is currently not an option for me. I tried to look at the original minecraft source code to see how elements like hearts, hotbar etc are drawn on the screen but I am too new to Minecraft modding to understand. What I'm looking for: What is the correct way to add a custom HUD element (icon + text) in Forge 1.21, given that the previous overlay API is missing? Is there a new recommended event, callback, or method in Forge 1.21 for custom HUD overlays, or is everyone just using a workaround? Is there a minimal open-source example repo for Forge 1.21 that demonstrates a working HUD overlay without relying on NeoForge or deprecated Forge APIs? My ideal solution: Centered HUD element with an in-game item/block icon (from the base game's assets, e.g. a diamond or any ItemStack / Item) and its name as text, with a transparent background rectangle. It should be visible to the players when the mini game is running. Easy to update the item (e.g. static variable or other method), so it can change dynamically during the game. Any help, code snippets, or up-to-date references would be really appreciated! If this is simply not possible right now in Forge 1.21, it would also help to know that for sure. Thank you very much in advance!
    • The simple answer is there is not an easy way. You would need to know how to program in Java, as well as at least some familiarity with how Forge works so you could port the differences. You would also need the sourcecode for the original mod, and permission from the author to modify it, if they did not use some sort of open source license. So it's not impossible, but it would take some effort, but doing so would open up a whole new world of possibilities for you!
  • Topics

×
×
  • Create New...

Important Information

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