-
Posts
16559 -
Joined
-
Last visited
-
Days Won
156
Everything posted by Draco18s
-
Don't bother trying to render an actual block of fire. Just grab its texture and render it onto some quads yourself. The main reason to do this is because Fire renders differently based on the surrounding blocks.
-
You mean quotes. ( is a parenthesis. http://en.wikipedia.org/wiki/Parenthesis#Parentheses_.28_.29
-
I figured it out yesterday, pure guess. The rendered YAW is based on entity.rotationYawHead.
-
[SOLVED]Custom mob increased maximum movement speed?
Draco18s replied to code4240's topic in Modder Support
speedModifier = 60D !? You realize that values greater than about 2 will cause the mob to effectively teleport, right? -
There's also Item#itemInteractionForEntity
-
You still haven't called Items.registerRecipes() anywhere.
-
The crash is not in your config: 2013-11-09 15:32:16 [sEVERE] [Minecraft-Server] Encountered an unexpected exception OutOfMemoryError java.lang.OutOfMemoryError: Java heap space at net.minecraft.util.AABBPool.getAABB(AABBPool.java:50)
-
Look at NBTTagCompoundList (IIRC the class name correctly) Essentially it's a list of tags that you can add to a tag, then each one of the tags in the list can hold the mob name and the count.
-
How do find x,y,z coordinates of a block I created.
Draco18s replied to XSoloDolo's topic in Modder Support
Block#onBlockPlacedBy -
Block texures not loading after mod installation
Draco18s replied to Stormageddon's topic in Modder Support
Not to sound completely full of myself, but you did what I told you to do, FINALLY. -
[Solved] Integer not incrementing (It sounds weird, I know) [1.6]
Draco18s replied to larsgerrits's topic in Modder Support
That isn't actually printing the value of redstonePower nor the code that increments the variable. -
Remove downcast from integer to byte on ItemEmptyMap
Draco18s replied to Draco18s's topic in Suggestions
Of course... Doubtful, the folks monitoring the Mojang bug tracker are refusing to recognize it as a legitimate bug. -
Code is a bit messy, but essentially I'm waiting for an event, then calling readyTickHandler(). It waits a specified number of ticks (renderDelay) before performing the render. This is to allow time for the world to load. However, due to the delay, I do not want to render from the player's location after the delay, but rather from their original location and orientation. Here's the problem: Even though I'm setting the temporary entity's orientation, it's being ignored when the render happens, it's treated as always 0, regardless of its actual value. If I use the actual player as the temporary agent, then it gets rendered with the correct orientation values (that is, where the player is looking at the time). What do I need to change in order for the temporary entity to make it render correctly? public void readyTickHandler(World w, EntityPlayer pl) { world = w; p = new EntityRenderNode(world); world.spawnEntityInWorld(p); p.posX = pl.posX; p.posY = pl.posY; p.posZ = pl.posZ; p.rotationPitch = 0; p.rotationYaw = pl.rotationYaw; System.out.println("Yaw: " + pl.rotationYaw); renderDelay = 20*30; } @Override public void tickEnd(EnumSet<TickType> type, Object... tickData) { if(renderDelay > 0) { renderDelay--; } if(renderDelay == 0) { renderDelay = -1; System.out.println("Render Yaw: " + p.rotationYaw); //this is the function that handles the rendering. int[] data = renderWorldToTexture(p, 0.01F); //now we save the data. ByteArrayOutputStream bt = new ByteArrayOutputStream(); DataOutputStream out = new DataOutputStream(bt); try { //omitted for irrelevancy. } catch (IOException ex) { } //remove the temporary entity p.attackEntityFrom(DamageSource.outOfWorld, 100); } } private final int[] renderWorldToTexture(EntityLivingBase player, float renderTime) { GameSettings settings = mc.gameSettings; // dont want to access these fields every time EntityRenderer entityRenderer = mc.entityRenderer; RenderGlobal renderGlobalBackup = mc.renderGlobal; EntityLivingBase viewportBackup = mc.renderViewEntity; int heightBackup = mc.displayHeight; int widthBackup = mc.displayWidth; int thirdPersonBackup = settings.thirdPersonView; boolean hideGuiBackup = settings.hideGUI; int particleBackup = mc.gameSettings.particleSetting; mc.gameSettings.particleSetting = 2; int width = 128; int height = 128; mc.renderGlobal = mc.renderGlobal; mc.renderViewEntity = player; mc.displayHeight = height; mc.displayWidth = width; settings.thirdPersonView = 0; settings.hideGUI = true; int fps = EntityRenderer.performanceToFps(mc.gameSettings.limitFramerate); if (settings.limitFramerate == 0) { entityRenderer.renderWorld(renderTime, 0L); } else { entityRenderer.renderWorld(renderTime, (1000000000 / fps)); } int k = width * height; int[] dataarray = new int[k]; IntBuffer databuffer = BufferUtils.createIntBuffer(k); GL11.glPixelStorei(GL11.GL_PACK_ALIGNMENT, 1); GL11.glPixelStorei(GL11.GL_UNPACK_ALIGNMENT, 1); databuffer.clear(); GL11.glReadPixels(0, 0, width, height, GL12.GL_BGRA, GL12.GL_UNSIGNED_INT_8_8_8_8_REV, databuffer); databuffer.get(dataarray); reconfigureArray(dataarray, width, height); settings.thirdPersonView = thirdPersonBackup; settings.hideGUI = hideGuiBackup; mc.displayHeight = heightBackup; mc.displayWidth = widthBackup; mc.renderGlobal = renderGlobalBackup; mc.renderViewEntity = viewportBackup; mc.gameSettings.particleSetting = particleBackup; return dataarray; } //I actually have no idea what purpose this function serves, but Vanilla uses it with screenshots. private void reconfigureArray(int[] dataarray, int width, int height) { int[] aint1 = new int[width]; int k = height / 2; for (int l = 0; l < k; ++l) { System.arraycopy(dataarray, l * width, aint1, 0, width); System.arraycopy(dataarray, (height - 1 - l) * width, dataarray, l * width, width); System.arraycopy(aint1, 0, dataarray, (height - 1 - l) * width, width); } }
-
It's what I've heard, that they were depreciated in favor of move/strafe.
-
motionX/Y/Z is no longer used. Use moveForward and moveStrafing
-
Probably not Possible - Getting a world reference
Draco18s replied to Draco18s's topic in Modder Support
I'll take a look. I do have my system fully functional using 4 packets right now (the first one locks in data editing until the fourth one from a matching source comes through) and other than some positioning data getting corrupted slightly between "saving the result" and "loading it from disc to send back to the client" things are working. (As in, the destination is getting offset by 1 block, preventing the server from locating the existing render) -
Block texures not loading after mod installation
Draco18s replied to Stormageddon's topic in Modder Support
Leave the main class alone! Move the TEXTURES. -
Probably not Possible - Getting a world reference
Draco18s replied to Draco18s's topic in Modder Support
PACKET SIZE is the limiting factor, not what KIND of packet. -
Probably not Possible - Getting a world reference
Draco18s replied to Draco18s's topic in Modder Support
Yup. I'm doing a plugin. Working on increasing my texture size. 64x64 is just NOT enough. But that means breaking the data into smaller packets. >..x -
If you don't know, then leave it alone. It has to be there for your mod to load correctly, but if that's all you do with it, then that's fine.
-
Nope, just leave it like that. You can reference it if you want to, but you don't need to set it or do anything else.
-
That's how Forge / ModLoader knows how to find your mod and access it.
-
Probably not Possible - Getting a world reference
Draco18s replied to Draco18s's topic in Modder Support
Earlier test: http://s18.postimg.org/5leo4j8ih/2013_11_08_13_35_01.png[/img] Render occurred before the client had block and weather data, so all it managed to screenshot was the dimension's two suns. But it totally worked. -
Block texures not loading after mod installation
Draco18s replied to Stormageddon's topic in Modder Support
But your assets shouldn't be inside your main package at all. Should be: src/stormcassidy/morecolors/MainModClass.java src/assets/morecolors/textures/[etc]