Mienecraft Mod coden

... komplette Frage anzeigen

1 Antwort

Hast du ein wenig Quelltext (ModMain.java) zu dem ganzen um nach Fehlern zu schauen.

Das könnte ein einfacher Schreibfehler im Quelltext sein.

Groß-/Kleinschreibung ist hier äußerst wichtig einzuhalten.


Antwort bewerten Vielen Dank für Deine Bewertung
Kommentar von Manubown
10.10.2016, 17:48

Hey em ich weis nicht welche Java Datei du meinst hab aufjedenfall mal den Code hier eingefügt vielleicht findest du ja die Lösung

package com.Minecraft;

import com.Minecraft.items.ItemRubin;

import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.model.ModelResourceLocation;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.registry.GameRegistry;

@Mod(modid = MinecraftPlus.MODID)
public class MinecraftPlus {

public static final String MODID = "MinecraftPlus";

//Item
public static Item Rubin = new ItemRubin();

@EventHandler
public void preInit (FMLPreInitializationEvent event) {
//crafting
ItemStack stackWool = new ItemStack(Blocks.wool);
ItemStack stackweb4 = new ItemStack(Blocks.web, 4);
ItemStack stackweb = new ItemStack(Blocks.web);

GameRegistry.addShapelessRecipe(stackweb4, stackWool);
GameRegistry.addRecipe(stackWool, " ", " ww"," ww",'w',stackweb);
GameRegistry.addRecipe(stackWool, "ww ", "ww "," ",'w',stackweb);
GameRegistry.addRecipe(stackWool, " ww", " ww"," ",'w',stackweb);
GameRegistry.addRecipe(stackWool, " ", "ww ","ww ",'w',stackweb);

//crafting
ItemStack stackdiamond = new ItemStack(Items.diamond);
ItemStack stackstone = new ItemStack(Blocks.stone);
ItemStack stackorediamond =new ItemStack(Blocks.diamond_ore);

GameRegistry.addRecipe(stackorediamond, "sss", "sds", "sss" , 's', stackstone , 'd',stackdiamond);

//Smelling
ItemStack stackDiamond = new ItemStack(Items.diamond);
ItemStack stackCoalBlock = new ItemStack(Blocks.coal_block);

GameRegistry.addSmelting(stackDiamond, stackCoalBlock, 1000);

}

@EventHandler
public void init(FMLInitializationEvent event) {
GameRegistry.registerItem(Rubin, "Rubin");
Minecraft.getMinecraft().getRenderItem().getItemModelMesher()
.register(Rubin, 0, new ModelResourceLocation("MinecraftPlus:Rubin", "inventory"));

}

public void postInit (FMLPostInitializationEvent event) {

}

}

package com.Minecraft.items;

import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;

public class ItemRubin extends Item {

public ItemRubin() {
this.setUnlocalizedName("Rubin");
this.setCreativeTab(CreativeTabs.tabMaterials);

}
}

0

Was möchtest Du wissen?