Everything posted by TricliniumAlegorium
-
[1.8] Leaves not transparent...ever...
I was updating my custom trees today and I finished the wood, but when I got to the leaves and I place them down...all the transparent parts on the texture are black in the game. Does anybody have any ideas why updating my leaves to 1.8 does this and how to fix it? Here is my class: public class ExampleLeaves extends BlockLeaves implements IShearable{ private final String name = "ExampleLeaves"; protected boolean isTransparent; public ExampleLeaves(int id) { super(); this.setUnlocalizedName(Mod.modid + ":" + name); this.setCreativeTab(Mod.ModTab); } public String getName(){ return name; } @Override public int getRenderColor(IBlockState state){ return ColorizerFoliage.getFoliageColorBasic(); } @SideOnly(Side.CLIENT) public int colorMultiplier(IBlockAccess worldIn, BlockPos pos, int renderPass) { return BiomeColorHelper.getFoliageColorAtPos(worldIn, pos); } @Override public int getBlockColor() { return ColorizerFoliage.getFoliageColor(0.5D, 1.0D); } @Override public boolean isLeaves(IBlockAccess world, BlockPos pos) { return true; } @Override public boolean isShearable(ItemStack item, IBlockAccess world, BlockPos pos) { return true; } @Override public List<ItemStack> onSheared(ItemStack item, IBlockAccess world, BlockPos pos, int fortune) { return new java.util.ArrayList(java.util.Arrays.asList(new ItemStack(this, 1, 1))); } @Override public EnumType getWoodType(int meta) { return null; } public boolean isOpaqueCube() { return !this.fancyGraphics; } @SideOnly(Side.CLIENT) public void setGraphicsLevel(boolean fancy) { this.isTransparent = fancy; this.fancyGraphics = fancy; this.iconIndex = fancy ? 0 : 1; } @SideOnly(Side.CLIENT) public EnumWorldBlockLayer getBlockLayer() { return this.isTransparent ? EnumWorldBlockLayer.CUTOUT_MIPPED : EnumWorldBlockLayer.SOLID; } public boolean isVisuallyOpaque() { return false; } }
-
[1.8] Custom Fluid Rendering (Invisible Fluid)
So I have literally coded, deleted, recoded in repeat for the last 2 days updating my mod, yet I still can't figure out this fluid thing. I even created a new TextureMap and TextureAtlasSprite and registered my sprite to a new resource location: public static TextureAtlasSprite[] atlasSpritesFluid = new TextureAtlasSprite[2]; TextureMap texturemap = Minecraft.getMinecraft().getTextureMapBlocks(); this.atlasSpritesFluid[0] = texturemap.registerSprite(new ResourceLocation("examplemod:textures/blocks/FluidStill.png")); this.atlasSpritesFluid[1] = texturemap.registerSprite(new ResourceLocation("examplemod:textures/blocks/FluidFlow.png")); I do this because minecraft uses TextureAtlasSprites as the parameters for setStillIcon and setFlowingIcon. But when I setStillIcon and setFlowingIcon to my fluid, it still renders invisible... fluid.setStillIcon(atlasSpritesFluid[0]).setFlowingIcon(atlasSpritesFluid[1]); My fluid does flow and moves seeds and displaces water like any normal fluid, but like stated before, it renders invisible. EDIT: I set a println to tell me the color of the fluid, and even when I set the blocks color, the fluid color stays as 16777215... Any ideas?
-
[1.8] Custom Fluid Rendering (Invisible Fluid)
So there is nothing built into forge to be able to render your own fluid? Could I maybe just change the color using hexadecimal (since I just changed the color of the water texture in Photoshop)? I don't need an elaborate or special texture. I just want a fluid that you can see
-
[1.8] Custom Fluid Rendering (Invisible Fluid)
I have added a fluid in 1.8 using the latest build of forge. I have textures and json files, but in game the item in hand has a texture, but the placed fluid is invisible. If you go under it, it has the water material. Also bubbles from water show, but the actual fluid is invisible. I looked through forge's github and IIcons are removed (which I knew), but their are still and flowing icon variables. These are TextureAtlasSprites though and I have no idea how to get my texture to show up using them. tl;dr I need my Fluid to show up with my texture. Any ideas? Any help is appreciated!
-
Spawning A Mob on Block Right Click...
Is there another way to do world.spawnEntityInWorld(entity)? Maybe a way that just spawns the mob on the server side?
-
Spawning A Mob on Block Right Click...
Thanks for the response, I have already tried that though. It goes to the else part of the if statement.
-
Spawning A Mob on Block Right Click...
I changed that and no difference. I think that the rest of you are right in terms of the server side stuff, but I just don't know how...
-
Spawning A Mob on Block Right Click...
How would I spawn the mob on the server side instead?
-
Spawning A Mob on Block Right Click...
Thanks for the response. I want to stick with the event, and I got it to spawn by just adding entityFireCreeper.setPosition. This works fine except: When I spawn the mob it stays in one spot and doesn't move. When I walk into the mob, it spazzes out my screen. Any ideas on how to fix this or what is wrong?
-
Spawning A Mob on Block Right Click...
I am trying to make part of my mod, so that when you right click on 2 custom blocks stacked on top of each other, they disappear and my custom mob spawns using a custom event. I got the blocks to disappear after you right click, but the mob is nowhere to be found... Any ideas... Code In My Custom Event:
-
Find Block Anywhere in World (or a workaround)
It is inside the onEntityCollidedWithBlock, which I know works because I can add the teleport line of code and it teleports the player to another dimension when they walk into the block. It just isn't working with this...
-
Find Block Anywhere in World (or a workaround)
I did that, And I even put a println to see if it works and it doesnt do it if(worldserver.getBlock((int)entity.posX, (int)entity.posY, (int)entity.posZ) instanceof HeavenPortal){ System.out.println("Hello199282");
-
Find Block Anywhere in World (or a workaround)
When I do entity.posX, entity.posY, and entity.posZ, it gives me an error, becuase those are doubles but getBlock needs integers. Also, I didn't realize that, next time I will keep my thread open
-
Find Block Anywhere in World (or a workaround)
There was originally a thread by me, and I thought I found a workaround so I closed it. Now I realized it doesn't work. Right now I am using : if(worldserver.getBlock(entity.chunkCoordX, entity.chunkCoordY, entity.chunkCoordZ) instanceof MyPortal) It doesn't work
-
Find Block Anywhere in World (or a workaround)
I though I had found a workaround to this, but I didn't...So, is there a simple way to find a block somewhere in the world? It sounds simple, but it wont work. I want to teleport to a block in another dimension through my custom portal if that block exists. If not, create that block. I have the create a block working, but it always goes to that creating multiple instances of that block in the world right next to each other. It wont recognize that the block exists...Any Help?
-
Mantle Usage
Also will this help me complete my main goal? (Making an instruction book)
-
Mantle Usage
I have a 1.7.10 mod in the works that is getting kind of complicated so I wanted to add an instruction book. I was looking at Tinkers Construct and saw that they used mantle. Am I allowed to use mantle and if so do I need permission? Also how do I produce my mod with it and do I just put the jar in my development environment and rebuild the environment? Any Help is appreciated!
-
Cause a block update on placement of block
I dont get what you mean, I called createHeavenPortal in the onDeathUpdate method of the entity I made. It is supposed to work so that when I kill the entity it spawns this portal. Just like the enderdragon
-
Cause a block update on placement of block
Here is the part that creates the portal after I kill a certain entity:
-
Cause a block update on placement of block
I think the fluid, because I just changed that portion of the vanilla code from fire to my fluid. Then I gave my fluid fire like properties. I can place the fluid in my frame normally and create the portal. I just cant get the world to place it.
-
Cause a block update on placement of block
It still just spawns the fluid inside of the portal frame and doesn't actually create a portal...
-
Cause a block update on placement of block
I am trying to make the world place a fluid inside of a nether portal type structure that spawns a Portal to my custom dimension. I have been told that I should cause a block update to make it spawn the portal after the fluid is placed. How would I go about doing this?
-
Spawning A Fluid
Im trying some different methods and still cant get it to make the portal...Im even trying different directions to make it more like the player placed it. I just dont get it...
-
Spawning A Fluid
I tried to cause a block update but it didnt work...what method did you use to cause the block update?
-
Spawning A Fluid
Ive tried every number combination and cant get it to work...
IPS spam blocked by CleanTalk.