
MCrafterzz
Members-
Posts
285 -
Joined
-
Last visited
Everything posted by MCrafterzz
-
[1.12] Make custom grass block use the colour map
MCrafterzz replied to MCrafterzz's topic in Modder Support
Bump -
[1.12] Make custom grass block use the colour map
MCrafterzz replied to MCrafterzz's topic in Modder Support
Got it working with: return worldIn.getBiome(pos).getGrassColorAtPos(pos); Thanks for pointing me in the right direction EDIT: It doesn't seem to work for the itemblock in the inventory, how can I fix this? -
Hello, I have created a custom grass block and want it to be coloured like the normal one. How can I implement this? Currently I just have a normal block which uses the grass texture and thefor like exspected is gray.
-
[1.12.2] Blockstate with item transforms doesn't load
MCrafterzz replied to MCrafterzz's topic in Modder Support
Bump -
[1.12.2] Blockstate with item transforms doesn't load
MCrafterzz replied to MCrafterzz's topic in Modder Support
Bump -
[1.12.2] Blockstate with item transforms doesn't load
MCrafterzz replied to MCrafterzz's topic in Modder Support
Does anyone know how to covert the vanilla values to forges? Multiple people have asked but I still haven't found a working answer. -
[1.12.2] Blockstate with item transforms doesn't load
MCrafterzz replied to MCrafterzz's topic in Modder Support
I'm not getting any errors and after changing some values it does seem to work. I just need to continue changing values it hopefully will be good. It's totally guess work so it'll take a while. EDIT: I tried converting the values with code: Main.logger.warn(new TRSRTransformation(new ItemTransformVec3f(new Vector3f(0, 45, 0), new Vector3f(0, 4.2f, 0), new Vector3f(0.4f,0.4f,0.4f))).getTranslation()); But it just printed out the same values as in the constructor :C -
[1.12.2] Blockstate with item transforms doesn't load
MCrafterzz replied to MCrafterzz's topic in Modder Support
Bump? -
[1.12.2] Blockstate with item transforms doesn't load
MCrafterzz replied to MCrafterzz's topic in Modder Support
Thanks Choonster, I did change it but it seems to ignore everything except the gui part: { "forge_marker": 1, "defaults": { "textures": { "all": "blocks/dirt" } }, "variants": { "layers": { "1": { "model": "ml:layer_2" }, "2": { "model": "ml:layer_4" }, "3": { "model": "ml:layer_6" }, "4": { "model": "ml:layer_8" }, "5": { "model": "ml:layer_10" }, "6": { "model": "ml:layer_12" }, "7": { "model": "ml:layer_14" }, "8": { "model": "ml:layer_16" } }, "inventory": [{ "model": "ml:layer_2", "transform": { "gui": { "rotation": [{ "x": 30 }, { "y": 225 }, { "z": 0 }], "translation": [0, 0, 0], "scale": 0.625 }, "ground": { "rotation": [{ "x": 0 }, { "y": 0 }, { "z": 0 }], "translation": [0, 3, 0], "scale": 0.1 }, "firstperson_righthand": { "rotation": [{ "x": 0 }, { "y": 45 }, { "z": 0 }], "translation": [0, 4.2, 0], "scale": 0.1 }, "firstperson_lefthand": { "rotation": [{ "x": 0 }, { "y": 225 }, { "z": 0 }], "translation": [0, 4.2, 0], "scale": 0.1 } } }] } } The scale is 0.1 but it's still much larger than any other block -
Here is the blockstate file: { "forge_marker": 1, "defaults": { "textures": { "all": "blocks/dirt" } }, "variants": { "layers": { "1": { "model": "ml:layer_2" }, "2": { "model": "ml:layer_4" }, "3": { "model": "ml:layer_6" }, "4": { "model": "ml:layer_8" }, "5": { "model": "ml:layer_10" }, "6": { "model": "ml:layer_12" }, "7": { "model": "ml:layer_14" }, "8": { "model": "ml:layer_16" } }, "inventory": [{ "model": "ml:layer_2", "textures": { "all": "blocks/dirt" }, "transform": { "display": { "gui": { "rotation": [30, 225, 0], "translation": [0, 0, 0], "scale": [0.625, 0.625, 0.625] }, "ground": { "rotation": [0, 0, 0], "translation": [0, 3, 0], "scale": [0.25, 0.25, 0.25] }, "firstperson_righthand": { "rotation": [0, 45, 0], "translation": [0, 4.2, 0], "scale": [0.40, 0.40, 0.40] }, "firstperson_lefthand": { "rotation": [0, 225, 0], "translation": [0, 4.2, 0], "scale": [0.40, 0.40, 0.40] } } } }] } } Why doesn't this load correctly? It gives the error: [12:53:03] [main/ERROR] [FML]: Exception loading model for variant ml:dirt_layer#inventory for item "ml:dirt_layer", normal location exception Removing the inventory part makes it load again. Thankful for all help!
-
Thanks!
-
I'm trying to register blocks but I can't get it to work. Code: Main: @Mod(modid = "mb", name = "More Blocks", version = "1.0.0") @EventBusSubscriber public class Main { @Instance public static Main instance; public static Logger logger; public static final CreativeTabs creativeTab = new CreativeTabBlocks(); @EventHandler public static void preInit(FMLPreInitializationEvent event) { logger = event.getModLog(); BlockInit.addBlocks(); } } BlockInit: public class BlockInit { public static ArrayList<Block> blocks; public static void addBlocks () { blocks = new ArrayList<Block>(); addBlock(new BlockModSlab("copper_slab")); } } RegistryHandler: @EventBusSubscriber(modid = "mb") public class RegistryHandler { @SubscribeEvent public void registerBlocks(Register<Block> event) { event.getRegistry().registerAll(BlockInit.blocks.toArray(new Block[0])); Main.logger.info("Regestring blocks"); } } I haven't bothered with textures/models yet as I first wanted to get the registry part working. Thanks for any help
-
Ok no longer readding the texture but how should I find the iconName of a block?
-
Well this is how I register: public void stichTextures(TextureStitchEvent event) { for (int i = 0; i < Misc.textureLocations.size(); i++) { event.getMap().registerSprite(Misc.textureLocations.get(i)); } } textureLocations is a arraylist of resourcelocations This is where I add to list: Misc.textureLocations.add(new ResourceLocation(Minecraft.getMinecraft().getBlockRendererDispatcher() .getModelForState(block.getDefaultState()).getParticleTexture().toString())); in my tileentity class
-
The forums names are one letter per line so they take an anourmus place
-
Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite(iconName).getMinU() Works but what should iconName be?
-
Ok but how should I implement that? vertexBuffer.tex(u, v) What should I replace u and v with? Where should I get the TextureAtlasSprite from?
-
[1.11.2] Get resourcelocation from block?
MCrafterzz replied to MCrafterzz's topic in Modder Support
Thank you showfacts -
[1.11.2] Get resourcelocation from block?
MCrafterzz replied to MCrafterzz's topic in Modder Support
This is what I've got so far: public String texture = BlockRendererDispatcher.getModelForState(Blocks.STONE.getDefaultState()) .getParticleTexture().toString(); The problem is that Blocks.STONE.getDefaultState() gives an error because it's static when the methoud isn't so how should I solve this? -
[1.11.2] Get resourcelocation from block?
MCrafterzz replied to MCrafterzz's topic in Modder Support
Thanks both of you. Choonster what should I get the IBakedModel from because it can't be used staticly -
[1.11.2] Get resourcelocation from block?
MCrafterzz replied to MCrafterzz's topic in Modder Support
I want to get the texture from a block, so from it's model then i guess -
How do I: Get the U and V coordinates for the stitched texture from the TextureAtlasSprite
-
[1.11.2] Get resourcelocation from block?
MCrafterzz replied to MCrafterzz's topic in Modder Support
The texture location. I found that .getRegistryName() returns a resourceLocation so is that correct? -
Hello, is it possible to get the resource location from a block for example stone?
-
Where should I put the TextureStichEvent? and how do I register a texture. registerSprite doesn't excist in the event or in the class.