Everything posted by Democretes
-
[1.7.10]EnumChatFormatting Help
So I've been trying to use drawString(...) in a GUI with EnumChatFormatting.OBSFUCATED (Look at obsfucated on http://minecraft.gamepedia.com/Formatting_codes to see what I'm aiming for), and it fails to work for Guis, but it works fine for Item/Block names. Using any other formatting codes works perfectly fines. I can change the text to any color or add bold, italics, etc., but using the obsfucated text fails to do anything. I've checked the code for GuiScreenBook and it doesn't seem to have anything that would make it work.
-
Gradle setupDecompWorkspace Error
Any reason it would? "must be your internet" doesn't exactly help me.
-
Gradle setupDecompWorkspace Error
I'm having an issue when setting using the setupDecompWorkspace command with gradle. Whenever I run it, it throws an exception "Could not resolve all dependencies for configuration" **************************** Powered By MCP: http://mcp.ocean-labs.de/ Searge, ProfMobius, Fesh0r, R4wk, ZeuX, IngisKahn MCP Data version : unknown **************************** :extractUserDev UP-TO-DATE :genSrgs SKIPPED :extractNatives FAILURE: Build failed with an exception. * What went wrong: Could not resolve all dependencies for configuration ':minecraftNatives'. > Could not download artifact 'net.java.jinput:jinput-platform:2.0.5:jinput-plat form-natives-windows.jar' > Could not GET 'http://repo1.maven.org/maven2/net/java/jinput/jinput-platfor m/2.0.5/jinput-platform-2.0.5-natives-windows.jar'. Received status code 503 fro m server: Service Unavailable
-
[1.7.10]Making Rendered Items not Rotate
Then what should I use?
-
[1.7.10]Making Rendered Items not Rotate
As the topic says, is there an easy way to do this? I want an item to lay flat on a block. EntityItem.age somewhat works, but it makes the render item vibrate back and forth.
-
[1.7.10]Registering Icons with ResourceLocation
As the title says, is it possible to register an Icon from another mod's assets using a ResourceLocation? I haven't found any way looking through the Item methods. Would I have to make a custom renderer to draw the Icon instead of using getIcon(...)?
-
[1.7.10]handleItemUse Event Triggering Twice
world.isRemote worked fine. Totally forgot to check for that.
-
[1.7.10]handleItemUse Event Triggering Twice
I'm using the handleItemUse event, and it works perfectly fine, it just triggers twice which is not a good thing. Is there anyway to fix this or is something just going wrong?
-
[1.7.2] Loading Textures after NBT has been loaded
That's so simple it's amazing. Thank ye.
-
[1.7.2] Loading Textures after NBT has been loaded
onDataPacket requires a NetworkManager. Any methods I can use to get one (from the server I'm assuming)?
-
[1.7.2] Loading Textures after NBT has been loaded
Do I need to make my own S35PacketUpdateTileEntity or are there default ones I can use in Minecraft/Forge?
-
[1.7.2] Loading Textures after NBT has been loaded
Realised that after I put a few println() in. Is there any documentation I can read or any open code for me to look at with those methods?
-
[1.7.2] Loading Textures after NBT has been loaded
What's the best way to load the block textures after the tile entity has loaded its NBT data? I'm currently working with blocks facing in the correct direction using the direction the tile entity "faces". When placed, it gets the facing correctly, but on world load, the block loads its textures before the tile entity loads it's NBT data leading to the facing to always be zero. Any suggestions?
-
[1.7.2]Packet Handler Illegal State Exception
It's simple and clean. Just the way it should be
-
[1.7.2]Packet Handler Illegal State Exception
That doesn't help me at all. I know how to write the packet handler, and clearly I've done it, it's just not working for some reason.
-
[1.7.2]Packet Handler Illegal State Exception
I'm having a few issues with the 1.7 packet handler. I've read up on some tutoirlas on how to do it and I'm doing it in an extrememly similar way, but I keep getting an IllegalStateException on startup. Here's the source code: https://github.com/Democretes/Fluxian-Expansion/blob/master/src/democretes/utils/network/PacketMatrix.java https://github.com/Democretes/Fluxian-Expansion/blob/master/src/democretes/utils/network/PacketHandler.java https://github.com/Democretes/Fluxian-Expansion/blob/master/src/democretes/FluxianExpansion.java Here's the crash log.
-
[1.6.4]Container client/server sync
https://github.com/Democretes/Technomancy/tree/master/src/democretes/blocks/gui Here's the repo for the guis and containers.
-
[1.6.4]Container client/server sync
In a Container I'm making, the items aren't syncing correctly from client to server. When picking up an item from the inventory, it gives you one of the item, and doesn't take away from the stack. If you take the item out of the inventory and try and drop it or put it in a separate inventory, it disappears. The problem is, shift clicking works perfectly. I can shift click a stack in and out without having any issues at all. It's just with the normal click on a stack that's causing problems. The repo can be found here: https://github.com/Democretes/Technomancy
-
[1.6.4]Rendering Liquid in a Tile Entity
Definitely not null, ItemStack shouldn't be calling null, even the math shouldn't be null. I honestly have no idea here. Any ideas?
-
[1.6.4]Rendering Liquid in a Tile Entity
It shouldn't be. It should be an instance of a new block public class TMBlocks { public static void init() { //Block Initialization nodeDynamo = new BlockNodeDynamo(BlockIds.idNODE_DYNAMO); essentiaContainer = new BlockEssentiaContainer(BlockIds.idESSENTIA_CONTAINER); cosmeticOpaque = new BlockCosmeticOpaque(BlockIds.idCOSMETIC_OPAQUE); //cosmeticPane = new BlockCosmeticPane(BlockIds.idCOSMETIC_PANE); //Registry GameRegistry.registerBlock(nodeDynamo, LibNames.NODE_DYNAMO_NAME); GameRegistry.registerBlock(essentiaContainer, LibNames.ESSENTIA_CONTAINER_NAME); GameRegistry.registerBlock(cosmeticOpaque, LibNames.COSMETIC_OPAQUE_NAME); //GameRegistry.registerBlock(cosmeticPane, LibNames.COSMETIC_PANE_NAME); //Tiles registry GameRegistry.registerTileEntity(TileEssentiaContainer.class, "TileEssentiacontainer"); GameRegistry.registerTileEntity(TileNodeDynamo.class, "TileNodeDynamo"); } //Block Instances public static Block nodeDynamo; public static Block essentiaContainer; public static Block cosmeticOpaque; public static Block cosmeticPane; }
-
[1.6.4]Rendering Liquid in a Tile Entity
I'm get a null pointer exception at renderBlocks.renderFaceYNeg(TMBlocks.essentiaContainer, -0.5D, 0.0D, -0.5D, icon); and I'm not quite sure if I'm just being blind to something or I'm guinely missing something. In RenderBlocks it point to double d3 = (double)par8Icon.getInterpolatedU(this.renderMinX * 16.0D); which shouldn't cause a problem since the renderMinX should be the first renderBounds which is 0.25D. public class TileEssentiaContainerRenderer extends TileEntitySpecialRenderer{ ModelEssentiaContainer model = new ModelEssentiaContainer(); private static final ResourceLocation modelTexture = new ResourceLocation(Reference.MODEL_ESSENTIA_CONTAINER_TEXTURE); public void renderTileEntityAt(TileEntity entity, double x, double y, double z, float t) { TileEssentiaContainer container = (TileEssentiaContainer)entity; GL11.glPushMatrix(); GL11.glTranslatef((float)x, (float)y, (float)z); GL11.glScalef(-1F, -1F, 1f); GL11.glTranslatef(-.5F, -1.5F, .5F); GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); if (container.amount > 0) { renderLiquid(container, x, y, z, t); } bindTexture(modelTexture); model.render(); GL11.glPopMatrix(); } public void renderLiquid(TileEssentiaContainer entity, double x, double y, double z, float f) { if (this.tileEntityRenderer.renderEngine == null) { return; } TileEssentiaContainer container = new TileEssentiaContainer(); GL11.glPushMatrix(); GL11.glRotatef(180.0F, 1.0F, 0.0F, 0.0F); World world = entity.worldObj; RenderBlocks renderBlocks = new RenderBlocks(); GL11.glDisable(2896); float level = entity.amount / entity.maxAmount * 0.625F; Tessellator t = Tessellator.instance; renderBlocks.setRenderBounds(0.25D, 0.0625D, 0.25D, 0.75D, 0.0625D + level, 0.75D); t.startDrawingQuads(); if (entity.aspect != null) { t.setColorOpaque_I((entity).aspect.getColor()); } int bright = 200; if (entity.worldObj != null) { bright = Math.max(200, Block.blocksList[blockIds.idESSENTIA_CONTAINER].getMixedBrightnessForBlock(entity.worldObj, entity.xCoord, entity.yCoord, entity.zCoord)); } t.setBrightness(bright); Icon icon = ((BlockEssentiaContainer)Block.blocksList[blockIds.idESSENTIA_CONTAINER]).iconLiquid; this.tileEntityRenderer.renderEngine.bindTexture(modelTexture); renderBlocks.renderFaceYNeg(TMBlocks.essentiaContainer, -0.5D, 0.0D, -0.5D, icon); renderBlocks.renderFaceYPos(TMBlocks.essentiaContainer, -0.5D, 0.0D, -0.5D, icon); renderBlocks.renderFaceZNeg(TMBlocks.essentiaContainer, -0.5D, 0.0D, -0.5D, icon); renderBlocks.renderFaceZPos(TMBlocks.essentiaContainer, -0.5D, 0.0D, -0.5D, icon); renderBlocks.renderFaceXNeg(TMBlocks.essentiaContainer, -0.5D, 0.0D, -0.5D, icon); renderBlocks.renderFaceXPos(TMBlocks.essentiaContainer, -0.5D, 0.0D, -0.5D, icon); t.draw(); GL11.glEnable(2896); GL11.glPopMatrix(); GL11.glColor3f(1.0F, 1.0F, 1.0F); } }
-
[1.6.4]Rendering TileEntities in Inventory
Is there a better way to run the IItemRenderer without making a new Item(insertBlockNameHere)?
-
[1.6.4]Rendering TileEntities in Inventory
How does one go about rendering a block/tile entity as a model in your inventory?
-
[1.6.4]Rendering Texture on Custom Model
Works flawlessly. Why is always the pain in the ass problems that have the simplest of solutions? Many thanks.
-
[1.6.4]Rendering Texture on Custom Model
I'm having trouble rendering the texture on a custom model I've made. When I run Minecraft, the model renders but the texture does not. I'm rendering the model in Techne and importing it. The texture is stored in "src/assets/technom/textures/models/nodeDynamo.png" public class TileNodeDynamoRenderer extends TileEntitySpecialRenderer { ModelNodeDynamo model = new ModelNodeDynamo(); private static final ResourceLocation modelTexture = new ResourceLocation(Reference.MODEL_NODE_DYNAMO_TEXTURE); @Override public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float t) { GL11.glPushMatrix(); GL11.glTranslatef((float)x, (float)y, (float)z); GL11.glScalef(-1F, -1F, 1f); GL11.glTranslatef(-.5F, -1.5F, .5F); GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); bindTexture(modelTexture); model.render(); GL11.glPopMatrix(); } } public class ClientProxy extends CommonProxy { @Override public void initRenderers() { ClientRegistry.bindTileEntitySpecialRenderer(TileNodeDynamo.class, new TileNodeDynamoRenderer()); RenderingRegistry.registerBlockHandler(new BlockNodeDynamoRenderer()); RenderIDs.idNodeDynamo = RenderingRegistry.getNextAvailableRenderId(); } public class BlockNodeDynamoRenderer implements ISimpleBlockRenderingHandler{ private int id; @Override public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) { GL11.glPushMatrix(); GL11.glTranslatef(-0.5F, -0.5F, -0.5F); TileEntityRenderer.instance.renderTileEntityAt(new TileNodeDynamo(), 0.0D, 0.0D, 0.0D, 0.0F); GL11.glPopMatrix(); } @Override public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) { return false; } @Override public boolean shouldRender3DInInventory() { return true; } @Override public int getRenderId() { return RenderIDs.idNodeDynamo; } } public class ModelNodeDynamo extends ModelBase { //fields ModelRenderer Base; ModelRenderer UpperBase; ModelRenderer SmallPost1; ModelRenderer SmallPost2; ModelRenderer SmallPost3; ModelRenderer SmallPost4; ModelRenderer Arm1; ModelRenderer Arm2; ModelRenderer Arm3; ModelRenderer Arm4; ModelRenderer SmallArm1; ModelRenderer SmallArm2; ModelRenderer SmallArm3; ModelRenderer SmallArm4; ModelRenderer Pannel1; ModelRenderer Pannel2; ModelRenderer Pannel3; ModelRenderer Pannel4; ModelRenderer Post1; ModelRenderer Post2; ModelRenderer Post3; ModelRenderer Post4; public ModelNodeDynamo() { textureWidth = 64; textureHeight = 32; Base = new ModelRenderer(this, 0, ; Base.addBox(-8F, -4F, -8F, 16, 8, 16); Base.setRotationPoint(0F, 20F, 0F); Base.setTextureSize(64, 32); Base.mirror = true; setRotation(Base, 0F, 0F, 0F); UpperBase = new ModelRenderer(this, 24, 1); UpperBase.addBox(-3F, -0.5F, -3F, 6, 1, 6); UpperBase.setRotationPoint(0F, 13F, 0F); UpperBase.setTextureSize(64, 32); UpperBase.mirror = true; setRotation(UpperBase, 0F, 0.7853982F, -3.141593F); SmallPost1 = new ModelRenderer(this, 4, 20); SmallPost1.addBox(-0.5F, -1.5F, -0.5F, 1, 3, 1); SmallPost1.setRotationPoint(2.8F, 14.5F, 0F); SmallPost1.setTextureSize(64, 32); SmallPost1.mirror = true; setRotation(SmallPost1, 0F, 0.7853982F, 0F); SmallPost2 = new ModelRenderer(this, 4, 20); SmallPost2.addBox(-0.5F, -1.5F, -0.5F, 1, 3, 1); SmallPost2.setRotationPoint(0F, 14.5F, 2.8F); SmallPost2.setTextureSize(64, 32); SmallPost2.mirror = true; setRotation(SmallPost2, 0F, 0.7853982F, 0F); SmallPost3 = new ModelRenderer(this, 4, 20); SmallPost3.addBox(-0.5F, -1.5F, -0.5F, 1, 3, 1); SmallPost3.setRotationPoint(-2.8F, 14.5F, 0F); SmallPost3.setTextureSize(64, 32); SmallPost3.mirror = true; setRotation(SmallPost3, 0F, 0.7853982F, 0F); SmallPost4 = new ModelRenderer(this, 4, 20); SmallPost4.addBox(-0.5F, -1.5F, -0.5F, 1, 3, 1); SmallPost4.setRotationPoint(0F, 14.5F, -2.8F); SmallPost4.setTextureSize(64, 32); SmallPost4.mirror = true; setRotation(SmallPost4, 0F, 0.7853982F, 0F); Arm1 = new ModelRenderer(this, 0, 19); Arm1.addBox(-0.5F, -2F, -0.5F, 1, 4, 1); Arm1.setRotationPoint(4.8F, 12.1F, 0F); Arm1.setTextureSize(64, 32); Arm1.mirror = true; setRotation(Arm1, 0F, 0F, -2.007129F); Arm2 = new ModelRenderer(this, 0, 19); Arm2.addBox(-0.5F, -2F, -0.5F, 1, 4, 1); Arm2.setRotationPoint(0F, 12.1F, 4.8F); Arm2.setTextureSize(64, 32); Arm2.mirror = true; setRotation(Arm2, 2.007129F, 0F, 0F); Arm3 = new ModelRenderer(this, 0, 19); Arm3.addBox(-0.5F, -2F, -0.5F, 1, 4, 1); Arm3.setRotationPoint(-4.8F, 12.1F, 0F); Arm3.setTextureSize(64, 32); Arm3.mirror = true; setRotation(Arm3, 0F, 0F, 2.007129F); Arm4 = new ModelRenderer(this, 0, 19); Arm4.addBox(-0.5F, -2F, -0.5F, 1, 4, 1); Arm4.setRotationPoint(0F, 12.1F, -4.8F); Arm4.setTextureSize(64, 32); Arm4.mirror = true; setRotation(Arm4, -2.007129F, 0F, 0F); SmallArm1 = new ModelRenderer(this, 0, 19); SmallArm1.addBox(-0.5F, -1.5F, -0.5F, 1, 3, 1); SmallArm1.setRotationPoint(5.4F, 9.7F, 0F); SmallArm1.setTextureSize(64, 32); SmallArm1.mirror = true; setRotation(SmallArm1, 0F, 0F, -0.4363323F); SmallArm2 = new ModelRenderer(this, 0, 19); SmallArm2.addBox(-0.5F, -1.5F, -0.5F, 1, 3, 1); SmallArm2.setRotationPoint(0F, 9.7F, 5.4F); SmallArm2.setTextureSize(64, 32); SmallArm2.mirror = true; setRotation(SmallArm2, 0.4363323F, 0F, 0F); SmallArm3 = new ModelRenderer(this, 0, 19); SmallArm3.addBox(-0.5F, -1.5F, -0.5F, 1, 3, 1); SmallArm3.setRotationPoint(-5.4F, 9.7F, 0F); SmallArm3.setTextureSize(64, 32); SmallArm3.mirror = true; setRotation(SmallArm3, 0F, 0F, 0.4363323F); SmallArm4 = new ModelRenderer(this, 0, 19); SmallArm4.addBox(-0.5F, -1.5F, -0.5F, 1, 3, 1); SmallArm4.setRotationPoint(0F, 9.7F, -5.4F); SmallArm4.setTextureSize(64, 32); SmallArm4.mirror = true; setRotation(SmallArm4, -0.4363323F, 0F, 0F); Pannel1 = new ModelRenderer(this, 54, 0); Pannel1.addBox(-0.5F, -2F, -2F, 1, 11, 4); Pannel1.setRotationPoint(8F, 15F, 0F); Pannel1.setTextureSize(64, 32); Pannel1.mirror = true; setRotation(Pannel1, 0F, -3.141593F, 0F); Pannel2 = new ModelRenderer(this, 54, 0); Pannel2.addBox(-0.5F, -2F, -2F, 1, 11, 4); Pannel2.setRotationPoint(0F, 15F, 8F); Pannel2.setTextureSize(64, 32); Pannel2.mirror = true; setRotation(Pannel2, 0F, 1.570796F, 0F); Pannel3 = new ModelRenderer(this, 54, 0); Pannel3.addBox(-0.5F, -2F, -2F, 1, 11, 4); Pannel3.setRotationPoint(-8F, 15F, 0F); Pannel3.setTextureSize(64, 32); Pannel3.mirror = true; setRotation(Pannel3, 0F, 0F, 0F); Pannel4 = new ModelRenderer(this, 54, 0); Pannel4.addBox(-0.5F, -2F, -2F, 1, 11, 4); Pannel4.setRotationPoint(0F, 15F, -8F); Pannel4.setTextureSize(64, 32); Pannel4.mirror = true; setRotation(Pannel4, 0F, -1.570796F, 0F); Post1 = new ModelRenderer(this, 0, 9); Post1.addBox(-1F, -1F, -2F, 2, 2, 5); Post1.setRotationPoint(6F, 16F, 0F); Post1.setTextureSize(64, 32); Post1.mirror = true; setRotation(Post1, 2.356194F, -1.570796F, 0F); Post2 = new ModelRenderer(this, 0, 9); Post2.addBox(-1F, -1F, -2F, 2, 2, 5); Post2.setRotationPoint(0F, 16F, 6F); Post2.setTextureSize(64, 32); Post2.mirror = true; setRotation(Post2, 0.7853982F, 0F, 0F); Post3 = new ModelRenderer(this, 0, 9); Post3.addBox(-1F, -1F, -2F, 2, 2, 5); Post3.setRotationPoint(-6F, 16F, 0F); Post3.setTextureSize(64, 32); Post3.mirror = true; setRotation(Post3, 2.356194F, 1.570796F, 0F); Post4 = new ModelRenderer(this, 0, 9); Post4.addBox(-1F, -1F, -2F, 2, 2, 5); Post4.setRotationPoint(0F, 16F, -6F); Post4.setTextureSize(64, 32); Post4.mirror = true; setRotation(Post4, 0.7853982F, 3.141593F, 0F); } public void render() { final float f5 = 1F/16F; Base.render(f5); UpperBase.render(f5); SmallPost1.render(f5); SmallPost2.render(f5); SmallPost3.render(f5); SmallPost4.render(f5); Arm1.render(f5); Arm2.render(f5); Arm3.render(f5); Arm4.render(f5); SmallArm1.render(f5); SmallArm2.render(f5); SmallArm3.render(f5); SmallArm4.render(f5); Pannel1.render(f5); Pannel2.render(f5); Pannel3.render(f5); Pannel4.render(f5); Post1.render(f5); Post2.render(f5); Post3.render(f5); Post4.render(f5); } private void setRotation(ModelRenderer model, float x, float y, float z) { model.rotateAngleX = x; model.rotateAngleY = y; model.rotateAngleZ = z; } public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) { super.setRotationAngles(f, f1, f2, f3, f4, f5, entity); } } public class Reference { // Mod Constants public static final String MOD_ID = "technom"; public static final String MOD_PREFIX = "techno:"; public static final String MOD_NAME = "Technomancy"; public static final String MOD_VERSION = "0.0.1"; public static final String CHANNEL_NAME = MOD_NAME; //Model Textures public static final String MODEL_PREFIX = MOD_ID + "/textures/models/"; public static final String MODEL_NODE_DYNAMO_TEXTURE = MODEL_PREFIX + "nodeDynamo.png"; }
IPS spam blocked by CleanTalk.