Jump to content

mokonaModoki

Members
  • Posts

    32
  • Joined

  • Last visited

Everything posted by mokonaModoki

  1. The way you do this, instance of ItemKnot is created even before your mod is loaded properly. So that means that you try to read knotID value from configHandler before it is initialized. Try creating instance of ItemKnot in public void load(FMLInitializationEvent event) method. That should help.
  2. So... I've seen it before in Thaumcraft 3 mod, where Azanor somehow used transparent textures while rendering Tile Entities: I wonder how it is possible? When using regular model rendering with boxes all the alpha channel from the textures is removed.
  3. if you are using Eclipse, try to set the breakpoint in onBlockActivated method. And would you let us see the BlockDC class... cause i have no idea what is this block.
  4. all your textures sould be in the mcp/src/minecraft/assets/modname/blocks(items, whatever)/ so you create assets folder inside the mcp/src/minecraft/ After reobfuscating the game, you copy the assets folder from src/minecraft inside your .zip file. If you are not sure about the paths, check the Eclipse console. When game launches it tries to load all the icons. If the icon is missing it is going to display a message like this in the console: Using missing texture, unable to load: somemod:textures/blocks/someblock.png That way you can determine if you have your textures in the right place.
  5. I am gonna check everything once more. I may have packed the zip* wrong or something, so it can't find forge methods anymore.
  6. Now it is don via the ClientRegistry. But even if it is done another way, then mod would not work when launched in eclipse too.
  7. Allright. There it goes: Crash report: main mod class: Client Proxy class: Note that the mod is working allright when launched from eclipse. Only zipped version crashes.
  8. It is trying to register renderer in the ClientProxy. Should I add another @SideOnly(Side.CLIENT) annotation?
  9. When launching the mod from eclipse it works just fine, but after reobf and trying to launch zip* version, it crashes. It is unable to bindCustomTileEntityRenderer. Here is the log: http://pastebin.com/JntNes0G Help required)
  10. Server and Client Tile Entities are synchronized via the Container class. check out detectAndSaveChanges(), updateProgressBar(), addCraftingToCrafters() methods in the ContainerFurnace class and make you Tile Entity update itself the same way. Otherwise your client and server Tile entities will desync after you log out from the world or unload the chunk it is in.
  11. Is there a way to do so when onPlayerStoppedUsing() method is executed?
  12. this is just the way to determine the direction block should face after placement. I need a way to find target block coordinates and it's sides and directions don't really matter
  13. I had the same desync trouble between client and server parts of the game. The container class should solve your problem: just override methods public void addCraftingToCrafters(ICrafting par1ICrafting) public void detectAndSendChanges() @SideOnly(Side.CLIENT) public void updateProgressBar(int index, int value) (you can find out what they should do in ContainerFurnace class) these methods are required for proper syncing between client and server TE
  14. is there an easy way to get coordinates of the block player is looking at? (like the block at which target box appears)
  15. try overriding getTextureFromSideAndMetadata() method. The one that you use (getBlockTextureFromSide) in your class determines the looks of the block in your inventory. You may just do something like this: public int getTextureFromSideAndMetadata(int side, int metadata) { return this.getBlockTextureFromSide(side); }
  16. However this ID is dynamic, so I doubt you would be able to use it like a constant marker.
  17. Since each player is an object of EntityPlayerMP class, it is an entity, so it has it's unique Entity ID (which is by the way shown in the server console). There is the way to access it from Entity class (this class got public int entityId field)
  18. It might not work becasuse even though FML and ModLoader are... almost the same, many methods from ModLoader were replaced with ones in the FML. And even if that mod worked, that means that your client has ModLoader installed and that means that you are unable to join the forge server.
  19. Is there a source code for any serious mods like IC or BC that utilize this feature?
  20. before posting something, try it yourself, please. This one is not gonna work because block metadata is not held it the block's class. To gain access to the block's metadata you need to use World.getBlockMetadata(int xCoord, int yCoord, int zCoord) method, however I don't have any coordinates of the newly created TileEntity. If I were to switch block TileEntity on the onBlockActivated event, the machine won't work after re-entering the world until right clicked and the correct tile entity is picked. So it wont work either.
  21. Is there any way to easily assign tile entity to the block depending on it's metadata? Like if I want several machines to fit in one blockID.
  22. You should be able to figure all out by looking through Entity (net.minecraft.entity) class. but if you want to associate a mob to a TileEntity, wouldn't be easier just to create a new one when TileEntity is loaded? That way you could just store some parameters in the TileEntity NBT and create new Entity with this parameters on load.
  23. You create two items (or use one item but with different metadata, but that might not be that easy if you are new to modding): one for the raw version and one for the cooked. You create a way for a player to obtain raw egg and add smelting recipe for it. ( GameRegistry.addSmelting(ItemStack input, ItemStackoutput, float xp); )
  24. Allright. I solved the problem by rewriting Container class. When disconnecting from the world and logging in again my client apparently had no idea what data is stored in the TileEntity class, since it is stored on the server part. I looked at vanilla ContainerFurnace code and figured out that public void addCraftingToCrafters(ICrafting par1ICrafting) public void detectAndSendChanges() and public void updateProgressBar(int index, int value) are responsible for syncing the client and server GUI parts. I just implemented these methods in my container class and made them do all the syncing stuff properly and voila - everything is displaying correctly and client side has all the data it needs to display machine's GUI properly. That's my COntainer code now: http://pastebin.com/FKP4C0yN
  25. thank you, that helperd a lot. i'll see what i can do with it
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.