Disclamer: RunCommand.RunCommand is part of my API and DOES work.
VOID code
public static void AddChatLogWithName(String chat, String name) {
RunCommand.RunCommand("/tellraw @a <" + name + "> " + chat);
}
Run code
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9) {
AddChatLog.AddChatLogWithName("DemiCraft API testBlock", "Server");
return true;
}
SetupBlock.SetupBlock(Block block,String blockname,String texturename, int resistance, int hardness, int lightlevel, CreativeTabs tab); /** WIP, texturename may not work **/
SpawnEntity.SpawnEntity(int id, World world, int x, int y, int z);
Information + Download
Please comment ideas and bugs! Also, if you know, how do I make it so the source is compiled?
When I try to have it work with .class files, they either don't exist or it crashes.
0
0
How do I do that?
0
/blockdata -98 75 -24 {Items:[0:{id:minecraft:iron_sword,Count:1b,Slot:4b,HideFlags:1b,tag:{ench:[{id:15,lvl:0}],display:{Name:Poisoned Blade,Lore:[Each Hit Poisons target]}}}]}
Position of cmdblock:
-101 55 -4
Position of hopper:
-98 75 -24
I used a redstone loader. still got error
0
public static void runCommand(String command){
MinecraftServer MCServer = MinecraftServer.getServer();
ICommandManager CommandManager = MCServer.getCommandManager();
ICommandSender entity = MCServer;
CommandManager.executeCommand(entity, command);
}
0
0
VOID code
Run code
0
0
(Can't teach someone who asks for tuts. Figure it out.)
0
0
Cant compile.
0
the p_149727_5_.func_146101_a is where it errors.
Rest of code:
blockFurnaceLap:
http://pastebin.com/qPv0SBLK
TileEntityFurnace:
http://pastebin.com/MtpvzW8C
0
0
0
errr, is not working correctly (messing up alot, nothing about the code)
But, look for the part in one of the 2 class files:
"Blocks.furnace"
change that to your furnace (i.e. furnacemod.oburnace).
then find
"Blocks.lit_furnace"
make that furnacemod.lit_oburnace (example)
then go into main class, declare lit_oburnace, gamereg here(Or just copy your code make false true):
lit_furnacetut = new blockFurnaceTut(true); //Put TRUE and not false
GameRegistry.registerBlock(lit_furnacetut, "lit_furnacetut");
0
Okay