Everything posted by deerangle
-
How can i get the ViewProjection matrix?
for my calculations for my in-game overlay mod, i need the view projection matrix that I can translate world positions to screen positions. how can I get this matrix (those matrices)?
-
[SOLVED] Block that breaks if not no block is underneath?
I got it! onNeighbourBlockChange
-
[SOLVED] Block that breaks if not no block is underneath?
I want to make a block, that disappears/breaks, one there is no block underneath it, like a door or fire
-
[1.9.4] Backface culling inside model
so those are front faces overlapping Thanks for helping me!
-
[1.9.4] Backface culling inside model
Is is actually possibile? and if it is, then how?
-
[1.9.4] Backface culling inside model
To be exact: those are the backfaces, overlapping with the other frontfaces, wich i want to remove/cull.
-
[1.9.4] Backface culling inside model
anyone?
- [1.8.9]ItemCraftedEvent
-
[1.9] How to make an item attack automatically when you hold the attack button?
If you were using MCP, and not forge, you could rewrite the attacking classes. But what you can do, is to check if an entity is on your cross in the middle of the screen, and if its in range. Then go ahead and damage that entity through the player as the "DamageSource" and there you go.
-
[1.9.4][Unsolved] Generate flowers
Don't bump your thread so often. In the world generator, you can set the minimum height. You also can set, what block to replace, and you can check in the flower class, if it can stay on the block it was generated on. So now go and fix your bug!
-
[1.9.4] Backface culling inside model
How can i cull the backface of an element inside the model? Thanks in advance
-
How does the sound ResourceLocation work?
Did you look at this tread? http://www.minecraftforge.net/forum/index.php/topic,38242.0.html
-
How does the sound ResourceLocation work?
in this case, i think you have to use "/", and not "." to seperate folders
-
gradlew setupDecompWorkspace not working with Eclipse Mars
-Extract minecraftforge zip-mdk or zip-src file. -Open command window there. -type: "gradlew setupDecompWorkspace eclipse" -when finished, then, but only then and not before, open the project in eclipse (workspace directory: eclipse folder in extracted zip) -start programming!
-
[SOLVED] [1.9.4] Coloring Block
ITS WORKING !!! YOU GUYS ARE TOTALLY, THE BEST! THANK YOU SOOOOO MUCH!
-
[SOLVED] [1.9.4] Coloring Block
I made a color registerer: package com.laser.tile; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.color.BlockColors; import net.minecraft.client.renderer.color.IBlockColor; import net.minecraft.client.renderer.color.ItemColors; import net.minecraft.world.ColorizerGrass; import net.minecraft.world.biome.BiomeColorHelper; import net.minecraftforge.fml.relauncher.*; @SideOnly(Side.CLIENT) public class ModColorHandler { private static final Minecraft minecraft = Minecraft.getMinecraft(); public static void registerColorHandlers() { final BlockColors blockColors = minecraft.getBlockColors(); registerBlockColorHandlers(blockColors); } private static void registerBlockColorHandlers(final BlockColors blockColors) { final IBlockColor laserColorHandler = (state, blockAccess, pos, tintIndex) -> { if (blockAccess != null && pos != null) { TileLaserX laser = (TileLaserX) (blockAccess.getBlockState(pos).getBlock()); return laser.getColor(); } return 16777215; }; if(laserColorHandler != null && ModBlocks.laser_x != null){ blockColors.registerBlockColorHandler(laserColorHandler, ModBlocks.laser_x); } } } but when i call it in the preinit method, then i get a nullpointer exception.
-
[SOLVED] [1.9.4] Coloring Block
I looked through "BlockLeaves" but i didn't find anything about color. Where exactly do i have to do the color-registry stuff, or where can i find the colorisation?
-
[SOLVED] [1.9.4] Coloring Block
public TileLaserX(Material materialIn) { super(materialIn); this.setLightOpacity(0); this.setLightLevel(0.5F); this.useNeighborBrightness = true; } @Override public int colorMultiplier(IBlockState statei, IBlockAccess worldIni, BlockPos posi, int tintIndexi) { int col = new Color(0, 0, 255).getRGB(); Minecraft.getMinecraft().getBlockColors().registerBlockColorHandler((state, access, pos, tintIndex) -> col, ModBlocks.laser_x); return col; } constructor and colorMultiplier method. and these are my JSONs: { "textures": { "particle": "#clear" }, "elements": [ { "from": [ 0, 6, 6 ], "to": [ 16, 10, 10 ], "faces": { "down": { "uv": [ 0, 0, 16, 16 ], "texture": "#all", "cullface": "down", "tintindex": 1 }, "up": { "uv": [ 0, 0, 16, 16 ], "texture": "#all", "tintindex": 1 }, "north": { "uv": [ 0, 8, 16, 16 ], "texture": "#all", "cullface": "north", "tintindex": 1 }, "south": { "uv": [ 0, 8, 16, 16 ], "texture": "#all", "cullface": "south", "tintindex": 1 }, "west": { "uv": [ 0, 8, 16, 16 ], "texture": "#all", "cullface": "west", "tintindex": 1 }, "east": { "uv": [ 0, 8, 16, 16 ], "texture": "#all", "cullface": "east", "tintindex": 1 } } } ] } { "parent": "lasermod:block/ray", "textures":{ "all": "lasermod:blocks/laser", "clear": "lasermod:blocks/clear" } } { "variants": { "normal": {"model": "lasermod:laser"} } }
-
[SOLVED] [1.9.4] Coloring Block
I have changed my mod to 1.9.4, but now my block isn't changing its color So how would i do the same in 1.9.4? I tried to use IBlockColor.colorMultiplier but that doesn't affect my block color.
-
[SOLVED] [1.9.4] Coloring Block
Thanks for your help. by the way: im using 1.8.9, but i think ill use 1.9.4 instead.
-
[SOLVED] [1.9.4] Coloring Block
I want to in-code color my block. I am using this code: @Override public int getRenderColor(IBlockState state) { return new Color(0, 0, 255).getRGB(); } @Override public int getBlockColor() { return new Color(0, 0, 255).getRGB(); } @Override public int colorMultiplier(IBlockAccess worldIn, BlockPos pos, int renderPass) { return new Color(0, 0, 255).getRGB(); } but it only colors the particles. How can i also color the block itself. btw.: my block is EnumWorldBlockLayer.TRANSLUCENT EDIT: Solution: package com.laser.tile; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.color.BlockColors; import net.minecraft.client.renderer.color.IBlockColor; import net.minecraft.client.renderer.color.ItemColors; import net.minecraft.world.ColorizerGrass; import net.minecraft.world.biome.BiomeColorHelper; import net.minecraftforge.fml.relauncher.*; @SideOnly(Side.CLIENT) public class ModColorHandler { private static final Minecraft minecraft = Minecraft.getMinecraft(); public static void registerColorHandlers() { final BlockColors blockColors = minecraft.getBlockColors(); registerBlockColorHandlers(blockColors); } private static void registerBlockColorHandlers(final BlockColors blockColors) { final IBlockColor laserColorHandler = (state, blockAccess, pos, tintIndex) -> { if (blockAccess != null && pos != null) { TileLaserX laser = (TileLaserX) (blockAccess.getBlockState(pos).getBlock()); return laser.getColor(); } return 16777215; }; // if(laserColorHandler != null && ModBlocks.laser_x != null){ blockColors.registerBlockColorHandler(laserColorHandler, ModBlocks.laser_x); // } } } call "registerBlockColorHandlers" in init method!
-
[1.8] Block Bounds Changing
Okay. Thank You Both very much!
-
[1.8] Block Bounds Changing
thanks for the response. i really like the new idea with jsons and stuff, but i find it too complicated, to do simple things. but we modders have to work with this, because we cant be working on 1.7.10 forever.
-
[1.8] Block Bounds Changing
I want to make a block, that isn't a full block, but the "setBlockBounds()" method doesn't change the model, but the collision box. Is there a way, that i can do that without a custom JSON model?
-
Need some help with texture(s)
this is actually a question about waila, and not minecraft forge. but i think you can choose, which texture is used by waila.
IPS spam blocked by CleanTalk.