-4
我在我的java代碼中有一個小問題。錯誤是令牌令牌上的Java語法錯誤「;」預計
語法錯誤 「;」,預計
這裏是我的代碼:
package natchly.chest;
import natchly.chest.blocks.BlockStoneChest;
import net.minecraft.block.Block;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
import cpw.mods.fml.common.event.FMLInitializationEvent;
@Mod(modid="chestsplus", name="Chests+", version="1.4.6_01")
@NetworkMod(clientSideRequired=true, serverSideRequired=false)
public class ModChests {
public int idBlockStoneChest = 250;
public static Block blockStoneChest; // <-------- Error here
blockStoneChest = new BlockStoneChest(idBlockStoneChest).setBlockName("blockNAZWABLOKU").setHardness(1.5F).setResistance(5.0F);
@Init
public void init(FMLInitializationEvent e) {
GameRegistry.registerBlock(blockStoneChest);
LanguageRegistry.addName(blockStoneChest, "Stone Chest");
}
}
StackOverflow不是語法檢查服務。 –
但我認爲,它的代碼是正確的... – sofalse
@ user1798217如果代碼是正確的,那麼爲什麼會有語法錯誤 –