Everything posted by Leomelonseeds
-
[UNSOLVED][1.10.2]Need help with TESR and tileentity item
package com.leomelonseeds.moarstuff.client.render.blocks; import com.leomelonseeds.moarstuff.blocks.BlockGrill; import com.leomelonseeds.moarstuff.blocks.Modblocks; import com.leomelonseeds.moarstuff.client.model.ModelGrill; import com.leomelonseeds.moarstuff.tileentity.Grill; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.client.model.ModelChest; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumFacing; import net.minecraft.util.ResourceLocation; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraftforge.client.ForgeHooksClient; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public class TileGrillRenderer extends TileEntitySpecialRenderer<Grill> { private static final ResourceLocation TEXTURE_BURNING = new ResourceLocation("moarstuff:textures/entity/grill/grill_on.png"); private static final ResourceLocation TEXTURE_NORMAL = new ResourceLocation("moarstuff:textures/entity/grill/grill_off.png"); private final ModelGrill simpleChest = new ModelGrill(); public TileGrillRenderer(){ } @Override public void renderTileEntityAt(Grill te, double x, double y, double z, float partialTicks, int destroyStage) { Grill grill = new Grill(); if(te != null){ GlStateManager.enableDepth(); GlStateManager.depthFunc(515); GlStateManager.depthMask(true); int i; if (te.hasWorldObj()) { Block block = te.getBlockType(); i = te.getBlockMetadata(); } else { i = 0; } ModelGrill modelgrill = this.simpleChest; if (destroyStage >= 0) { this.bindTexture(DESTROY_STAGES[destroyStage]); GlStateManager.matrixMode(5890); GlStateManager.pushMatrix(); GlStateManager.scale(4.0F, 4.0F, 1.0F); GlStateManager.translate(0.0625F, 0.0625F, 0.0625F); GlStateManager.matrixMode(5888); } else if(te.isBurning == true){ this.bindTexture(TEXTURE_BURNING); } else { this.bindTexture(TEXTURE_NORMAL); } GlStateManager.pushMatrix(); GlStateManager.enableRescaleNormal(); if (destroyStage < 0) { GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); } GlStateManager.translate((float)x, (float)y + 1.0F, (float)z + 1.0F); GlStateManager.scale(1.0F, -1.0F, -1.0F); GlStateManager.translate(0.5F, 0.5F, 0.5F); int j = 0; if (i == 2) { j = 180; } if (i == 3) { j = 0; } if (i == 4) { j = 90; } if (i == 5) { j = -90; } GlStateManager.rotate((float)j, 0.0F, 1.0F, 0.0F); GlStateManager.translate(-0.5F, -0.5F, -0.5F); float f = te.prevLidAngle + (te.lidAngle - te.prevLidAngle) * partialTicks; f = 1.0F - f; f = 1.0F - f * f * f; modelgrill.chestLid.rotateAngleX = -(f * ((float)Math.PI / 2F)); modelgrill.renderAll(); GlStateManager.disableRescaleNormal(); GlStateManager.popMatrix(); GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); if (destroyStage >= 0) { GlStateManager.matrixMode(5890); GlStateManager.popMatrix(); GlStateManager.matrixMode(5888); } }else{ GlStateManager.enableDepth(); GlStateManager.depthFunc(515); GlStateManager.depthMask(true); ModelGrill mg = this.simpleChest; if (destroyStage >= 0) { this.bindTexture(DESTROY_STAGES[destroyStage]); GlStateManager.matrixMode(5890); GlStateManager.pushMatrix(); GlStateManager.scale(4.0F, 4.0F, 1.0F); GlStateManager.translate(0.0625F, 0.0625F, 0.0625F); GlStateManager.matrixMode(5888); } else { this.bindTexture(TEXTURE_NORMAL); } GlStateManager.pushMatrix(); GlStateManager.enableRescaleNormal(); if (destroyStage < 0) { GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); } GlStateManager.translate((float)x, (float)y + 1.0F, (float)z + 1.0F); GlStateManager.scale(1.0F, -1.0F, -1.0F); GlStateManager.translate(0.5F, 0.5F, 0.5F); GlStateManager.translate(-0.5F, -0.5F, -0.5F); mg.renderAll(); GlStateManager.disableRescaleNormal(); GlStateManager.popMatrix(); GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); if (destroyStage >= 0) { GlStateManager.matrixMode(5890); GlStateManager.popMatrix(); GlStateManager.matrixMode(5888); } } } } Also, read the above posts.
-
[UNSOLVED][1.10.2]Need help with TESR and tileentity item
hmmmmm... my grill is opening in the inventory too, how do I fix that...
-
[UNSOLVED][1.10.2]Need help with TESR and tileentity item
OK so in my tileentity class, how would I detect if it is being rendered in the invertory?
-
1.11 - Custom mob ignoring player
I think you need to add something like this: this.tasks.addTask(2, new EntityAIZombieAttack(this, 1.0D, false));
-
Flan's Mod installation
When the mod is in the mods folder it automatically goes into minecraft so yes, go into a singleplayer world and test it out.
-
@Mod cannot be resolved to a type
Import the forge src jar into your project java build path libraries.
-
[1.8.9] Multi-Block Structures
Okkk. I guess not doing that is simpler, too.
-
[1.8.9] Multi-Block Structures
Whats wrong with extending BlockContainer though
-
1.11 - Custom mob ignoring player
Check out this: http://www.minecraftforge.net/forum/topic/29927-the-entity-attribute-system-how-to-manipulate-it-in-code/
-
Block with blockstates don't render as item models
What was that random f word for tho
-
[1.10.2] IntelliJ on trying to launch outputs: "Couldn't set pixel format"
So it works? Good. Yeah it is weird, huh.
-
[1.10.2] IntelliJ on trying to launch outputs: "Couldn't set pixel format"
Ok then downgrade upgrade because that exact version has problems with minecraft.
-
[1.10.2] IntelliJ on trying to launch outputs: "Couldn't set pixel format"
You have driver version 378.49?
-
Block with blockstates don't render as item models
You know how to override a method right?
-
[1.10.2] IntelliJ on trying to launch outputs: "Couldn't set pixel format"
Are you using an nvidia driver? If not this might help.
-
1.11 - Custom mob ignoring player
Still, try. You never know whats gonna work.
-
1.11 - Custom mob ignoring player
- Server Crash On Startup
Jesus, dont vomit a crash into your post. 1.7.10 is NO LONGER SUPPORTED by forge.- Flan's Mod installation
Download forge for 1.8, go to launcher and select the profile forge 1.8, run it, go to .minecraft/mods folder, put flans mod jar/zip into it, run minecraft, enjoy.- RecompieMC failure
ohhhhhhh, try setting it to 2G, see if that works. BTW are all the values generating the EXACT same error?- RecompieMC failure
- ATLauncher not opening packs.
Forge 1.7.10 is no longer supported.- RecompieMC failure
Exactly how much ram u have?- RecompieMC failure
Actually, try even smaller numbers, like 30M.- RecompieMC failure
did you try putting like -Xmx250M -Xms250M or -Xmx1G -Xms1G ? Newer versions of jdk will not help you. - Server Crash On Startup
IPS spam blocked by CleanTalk.
Important Information
By using this site, you agree to our Terms of Use.