TheGreyGhost
Members-
Posts
3280 -
Joined
-
Last visited
-
Days Won
8
Everything posted by TheGreyGhost
-
Hi I think coolAlias was trying to do this less than a month ago and had some success. It is tricky because it was not implemented in a modular way in the vanilla. If he hasn't noticed your question, you could PM him, he is a very helpful bloke. -TGG
-
[SOLVED][1.6.4] Render block from Techne Model?
TheGreyGhost replied to Paxtrex's topic in Modder Support
Hi It would help a lot if you could provide a description of the symptoms (what do you expect vs what you actually get), and preferably a screenshot. -TGG -
Hi My guess is that this.mc.getSession().getUsername() is returning null in String s2 = this.sendSessionRequest(this.mc.getSession().getUsername(), this.mc.getSession().getSessionID(), s1); (see NetClientHandler:: public void handleServerAuthData(Packet253ServerAuthData par1Packet253ServerAuthData) You could confirm this by putting a breakpoint in NetClientHandler::sendSessionRequest. Of course, I have no idea why getUserName() would be returning null - but at least it would give you something to track down.. -TGG
-
[1.7.2]Custom Bed doesn't reset Time in custom Dimension
TheGreyGhost replied to Dragonisser's topic in Modder Support
> hmm, but the code in WorldServer.java never gets called Interesting; I'd suggest you go digging through the vanilla with breakpoints and/or System.out.println and see if you can figure out why that never gets called. A good place to start is probably EntityPlayer.sleepInBedAt. I don't see an obvious reason myself, sorry.... -TGG -
Hi It sounds like you just need to be able to convert your mouseClicked coordinate back into the texture coordinate? texture_x = mouseclick_x * texture_width / this.width; texture_y = mouseclick_y * texture_height / this.height; You know texture_width and texture_height because you're supplying the texture, yes? -TGG
-
Hi Your texture files are probably in the wrong spot? Search on this forum for Using missing texture, unable to load this is a pretty common error. This link might also help: http://www.minecraftforge.net/forum/index.php/topic,11963.0.html -TGG
-
[1.6.4] Best practices for organizing code for a mod?
TheGreyGhost replied to keybounce's topic in Modder Support
Hi I would suggest that any API code (that you don't want to accidentally change) should go in a Library. This is what Forge does for the 1.7+ releases. If you have multiple mods at once that you are working on - I've never done this but I imagine you just have different top-level packages for each. The "Pahimar setup" appeared to have something like that (although I never used it either) - it's out of date now with the Gradle builds but the approach might be what you're after. -TGG -
Hi I would suggest to focus your troubleshooting efforts in here: public IIcon getIcon(int p_149691_1_, int p_149691_2_) { if (p_149691_1_ == 0) { return Blocks.planks.getBlockTextureFromSide(p_149691_1_); } else { int k = getDirection(p_149691_2_); int l = Direction.bedDirection[k][p_149691_1_]; int i1 = isBlockHeadOfBed(p_149691_2_) ? 1 : 0; return (i1 != 1 || l != 2) && (i1 != 0 || l != 3) ? (l != 5 && l != 4 ? this.field_149983_N[i1] : this.field_149982_M[i1]) : this.field_149980_b[i1]; } } It appears that the head of your bed is swapped over on the side texture. Probably your side icon for the bed head is swapped left-right. See also http://greyminecraftcoder.blogspot.com.au/2013/07/rendering-standard-blocks-cubes.html and http://greyminecraftcoder.blogspot.com.au/2013/07/rendering-non-standard-blocks.html -TGG
-
[1.7.2]Custom Bed doesn't reset Time in custom Dimension
TheGreyGhost replied to Dragonisser's topic in Modder Support
Are you sure? That's just the tick loop; it counts the elapsed milliseconds and performs a tick every 50ms. I don't think it has anything to do with the world time? -TGG -
[1.7.2]Custom Bed doesn't reset Time in custom Dimension
TheGreyGhost replied to Dragonisser's topic in Modder Support
Hmmm so - your symptoms are (1) you can sleep in a bed, you lie down, close your eyes etc, then wake up; but (2) the time isn't reset to zero (how can you tell)? Did you try putting a breakpoint in here if (this.areAllPlayersAsleep()) { if (this.getGameRules().getGameRuleBooleanValue("doDaylightCycle")) /// HERE { long i = this.worldInfo.getWorldTime() + 24000L; this.worldInfo.setWorldTime(i - i % 24000L); } this.wakeAllPlayers(); } -TGG -
[1.7.2]Custom Bed doesn't reset Time in custom Dimension
TheGreyGhost replied to Dragonisser's topic in Modder Support
Hi Look in EntityPlayer.sleepInBedAt public EnumStatus sleepInBedAt(int par1, int par2, int par3) { PlayerSleepInBedEvent event = new PlayerSleepInBedEvent(this, par1, par2, par3); MinecraftForge.EVENT_BUS.post(event); if (event.result != null) { return event.result; } if (!this.worldObj.isRemote) { if (this.isPlayerSleeping() || !this.isEntityAlive()) { return EnumStatus.OTHER_PROBLEM; } if (!this.worldObj.provider.isSurfaceWorld()) { return EnumStatus.NOT_POSSIBLE_HERE; } if (this.worldObj.isDaytime()) { return EnumStatus.NOT_POSSIBLE_NOW; } -TGG -
[1.7.2]Custom Bed doesn't reset Time in custom Dimension
TheGreyGhost replied to Dragonisser's topic in Modder Support
Hi The resetting of time when all players are sleeping is in WorldServer.tick() if (this.areAllPlayersAsleep()) { if (this.getGameRules().getGameRuleBooleanValue("doDaylightCycle")) { long i = this.worldInfo.getWorldTime() + 24000L; this.worldInfo.setWorldTime(i - i % 24000L); } this.wakeAllPlayers(); } -TGG -
Hi Well, at least in 1.6.4 I don't think there is any such thing. The scarcity is determined by the values in BiomeDecorator.generateOres, and they are all hard coded. -TGG
-
Hi The items don't match because they're not the same Item. //defining Items public static Item itemEnderDust; public static Item itemEnderCrystal; public static Item itemEnderLense; and then in preInit(..) final Item itemEnderDust = new ItemBasic(64, 1, "itemEnderDust"); final Item itemEnderLense = new ItemBasic(16, 1, "itemEnderLense"); final Item itemEnderCrystal = new ItemBasic(64, 1, "itemEnderCrystal"); -TGG
-
Hi This is the build I tested it on #Sat, 16 Nov 2013 18:30:21 -0500 fmlbuild.major.number=6 fmlbuild.minor.number=4 fmlbuild.revision.number=45 fmlbuild.githash=g23baf3a fmlbuild.mcpversion=8.11 fmlbuild.mcversion=1.6.4 fmlbuild.branch=master fmlbuild.build.number=953 -TGG
-
Lighting Bug with a custom rendered block!
TheGreyGhost replied to Mecblader's topic in Modder Support
Hi This link might be of interest http://greyminecraftcoder.blogspot.com.au/2013/08/lighting.html For blocks you need to set the tessellator brightness (the sky light / block light multitexturing coordinate) and the colour tessellator.setBrightness(...); tessellator.setColorOpaque_F(...); -TGG -
Hi I think you have basically two choices 1) Use a TileEntity like dieSieben said or 2) If your block only needs to have a few (<=16) different textures, you could override Block.getIcon(metadata, side) see the Block Rendering sections at http://greyminecraftcoder.blogspot.com.au/p/list-of-topics.html The main differences between the two methods is that 1) TileEntity will redraw itself every 1/20 of a second, whereas blocks are compiled into a "renderlist" which is only updated when the block changes, so if you change the return value from getIcon it won't do anything unless you trigger an update of the block (for example, using World.setBlockMetadataWithNotify) 2) TileEntities can store whatever you want (and take up a lot more space), Block metadata is limited to an integer from 0 to 15. -TGG
-
Hi When I cut & paste your fragment into my 1.6.4 code, it compiles fine. I remember hearing that the 1.6.4 Gradle setup was a bit flaky. Do you have a non-gradle setup for 1.6.4 you could try? Might be a bug in the deobfuscator, perhaps post in the forge Support & bug report section. -TGG
-
no problems, good luck :-)
-
Hmmm In that case, yeah it's unlikely to be the problem. This class might be of interest to you https://github.com/TheGreyGhost/SpeedyTools/blob/Working/src/speedytools/common/Utilities/OpenGLdebugging.java I've used it in the past to check what the OpenGL settings are; it's not complete, but dumpAllIsEnabled() works and has showed up problems for me before- dump for a good render, dump for a bad render, and spot the difference. Apart from that I'm clueless, sorry! -TGG
-
Hi My first guess would be that it's drawing somewhere offscreen or underground where you can't see it, i.e. the origin is in a different spot. One of these days I plan to systematically go through and figure out the origin for each place in the code you might want to render. (But not today). Sometimes it's the player's eyes, sometimes it's their hand. This link might be a bit of help for 1st and 3rd person rendering, it's 1.6.4 but still mostly relevant http://greyminecraftcoder.blogspot.com.au/p/list-of-topics.html See the sections on Item Rendering -TGG
-
Hi Where does this magic number 100 come from in this line? if (a.inventory.getStackInSlot(100).equals(new ItemStack(Items.ArmorHazmatSuitBoots))) { Tracing through getStackInSlot I find public ItemStack getStackInSlot(int par1) { ItemStack[] aitemstack = this.mainInventory; if (par1 >= aitemstack.length) { par1 -= aitemstack.length; aitemstack = this.armorInventory; } return aitemstack[par1]; } The definition of InventoryPlayer.mainInventory and armorInventory are /** * An array of 36 item stacks indicating the main player inventory (including the visible bar). */ public ItemStack[] mainInventory = new ItemStack[36]; /** An array of 4 item stacks containing the currently worn armor pieces. */ public ItemStack[] armorInventory = new ItemStack[4]; So your error index 64 comes from 100 - 36 = 64 which is bigger than the size of armorInventory. -TGG