-
Posts
153 -
Joined
-
Last visited
Everything posted by WorldsEnder
-
I got a problem when I try to load localized Strings for my items etc. How I do that is I read a specific file, instanciate a java.util.Properties, let that read my mappings and register it with LanguageRegistry#addStringLocalization(properties); As far as I know that works correctly (I debugged) but still after I registered the Strings I get displayed in game are not correctly replaced. Is this a common problem that will be fixed? Anything I'm doing wrong?
-
Thank you diesieben07 for your feedback and I'll try to figure out things myself next time because this is definitly not what this forum is all about. onLeftClickEntity was my fault, it's still there. Have I said that I love how things are shifted to events? no? ok, I love it. Forum was good enough to port my alpha-version to 1.7.2, thanks guys
-
I have various problems trying to update my mod from 1.6.4 to 1.7.2. entityId: I used the entityId of any entity as a Hash for my mapppings and stuff... NO I can't use extended properties because I gave the entity to openGui-method. PlayerTracker: In 1.6.4 I was able to register a PlayerTracker which featured methods like onConnect() etc.... as of now, this gives me compiler errors and I can't find another way to do it. onLeftClickEntity: I had an item that reacted in a special way when the player attacked an entity. I can't find the method onLeftClickEntity in the item-class anymore. RenderLiving: I have overridden the RenderLiving-class but a lot of code has changed. Can someone explain me what method is called when and how I (my class) am supposed to react? ANSWERED: KeyHandler: I had registered a KeyBinding. It seems like either the classes got moved or something basic stuff changed. How can I register a key binding in the new version? Will the keyBinding persist between Minecraft starts? Thanks Lex for all those new Events, I just found them, a big hug from me. (It's an InputEvent for everyone interested)
-
Block: func_149664_b(WorldClient, int, int, int, int): onBlockDestroyed(worldClient, posX, posY, posZ, metadata) Material: field_151579_a : MaterialAir field_151579_a : MaterialGrass field_151578_c : MaterialDirt field_151575_d : MaterialWood (like bookshelf, etc.) field_151576_e : MaterialStone field_151576_e : MaterialMachine (hopper, cauldron and brewingStand) field_151574_g : MaterialAnvil field_151586_h : MaterialWater field_151587_i : MaterialLava field_151584_j : MaterialLeaves field_151585_k : MaterialPlant (+cocaoBeans) (can not be replaced and doesn't burn) field_151582_l : MaterialGrass (can be replaced and burns) field_151583_m : MaterialSponge field_151580_n : MaterialBed field_151581_o : MaterialFire field_151595_p : MaterialSoulSand field_151594_q : MaterialLogic (redstone, rails and flowerpots, lever, torches and tripwire) field_151593_r : MaterialCarpet field_151592_s : MaterialBeacon (+stainedGlass) field_151591_t : MaterialRedstoneLight field_151590_u : MaterialTNT field_151589_v : Material? //NOTE: I can't figure it out... please reply or something if you know field_151588_w : MaterialIce field_151598_x : MaterialPackedIce field_151597_y : MaterialSnow field_151596_z : MaterialSnowBlock field_151570_A : MaterialCactus field_151571_B : MaterialClay (+silverfish) field_151572_C : MaterialMelon field_151566_D : MaterialDragonEgg field_151567_E : MaterialPortal field_151568_F : MaterialCake field_151569_G : MaterialWeb func_151565_r(): returns the color on the map KeyBinding: KeyBinding(String p_i45001_1_, int p_i45001_2_, String p_i45001_3_): KeyBinding(description, keyCode, category) field_151472_e: keyCode2 ?duplicate? this one is never changed field_151471_f: Category func_151470_d(): return isPressed func_151466_e(): category func_151464_g(): description func_151469_h(): keyCode2, never changed func_151462_b(int p_151462_1_): setKeyCode(int newCode) GuiContainer: field_146999_f: ySize field_147000_g: xSize etc... more will come when I have time and feel tempted to do so
-
It may not be the a very problematic but as far as I can see the .jars (Referenced libraries) are kept in the .gradle folder in the users account. I don't really like this method because I hate spreaded files which I have to search for if I want to clear the installation manually or something. It's just personal preference and maybe isn't that hard to archieve if you move the libraries into the same folder as gradlew or the assets or whatever. Also the foldername "cache" chosen by gradle could be misleading as you are normally allowed to delete cache without worries about your project what so ever.
-
Maybe the old method should get an @Deprecated-annotation or something.
-
I installed the new dev-version of minecraft forge following this tutorial: http://www.minecraftforge.net/forum/index.php/topic,14048.0.html After setting everything up as described in the tutorial I get this error: [04:10:52] [main/INFO]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker [04:10:52] [main/INFO]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker [04:10:52] [main/INFO]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker [04:10:52] [main/INFO]: Forge Mod Loader version 7.2.44.991 for Minecraft 1.7.2 loading [04:10:52] [main/INFO]: Java is Java HotSpot(TM) Client VM, version 1.6.0_26, running on Windows 7:x86:6.1, installed at C:\Program Files (x86)\Java\jre6 [04:10:52] [main/INFO]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation [04:10:52] [main/INFO]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [04:10:52] [main/INFO]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker [04:10:52] [main/INFO]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [04:10:52] [main/INFO]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [04:10:52] [main/INFO]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper [04:10:53] [main/ERROR]: The binary patch set is missing. Either you are in a development environment, or things are not going to work! [04:10:54] [main/ERROR]: The minecraft jar file:/C:/Users/Carbon/.gradle/caches/minecraft/net/minecraftforge/forge/1.7.2-10.12.0.991/forge-1.7.2-10.12.0.991-mcp.jar!/net/minecraft/client/ClientBrandRetriever.class appears to be corrupt! There has been CRITICAL TAMPERING WITH MINECRAFT, it is highly unlikely minecraft will work! STOP NOW, get a clean copy and try again! [04:10:54] [main/ERROR]: FML has been ordered to ignore the invalid or missing minecraft certificate. This is very likely to cause a problem! [04:10:54] [main/ERROR]: Technical information: ClientBrandRetriever was at jar:file:/C:/Users/Carbon/.gradle/caches/minecraft/net/minecraftforge/forge/1.7.2-10.12.0.991/forge-1.7.2-10.12.0.991-mcp.jar!/net/minecraft/client/ClientBrandRetriever.class, there were 0 certificates for it [04:10:54] [main/ERROR]: FML appears to be missing any signature data. This is not a good thing [04:10:54] [main/INFO]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper [04:10:54] [main/INFO]: Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker [04:10:54] [main/INFO]: Launching wrapped minecraft {net.minecraft.client.main.Main} [04:10:57] [main/ERROR]: Unable to launch java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.6.0_26] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.6.0_26] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.6.0_26] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.6.0_26] at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?] Caused by: joptsimple.MissingRequiredOptionException: Missing required option(s) ['accessToken'] at joptsimple.OptionParser.ensureRequiredOptions(OptionParser.java:447) ~[OptionParser.class:?] at joptsimple.OptionParser.parse(OptionParser.java:437) ~[OptionParser.class:?] at net.minecraft.client.main.Main.main(Main.java:44) ~[Main.class:?] ... 6 more when trying to launch with the default ExampleMod.
-
Oh good thing that I haven't written too much networkcode yet. I heard there were pretty heavy changes to this. Anything confirmed/have I to fear the compability of my mod?
-
String comparison is not like it would first seem it would be. There can be two different String objects although both Strings could contain "Hello". This is like any other object, two objects with the same properties but they are not the same object (which would mean that they are stored at the same location in RAM, etc.). .equals is designed for that specifique case where you have two objects that have the same properties and somehow the user should know that (he can't know about private fields). So the mthod .equals in String is designed for the case that both Strings contain the same charsequence but are not really the same object. .equals return true in this case, == doesn't. PS: String has a method named .intern(). All Strings charsequences are stored in an String-class intern list with exactly one String object as reference. Calling .intern() returns exactly that String object meaning that if you use this before comparing two string containing the same char** with ==, the operation would return true. Example: x.intern() == ("Mythical"+CriticalStrike.common.summoningStone.name2+CriticalStrike.common.summoningStone.name1).intern(). PSS: All strings you literally type in like "Mythical" are automatically intern, this is why normally == would succeed. A random charsqeunce-generator though normally returns a new String-object, not the .intern() one. PSSS: Use .equals() instead of .intern() twice, code style.
-
All I know is that you can set the player's walk speed with a simple call to thePlayer.capabilities.setPlayerWalkSpeed(float) Default value is 0.1F. I know that this may have the side effect of a FOV change but I guess that is all right since the player is running... fast...
-
Oh how did I not see that *slap myself*, old school style without @ForgeSubscribe Thx, topic redundant.
-
Hi again. Another thing which I did not find in the current version. I need a hook for when the resource pack is changed/reloaded. Would really appreciate a response Bye WorldsEnder
-
Some code how you render that stair would help.
-
[SOLVED]How can I abort the player's left-click action?
WorldsEnder replied to WeAthFolD's topic in Modder Support
And please post your result... I am very curious myself. -
Teach me wrong but as far as I know when someone includes .lang files in the corresponding location (assets/mod/lang/en_US.lang) they are not automatically read and included. This would be fairly easy to do (for example ask the @Mod-file, or search in /assets/MODID/) and would really help to clean stuff up. Also anyone outside (resource pack creators) could easily change the name for languages if they like to do so. A file like "any.lang" would register unlocalized strings if one wants to do so.
-
Ok, a custom dimension can mean a lot of work if you really want own biomes. I'll try to give you some idea what you need as far as I know. First of all you need a class that takes care of the world being hold meaning that this class will tell Minecraft how to handle the world. This is the class you must register in your @Mod-class. DimensionManager.registerProviderType(this.providerID, your_class.class, false); What this does is registering a provider. As providerID you have to take one that is not taken yet (the method return true if registering was successful, 0, -1, 1 are Vanilla I think). The false at the end says whether or not your dimension should be loaded if there are no players inside. To avoid lagspikes you should give false. This isn't enough though as you have not created a world yet. You do this by calling this.dimensionID = DimensionManager.getFreeDimId(); //dimensionID should be stored, here in your @Mod-class DimensionManager.registerDimension(this.dimensionID, this.providerID); This call creates a new world with your provider as sort of type of the world. You can create many worlds just by calling the second method over and over again without having to register a new WorldProvider. Now all you have to do is to create your own provider. public class your_class extends WorldProvider { //Override super-methods as you like here }
-
Set the ItemSTack that the player has "in hand"
WorldsEnder replied to WorldsEnder's topic in Modder Support
Well... what ever. I now use my own Slots extending Slot (the slot-sensitive version of isItemStackValid() IS called) and have rewritten the transferStackInSlot() method. This thing is on fire now. Thanks for sharing your knowledge with me. THIS THREAD CAN BE CONSIDERED CLOSED! -
Set the ItemSTack that the player has "in hand"
WorldsEnder replied to WorldsEnder's topic in Modder Support
I found this method (which is in IInventory, I believe). The problem is that the auto-sorting, placing, etc. algorithms just don't use it ..... which is of course kinda obnoxious. Hm extending Slot... I dunno I thought about overriding the slotClick(int, int, int, EntityPlayer) method from Container but I don't know what all those parameters are. Does anyone know more about the handed vars? -
How to add a renderer on top of an existing minecraft gui
WorldsEnder replied to tlr38usd's topic in Modder Support
I would suppose not to use TickType.PLAYER but TickType.RENDER. Everything should work smoother -
Set the ItemSTack that the player has "in hand"
WorldsEnder replied to WorldsEnder's topic in Modder Support
Thanks for the basics. Appreciate. Now I want to "hand back" the ItemStack when it isn't one which I allow. For example my inventory should ONLY hold sticks. This is what I ment with the players hand in the first place. Whenever you click a slot with an item that is not a stick nothing should happen. Can someone figure it out how to do THAT? Thanks for the fast respond, I like it -
Hey guys I need your quick (hopefully) help. You all know that after opening your inventory you can transfer ItemStacks by clicking on them which brings them into "your hand". I want to do the same thing in my custom Gui. How? Keeping it short, Me
-
How to add a renderer on top of an existing minecraft gui
WorldsEnder replied to tlr38usd's topic in Modder Support
Tick Handler maybe great for some purposes but in my opinion @ForgeSubcribe-method is better as you can hook in everywhere you want (for example after the healthbar or before the hungerbar w s e). Just sayin -
How to add a renderer on top of an existing minecraft gui
WorldsEnder replied to tlr38usd's topic in Modder Support
I got some code for you: import net.minecraftforge.client.event.RenderGameOverlayEvent; import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType; import net.minecraftforge.event.ForgeSubscribe; //maybe some imports are missing... I hope not, respond if I'm wrong or fix it yourself public class YourRenderer() { public YourRenderer() { //Whatever you need else MinecraftForge.EVENT_BUS.register(this); //You can/should/may do this after you created an instance of the class anywhere you //like } @ForgeSubscribe public void onRenderEvent(RenderGameOverlayEvent.Post postRender) //You wanted to render afterwards { if(postRender.type!=ElementType.ALL) return; //This renders it really last. You can select another ElementType if you like. //your render code } } -
Always glad to help out.