-
Posts
1689 -
Joined
-
Last visited
-
Days Won
1
Everything posted by SanAndreaP
-
there is always an error log if Forge is installed properly! It's called ForgeModLoader-client-0.log. Go look for it.
-
Put this line after the OpenGLHelper method: GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
-
use this: int var5 = (int) (tpb.worldObj.getBlockLightValue(tpb.xCoord, tpb.yCoord, tpb.zCoord) / 15F * 240F); instead of this: int var5 = (int) (tpb.worldObj.getBlockLightValue(tpb.xCoord, tpb.yCoord, tpb.zCoord) / 15F);
-
[PROBLEM] Problem With Shapeless Recipe
SanAndreaP replied to Alizter's topic in Support & Bug Reports
Because you're using a block in your recipe before initializing it, which causes an NPE. I suggest to create your recipes after you initalize all blocks and items. -
Okay, then try this code: int var5 = entityliving.getBrightnessForRender(f); int var6 = var5 % 65536; int var7 = var5 / 65536; OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, var6 / 1.0F, var7 / 1.0F); above: this.renderBlocks.renderBlockAsItem(Block.blocksList[craftingResult.itemID], craftingResult.getItemDamage(), 1.0F); and replace this: entityliving.getBrightnessForRender(f) with this: (float)te.worldObj.getBlockLightValue(te.xCoord, te.yCoord, te.zCoord) / 15F
-
I had this problem with textures in my GUI, but dunno if you can apply this, too. I used this before rendering: RenderHelper.disableStandardItemLighting(); Put that before: this.renderBlocks.renderBlockAsItem(Block.blocksList[craftingResult.itemID], craftingResult.getItemDamage(), 1.0F); Then after that: RenderHelper.enableStandardItemLighting(); If that doesn't work, swap these methods around and test it then.
-
Yup, with an event called LivingDropsEvent. I use it for one of my own mods.
-
Problem with Block updateTick and client
SanAndreaP replied to Jade_Knightblazer's topic in Modder Support
I'm glad that it works now. But I'm curious which method you used? -
event.manager.soundPoolSounds.addSound("/folder/mirrorsound.ogg", ModMagicItems.class.getResource("/spelssounds/sounds/folder/mirrorsound.ogg")); The first path is wrong. You shouldn't have a slash at the beginning. It should be like: "folder/mirrorsound.ogg"
-
Problem with Block updateTick and client
SanAndreaP replied to Jade_Knightblazer's topic in Modder Support
I had this problem with my block, too. Maybe this will work (at least it works for me): par1World.markBlockNeedsUpdate(par2, par3, par4); after setting your metadata. -
1. Wrong sub-forum (someone moved the topic) 2. read this: http://www.minecraftforge.net/forum/index.php/topic,2429.0.html
-
It's definetly crashing because of DynamicLights. The fact that both, Forge and DL, edits the xe.class and the crash report shows there's something up with this class (it's missing a method) confirms that. Ask the mod author, if he can make a patch for Forge or if he could move to Forge (then he don't need to edit base classes because of the Coremod functionality).
-
I'm using this in my Clay Soldiers Mod: private void showChatMessageToAll(String msg) { Iterator<EntityPlayer> players = this.worldObj.playerEntities.iterator(); while(players.hasNext()) { EntityPlayer player = players.next(); if(getDistanceSqToEntity(player) < 32F) player.sendChatToPlayer(msg); } } Add this method in your entity and call it where you want. Be sure that this only gets called on the server with checking: worldObj.isRemote == false. One note: this line: if(getDistanceSqToEntity(player) < 32F) checks if the players are within the range. If you want to send it to all players on the server, simply remove this line.
-
Do you have something like: this.health = this.maxHealth in your constructor somewhere?
-
Shouldn't the EntityID in the method registerModEntity(...) be static? Because the ID used there is mod-specific, not global. I use 0, for the first entity and count down each entity (1 for the second a.s.o).
-
[1.4.2] Not working but no crash report
SanAndreaP replied to okmujnyhb's topic in Support & Bug Reports
You mean: http://files.minecraftforge.net ? -
There's an event called LivingDropsEvent. Use it.
-
The common issue that causes a black screen after the FML window popped out is that the needed libraries aren't downloaded or are corrupted somehow. Try these steps: Open the lib folder located either in your .minecraft directory (for client) or next to your minecraft_server.jar (for server) Download these three files and put them into the previously opened lib folder: http://files.minecraftforge.net/fmllibs/argo-2.25.jar http://files.minecraftforge.net/fmllibs/guava-12.0.1.jar http://files.minecraftforge.net/fmllibs/asm-all-4.0.jar Close the lib folder and start your client / server
-
Looking for some solutions to fixing old code
SanAndreaP replied to tomtomtom0909's topic in General Discussion
The first one: I'm pretty sure that's runned twice, because it is executed on the client and server thread as well. So at the beginning do something like: if(world.isRemote) { // check if it's the client thread) return true; } The second one, I dunno, but you could do something like this: public int getItemBurnTime(ItemStack itemStack) { if (itemStack == null) { return 0; } else { int var1 = itemStack.getItem().shiftedIndex; if(var1 == CampCraft.HammerIron.shiftedIndex) { /* either use this: */ AnvilItemStacks[1].setItemDamage(AnvilItemStacks[1].getItemDamage() + 15); /**Damages the iron hammer after the repair*/ /* or this */ itemStack.setItemDamage(itemStack.getItemDamage() + 15); } return 200; /**Number of ticks to burn for*/ } } -
The metadata for a block is an int, yes, but the Anvil save format reserves 16 bit of block data, 12 bit for the block IDs and 4 bit of metadata. Try to create a block with metadata higher as 15. It may work, but it won't be saved correctly! http://www.minecraftwiki.net/wiki/Anvil_file_format
-
TileEntitySpecialRenderer not working on Server ?
SanAndreaP replied to DealerJoe's topic in Support & Bug Reports
I actually saw these lines in your mod file: RenderChopper renderChopper = new RenderChopper(); ClientRegistry.registerTileEntity(TileEntityChopper.class, "TileEntityChopper", renderChopper); This has to go into your ClientProxy, maybe into your registerRenderStuff() method. -
TileEntitySpecialRenderer not working on Server ?
SanAndreaP replied to DealerJoe's topic in Support & Bug Reports
I see that your render file is in the common package. Move it into the src / client package -
That is not how to do it with forge! @kintick: Anyway, your code _should_ work. I have to look into this further with the WorldGenMineable class. Also make sure you're generating only in the overworld dimension by checking this: if(world.getWorldInfo().getDimension() == 0) EDIT: Where do you register your WorldGenerator?
-
1) This method: public Entity createEntity(World world, Entity location, ItemStack itemstack) { return new EntityItem(world, location.posX, location.posY, location.posZ, itemstack); } MUST return an instance of your new EntityItem, NOT the original EntityItem! 2) Make sure the path is correct. It must have a slash at the beginning. If that doesn't work, use setTextureFile(path) on an instance of your item / block, like: Block custom = new Block(blockID, 0, Material.wood); custom.setTextureFile("/Path/File.png"); 3) That code doesn't work in any way on a server. I would first make sure the code is executed only client-side with the Proxy system and then use packets for this.
-
TileEntitySpecialRenderer not working on Server ?
SanAndreaP replied to DealerJoe's topic in Support & Bug Reports
This: @SidedProxy(clientSide = "farmersfriends.client.ClientProxyFm", serverSide = "farmersfriends.common.CommonProxyFm") public static CommonProxyFm proxy; goes into your mod class, not in the CommonProxy class.