
nexusrightsi
Members-
Posts
153 -
Joined
-
Last visited
Everything posted by nexusrightsi
-
[1.11.2][Solved] No TE special renderer for tessellating
nexusrightsi replied to nexusrightsi's topic in Modder Support
Okay so I've found the cauldron blockstate and models, it appears that there are 4 different models for each of the heights of the water. the thing is I can't read them since Eclipse isn't allowing me to open them in any viewer/editor, so I can't really tell whats going on inside either of them. -
[1.11.2][Solved] No TE special renderer for tessellating
nexusrightsi replied to nexusrightsi's topic in Modder Support
oh yeah, thank you! I completely forgot about the cauldron! -
[1.11.2][Solved] No TE special renderer for tessellating
nexusrightsi replied to nexusrightsi's topic in Modder Support
Alright, so I roughly get the jest as to what blockstates are applicable to. How would I go about the rendering part in this case? I want to avoid the usage of TE's as much as possible and since I can check the amount of content in the bin with metadata I don't really need a TE other then for the rendering part as far as I am aware right now. -
[1.11.2][Solved] No TE special renderer for tessellating
nexusrightsi replied to nexusrightsi's topic in Modder Support
Thank you very much, I'll read up on it and see if I can figure out how to make the magic happen. -
[1.11.2][Solved] No TE special renderer for tessellating
nexusrightsi replied to nexusrightsi's topic in Modder Support
Thank you for the fast reply, is there any documentation on this because I'm still quite left in the blue as how block states work? -
So, I've decided to finally update my mod to 1.11.2 from 1.7.10. It wasn't really my choice entirely but still this gave me the opportunity to clean up my code/project. Here is the actual question: in my 1.7.10 project I had a working compost bin that had a tileentity assigned to it just for the custom renderer now the actual part that is in question as to if it is possible to recreate without having to assign it a TE is the actual compost layer that would not be present if the bin is empty but slightly gets raised depending on the fullness of the bin. I got a working TE renderer for this in 1.7.10 but since you don't need a TE anymore for custom models in 1.11.2 I was wondering if it was possible to just use the metadata of the block to calculate the position of the compost layer with and where the rendering of the compost layer would take place? (the compost layer was just a single sided tessellated UV texture)
-
[solved]Getting a certain part of the player skin
nexusrightsi replied to nexusrightsi's topic in Modder Support
Alright, I've fixed it right now. So I removed private void renderFace(EntityPlayer player) { float f2 = interpolateRotation(player.prevRenderYawOffset, player.renderYawOffset, 1); float f3 = interpolateRotation(player.prevRotationYawHead, player.rotationYawHead, 1); float f4; GameProfile game = new GameProfile(null, Minecraft.getMinecraft().getSession().getUsername()); Map map = Minecraft.getMinecraft().func_152342_ad().func_152788_a(game); ResourceLocation playerTex; if (map.containsKey(Type.SKIN)) { playerTex = Minecraft.getMinecraft().func_152342_ad().func_152792_a((MinecraftProfileTexture) map.get(Type.SKIN),Type.SKIN); and changed that part to this: private void renderFace(EntityPlayer player) { AbstractClientPlayer p = (AbstractClientPlayer)player; ResourceLocation skin = p.getLocationSkin(); I also removed the interpolateRotations since it was pretty much a duplicate causing extra rotation, because the player render event actually does the rotations and calls the renderface method too. Weirdest thing is for some reason it didn't moan about the abstractplayer field being static... which it did at first. -
[solved]Getting a certain part of the player skin
nexusrightsi replied to nexusrightsi's topic in Modder Support
So, i've figured out what the issue is. It seems to be that "if (map.containsKey(Type.SKIN))" always returns false because when I removed this check and changed the texture to an already existing texture in my resources it worked perfectly. I have no idea why this keeps returning false though, I tested it both in dev environment and in a regular minecraft environment. -
[solved]Getting a certain part of the player skin
nexusrightsi replied to nexusrightsi's topic in Modder Support
I'm trying to tessellate the face somewhat infront of the actual models face with addVertexWithUV although it doesn't seem to be appearing at all. Maybe I did something wrong in the tessellator? code: private void renderFace(EntityPlayer player) { float f2 = interpolateRotation(player.prevRenderYawOffset, player.renderYawOffset, 1); float f3 = interpolateRotation(player.prevRotationYawHead, player.rotationYawHead, 1); float f4; GameProfile game = new GameProfile(null, Minecraft.getMinecraft().getSession().getUsername()); Map map = Minecraft.getMinecraft().func_152342_ad().func_152788_a(game); ResourceLocation playerTex; if (map.containsKey(Type.SKIN)) { playerTex = Minecraft.getMinecraft().func_152342_ad().func_152792_a((MinecraftProfileTexture) map.get(Type.SKIN),Type.SKIN); GL11.glPushMatrix(); f2 = interpolateRotation(player.prevRenderYawOffset, player.renderYawOffset, 0.5F); f4 = MathHelper.wrapAngleTo180_float(f3 - f2); if (f4 < -85.0F) { f4 = -85.0F; } if (f4 >= 85.0F) { f4 = 85.0F; } f2 = f3 - f4; if (f4 * f4 > 2500.0F) { f2 += f4 * 0.2F; } float modelYOffset = -1.625F; GL11.glEnable(GL11.GL_BLEND); GL11.glDisable(GL11.GL_LIGHTING); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glRotatef(f2+90F, 0F, -2.0F, 0F); GL11.glTranslatef(-1.25F, 0.25F, 0.60F); //GL11.glTranslatef(-1.0F, -0.0F, 0.70F); GL11.glRotatef(90F, 1.0F, 0.0F, 0.0F); GL11.glRotatef(90F, 0.0F, 0.0F, 1.0F); GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); float textureWidth = 1F/64;//256 float textureHeight = 1F/32F; Minecraft.getMinecraft().renderEngine.bindTexture(playerTex); Tessellator t = Tessellator.instance; t.startDrawingQuads(); t.addVertexWithUV(1, 0, -1, 16 * textureWidth, 16 * textureHeight); t.addVertexWithUV(1, 1, -1, 16 * textureWidth, 9 * textureHeight); t.addVertexWithUV(1, 1, 1, 9 * textureWidth, 9 * textureHeight); t.addVertexWithUV(1, 0, 1, 9 * textureWidth, 16 * textureHeight); t.draw(); GL11.glDisable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_LIGHTING); GL11.glPopMatrix(); } } -
[solved]Getting a certain part of the player skin
nexusrightsi replied to nexusrightsi's topic in Modder Support
I actually did state it was for the players, which indicates that I'm using entities but no biggy there. Thats exactly what I did though, I managed to get the players skin by fetching the gameprofile. Now I just need a way to get the face on the original texture, worst thing is: there is hair on the model that will most likely result in an odd texture if i paste the players face on there -
[solved]Getting a certain part of the player skin
nexusrightsi replied to nexusrightsi's topic in Modder Support
Thank you all for the fast replies, I'll have a look into the ImageIO and do some research on it. I'll post an update on the outcome and if successful i'll post my solution here for future reference. (also if this post comes up double, i have no idea what happend to the first one cuz apparently it didn't came through for me.) -
Hey all, so I'm working on custom races but to have some differences between each player i want the models face texture to actually be the players skin face. Although I have no clue on how to get this done, so could someone please point me in the right direction? I know there is a way to get the players skin although I don't think there is a method/event to fetch certain parts?
-
Thanks again, after doing some debugging I found out it wasn't the actual packet that raised suspicion but it was a check in the event right where it checks if you hit an entity or not. Anyways, thanks to the both of you for clairing this up ^^
-
Right, I was false informed than. So my code should automatically run as long as my packet runs?
-
So... I'm trying to create a new thread in my packet to modify certain properties of items and players. Although I know that 1.8 has a simple solution for this which is: .addScheduledTask(new Runnable() However I can not find an equivalent for this(neither client or server world classes)
-
How can I add custom tree shape/blocks to my Custom Biome?
nexusrightsi replied to ScottehBoeh's topic in Modder Support
*cough* biome decorator *cough* -
[1.7.10] Easy way to check if block can stand alone?
nexusrightsi replied to IceMetalPunk's topic in Modder Support
All you need is: public boolean canPlaceBlockAt(World world, int x, int y, int z) and public void onNeighborBlockChange(World world, int x, int y, int z, Block block) Both methods can be found in the Block class, there is no reason to do it through an Item class -
Honestly, making a chairlike/mountable block isn't hard at all. well thats for 1.7.10 i don't know what its like in 1.8 though. all you have to do is spawn a new nocollide entity and mount it instantly on right clicking the block. to prevent an overflow of entities in the world you just set the entity to kill itself if it has no rider. That is pretty much it.
-
this is what i use for reading the inv nbt data if (tagCompound.hasKey("Items")) { NBTTagList tagList = (NBTTagList) tagCompound.getTag("Items"); this.inv = new ItemStack[4]; for (int i = 0; i < tagList.tagCount(); ++i) { NBTTagCompound nbt = (NBTTagCompound) tagList.getCompoundTagAt(i); byte s = nbt.getByte("Slot"); if (s >= 0 && s < this.inv.length) { this.inv[s] = ItemStack.loadItemStackFromNBT(nbt); } } } and this is what i use for saving the inv data NBTTagList tagList = new NBTTagList(); for (int i = 0; i < this.inv.length; ++i) { if (this.inv[i] != null) { NBTTagCompound nbt = new NBTTagCompound(); nbt.setByte("Slot", (byte) i); this.inv[i].writeToNBT(nbt); tagList.appendTag(nbt); } } tagCompound.setTag("Items", tagList);
-
[1.7.10] Custom dim schematic generating
nexusrightsi replied to nexusrightsi's topic in Modder Support
I'm still open to suggestions at this point. -
Hello, so i'm wondering if its possible to pre set a custom dimension to generate from a schematic instead of a random chunk generator. I know there are programs that can convert the schematics into actual code so thats an option, but all I need to know is how to just generate it all once into the dimension rather then having the same schamtic structure multiple times. I'm fairly new to world generating so if someone could pinpoint me in the right direction that would be awesome!
-
So i've been wondering what the cause could be that stops @Override public ItemStack transferStackInSlot(EntityPlayer player, int slot) in the container class of my gui to be called. It all used to work untill I started adding in buttons, just regular basic buttons might i add. No special slots either. Its as if its skipping the first 5 player inventory slots hence it uses the armor inventory and the crafting grid of the inventory. here is a short video of the problem: https://www.youtube.com/watch?v=2e2V63rwWiI
-
so I managed to fix the issue, its now gliding along instead of teleporting. One of the major issues was the !world.isRemote check, but now that i have removed it its instead of resting on top of the block its floating in mid air. but transport for all directions seems to work appart from the height issue. So next up is figuring out a way to disable the despawn and pickup for the EntityItems whiles they are on the transport.