FindItemStack is like a global API to get ModItems. Similar to the IC²-API getting IC²-Items, or the RC-API getting RC-Items. Mods register an ItemStack with a certain String at the GameRegistry, and sign with their Mod-ID.
[Addon v1.115.304 for MC 1.5.1/1.4.7] OreDupeFix 3.1
- agaricus
- Closed
-
-
Not sure how this would work exactly, what do you have in mind? If both GT and ODF are overwriting the same recipe, one has to take priority.. currently this "priority" can be set in their respective config files (enabling/disabling GT unification targets, and ODF enabling/disabling PreferredOres and replacement types).
What I had in mind was if the unificator targets were the same for ODF and GT, wouldn't it be possible for either one to look for each other's config and look up the enabled targets and set them based on that? I highly doubt that Greg has any plans to change the locations and names of his config files and the identifier for the line (ThermalExpansion = true, and such). However, this would have to happen in whichever mod that initializes last. Isn't it possible to look up in Forge which mods have been initialized and loaded?
Exactly, this is the barrier. Not going to reflect into Eloraam's code without her permission. Maybe something to consider for 1.5 once RP2 is updated, but honestly I'm holding out for a better solution which doesn't require this kind of mod-specific code (either modifying the items at a lower level, which may or may not be practical, or something higher-level in Forge itself to avoid the duplicate ore problem entirely - maybe this new FML findItemStack API or similar?). Fortunately IC2 has a fairly liberal reverse-engineering policy so it was the perfect proof-of-concept for this mod. For now, to workaround the problems in editing RP2 Alloy Furnace recipes I've set the default copper/silver/tin ingots to RedPower's (and IIRC GregTech does this too probably for the same reason).
I believe Greg did that as default for those exact reasons (plus he likes/loves Redpower, so....). I can fully understand your want to hold out on this until a better solution comes around, and I don't blame you, if I were in your position, I wouldn't want my mod taken down like the "legendary" (can't think of a decent word) EU-BT converter mod that lived for a very short time here and Elo had it taken down. Besides, I can kind of see where her logic is considering RP is still in prerelease.
-
I have an Unification API. Just a "ItemStack getUnificatedStack(ItemStack aStack)" inside my GregTech_API File. It works via hashmaps, so its not even causing performance Issues when called Ingame.
-
Oh look, it's another mod in the add-on section that isn't an IC2 add-on... >.>
-
Oh look, it's another mod in the add-on section that isn't an IC2 add-on... >.>
I feel bad for MFFS, i think nobody cared about it being in IC2 addon section.
-
Oh look, it's another mod in the add-on section that isn't an IC2 add-on... >.>
OreDupeFix is an IC2 addon, I use the IC2 API (and a couple non-API methods) to edit the IC2 machine recipes (macerate, extractor, compressor) and scrap box drops. The original versions would crash if IC2 wasn't installed, though I've since added a check to hopefully prevent this, at a user's request.Suppose I could move this mod elsewhere, now that it might work without IC2. AFAIK, IronChests similarity started out as an IC2 addon then became an independent mod. Maybe I'll move OreDupeFix in the future if I add more mod support or make it more general, but the current version I see as intended for use with IC2. No machine recipe types from other mods are supported yet, but we' ll see..
FindItemStack is like a global API to get ModItems. Similar to the IC²-API getting IC²-Items, or the RC-API getting RC-Items. Mods register an ItemStack with a certain String at the GameRegistry, and sign with their Mod-ID.Hm, sounds very useful for some purposes but I suppose if it was to be used for oredict unification the mod would have to loop over all Mod-IDs to find a matching item.
IMHO what would be really cool is a FindItemStack API accepting only a string for the item name, no mod ID, and then it could return the "canonical" item for that item name, if it exists, so mods could use it and wouldn't have to register their own duplicate items.
I have an Unification API. Just a "ItemStack getUnificatedStack(ItemStack aStack)" inside my GregTech_API File. It works via hashmaps, so its not even causing performance Issues when called Ingame.So when is your Unification API going to be submitted to Forge?
-
hello i was trying to add your mod to my server and got the error included in the attached text file
any help would be appreciated
forge version = 7.7.1.652
-
I have a request.
When i use Natura and get Metal (Iron/Tin...) Nuggets from the Berries im not able to make Ingots, but im able to make Ingots from Thaumcraft Nuggets.
Is it possible to integrate the Natura Nuggets into the Fix? -
I have a request.
When i use Natura and get Metal (Iron/Tin...) Nuggets from the Berries im not able to make Ingots, but im able to make Ingots from Thaumcraft Nuggets.
Is it possible to integrate the Natura Nuggets into the Fix?That would be its fault for not including the OreDictionary. Go Pester Natura.
-
Quoted from "Gucky"
I have a request.
When i use Natura and get Metal (Iron/Tin...) Nuggets from the Berries im not able to make Ingots, but im able to make Ingots from Thaumcraft Nuggets.
Is it possible to integrate the Natura Nuggets into the Fix?That would be its fault for not including the OreDictionary. Go Pester Natura.
I did now and its done.
But i have a bigger problem now. OreDupeFix crashes my Minecraft.
The Crash report is here:
---- Minecraft Crash Report ----
// Oops.Time: 24.04.13 11:31
Description: Failed to start gamecpw.mods.fml.relauncher.ReflectionHelper$UnableToAccessFieldException: cpw.mods.fml.relauncher.ReflectionHelper$UnableToFindFieldException: java.lang.NoSuchFieldException: e
at cpw.mods.fml.relauncher.ReflectionHelper.setPrivateValue(ReflectionHelper.java:140)
at agaricus.mods.oredupefix.OreDupeFix.setCraftingRecipeOutput(OreDupeFix.java:312)
at agaricus.mods.oredupefix.OreDupeFix.replaceCraftingRecipes(OreDupeFix.java:305)
at agaricus.mods.oredupefix.OreDupeFix.postInit(OreDupeFix.java:115)
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:515)
at sun.reflect.GeneratedMethodAccessor3.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:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:165)
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:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:98)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:695)
at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:206)
at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:444)
at net.minecraft.client.MinecraftAppletImpl.func_71384_a(SourceFile:56)
at net.minecraft.client.Minecraft.run(Minecraft.java:729)
at java.lang.Thread.run(Unknown Source)
Caused by: cpw.mods.fml.relauncher.ReflectionHelper$UnableToFindFieldException: java.lang.NoSuchFieldException: e
at cpw.mods.fml.relauncher.ReflectionHelper.findField(ReflectionHelper.java:87)
at cpw.mods.fml.relauncher.ReflectionHelper.setPrivateValue(ReflectionHelper.java:136)
... 33 more
Caused by: java.lang.NoSuchFieldException: e
at java.lang.Class.getDeclaredField(Unknown Source)
at cpw.mods.fml.relauncher.ReflectionHelper.findField(ReflectionHelper.java:78)
... 34 more
A detailed walkthrough of the error, its code path and all known details is as follows:
----------------------------------------------------------------------------------------- System Details --
Details:
Minecraft Version: 1.5.1
Operating System: Windows 7 (amd64) version 6.1
Java Version: 1.7.0_21, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 1075302304 bytes (1025 MB) / 1342308352 bytes (1280 MB) up to 1908932608 bytes (1820 MB)
JVM Flags: 2 total; -Xms1024m -Xmx2048m
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
Suspicious classes: FML and Forge are installed
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v7.44 FML v5.1.29.661 Minecraft Forge 7.7.1.661 Optifine OptiFine_1.5.1_HD_U_C4 35 mods loaded, 35 mods active
mcp{7.44} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized
FML{5.1.29.661} [Forge Mod Loader] (coremods) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized
Forge{7.7.1.661} [Minecraft Forge] (coremods) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized
CodeChickenCore{0.8.6.1} [CodeChicken Core] (coremods) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized
CoFHCore{1.5.1.0} [CoFH Core] (coremods) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized
NotEnoughItems{1.5.2.9} [Not Enough Items] (coremods) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized
CoFHNetwork{1.5.1.0} [CoFHNetwork] (CoFHCore-1.5.1.0.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized
CoFHWorld{1.5.1.0} [CoFHWorld] (CoFHCore-1.5.1.0.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized
mod_Gender{1.6_2} [mod_Gender] ([1.5.1]iPixeli_Gender_v1.6_2.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized
mod_ReiMinimap{v3.3_04 [1.5.1]} [mod_ReiMinimap] ([1.5.1]ReiMinimap_v3.3_04.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized
OmniTools{3.1.0.0} [OmniTools] (OmniTools-3.1.0.0.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized
ThermalExpansion{2.3.1.0} [Thermal Expansion] (ThermalExpansion-2.3.1.0.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized
IC2{1.115.294-lf} [IndustrialCraft 2] (industrialcraft-2_1.115.294-lf.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized
AdvancedMachines{4.9} [IC2 Advanced Machines Addon] (AdvancedMachines_1.5.1.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized
ArsMagica{5.50.007} [Ars Magica] (ArsMagica_5.50.007.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized
BuildCraft|Core{3.5.0} [BuildCraft] (buildcraft-A-3.5.0.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized
BuildCraft|Builders{3.5.0} [BC Builders] (buildcraft-A-3.5.0.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized
BuildCraft|Energy{3.5.0} [BC Energy] (buildcraft-A-3.5.0.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized
BuildCraft|Factory{3.5.0} [BC Factory] (buildcraft-A-3.5.0.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized
BuildCraft|Transport{3.5.0} [BC Transport] (buildcraft-A-3.5.0.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized
BuildCraft|Silicon{3.5.0} [BC Silicon] (buildcraft-A-3.5.0.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized
ChickenChunks{1.3.2.4} [ChickenChunks] (ChickenChunks 1.3.2.4.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized
CompactSolars{4.1.3.34} [Compact Solar Arrays] (compactsolars-universal-1.5.1-4.1.3.34.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized
EnderStorage{1.4.2.4} [EnderStorage] (EnderStorage 1.4.2.4.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized
Forestry{2.1.2.11} [Forestry for Minecraft] (forestry-A-2.1.2.11.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized
iChunUtil{1.0.0} [iChunUtil] (iChunUtil1.0.0.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized
inventorytweaks{1.53} [Inventory Tweaks] (InventoryTweaks-1.53.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized
IronChest{5.2.3.363} [Iron Chest] (ironchest-universal-1.5.1-5.2.3.363.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized
Mystcraft{0.10.3.00} [Mystcraft] (mystcraft-uni-1.5.1-0.10.3.00.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized
Natura{1.5.1_2.0.19} [Natura] (Natura_1.5.1_2.0.19.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized
OreDupeFix{3.1-SNAPSHOT} [OreDupeFix] (OreDupeFix-3.1-SNAPSHOT.jar) Unloaded->Constructed->Pre-initialized->Initialized->Errored
PortalGun{1.5.1} [PortalGun] (PortalGun1.5.1.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized
StevesCarts{2.0.0.a101} [Steve's Carts] (StevesCarts2.0.0.a101.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized
TConstruct{1.5.1_1.3rc.3} [Tinkers' Construct] (TConstruct_1.5.1_1.3rc.3.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized
TwilightForest{1.17.1} [The Twilight Forest] (twilightforest-1.17.1.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized
LWJGL: 2.4.2
OpenGL: GeForce GTX 460/PCIe/SSE2 GL version 4.3.0, NVIDIA Corporation
Is Modded: Definitely; Client brand changed to 'fml,forge'
Type: Client (map_client.txt)
Texture Pack: [1.5] R3D CRAFT Default Realism 64x64 (75%).zip
Profiler Position: N/A (disabled)
Vec3 Pool Size: ~~ERROR~~ NullPointerException: nullSo Minecraft crashes when i combine OreDupeFix with Tinker's Construct.
But since OreDupeFix error'd (in the report) im posting it here. If it isnt the OreDupeFixes fault im posting it in the TC Forum. -
I get something like this too
My crash :
--- BEGIN ERROR REPORT 73638d7c --------
cpw.mods.fml.relauncher.ReflectionHelper$UnableToAccessFieldException: cpw.mods.fml.relauncher.ReflectionHelper$UnableToFindFieldException: java.lang.NoSuchFieldException: a
at cpw.mods.fml.relauncher.ReflectionHelper.setPrivateValue(ReflectionHelper.java:140)
at agaricus.mods.oredupefix.OreDupeFix.setCraftingRecipeOutput(OreDupeFix.java:314)
at agaricus.mods.oredupefix.OreDupeFix.replaceCraftingRecipes(OreDupeFix.java:305)
at agaricus.mods.oredupefix.OreDupeFix.postInit(OreDupeFix.java:115)
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:494)
at sun.reflect.GeneratedMethodAccessor4.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:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:165)
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:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:98)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:695)
at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:206)
at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:447)
at net.minecraft.client.MinecraftAppletImpl.func_71384_a(SourceFile:56)
at net.minecraft.client.Minecraft.run(Minecraft.java:732)
at java.lang.Thread.run(Unknown Source)
Caused by: cpw.mods.fml.relauncher.ReflectionHelper$UnableToFindFieldException: java.lang.NoSuchFieldException: a
at cpw.mods.fml.relauncher.ReflectionHelper.findField(ReflectionHelper.java:87)
at cpw.mods.fml.relauncher.ReflectionHelper.setPrivateValue(ReflectionHelper.java:136)
... 33 more
Caused by: java.lang.NoSuchFieldException: a
at java.lang.Class.getDeclaredField(Unknown Source)
at cpw.mods.fml.relauncher.ReflectionHelper.findField(ReflectionHelper.java:78)
... 34 more
--- END ERROR REPORT 3f5e63b1 ---------- -
-
I get something like this too :
[spoiler]
cpw.mods.fml.common.LoaderException: java.lang.NoSuchMethodError: ic2.api.Ic2Recipes.addCompressorRecipe(Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;)V
at cpw.mods.fml.common.LoadController.transition(LoadController.java:142)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:696)
at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:206)
at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:447)
at net.minecraft.client.MinecraftAppletImpl.func_71384_a(SourceFile:56)
at net.minecraft.client.Minecraft.run(Minecraft.java:732)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoSuchMethodError: ic2.api.Ic2Recipes.addCompressorRecipe(Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;)V
at binnie.extrabees.core.ExtraBeeCore.addRecipes(ExtraBeeCore.java:258)
at binnie.extrabees.core.ExtraBeePlugin.doInit(ExtraBeePlugin.java:56)
at forestry.core.ForestryCore.postInit(ForestryCore.java:140)
at forestry.core.ForestryClient.postInit(ForestryClient.java:25)
at forestry.Forestry.postInit(Forestry.java:48)
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:494)
at sun.reflect.GeneratedMethodAccessor4.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:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:165)
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:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:98)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:695)
... 5 more
--- END ERROR REPORT 6247521b ---------- -
OreDupeFix 3.1 now available. Should fix the issues reported above. Download at:
https://bitbucket.org/agaricus…nloads/OreDupeFix-3.1.jar
Change log:
2013/04/25 3.1
* Update for compatibility with IC2 1.115.304+
* Use srgnames for reflection to improve mod compatibility
* Improve output formatting for dumpOreDict -
Sorry for bumping this topic. but I am using this on my server and this mod doesnt seems to recognize lead. I tried to put lead from a IC2 macerator, but to no avail it doesnt make the dust.i I made an input for the lead dust in the config and that doesnt work. can anyone tell me what Im doing wrong?