-
Posts
1689 -
Joined
-
Last visited
-
Days Won
1
Everything posted by SanAndreaP
-
-XX:PermSize=256m -XX:MaxPermSize=512m Different values are not recommented, because if the PermGen has reached the min value, it has to reallocate it. Use a fixed value: -XX:PermSize=512m -XX:MaxPermSize=512m
-
You can look into the bat file and see what it does. Then adapt this to your bat. I assume you download and extract MCP with your bat?
-
No, I meant when you put Forge into the minecraft.jar, you've probably missed files in the forge package. I suggest you open both the Forge ZIP and the minecraft.jar, mark EVERYTHING in the forge zip (Ctrl+A) and copy the marked stuff over to the minecraft.jar.
-
You need to register your Achievements (and your block / items, too) in your @PreInit method.
-
You didn't install EVERYTHING from the forge package.
-
[SOLVED]Custom flowers - How to only be placed on custom blocks?
SanAndreaP replied to bl4ckscor3's topic in Modder Support
You need to override the method from SeaBass and also this one: public boolean canBlockStay(World par1World, int x, int y, int z) Get the block ID from the block below (y-1) and check if it's equal to your custom block(s). -
Minecraft Launcher (i.e. Mojangs launcher) and Forge with 1.5.2
SanAndreaP replied to NosajDraw's topic in General Discussion
The Forge devs work already on porting Forge to 1.6 (and recoding it because of that) to be compatible with the new Launcher. Fun fact: the new Launcher uses some FML technology. If you wanna use Forge on versions pre-1.6, use the old launcher, or an other 3rd-party launcher. (I recommend MultiMC) -
There's already some description to the potions before 1.6. You need to look at the actual ItemPotion class, not at the Potion classes.
-
I'm not sure which mod is having this package structure: chocolate.mods.BD.builder.BuilderHelper.fillMap but that mod is causing the crash. So either you'll look into the mod's zip files and look for the one which folder structure matches. This is the mod then. Or install all mods again one by one until it crashes.
-
Opening GUI on player's client from server
SanAndreaP replied to twixthehero's topic in Modder Support
Sorry, I didn't meant to quote you, I was answering the guy above you and only overviewed your post, my apologies. In my opinion your Option B is working perfectly fine, but a tiny bit uglier, since you create an instance which won't be used in the end and eats up memory (even if it's a very tiny bit) until the next garbage collection. Again, it's my opinion. Also creating a custom packet is a good way to learn how to handle packets if you didn't already learn that. -
Use reflection or make a coremod.
-
Any way to check if the player is spawned?
SanAndreaP replied to freeradicalx's topic in Modder Support
Use Forge's LivingSpawnEvent, then checkcast the EntityLiving obj to EntityPlayer. What he said ^^ Also, try and avoid using Minecraft.getMinecraft() any any SMP mod, as it is a client-side only method and will not run properly if compiled/placed on dedicated server. (unecessary for SSP only mods, but probably a good idea to do things properly from the get-go) There is also a way to get a list of all logged in player entities from MinecraftServer.... I think it is located at: MinecraftServer.getServer().getConfigurationManager().playerEntityList Which would allow for active/realtime polling of player positions/knowing when they are online. (And this method is SMP safe, and could safely be called on a dedicated server). Minecraft.getMinecraft() should not be used in a SMP mod ... server-sided! If you are sure you're on the client-side, you can freely use this (examples are renderers). If you're not sure, then always use your proxy. MinecraftServer.getServer() will actually not work on clients connected on a dedicated server! It can be used for the internal server or dedicated server (server-side). Here you have to make sure, you only execute this server-sided. Again, if you're not sure, use your proxy. -
Opening GUI on player's client from server
SanAndreaP replied to twixthehero's topic in Modder Support
The GUI is linked to the container. Perhaps that is not the problem, but it is necessary. No, as long as you don't extend GuiContainer, you DON'T NEED a Container! Look at my GuiHandler and you'll see it for yourself: https://github.com/SanAndreasP/TurretModv3/blob/master/sanandreasp/mods/TurretMod3/registry/GuiHandler.java I my GuiHandler, some cases of the getServerGuiElement it returns null. I believe you need to open the GUI client-side (in case of container GUIs, client- and server-side) in order to open them. If you have a method which only opens server-side, you'll need to send a packet to the client, then open the GUI that way! -
It's just like using the normal reobfuscate.bat/.sh, it just uses those SRG names instead of the obfuscated ones.
-
Wasn't there a Forge beta build in his forum thread?
-
I may add that I recommend to use the reobfuscate_srg.(bat/sh), since then you don't have to worry about updating your mod every Minecraft bugfix update (like the 1.5.0 -> 1.5.1 -> 1.5.2 updates) Why, exactly? what do you mean with "why"? why I recommend this or why you don't have to worry about updating your mod during MC bugfix updates? I personally would be interested in the later part. How does the magic work, any leads? You heard of "runtime deobfuscation"? Forge converts the obfuscated code in Minecraft (the classes/methods/fields named a, bs, aab etc.) to deobfuscated "SRG names" (like func_34423 for methods etc.) while Minecraft runs. Those are indices which won't change unless there is an update which introduces new stuff or removes old stuff. That's why a mod reobfuscated with srg names won't break until a next "mod-breaking" update, like the 1.3 update was (introducing an internal server in singleplayer) or the 1.5 one (new texture system), basically a mod compiled in 1.5 will work with 1.5.2 (if written corectly, of course). If you don't, you most likely have to update to the next bugfix update.
-
The problem about this is that you can't get the size of a generated biome. You can force your generation so that it doesn't generate if it's too close to an other biome, but EXACTLY the middle of the biome is pretty impossible due to the fact that the world gen is pretty much randomized.
-
Or set noclip. IIRC, you can still push the entity aside. Also wouldn't it just fall through the ground?
-
I may add that I recommend to use the reobfuscate_srg.(bat/sh), since then you don't have to worry about updating your mod every Minecraft bugfix update (like the 1.5.0 -> 1.5.1 -> 1.5.2 updates) Why, exactly? what do you mean with "why"? why I recommend this or why you don't have to worry about updating your mod during MC bugfix updates?
-
well, read your log... or the EAQ. Both should help.
-
To load your coremod in MCP, you need to make a dummy jar file, put that /META-INF/MANIFEST.MF in that and shove the jar into the /mcp/jars/coremods folder. Here's my dummy jar, if you want to inspect that: https://dl.dropboxusercontent.com/u/56920617/SAP_ManPackCore_v100_dummy.jar If you mean it's not loading in debug mode, then yes, it's not loading. Well, I like to develop and test my programs in the IDE. I haven't tried yet whether it even loads up in regular Minecraft. Sure I could do it that way too, but I'd like to know if it is possible to get it to run in the IDE, especially since it's much quicker and easier when resolving problems since I don't always have to log a lot of information, recompile, and re-obfuscate all the time. It's just about convenience at this point. I've never used Debug myself. What exactly does it do? In eclipse, it lets you change code in classes and you will immediately see the result, except you add/delete/rename a method, field or class.
-
I may add that I recommend to use the reobfuscate_srg.(bat/sh), since then you don't have to worry about updating your mod every Minecraft bugfix update (like the 1.5.0 -> 1.5.1 -> 1.5.2 updates)
-
Not that complicated, tbh. lolno, the sitting render is actually handled inside the RenderBiped and ModelBiped class, AFAIK. The entity just holds a variable for the riding / ridden Entity. The only thing worth looking at would be how to mount the player onto that minecart (generally an entity) Or you just create a "dummy entity" which is invisible, let it place when the block is placed in the middle of the X/Z block coordinates (blockX/blockZ + 0,5) and deny despawning (canDespawn() returns false). If he right-clicks the block, the block scans for the entity and mount the player to that entity. Make sure to make the size of the entity small enough so you can place blocks next to your block, and to prevent the entity from blocking the block highlighting, so the player can break the block. If the player breaks the block, the entity is removed from the world (entity.setDead()). Ah yeah, and don't forget to block the entitys movement!