2016-06-09 19 views
0

Ich erstelle einen Mod, aber die Textur eines Blocks (der einzige) lädt nur im Inventar und wenn es fallen gelassen wird, hoffe, Sie können mir helfen, ich benutze die 1.8 MDK .Block Textur laden nur im Inventar

Blockstates:

{ 
    "variants"": { 
     "normal": {"model": "horsenexus:horse_block"}, 
    } 
} 

Modelle, Block:

{ 
    "parent": "block/cube_all", 
    "textures": { 
     "down": "horsenexus:blocks/horse_block_down", 
     "up": "horsenexus:blocks/horse_block_top", 
     "north": "horsenexus:blocks/horse_block_north", 
     "east": "horsenexus:blocks/horse_block_east", 
     "south": "horsenexus:blocks/horse_block_south", 
     "west": "horsenexus:blocks/horse_block_west" 
    } 

} 

Models, Artikel:

{ 
    "parent": "horsenexus:block/horse_block", 
    "display": { 
     "thirdperson": { 
      "rotation": [ 10, -45, 170 ], 
      "translation": [ 0, 1.5, -2.75 ], 
      "scale": [ 0.375, 0.375, 0.375 ] 
     } 
    } 
} 

Und die Codes:

package com.crazyhoorse961.core.blocks; 

import net.minecraft.block.Block; 
import net.minecraft.block.material.Material; 
import net.minecraft.item.ItemStack; 
import net.minecraftforge.common.MinecraftForge; 

public class HorseBlock extends Block{ 

    public HorseBlock(Material materialIn) { 
     super(materialIn); 
     this.setHardness(5.6F); 
     this.setResistance(56.34F); 
     this.setStepSound(this.soundTypeSnow); 
    } 

} 

Und die letzte:

package com.crazyhoorse961.core.init; 

import com.crazyhoorse961.core.Reference; 
import com.crazyhoorse961.core.blocks.HorseBlock; 

import net.minecraft.block.Block; 
import net.minecraft.block.material.Material; 
import net.minecraft.client.Minecraft; 
import net.minecraft.client.resources.model.ModelResourceLocation; 
import net.minecraft.item.Item; 
import net.minecraftforge.common.MinecraftForge; 
import net.minecraftforge.fml.common.registry.GameRegistry; 

public class Horse_Block { 
    public static Block horse_block; 

    public static void init() 
    { 

     horse_block = new HorseBlock(Material.clay).setUnlocalizedName("horse_block"); 
    } 

    public static void register() 
    { 
     GameRegistry.registerBlock(horse_block, horse_block.getUnlocalizedName().substring(5)); 
    } 

    public static void registerRenders() 
    { 
     registerRender(horse_block); 
    } 

    public static void registerRender(Block block) 
    { 

     Item item = Item.getItemFromBlock(block); 
     Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Reference.MOD_ID + ":" + item.getUnlocalizedName().substring(5), "inventory")); 

     } 
    } 

Vielen Dank für den Versuch, mir zu helfen, einen guten Tag haben.

Antwort

1

Versuchen Sie, die folgende Zeile in der "Models, Block" Code

"parent": "block/cube_all", 

ausgetauscht wurden durch:

"parent": "block/cube", 

Soweit ich weiß 'cube_all' nur verwendet, wenn Sie die Verwendung gleiche Textur für alle Seiten Ihres Blocks.