Jump to content

Tyron

Members
  • Posts

    70
  • Joined

  • Last visited

Everything posted by Tyron

  1. public EnumFacing getNearbyMachine(World world, BlockPos pos) { for (EnumFacing facing : EnumFacing.values) { TileEntity te = world.getTileEntity(pos.offset(facing, 1)); if (te instanceof IEnergyAccepter) return facing; } return null; }
  2. I can't figure out this one. I register to the EVENT_BUS in the FMLInitializationEvent like this: MinecraftForge.EVENT_BUS.register(this); some lines below i have @SubscribeEvent void bla (ChunkEvent.Load event) { System.out.println("====================================================loadc"); } @SubscribeEvent void loadChunk(ChunkDataEvent.Load event) { System.out.println("====================================================loadcdata"); } I would expect my messages to be printed many times once I load a world but neither appears. What am I doing wrong? My init method where I register to the event bus I definitely being called.
  3. Wow ok, you're a genius, anybody mentioned that already? ;-) Thank you for your help!
  4. When building my mod with Forge 1.8 Build 1273 I'm getting this AbstractMethodError crash when trying to use the mod in normal minecraft. Both my enviroments are with Forge Build 1273 and the mod runs fine within Eclipse. Sourcecode of EnumOrganicLayer.java Exception:
  5. Ok, I got it resolved. Thanks anyhow.
  6. Currently having problems getting TEs to work and I'm out of ideas for the cause. I've got a TEOre class extending from Tileentity featuring basically the same functions as the CustomeTileEntity in ModelBakeEventDebug.java During the FMLInitializationEvent I do GameRegistry.registerTileEntity(TEOre.class, ModInfo.ModID + ":orete"); My Block Class BlockOreVC extends from BlockContainer and creates the tile entity @Override public TileEntity createNewTileEntity(World world, int meta) { return new TEOre(); } @Override public IBlockState getExtendedState(IBlockState state, IBlockAccess world, BlockPos pos) { TileEntity te = world.getTileEntity(pos); if(te instanceof TEOre) { TEOre cte = (TEOre) te; return cte.getState(); } else { if (te == null) { System.out.println("getExtendedState() Error: tileentity is null!"); } else { System.out.println("getExtendedState() Error: te is NOT of instance TEOre at pos " + pos); } } return state; } @Override protected BlockState createBlockState() { return new ExtendedBlockState(this, new IProperty[0], TEOre.properties); } I create the blocks in WorldGenDeposits like this: world.setBlockState(pos, deposit.block.getDefaultState(), 2); if (deposit.block instanceof BlockOreVC) { TEOre tileentity = (TEOre)world.getTileEntity(pos); if(tileentity != null) { tileentity.setOreType(deposit).setRockType((EnumRockType)parentmaterial.getValue(BlockRock.STONETYPE)); } else { System.out.println("tileentity was not created?"); } } When generating a new world however the call to getExtendedState() will return null for world.getTileEntity(pos); I dont understand why because during creation I can access the tileentity and modify it's state. Am I missing some client <=> server stuff for tileentities to work?
  7. BlockState in the end is just a method to combine block and named metadata. Same as x,y,z coordinates are combined in BlockPos.
  8. Ah yes, of course, that'll work. Thanks a lot!
  9. Thank you, that definitely helps getting my model folder organized, i'm still forced to use model jsons, right? My mod has about 150 textures that are being overlayed on 5 base textures with any combination possible. Is there no way around making 450 item model jsons?
  10. Code Comments in IItemRenderer.class: @Deprecated //Unused, for now. Rendering emensely changed in 1.8, Is this even needed at all anymore? //Modders should speak up if needed. ^ How can I render items based on their nbt tag without an IItemRenderer? Do I have to make one json file for each possible state? That'd result in hundreds Also I guess we have to adapt the chaos Mojang produced and keep all item json files in one folder..
  11. Thanks for sharing your insights, I did not use the same resourcelocation / variant name for getItemModelMesher().register() and ModelBakery.addVariantName() After using the same name for both, it actually did load the texture, but only the same texture for all my 15 metadata-variant blocks [Edit:] Ok all the same texture was my error. It's working now \o/ Thanks!
  12. Ok, and yes i know folders can have hyphens Now Minecraft seems to find the .json, as nothing strange is shown on the console, but it's how it looks inside a world: https://dl.dropboxusercontent.com/u/184200482/img/2014-12-07_21.38.23.png[/img] I'm having exactly the same problem, creating a new world as suggested by bfox1 didn't fix the problem. I get no more errors in the console and I can verify the item jsons are loaded - if i write invalid json in the item model MC complains about invalid syntax.
  13. >the guide in http://www.minecraftforge.net/forum/index.php/topic,24263.0.html speeks brifly about but it lets the idea that must create an item whith the name charcoal at the same time than the block named charcoal that part i dont get like this: GameRegistry.registerBlock(yourblock, itemclass, yourname); I also have massive problems with item textures. I got a block with metadata - which renders fine when placed. But the Item version of it remains the textureless pink/black block. No more errors are shown in the logs and I registered to the model mesher and added my variant names. Looks like the the item Variant json files get parsed by Minecraft because if I change the parent path I get an error logged. My code: during init: Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Item.getItemFromBlock(rock), rocktype.getMetadata(), new ModelResourceLocation("NOTUSED", "inventory")); ModelBakery.addVariantName(Item.getItemFromBlock(rock), "vintagecraft:rock/" + rocktype.getName()); example item variant json file: { "parent": "vintagecraft:block/rock/andesite", "display": { "thirdperson": { "rotation": [ 10, -45, 170 ], "translation": [ 0, 1.5, -2.75 ], "scale": [ 0.375, 0.375, 0.375 ] } } } Any help is appreciated.
  14. Using Forge Build 11.14.0.1255 I'm getting this on my client when trying to join my Forge 1.8 Server: http://pastebin.com/x19vhTvE Client gets stuck in the Loading screen because of that, no errors show serverside. [Edit:] Nevermind, it's Optifine causing it.
  15. Thank you for your response. That's exactly what I'm doing - I switch the Eclipse Workspace to C:\[....]\forge-1.8-11.14.0.1252-1.8-src\eclipse. Eclipse however tells me it doesn't find the .project file [Edit:] Ok I got it solved, I think you're not allowed to rename the folder once installed.
  16. I'm trying to install Forge 11.14.0.1252 with the 2 commands listed in the wiki gradlew setupDecompWorkspace --refresh-dependencies gradlew eclipse However Eclipse cant open the project afterwards, it doesn't generate any of the project files. In the eclipse folder theres only a .metadata folder. gradle doesn't show any errors either during setup: http://pastebin.com/yRVFDXb6 What am I doing wrong?
  17. How come that when I resize my text, that it becomes all wrongly drawn? I have seen other mods using smaller fonts with smooth letters (e.g. Mariculture), how do they do it? int x = screen.width / 2 + 10; float size = 0.8F; GL11.glPushMatrix(); GL11.glScalef(size, size, size); x = (int) ((x*1F) / size); fontRenderer.drawString("Spawning blocks: ", x , 34 + line*10, 0x666666); GL11.glPopMatrix(); fontRenderer.drawString("Spawning blocks: ", screen.width / 2 + 10 , 34 + line*10, 0x666666); P.S.: BBCode Editor seems broken in Chrome: Uncaught TypeError: Cannot read property 'handleButtonClick' of undefined index.php?action=post;board=73.0:1
  18. It would be awesome to have 2 small scripts that save us the extra step of opening a commandline to setup forge and build our mod.
  19. Ok, fixed it with following gl settings, incase someone else runs into the same troubles GL11.glDisable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_ALPHA_TEST); GL11.glEnable(GL11.GL_BLEND); [render item] GL11.glEnable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_ALPHA_TEST); GL11.glDisable(GL11.GL_BLEND);
  20. I'm in the process of upgrading my mod, first to 1.7.2 and now to the forge beta version of 1.7.10. In both versions I'm getting rendering glitches where the transparent portion of the item is rendered partially pink, partially white. This only happens for the rendered inventory item, the rendering of the entityItem and equippedItem are both fine. I guess some generic GL-Setting is missing. My rendering code worked just fine in 1.6.4. Here's an example of the glitched gfx: Here is my inventory item rending method - in order to save me from creating hundreds png graphics, I'm drawing 2 images over each other: @Override void renderInventoryItem(ItemRenderType type, ItemStack item, Object... data) { GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_CULL_FACE); EnumButterflies butterfly = ButterflyMania.getButterflyOfItem(item.getItem()); if (butterfly != null) { ButterflyMania.loadTexture("/textures/items/smallbutterflies/" + butterfly.code + ".png"); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); this.renderTexturedQuad(0, 0, 0, -1, 16, 16); } String texturename = JarType.getTextureName(item.getItemDamage()); if (texturename != null) { ButterflyMania.loadTexture("/butterflies/" + texturename); } this.renderTexturedQuad(0, 0, 0, 0, 16, 16); GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_CULL_FACE); }
  21. Seems to be an error that is beyond my reach to fix: Download of minecraft_server.1.6.4.jar failed hash check, deleting abcf286a14f7aee82e8bf89270433509 ba3145656b1480122b 759cecd7b7a1 Something failed verifying minecraft files, see log for details. Decompile Exception: 1 Press any key to continue . . .
  22. Ok, the 403 Error seems to have disappeared, the NoClassDefFoundError was because I accidently copied Optifine over. Let's see if i can fix my mod crashes...
  23. Well this is odd. First time I'm having troubles installing forge server on my debian machine. What I've tried so far: 1. java -jar forge-1.7.2-10.12.0.1033-installer.jar --installServer 2. This downloads the minecraft server, but returns 403 for a lot of libs (e.g.: java.io.IOException: Server returned HTTP response code: 403 for URL: https://libraries.minecraft.net/net/minecraft/launchwrapper/1.9/launchwrapper-1.9.jar. pack.xz) 3. Ends with error: These libraries failed to download, try again. org.scala-lang:scala-compiler:2.10.2 4. Installing Server under Windows then uploading libraries etc., then starting with "java -jar forge-1.7.2-10.12.0.1033-installer.jar" starts the server, but when loading the world results in java.lang.NoClassDefFoundError: net/minecraft/client/multiplayer/WorldClient 5. Starting the server with "java -jar minecraft_server.1.7.2.jar" always results in the vanilla server only to be started, no errors. 6. Couldn't find any up-to-date manual on installing the server on linux
  24. I know, I already saw it's marked deprecated. First of all I need to get my mod running again. Thanks anyway
  25. diesieben07, you're a genius. Again you saw my problem at first look! Thank you so much!
×
×
  • Create New...

Important Information

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