Jump to content

Jonniboy

Members
  • Posts

    9
  • Joined

  • Last visited

Converted

  • XMPP/GTalk
  • Gender
    Male
  • Location
    Germany, Saxony-Anhalt
  • Personal Text
    Newbie Modder

Jonniboy's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Sry for the bump, but do anyone have an answer for me? I think for some high-skilled Forge modders and Java pro's my problem shouldn't be a problem. Regards, Jonniboy
  2. First of all, thank you for the answers and the corrections. By the way,
  3. Thank you for your answer. I know, the texture for the block in my inventory isn't set. But that is not the problem I mean because I know how to set the inventory icon. The real problem is that I don't see something when I place it. Only the borders of the TileEntity appear, but the texture seems to be not loaded. Sorry for this description, I haven't described it clearly enough. Regards, Jonniboy
  4. Hello, after a long time I've decided to try modding with Forge again because of the problems with bukkit etc. My goal is to use an exported 3d model from Techne in Forge. So I've exported a simple 3d model (the cat with the fish on Techne Online, only for example) and created a mod which loads a custom model with the TESR. So it should be a tile entity for the first. I've copied some code parts (sry for this ) from some posts here and it seems to be working, I can place the "block" and I can hover over it. http://cloud.jonni.it/index.php/apps/files_sharing/ajax/publicpreview.php?x=1920&y=943&a=true&file=%252Fpicpublic2015-02-02_16.14.30.png&t=1e1f30392630e1337809615fddcf219f&scalingup=0[/img] But the texture doesn't work, you can see it in the picture. Here is my TileEntityExampleRenderer: package com.example.examplemod; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.entity.Entity; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; import org.lwjgl.opengl.GL11; import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.Side; @SideOnly(Side.CLIENT) public class TileEntityExampleRenderer extends TileEntitySpecialRenderer { //The model of your block private final ModelExample model; private final ResourceLocation textureLocation; public TileEntityExampleRenderer() { this.model = new ModelExample(); this.textureLocation = new ResourceLocation("examplemod", "textures/entity/texture.png"); } private void adjustRotatePivotViaMeta(World world, int x, int y, int z) { int meta = world.getBlockMetadata(x, y, z); GL11.glPushMatrix(); GL11.glRotatef(meta * (-90), 0.0F, 0.0F, 1.0F); GL11.glPopMatrix(); } @Override public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale) { //The PushMatrix tells the renderer to "start" doing something. GL11.glPushMatrix(); //This is setting the initial location. GL11.glTranslatef((float) x + 0.5F, (float) y + 1.5F, (float) z + 0.5F); this.bindTexture(this.textureLocation); //This rotation part is very important! Without it, your model will render upside-down! And for some reason you DO need PushMatrix again! GL11.glPushMatrix(); GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); int rotation = 0; switch (te.getBlockMetadata() % 4) { case 0: rotation = 270; break; case 1: rotation = 0; break; case 2: rotation = 90; break; case 3: rotation = 180; break; } GL11.glRotatef(rotation, 0.0F, 1.0F, 0.0F); //A reference to your Model file. Again, very important. this.model.render(null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F); //Tell it to stop rendering for both the PushMatrix's GL11.glPopMatrix(); GL11.glPopMatrix(); } //Set the lighting stuff, so it changes it's brightness properly. private void adjustLightFixture(World world, int i, int j, int k, Block block) { Tessellator tess = Tessellator.instance; float brightness = block.getLightOpacity(world, i, j, k); int skyLight = world.getLightBrightnessForSkyBlocks(i, j, k, 0); int modulousModifier = skyLight % 65536; int divModifier = skyLight / 65536; tess.setColorOpaque_F(brightness, brightness, brightness); OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float) modulousModifier, divModifier); } } And here is a picture from my class tree: http://cloud.jonni.it/index.php/apps/files_sharing/ajax/publicpreview.php?x=1920&y=943&a=true&file=%252FpicpublicUnbenannt%2520%283%29.PNG&t=a29658dc0b4d7304ea2fc5ab75977c9c&scalingup=0[/img] I've tried a lot but I don't understand why it doesn't work. Can you help me? Thanks in advance. Regards, Jonniboy
  5. I don't want to modify existing content more than needed and I want to create some new content. But for new content and a better gaming experience (for example a server mod pack which is perfectly adjusted to the concept) I need to know how I can design it for a good design or new configuration options. The example with the blocks was just an example to understand what is possible and what not. So my question was only that I want to know if I can change the base classes of Minecraft with Forge directly (like the Class Transformer in older versions) or if I must use existing events to replace things. And I ask here because I want to know if it's possible. And when it's possible, I want to know how, to get more experience (to get it "in my scope"). I know about a ASM class transformer (--> to make coremods?) and when this is possible in 1.6.4, I need the possibility to read and modify the base classes, or is that wrong? (Additionally, I realised by myself that I don't need the source code of Minecraft if I don't want to create a coremod because there are javadocs. But maybe, I want to do this in my situation.) But the title of the topic is "Forge source installation fails", this question is answered perfectly. Thanks for your help. Maybe you can answer the question in this topic, but if I should create a new topic with my real "new" question I can do this. Best regards, Jonniboy
  6. Because I don't know how I can change the "GuiMainMenu" for example, some tutorials say that I have to program a new class which overrides/transforms the base class to replace the Main Menu which opens at Minecraft start. For that I need the old class, the Class Transformer searches only for already compiled classes (abc.class, ...). I know that some tutorials say that I should open OpenGuiEvent or something similar and that I can cancel this event and open a "new menu", but how I can check if this is the Main Menu? And if I can solve my problem with it, how I can modify existing blocks for example? Regards, Jonniboy
  7. Thanks for that. I've downloaded the 1.6.4 #964 source code which uses ForgeGradle. It is pretty easy to use for eclipse. But I don't understand for what I need it more than the old MCP. I can't decompile or extract Minecraft, only the assets. The only thing I need are the Vanilla classes to know about all important constructors and methods and so on. And to override the base classes to modify clientside things, especially the standard GUI's. Sorry if it's wrong, but I'm new at modding and I want to make a basic mod which transforms the Vanilla classes. If I'm wrong please correct me. Regards, Jonniboy
  8. Is it not possible at any way? I use 1.6.4 because I've mods running on 1.6.4 only and there is no source code for this mods. Regards, Jonniboy
  9. Hello guys, I need some help because I don't get the Forge source code installed. I need the source code to edit some base classes from Vanilla to renew the "Main Menu". Yesterday there are some Java errors that I haven't secured, now there are different Java errors with the urllib package. The Java exception code is: ================ Forge ModLoader Setup Start =================== MCP Detected already, not downloading Setting up MCP Patching commands.py patching file commands.py Commands patch applied successfully Copying FML conf Creating Repackaged data Creating re-packaged srg Creating re-packaged exc Creating re-packaged MCP patches Traceback (most recent call last): File "install.py", line 76, in <module> decompile=options.decompile, gen_conf=False) File "install.py", line 17, in fml_main disable_assets=disable_assets) File "C:\Users\Jon\Downloads\forge-1.6.4-9.11.1.965-src\forge\fml\fml.py", lin e 1027, in decompile_minecraft pre_decompile(mcp_dir, fml_dir, disable_assets=disable_assets) File "C:\Users\Jon\Downloads\forge-1.6.4-9.11.1.965-src\forge\fml\fml.py", lin e 1075, in pre_decompile download_minecraft(mcp_dir, fml_dir) File "C:\Users\Jon\Downloads\forge-1.6.4-9.11.1.965-src\forge\fml\fml.py", lin e 1139, in download_minecraft failed = download_libraries(mcp_dir, version_json['libraries'], mc_info['nat ives_dir']) or failed File "C:\Users\Jon\Downloads\forge-1.6.4-9.11.1.965-src\forge\fml\fml.py", lin e 1195, in download_libraries headers = get_headers(url) File "C:\Users\Jon\Downloads\forge-1.6.4-9.11.1.965-src\forge\fml\fml.py", lin e 180, in get_headers response = urllib2.urlopen(HeadRequest(url)) File "urllib2.pyc", line 126, in urlopen File "urllib2.pyc", line 406, in open File "urllib2.pyc", line 519, in http_response File "urllib2.pyc", line 438, in error File "urllib2.pyc", line 378, in _call_chain File "urllib2.pyc", line 625, in http_error_302 File "urllib2.pyc", line 406, in open File "urllib2.pyc", line 519, in http_response File "urllib2.pyc", line 444, in error File "urllib2.pyc", line 378, in _call_chain File "urllib2.pyc", line 527, in http_error_default urllib2.HTTPError: HTTP Error 404: Not Found As you can see at the stupidly formatted console log, I am using Windows (7 64bit) and have Java 6 and 7. Is there the problem that the download servers are offline? Thanks for every answer. Best regards, Jonniboy
×
×
  • Create New...

Important Information

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