-
Posts
1689 -
Joined
-
Last visited
-
Days Won
1
Everything posted by SanAndreaP
-
Try the links in this thread: http://www.minecraftforge.net/forum/index.php/topic,5.0.html
-
When I debugged my "Crap", It didnt help a thing, same error, giving the same location. I need to find a replacement method, but I can't seem to get one. The method is really needed to generate my world. Did you try my response?
-
I don't exactly know, but is this method also available for the server? .getFloatRainfall() in: float f1 = worldObj.getWorldChunkManager().getBiomeGenAt(i, k).getFloatRainfall(); Try to outcomment it or use an actual number like 1F or so. If it's working then, you know what's the problem then.
-
I would rather uninstall java from the control panel (both, JRE and JDK) and after that, download the latest JDK (includes JRE) and install that.
-
Forge Modloader does not work for me
SanAndreaP replied to rhapowar's topic in Support & Bug Reports
Okay, then the answer for the thread creator is pretty obvious. -
@OvermindDL1: I already answered this in my mod installation thread where he/she posted the same problem. Anyway, either it's a bad download or, most likely, you tried to extract the content from the mod package and put this content into the mods folder. That's wrong. Just put the package itself into the mods folder (and clean the mods folder before)
-
I dunno if there was something changed in the rendering stuff for guis in 1.3. The code is still from the 1.2.5 version of the mod, so I cannot say if it still works correctly for 1.3. I have to figure this out myself now with an other mod I want to update (which gets a new GUI with features like this). So either you wait until I / an other person respond or you can play with stuff around for yourself. I think the problem is a colorizing problem. Try to put this code: GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); before this line: RenderManager.instance.renderEntityWithPosYaw(turret, 0.0D, 0.0D, 0.0D, 0.0F, 1.0F);
-
You should use a new instance of your entity, or else you get these effects. Also menuW and menuH are the width and height of my gui (223 px and 222 px). private int menuW = 223, menuH = 222;
-
This is a code snippet from the Turret Book GUI from my Turret Mod, which renders a turret entity and let it rotate automatically: private int rotateTurret = 0; private void drawTurret(EntityLiving turret) { int xPos = (this.width - this.menuW) / 2; int yPos = (this.height - this.menuH) / 2; if (turret == null) { return; } /* some special code for the turrets, not neccessary turret.health = turret.getMaxHealth() / 2; if (turret instanceof TurretMod_EntityTurretG) { ((TurretMod_EntityTurretG) turret).ammo = ((TurretMod_EntityTurretG) turret).maxammo / 2; } else if (turret instanceof TurretMod_EntityDefenseBot) { ((TurretMod_EntityDefenseBot) turret).ammo = ((TurretMod_EntityDefenseBot) turret).maxammo / 2; ((TurretMod_EntityDefenseBot) turret).isTamed = true; }*/ GL11.glPushMatrix(); GL11.glColor3f(1F, 1F, 1F); GL11.glEnable(32826 /* GL_RESCALE_NORMAL_EXT */); GL11.glEnable(2903 /* GL_COLOR_MATERIAL */); GL11.glPushMatrix(); GL11.glTranslatef(xPos + 40, yPos + 98, 50F); float f1 = 30F; GL11.glScalef(-f1, f1, f1); GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); GL11.glRotatef(135F, 0.0F, 1.0F, 0.0F); RenderHelper.enableStandardItemLighting(); GL11.glRotatef(-135F, 0.0F, 1.0F, 0.0F); GL11.glRotatef(0.0F, 1.0F, 0.0F, 0.0F); turret.renderYawOffset = turret.rotationYaw = turret.prevRotationYaw = turret.prevRotationYawHead = turret.rotationYawHead = this.rotateTurret; turret.rotationPitch = 0.0F; GL11.glTranslatef(0.0F, turret.yOffset, 0.0F); RenderManager.instance.playerViewY = 180F; RenderManager.instance.renderEntityWithPosYaw(turret, 0.0D, 0.0D, 0.0D, 0.0F, 1.0F); GL11.glPopMatrix(); RenderHelper.disableStandardItemLighting(); GL11.glDisable(32826 /* GL_RESCALE_NORMAL_EXT */); GL11.glTranslatef(0F, 0F, 0.0F); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glEnable(32826 /* GL_RESCALE_NORMAL_EXT */); int i1 = 240; int k1 = 240; OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, i1 / 1.0F, k1 / 1.0F); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glDisable(32826 /* GL_RESCALE_NORMAL_EXT */); RenderHelper.disableStandardItemLighting(); GL11.glDisable(2896 /* GL_LIGHTING */); GL11.glDisable(2929 /* GL_DEPTH_TEST */); GL11.glPopMatrix(); } This method gets called in the drawScreen method of your GUI. Just change the things to your wishes. The rotateTurret integer field gets incremented in the updateScreen method like this.rotateTurret++;
-
Seems pretty obvious: You call 2 times GL11.glPopMatrix() without calling any GL11.glPushMatrix() before. Google your error and you'll find help.
-
Forge Modloader does not work for me
SanAndreaP replied to rhapowar's topic in Support & Bug Reports
Is there already a port available of forge for bukkit? I know that the Forge team don't provide a bukkit version. -
[solved] Double Entity Spawning Problem ...
SanAndreaP replied to Torojima's topic in General Discussion
either, that quote is a typo, or I do understand it very wrong ... Yeah, this is unluckily explained. With serverside world is meant that it is a remote world, so worldObj.isRemote is true. This applies also for the new 1.3 update, but instead the client has now a server running in the background, so you have to spawn your entities into the serverside world. -
[solved] Double Entity Spawning Problem ...
SanAndreaP replied to Torojima's topic in General Discussion
Who told you that? Spawning of entities HAVE TO be done on the server side, and only there! -
Minecraft crashes upon joining multiplayer server
SanAndreaP replied to DrewbieCanubie's topic in Support & Bug Reports
you should both have the actual recommented universal build. And yes, that is most likely the cause, that you're running different minor versions of forge. -
minecraft server crashes with forge 3.3.8.164
SanAndreaP replied to randomperson12321's topic in Support & Bug Reports
How do you run your server? With a command line or what? -
cpw.mods.fml.relauncher.ReflectionHelper$UnableToAccessFieldException: cpw.mods.fml.relauncher.ReflectionHelper$UnableToFindFieldException: java.lang.NoSuchFieldException: fruitType Looks like it cannot find that field you're trying to access to. You try to use: ModLoader.setPrivateValue(net.minecraft.src.BlockStem.class, (BlockStem)Block.pumpkinStem, "fruitType", realPumpkin); and fruitType will be obfuscated, that means it has a name like field_2124 or something like that. So it works in eclipse (with the readable name) but not after obfuscation. I believe there's a method similar to that, just with an int parameter instead of a String one for the field. Try something like that: ReflectionHelper.setPrivateValue(net.minecraft.src.BlockStem.class, (BlockStem)Block.pumpkinStem, 0, realPumpkin) The 0 is the index of the field in the BlockStem class, means that this is the first field in it. Also try to use the ReflectionHelper directly instead of ModLoader methods for Reflection things like these. ModLoader stuff in a forge mod doesn't look good / clean.
-
I got a log after replying, but he shouldn't do that again (also a warning for other people). It confuses people and they're less likely to help.
-
uhm, yeah... I don't see any logs Nvm... (how did you do that? And please stop this, that confuses people I think) Anyway, looks like a class is missing. Try to get a clean minecraft.jar and install forge again. Be sure to get the recommented universal build. If that doesn't work, try the latest one. If that doesn't work either, use an other launcher like MultiMC or MagicLauncher.
-
Request for on how to update the players inventory.
SanAndreaP replied to jangofett890's topic in Modder Support
Could you tell us where you call this kind of code? In a GUI, in an entity (interact(...) method), whatever... Maybe it's not even necessary to send packets. Also don't use ModLoader stuff anymore. In your example, you can get theMinecraft instance with Minecraft.getMinecraft() instead of ModLoader.getMinecraftInstance() (warning: don't use these in classes which are supposed to be in the server, too!) -
how can i fix forge so it can use multiple mods without crashing?
SanAndreaP replied to Polar Tendency's topic in Suggestions
If it doesn't work with forge, either provide proper logs or go to the mod author. If it would be programmed well, it would work. -
Nope, but it gives you the player instance, so you can check which item the player is holding when called that method, like this: public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) { ItemStack heldItem = par5EntityPlayer.getCurrentEquippedItem(); if(heldItem != null && heldItem.isItemEqual(YOUR_ITEM_STACK)) { // YOUR CODE HERE return true; } return false; } YOUR_ITEM_STACK can be for example: new ItemStack(Block.cloth.blockID, 1, 5) for the light green wool.
-
Seems valid. Could you tell which issues you have?
-
Couldn't change block's id myself in config folder
SanAndreaP replied to CDtoday's topic in Support & Bug Reports
Looks neat. I'll test that. EDIT: Alright, I've tested your class (UnicodeInputStreamReader) now (sorry if I'm late, had stuff to do). The class reads UTF-X files with BOM quite well. The only thing is that it can't read files encoded in ANSI (ASCII) or UTF-8 w/o BOM now. I can't find the problem... Seems like if it hasn't any BOM, it just cuts out 4 chars at the beginning. I set the inital size variable to 0 instead of 4 (it's on line 417 in this file) and it works now in both, UTF with BOM and encodings without BOM (UTF-8 w/o BOM and ANSI). But does this cause any problems? EDIT2: Forgot to mention that I've added the line size = 4; after enc = "UTF-32BE"; and enc = "UTF-32LE";