diff --git a/.gitignore b/.gitignore index c53ee16..3df2380 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,8 @@ !gradlew.bat !build.gradle !gradle.properties +!version.json +!updatelog.txt # include markdowns !LICENSE diff --git a/build.gradle b/build.gradle index a2de8c4..063e010 100644 --- a/build.gradle +++ b/build.gradle @@ -18,7 +18,10 @@ buildscript { apply plugin: 'forge' version = mod_version -group= mod_group // http://maven.apache.org/guides/mini/guide-naming-conventions.html +url = mod_url +updateurl = mod_updateurl +updatejson = mod_updatejson +group = mod_group // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = mod_id [compileJava, compileTestJava]*.options*.encoding = 'UTF-8' @@ -60,13 +63,16 @@ processResources // this will ensure that this task is redone when the versions change. inputs.property "version", project.version inputs.property "mcversion", project.minecraft.version + inputs.property "url", project.url + inputs.property "updateurl", project.updateurl + inputs.property "updatejson", project.updatejson // replace stuff in mcmod.info, nothing else from(sourceSets.main.resources.srcDirs) { include 'mcmod.info' // replace version and mcversion - expand 'version':project.version, 'mcversion':project.minecraft.version + expand 'version':project.version, 'mcversion':project.minecraft.version, 'url':project.url, 'updateurl':project.updateurl, 'updatejson':project.updatejson } // copy everything else, thats not the mcmod.info diff --git a/gradle.properties b/gradle.properties index 0cd0270..b59d057 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,10 @@ # Mod Information mod_id = dawncraft -mod_version = B0.12.1 +mod_version = B0.13 mod_group = wdawning +mod_url = https://github.com/Wdawning/Dawn-Craft-Mod +mod_updateurl = https://github.com/Wdawning/Dawn-Craft-Mod/releases +mod_updatejson = https://raw.githubusercontent.com/Wdawning/Dawn-Craft-Mod/master/version.json # Minecraft & Forge minecraft_version = 1.8 diff --git a/src/main/java/com/github/wdawning/dawncraft/LuaTest.java b/src/main/java/com/github/wdawning/dawncraft/LuaTest.java index 32303cc..1d1e305 100644 --- a/src/main/java/com/github/wdawning/dawncraft/LuaTest.java +++ b/src/main/java/com/github/wdawning/dawncraft/LuaTest.java @@ -9,6 +9,7 @@ public class LuaTest { public LuaTest() { + /* ConfigLoader.logger().info("Lua Loader Started."); String script = "assets/dawncraft/lua/hello.lua"; @@ -23,5 +24,6 @@ public LuaTest() chunk.call( LuaValue.valueOf(script) ); ConfigLoader.logger().info("Lua Loader Stopped."); + */ } } diff --git a/src/main/java/com/github/wdawning/dawncraft/block/BlockLoader.java b/src/main/java/com/github/wdawning/dawncraft/block/BlockLoader.java index d58799c..82ff792 100644 --- a/src/main/java/com/github/wdawning/dawncraft/block/BlockLoader.java +++ b/src/main/java/com/github/wdawning/dawncraft/block/BlockLoader.java @@ -4,6 +4,7 @@ import com.github.wdawning.dawncraft.creativetab.CreativeTabsLoader; import net.minecraft.block.Block; +import net.minecraft.block.material.MapColor; import net.minecraft.block.material.Material; import net.minecraft.client.Minecraft; import net.minecraft.client.resources.model.ModelResourceLocation; diff --git a/src/main/java/com/github/wdawning/dawncraft/client/ClientProxy.java b/src/main/java/com/github/wdawning/dawncraft/client/ClientProxy.java index d0c047d..d8c9375 100644 --- a/src/main/java/com/github/wdawning/dawncraft/client/ClientProxy.java +++ b/src/main/java/com/github/wdawning/dawncraft/client/ClientProxy.java @@ -1,12 +1,13 @@ package com.github.wdawning.dawncraft.client; import com.github.wdawning.dawncraft.common.CommonProxy; +import com.github.wdawning.dawncraft.common.GuiEventLoader; +import com.github.wdawning.dawncraft.gui.GuiLoader; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; - public class ClientProxy extends CommonProxy { @Override @@ -23,6 +24,7 @@ public void init(FMLInitializationEvent event) new KeyLoader(); new ItemRenderLoader(); new EntityRenderLoader(); + new GuiEventLoader(); } @Override diff --git a/src/main/java/com/github/wdawning/dawncraft/client/KeyLoader.java b/src/main/java/com/github/wdawning/dawncraft/client/KeyLoader.java index 616a674..3659118 100644 --- a/src/main/java/com/github/wdawning/dawncraft/client/KeyLoader.java +++ b/src/main/java/com/github/wdawning/dawncraft/client/KeyLoader.java @@ -10,14 +10,14 @@ public class KeyLoader { public static KeyBinding aim; - public static KeyBinding showTime; + public static KeyBinding magic; public KeyLoader() { KeyLoader.aim = new KeyBinding("key." + dawncraft.MODID + ".aim", Keyboard.KEY_F, "key.categories." + dawncraft.MODID); - KeyLoader.showTime = new KeyBinding("key." + dawncraft.MODID + ".showTime", Keyboard.KEY_H, "key.categories." + dawncraft.MODID); + KeyLoader.magic = new KeyBinding("key." + dawncraft.MODID + ".magic", Keyboard.KEY_R, "key.categories." + dawncraft.MODID); ClientRegistry.registerKeyBinding(KeyLoader.aim); - ClientRegistry.registerKeyBinding(KeyLoader.showTime); + ClientRegistry.registerKeyBinding(KeyLoader.magic); } } diff --git a/src/main/java/com/github/wdawning/dawncraft/command/CommandLoader.java b/src/main/java/com/github/wdawning/dawncraft/command/CommandLoader.java new file mode 100644 index 0000000..a552698 --- /dev/null +++ b/src/main/java/com/github/wdawning/dawncraft/command/CommandLoader.java @@ -0,0 +1,11 @@ +package com.github.wdawning.dawncraft.command; + +import net.minecraftforge.fml.common.event.FMLServerStartingEvent; + +public class CommandLoader +{ + public CommandLoader(FMLServerStartingEvent event) + { + event.registerServerCommand(new CommandMagic()); + } +} diff --git a/src/main/java/com/github/wdawning/dawncraft/command/CommandMagic.java b/src/main/java/com/github/wdawning/dawncraft/command/CommandMagic.java new file mode 100644 index 0000000..590a1a3 --- /dev/null +++ b/src/main/java/com/github/wdawning/dawncraft/command/CommandMagic.java @@ -0,0 +1,88 @@ +package com.github.wdawning.dawncraft.command; + +import java.util.List; + +import com.github.wdawning.dawncraft.extend.ExtendedPlayer; +import com.github.wdawning.dawncraft.network.MessageMagic; +import com.github.wdawning.dawncraft.network.NetworkLoader; + +import net.minecraft.command.CommandBase; +import net.minecraft.command.CommandException; +import net.minecraft.command.ICommandSender; +import net.minecraft.command.WrongUsageException; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.server.MinecraftServer; +import net.minecraft.util.BlockPos; +import net.minecraft.util.ChatComponentTranslation; +import net.minecraftforge.fml.common.network.simpleimpl.IMessage; + +public class CommandMagic extends CommandBase +{ + @Override + public String getCommandName() + { + return "magic"; + } + + @Override + public String getCommandUsage(ICommandSender sender) { + return "commands.magic.usage"; + } + + @Override + public void processCommand(ICommandSender sender, String[] args) throws CommandException + { + if(args.length > 0) + { + EntityPlayerMP entityPlayerMP = CommandBase.getCommandSenderAsPlayer(sender); + + if(args[0].equals("view")) + { + entityPlayerMP.addChatMessage(new ChatComponentTranslation("commands.magic.view", + ExtendedPlayer.get(entityPlayerMP).getMana())); + } + else if(args[0].equals("set")) + { + int i = parseInt(args[1], 0); + if(i >= 0 && i <= 20) + { + ExtendedPlayer.get(entityPlayerMP).setMana(i); + entityPlayerMP.addChatMessage(new ChatComponentTranslation("commands.magic.set", + ExtendedPlayer.get(entityPlayerMP).getMana())); + + NetworkLoader.instance.sendTo(new MessageMagic(i), entityPlayerMP); + } + else + { + throw new WrongUsageException("commands.magic.usage", new Object[0]); + } + } + else if(args[0].equals("reset")) + { + ExtendedPlayer.get(entityPlayerMP).replenishMana(); + entityPlayerMP.addChatMessage(new ChatComponentTranslation("commands.magic.reset")); + + NetworkLoader.instance.sendTo(new MessageMagic(20), entityPlayerMP); + } + else + { + throw new WrongUsageException("commands.magic.usage", new Object[0]); + } + } + else + { + throw new WrongUsageException("commands.magic.usage", new Object[0]); + } + } + + @Override + public List addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) + { + if (args.length == 1) + { + return getListOfStringsMatchingLastWord(args, new String[] {"view", "set", "reset"}); + } + return null; + } +} diff --git a/src/main/java/com/github/wdawning/dawncraft/common/CommonProxy.java b/src/main/java/com/github/wdawning/dawncraft/common/CommonProxy.java index 349bd4d..b9cf940 100644 --- a/src/main/java/com/github/wdawning/dawncraft/common/CommonProxy.java +++ b/src/main/java/com/github/wdawning/dawncraft/common/CommonProxy.java @@ -2,6 +2,7 @@ import com.github.wdawning.dawncraft.achievement.AchievementLoader; import com.github.wdawning.dawncraft.block.BlockLoader; +import com.github.wdawning.dawncraft.command.CommandLoader; import com.github.wdawning.dawncraft.crafting.CraftingLoader; import com.github.wdawning.dawncraft.creativetab.CreativeTabsLoader; import com.github.wdawning.dawncraft.enchantment.EnchantmentLoader; @@ -10,6 +11,7 @@ import com.github.wdawning.dawncraft.gui.ContainerEleHeatGenerator; import com.github.wdawning.dawncraft.gui.GuiLoader; import com.github.wdawning.dawncraft.item.ItemLoader; +import com.github.wdawning.dawncraft.network.NetworkLoader; import com.github.wdawning.dawncraft.potion.PotionLoader; import com.github.wdawning.dawncraft.tileentity.TileEntityEleHeatGenerator; import com.github.wdawning.dawncraft.tileentity.TileEntityLoader; @@ -18,6 +20,7 @@ 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.event.FMLServerStartingEvent; public class CommonProxy { @@ -32,6 +35,7 @@ public void preInit(FMLPreInitializationEvent event) new PotionLoader(event); new TileEntityLoader(event); new GuiLoader(event); + new NetworkLoader(event); } public void init(FMLInitializationEvent event) @@ -48,4 +52,9 @@ public void postInit(FMLPostInitializationEvent event) { } + + public void serverStarting(FMLServerStartingEvent event) + { + new CommandLoader(event); + } } \ No newline at end of file diff --git a/src/main/java/com/github/wdawning/dawncraft/common/EventLoader.java b/src/main/java/com/github/wdawning/dawncraft/common/EventLoader.java index d917517..ca2ee09 100644 --- a/src/main/java/com/github/wdawning/dawncraft/common/EventLoader.java +++ b/src/main/java/com/github/wdawning/dawncraft/common/EventLoader.java @@ -4,19 +4,25 @@ import com.github.wdawning.dawncraft.client.KeyLoader; import com.github.wdawning.dawncraft.enchantment.EnchantmentLoader; import com.github.wdawning.dawncraft.entity.EntitySavage; -import com.github.wdawning.dawncraft.entity.ExtendedPlayer; +import com.github.wdawning.dawncraft.extend.ExtendedPlayer; import com.github.wdawning.dawncraft.item.ItemLoader; +import com.github.wdawning.dawncraft.network.MessageMagic; +import com.github.wdawning.dawncraft.network.NetworkLoader; import com.github.wdawning.dawncraft.potion.PotionLoader; +import com.github.wdawning.dawncraft.gui.GuiMagicBook; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.EntityPlayerSP; +import net.minecraft.client.gui.GuiScreen; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.FurnaceRecipes; +import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.PotionEffect; import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentTranslation; @@ -24,11 +30,13 @@ import net.minecraft.util.EnumFacing; import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.entity.EntityEvent.EntityConstructing; +import net.minecraftforge.event.entity.EntityEvent; +import net.minecraftforge.event.entity.EntityJoinWorldEvent; import net.minecraftforge.event.entity.living.LivingDeathEvent; import net.minecraftforge.event.entity.living.LivingHurtEvent; import net.minecraftforge.event.entity.player.EntityInteractEvent; import net.minecraftforge.event.entity.player.FillBucketEvent; +import net.minecraftforge.event.entity.player.PlayerEvent; import net.minecraftforge.event.world.BlockEvent; import net.minecraftforge.fluids.BlockFluidBase; import net.minecraftforge.fluids.Fluid; @@ -44,9 +52,7 @@ public class EventLoader { - public static Minecraft mc = Minecraft.getMinecraft(); - public static final float defaultFov = mc.gameSettings.fovSetting; - public static final float fovAmount = 10.0F; + public float defaultFov; //register public EventLoader() @@ -60,37 +66,51 @@ public EventLoader() @SubscribeEvent public void onKeyInput(InputEvent.KeyInputEvent event) { + Minecraft mc = Minecraft.getMinecraft(); + if (KeyLoader.aim.isPressed()) { - if(mc.gameSettings.fovSetting != fovAmount) + if(mc.gameSettings.fovSetting != 10.0F) { - mc.gameSettings.fovSetting = fovAmount; + defaultFov = mc.gameSettings.fovSetting; + mc.gameSettings.fovSetting = 10.0F; } else { mc.gameSettings.fovSetting = defaultFov; } - EntityPlayerSP player = Minecraft.getMinecraft().thePlayer; + EntityPlayerSP player = mc.thePlayer; player.addChatMessage(new ChatComponentTranslation("chat.dawncraft.zoom")); } - if (KeyLoader.showTime.isPressed()) - { - EntityPlayerSP player = Minecraft.getMinecraft().thePlayer; - World world = Minecraft.getMinecraft().theWorld; - player.addChatMessage(new ChatComponentTranslation("chat.dawncraft.time", world.getTotalWorldTime())); + if (KeyLoader.magic.isPressed()) + { + Minecraft.getMinecraft().displayGuiScreen(new GuiMagicBook()); } } @SubscribeEvent - public void onEntityConstructing(EntityConstructing event) + public void onEntityConstructing(EntityEvent.EntityConstructing event) { - if (event.entity instanceof EntityPlayer && ExtendedPlayer.get((EntityPlayer) event.entity) == null) - ExtendedPlayer.register((EntityPlayer) event.entity); - - if (event.entity instanceof EntityPlayer && event.entity.getExtendedProperties(ExtendedPlayer.EXT_PROP_NAME) == null) - event.entity.registerExtendedProperties(ExtendedPlayer.EXT_PROP_NAME, new ExtendedPlayer((EntityPlayer) event.entity)); + if (event.entity instanceof EntityPlayer && ExtendedPlayer.get((EntityPlayer) event.entity) == null) + { + ExtendedPlayer.register((EntityPlayer) event.entity); + } + } + + @SubscribeEvent + public void onEntityJoinWorld(EntityJoinWorldEvent event) + { + if (!event.world.isRemote && event.entity instanceof EntityPlayer) + { + EntityPlayer player = (EntityPlayer) event.entity; + if (ExtendedPlayer.get(player) != null) + { + int amount = ExtendedPlayer.get(player).getMana(); + NetworkLoader.instance.sendTo(new MessageMagic(amount), (EntityPlayerMP) player); + } + } } @SubscribeEvent @@ -188,6 +208,29 @@ public void onLivingDeath(LivingDeathEvent event) { ((EntityPlayer) event.entityLiving).triggerAchievement(AchievementLoader.Ger); } + + + if(!event.entityLiving.worldObj.isRemote && event.entityLiving instanceof EntityPlayer) + { + EntityPlayerMP player = (EntityPlayerMP) event.entityLiving; + if (ExtendedPlayer.get((EntityPlayer) event.entityLiving) != null) + { + int amount = 20; + ExtendedPlayer.get((EntityPlayer) event.entityLiving).setMana(amount); + NetworkLoader.instance.sendTo(new MessageMagic(amount), player); + } + } + } + + @SubscribeEvent + public void onClonePlayer(PlayerEvent.Clone event) + { + if(event.wasDeath) + { + NBTTagCompound compound = new NBTTagCompound(); + ExtendedPlayer.get(event.original).saveNBTData(compound); + ExtendedPlayer.get(event.entityPlayer).loadNBTData(compound); + } } //end diff --git a/src/main/java/com/github/wdawning/dawncraft/common/GuiEventLoader.java b/src/main/java/com/github/wdawning/dawncraft/common/GuiEventLoader.java new file mode 100644 index 0000000..8e84b6c --- /dev/null +++ b/src/main/java/com/github/wdawning/dawncraft/common/GuiEventLoader.java @@ -0,0 +1,124 @@ +package com.github.wdawning.dawncraft.common; + +import java.util.Random; + +import com.github.wdawning.dawncraft.dawncraft; +import com.github.wdawning.dawncraft.extend.ExtendedPlayer; + +import net.minecraft.block.material.Material; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.FontRenderer; +import net.minecraft.client.gui.Gui; +import net.minecraft.client.gui.GuiIngame; +import net.minecraft.entity.SharedMonsterAttributes; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.potion.Potion; +import net.minecraft.util.MathHelper; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.client.GuiIngameForge; +import net.minecraftforge.client.event.RenderGameOverlayEvent; +import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.fml.common.FMLCommonHandler; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; + +public class GuiEventLoader extends Gui +{ + public static final ResourceLocation dIconsTextures = new ResourceLocation(dawncraft.MODID + ":" + "textures/gui/icons.png"); + public static final ResourceLocation mcIconsTextures = new ResourceLocation("textures/gui/icons.png"); + public final Random rand = new Random(); + public Minecraft mc = Minecraft.getMinecraft(); + + //register + public GuiEventLoader() + { + FMLCommonHandler.instance().bus().register(this); + MinecraftForge.EVENT_BUS.register(this); + } + + //event about GUI + @SideOnly(Side.CLIENT) + @SubscribeEvent + public void PreGUIRender(RenderGameOverlayEvent.Pre event) { + if (this.mc.getRenderViewEntity() instanceof EntityPlayer) + { + int air,mana,a,b; + EntityPlayer entityplayer = (EntityPlayer)mc.getRenderViewEntity(); + int width = event.resolution.getScaledWidth(); + int height = event.resolution.getScaledHeight(); + int w1,h1; + + if(mc.playerController.gameIsSurvivalOrAdventure()) + { + this.mc.getTextureManager().bindTexture(dIconsTextures); + mana = ExtendedPlayer.get(entityplayer).getMana(); + w1 = width / 2 + 91; + h1 = height - 39 - 9 - 1; + int ii,i1,i2; + + for (ii = 0; ii < 10; ++ii) + { + i1 = w1 - ii * 8 - 9; + i2 = h1; + + this.drawTexturedModalRect(i1, i2, 0, 9, 9, 9); + + if (ii * 2 + 1 < mana) + { + this.drawTexturedModalRect(i1, i2, 9, 9, 9, 9); + } + + if (ii * 2 + 1 == mana) + { + this.drawTexturedModalRect(i1, i2, 17, 9, 9, 9); + } + } + + this.mc.getTextureManager().bindTexture(mcIconsTextures); + } + + if(event.type == ElementType.AIR) + { + event.setCanceled(true); + w1 = width / 2 + 91; + h1 = height - 39 - 9 - 1 - 9 - 1; + + this.mc.mcProfiler.startSection("air"); + if (entityplayer.isInsideOfMaterial(Material.water)) + { + air = this.mc.thePlayer.getAir(); + + a = MathHelper.ceiling_double_int((double)(air - 2) * 10.0D / 300.0D); + b = MathHelper.ceiling_double_int((double)air * 10.0D / 300.0D) - a; + + for (int i = 0; i < a + b; ++i) + { + if (i < a) + { + this.drawTexturedModalRect(w1 - i * 8 - 9, h1, 16, 18, 9, 9); + } + else + { + this.drawTexturedModalRect(w1 - i * 8 - 9, h1, 25, 18, 9, 9); + } + } + this.mc.mcProfiler.endSection(); + } + } + } + } + + @SideOnly(Side.CLIENT) + @SubscribeEvent + public void TextRender(RenderGameOverlayEvent.Text event) + { + event.left.add(0, String.format("Welcome to play Dawncraft Mod, %s!", Minecraft.getMinecraft().thePlayer.getCommandSenderName())); + event.left.add(1, String.format("Dawncraft Mod's version is %s!", dawncraft.VERSION)); + event.left.add(2, String.format("This word will remove in the future!")); + EntityPlayer entityplayer = (EntityPlayer)mc.getRenderViewEntity(); + int amount = ExtendedPlayer.get(entityplayer).getMana(); + event.left.add(3, String.format("Your Mana is %s!", amount)); + } +} diff --git a/src/main/java/com/github/wdawning/dawncraft/creativetab/CreativeTabsLoader.java b/src/main/java/com/github/wdawning/dawncraft/creativetab/CreativeTabsLoader.java index 944988c..cdab3d9 100644 --- a/src/main/java/com/github/wdawning/dawncraft/creativetab/CreativeTabsLoader.java +++ b/src/main/java/com/github/wdawning/dawncraft/creativetab/CreativeTabsLoader.java @@ -86,7 +86,7 @@ public Item getTabIconItem() @Override public Item getTabIconItem() { - return ItemLoader.cakeEgg; + return ItemLoader.magicBook; } }; tabFlans = new CreativeTabs("Flans") diff --git a/src/main/java/com/github/wdawning/dawncraft/dawncraft.java b/src/main/java/com/github/wdawning/dawncraft/dawncraft.java index 286b82a..5755cc5 100644 --- a/src/main/java/com/github/wdawning/dawncraft/dawncraft.java +++ b/src/main/java/com/github/wdawning/dawncraft/dawncraft.java @@ -9,6 +9,7 @@ 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.event.FMLServerStartingEvent; /** @author QingChenW @@ -47,4 +48,10 @@ public void postInit(FMLPostInitializationEvent event) proxy.postInit(event); new LuaTest(); } + + @EventHandler + public void serverStarting(FMLServerStartingEvent event) + { + proxy.serverStarting(event); + } } \ No newline at end of file diff --git a/src/main/java/com/github/wdawning/dawncraft/entity/ExtendedPlayer.java b/src/main/java/com/github/wdawning/dawncraft/extend/ExtendedPlayer.java similarity index 63% rename from src/main/java/com/github/wdawning/dawncraft/entity/ExtendedPlayer.java rename to src/main/java/com/github/wdawning/dawncraft/extend/ExtendedPlayer.java index ce1a0de..66d377d 100644 --- a/src/main/java/com/github/wdawning/dawncraft/entity/ExtendedPlayer.java +++ b/src/main/java/com/github/wdawning/dawncraft/extend/ExtendedPlayer.java @@ -1,21 +1,28 @@ -package com.github.wdawning.dawncraft.entity; +package com.github.wdawning.dawncraft.extend; + +import com.github.wdawning.dawncraft.dawncraft; import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityTracker; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; +import net.minecraft.world.WorldServer; import net.minecraftforge.common.IExtendedEntityProperties; +import net.minecraftforge.common.util.Constants; public class ExtendedPlayer implements IExtendedEntityProperties { public final static String EXT_PROP_NAME = "ExtendedPlayer"; private final EntityPlayer player; -private float currentMana, maxMana; +private final int maxMana = 20; +private int currentMana; public ExtendedPlayer(EntityPlayer player) { this.player = player; -this.currentMana = this.maxMana = 20; +this.currentMana = this.maxMana; } /** @@ -24,7 +31,7 @@ public ExtendedPlayer(EntityPlayer player) */ public static final void register(EntityPlayer player) { -player.registerExtendedProperties(ExtendedPlayer.EXT_PROP_NAME, new ExtendedPlayer(player)); +player.registerExtendedProperties(EXT_PROP_NAME, new ExtendedPlayer(player)); } /** @@ -41,8 +48,7 @@ public void saveNBTData(NBTTagCompound compound) { NBTTagCompound properties = new NBTTagCompound(); -properties.setFloat("CurrentMana", this.currentMana); -properties.setFloat("MaxMana", this.maxMana); +properties.setInteger("Mana", this.currentMana); compound.setTag(EXT_PROP_NAME, properties); } @@ -50,22 +56,25 @@ public void saveNBTData(NBTTagCompound compound) @Override public void loadNBTData(NBTTagCompound compound) { -NBTTagCompound properties = (NBTTagCompound) compound.getTag(EXT_PROP_NAME); + if(compound.hasKey(EXT_PROP_NAME, Constants.NBT.TAG_COMPOUND)) + { + NBTTagCompound properties = compound.getCompoundTag(EXT_PROP_NAME); -this.currentMana = properties.getFloat("CurrentMana"); -this.maxMana = properties.getFloat("MaxMana"); + this.currentMana = properties.getInteger("Mana"); + } } @Override public void init(Entity entity, World world) { + } /** * Returns true if the amount of mana was consumed or false * if the player's current mana was insufficient */ -public boolean consumeMana(float amount) +public boolean consumeMana(int amount) { boolean flag = this.currentMana >= amount; @@ -77,6 +86,22 @@ public boolean consumeMana(float amount) return flag; } +/** +* Simple method sets mana +*/ +public void setMana(int amount) +{ +if(amount <= 20 && amount >= 0) +{ +this.currentMana = amount; +} +} + +public int getMana() +{ +return this.currentMana; +} + /** * Simple method sets current mana to max mana */ diff --git a/src/main/java/com/github/wdawning/dawncraft/fluid/FluidPetroleum.java b/src/main/java/com/github/wdawning/dawncraft/fluid/FluidPetroleum.java index d17ae7e..fb9d7ef 100644 --- a/src/main/java/com/github/wdawning/dawncraft/fluid/FluidPetroleum.java +++ b/src/main/java/com/github/wdawning/dawncraft/fluid/FluidPetroleum.java @@ -11,7 +11,7 @@ public class FluidPetroleum extends Fluid { public static final ResourceLocation still = new ResourceLocation(dawncraft.MODID + ":" + "fluid/petroleum_still"); public static final ResourceLocation flowing = new ResourceLocation(dawncraft.MODID + ":" + "fluid/petroleum_flow"); - protected static final TextureMap texturemap = Minecraft.getMinecraft().getTextureMapBlocks(); +// protected static final TextureMap texturemap = Minecraft.getMinecraft().getTextureMapBlocks(); public FluidPetroleum() { diff --git a/src/main/java/com/github/wdawning/dawncraft/gui/GuiMagicBook.java b/src/main/java/com/github/wdawning/dawncraft/gui/GuiMagicBook.java new file mode 100644 index 0000000..24c70f6 --- /dev/null +++ b/src/main/java/com/github/wdawning/dawncraft/gui/GuiMagicBook.java @@ -0,0 +1,93 @@ +package com.github.wdawning.dawncraft.gui; + +import java.io.IOException; +import com.github.wdawning.dawncraft.dawncraft; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.renderer.GlStateManager; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.ResourceLocation; + +public class GuiMagicBook extends GuiScreen +{ + private static final ResourceLocation bookGuiTextures = new ResourceLocation(dawncraft.MODID + ":" + "textures/gui/magic_book.png"); + private int updateCount; + private int bookImageWidth = 192; + private int bookImageHeight = 192; +// private final EntityPlayer Player; +// private final ItemStack bookObj; + private GuiButton buttonDone; + + public GuiMagicBook()//EntityPlayer player, ItemStack book) + { +/* this.Player = player; + this.bookObj = book; + + if (book.hasTagCompound()) + { + NBTTagCompound nbttagcompound = book.getTagCompound(); + }*/ + } + + public void updateScreen() + { + super.updateScreen(); + ++this.updateCount; + } + + public void initGui() + { + this.buttonList.clear(); + this.buttonList.add(this.buttonDone = new GuiButton(0, this.width / 2 - 100, 4 + this.bookImageHeight, 200, 20, I18n.format("gui.done", new Object[0]))); + + this.updateButtons(); + } + + public void onGuiClosed() + { + + } + + private void updateButtons() + { + + } + + private void sendBookToServer(boolean publish) throws IOException + { + + } + + protected void actionPerformed(GuiButton button) throws IOException + { + if (button.enabled) + { + if (button.id == 0) + { + this.mc.displayGuiScreen((GuiScreen)null); + this.sendBookToServer(false); + } + this.updateButtons(); + } + } + + public void drawScreen(int mouseX, int mouseY, float partialTicks) + { + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); + this.mc.getTextureManager().bindTexture(bookGuiTextures); + int k = (this.width - this.bookImageWidth) / 2; + byte b0 = 2; + this.drawTexturedModalRect(k, b0, 0, 0, this.bookImageWidth, this.bookImageHeight); + this.fontRendererObj.drawString("gui.magic.future", this.width / 2, this.height / 2, 4210752); + + super.drawScreen(mouseX, mouseY, partialTicks); + } + + protected void mouseClicked(int mouseX, int mouseY, int mouseButton) throws IOException + { + + } +} diff --git a/src/main/java/com/github/wdawning/dawncraft/item/ItemLoader.java b/src/main/java/com/github/wdawning/dawncraft/item/ItemLoader.java index f8532c6..a5d0c09 100644 --- a/src/main/java/com/github/wdawning/dawncraft/item/ItemLoader.java +++ b/src/main/java/com/github/wdawning/dawncraft/item/ItemLoader.java @@ -7,6 +7,7 @@ import net.minecraft.client.resources.model.ModelResourceLocation; import net.minecraft.item.Item; import net.minecraft.item.ItemArmor; +import net.minecraft.item.ItemBook; import net.minecraft.item.ItemFood; import net.minecraft.item.ItemPotion; import net.minecraft.item.ItemSword; @@ -31,6 +32,7 @@ public class ItemLoader public static Item proCPU = new ItemComputerCPU.ProCPU(); public static Item superCPU = new ItemComputerCPU.SuperCPU(); + public static Item magicBook = new ItemBook().setUnlocalizedName("magicBook").setCreativeTab(CreativeTabsLoader.tabMagic); public static Item metalEssence = new Item().setUnlocalizedName("metalEssence").setCreativeTab(CreativeTabsLoader.tabMagic); public static Item woodEssence = new Item().setUnlocalizedName("woodEssence").setCreativeTab(CreativeTabsLoader.tabMagic); public static Item waterEssence = new Item().setUnlocalizedName("waterEssence").setCreativeTab(CreativeTabsLoader.tabMagic); @@ -81,6 +83,7 @@ public ItemLoader(FMLPreInitializationEvent event) register(proCPU, "pro_CPU"); register(superCPU, "super_CPU"); + register(magicBook, "magic_book"); register(metalEssence, "metal_essence"); register(woodEssence, "wood_essence"); register(waterEssence, "water_essence"); @@ -128,6 +131,7 @@ public static void registerRenders() registerRender(proCPU, "pro_CPU"); registerRender(superCPU, "super_CPU"); + registerRender(magicBook, "magic_book"); registerRender(metalEssence, "metal_essence"); registerRender(woodEssence, "wood_essence"); registerRender(waterEssence, "water_essence"); diff --git a/src/main/java/com/github/wdawning/dawncraft/magic/Magic.java b/src/main/java/com/github/wdawning/dawncraft/magic/Magic.java index f2275cd..af4e390 100644 --- a/src/main/java/com/github/wdawning/dawncraft/magic/Magic.java +++ b/src/main/java/com/github/wdawning/dawncraft/magic/Magic.java @@ -1,7 +1,7 @@ package com.github.wdawning.dawncraft.magic; import com.github.wdawning.dawncraft.dawncraft; -import com.github.wdawning.dawncraft.entity.ExtendedPlayer; +import com.github.wdawning.dawncraft.extend.ExtendedPlayer; import com.github.wdawning.dawncraft.potion.PotionLoader; import net.minecraft.entity.EntityLivingBase; @@ -14,14 +14,14 @@ public class Magic { public static final Magic[] magicTypes = new Magic[64]; - public static final Magic attack = new Magic(0, 4.5F).setMagicName("magic.attack.name"); - public static final Magic heal = new Magic(1, 4.0F).setMagicName("magic.heal.name"); + public static final Magic attack = new Magic(0, 4).setMagicName("magic.attack.name"); + public static final Magic heal = new Magic(1, 4).setMagicName("magic.heal.name"); public final int id; - public final float mana; + public final int mana; public static String name = ""; - public Magic(int magicID, float magicMANA) + public Magic(int magicID, int magicMANA) { this.id = magicID; this.mana = magicMANA; @@ -33,7 +33,7 @@ public int getId() return this.id; } - public float getMANA() + public int getMANA() { return this.mana; } diff --git a/src/main/java/com/github/wdawning/dawncraft/magic/MagicSkill.java b/src/main/java/com/github/wdawning/dawncraft/magic/MagicSkill.java index 1acac6c..95b670c 100644 --- a/src/main/java/com/github/wdawning/dawncraft/magic/MagicSkill.java +++ b/src/main/java/com/github/wdawning/dawncraft/magic/MagicSkill.java @@ -6,7 +6,7 @@ import java.util.Map; import com.github.wdawning.dawncraft.creativetab.CreativeTabsLoader; -import com.github.wdawning.dawncraft.entity.ExtendedPlayer; +import com.github.wdawning.dawncraft.extend.ExtendedPlayer; import com.google.common.collect.Lists; import com.google.common.collect.Maps; diff --git a/src/main/java/com/github/wdawning/dawncraft/network/MessageMagic.java b/src/main/java/com/github/wdawning/dawncraft/network/MessageMagic.java new file mode 100644 index 0000000..abbc780 --- /dev/null +++ b/src/main/java/com/github/wdawning/dawncraft/network/MessageMagic.java @@ -0,0 +1,70 @@ +package com.github.wdawning.dawncraft.network; + +import com.github.wdawning.dawncraft.extend.ExtendedPlayer; + +import io.netty.buffer.ByteBuf; +import net.minecraft.client.Minecraft; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.IThreadListener; +import net.minecraft.world.WorldServer; +import net.minecraftforge.fml.common.network.ByteBufUtils; +import net.minecraftforge.fml.common.network.simpleimpl.IMessage; +import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; +import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; + +public class MessageMagic implements IMessage{ + + public MessageMagic(){} + + //private NBTTagCompound data; + public int mana; + + public MessageMagic(int amount) + { + this.mana = amount; + } + + @Override + public void fromBytes(ByteBuf buf) { + //mana = ByteBufUtils.readVarInt(buf, 20); + mana = buf.readInt(); + //mana = buf.getInt(0); + } + + @Override + public void toBytes(ByteBuf buf) { + //ByteBufUtils.writeVarInt(buf, mana, 20); + buf.writeInt(mana); + //buf.setInt(0, mana) + } + + public static class MessageHandler implements IMessageHandler + { + @SideOnly(Side.CLIENT) + @Override + public IMessage onMessage(final MessageMagic message, MessageContext ctx) + { + if (ctx.side == Side.CLIENT) + { + final EntityPlayer player = Minecraft.getMinecraft().thePlayer; + + Minecraft.getMinecraft().addScheduledTask(new Runnable() + { + @Override + public void run() + { + int mana = message.mana; + ExtendedPlayer.get(player).setMana(mana); + } + }); + } + return null; + } + } +} diff --git a/src/main/java/com/github/wdawning/dawncraft/network/NetworkLoader.java b/src/main/java/com/github/wdawning/dawncraft/network/NetworkLoader.java new file mode 100644 index 0000000..81546f8 --- /dev/null +++ b/src/main/java/com/github/wdawning/dawncraft/network/NetworkLoader.java @@ -0,0 +1,28 @@ +package com.github.wdawning.dawncraft.network; + +import com.github.wdawning.dawncraft.dawncraft; + +import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; +import net.minecraftforge.fml.common.network.NetworkRegistry; +import net.minecraftforge.fml.common.network.simpleimpl.IMessage; +import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; +import net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper; +import net.minecraftforge.fml.relauncher.Side; + +public class NetworkLoader +{ + public static SimpleNetworkWrapper instance = NetworkRegistry.INSTANCE.newSimpleChannel(dawncraft.MODID); + + private static int nextID = 0; + + public NetworkLoader(FMLPreInitializationEvent event) + { + registerMessage(MessageMagic.MessageHandler.class, MessageMagic.class, Side.CLIENT); + } + + private static void registerMessage( + Class> messageHandler, Class requestMessageType, Side side) + { + instance.registerMessage(messageHandler, requestMessageType, nextID++, side); + } +} diff --git a/src/main/resources/assets/dawncraft/lang/zh_CN.lang b/src/main/resources/assets/dawncraft/lang/zh_CN.lang index 6bb42f6..940e2a0 100644 --- a/src/main/resources/assets/dawncraft/lang/zh_CN.lang +++ b/src/main/resources/assets/dawncraft/lang/zh_CN.lang @@ -59,7 +59,12 @@ item.magnetChestplate.name=磁石胸甲 item.magnetLeggings.name=磁石护腿 item.magnetBoots.name=磁石靴子 - +item.metalEssence.name=金之精华 +item.woodEssence.name=草本精华 +item.waterEssence.name=水之精华 +item.fireEssence.name=火焰精华 +item.dirtEssence.name=土之精华 +item.magicBook.name=神奇魔法书 item.faeces.name=§6屎 item.gerHeart.name=§7巨Ger之心 @@ -88,6 +93,8 @@ magic.heal.name=治疗术 container.eleHeatGenerator=热能发电机 container.MachineEleFurnace=电炉 +gui.magic.future=魔法系统尚未开启,敬请期待! + achievement.dawncraft.Ger=你Ger啊 achievement.dawncraft.Ger.desc=被Ger王Ger死 @@ -95,11 +102,16 @@ death.attack.byGer=%s Ger死了 key.categories.dawncraft=曙光工艺 key.dawncraft.aim=瞄准镜 -key.dawncraft.showTime=显示时间 +key.dawncraft.magic=魔法书 chat.dawncraft.nope=[§6曙光工艺§r] 抱歉,你不能这么做。 chat.dawncraft.future=[§6曙光工艺§r] 功能尚未开放,敬请期待。 chat.dawncraft.zoom=[§6曙光工艺§r] §c警告:§r放大目前为测试功能,可能存在Bug,并且请在退出存档前关闭放大模式。 chat.dawncraft.time=[§6曙光工艺§r] 现在时间为:%s chat.entity.GerKing.say1=[§6曙光工艺§r] Ger王降临,天下吴Ger -chat.entity.GerKing.say2=[§6曙光工艺§r] Ger王:我一定会回来的! \ No newline at end of file +chat.entity.GerKing.say2=[§6曙光工艺§r] Ger王:我一定会回来的! + +commands.magic.usage=/magic <值> 查看或设置或重置玩家魔法(测试用) +commands.magic.view=当前玩家魔法值为 %1$s. +commands.magic.set=已成功设置玩家魔法值,魔法值为 %1$s. +commands.magic.reset=已成功重置玩家魔法值为 20. \ No newline at end of file diff --git a/src/main/resources/assets/dawncraft/models/item/dirt_essence.json b/src/main/resources/assets/dawncraft/models/item/dirt_essence.json new file mode 100644 index 0000000..079fe10 --- /dev/null +++ b/src/main/resources/assets/dawncraft/models/item/dirt_essence.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "dawncraft:items/dirt_essence" + }, + "display": { + "thirdperson": { + "rotation": [ 0, 90, -35 ], + "translation": [ 0, 1.25, -3.5 ], + "scale": [ 0.85, 0.85, 0.85 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/dawncraft/models/item/fire_essence.json b/src/main/resources/assets/dawncraft/models/item/fire_essence.json new file mode 100644 index 0000000..1215627 --- /dev/null +++ b/src/main/resources/assets/dawncraft/models/item/fire_essence.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "dawncraft:items/fire_essence" + }, + "display": { + "thirdperson": { + "rotation": [ 0, 90, -35 ], + "translation": [ 0, 1.25, -3.5 ], + "scale": [ 0.85, 0.85, 0.85 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/dawncraft/models/item/magic_book.json b/src/main/resources/assets/dawncraft/models/item/magic_book.json new file mode 100644 index 0000000..a1ec792 --- /dev/null +++ b/src/main/resources/assets/dawncraft/models/item/magic_book.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "dawncraft:items/magic_book" + }, + "display": { + "thirdperson": { + "rotation": [ 0, 90, -35 ], + "translation": [ 0, 1.25, -3.5 ], + "scale": [ 0.85, 0.85, 0.85 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/dawncraft/models/item/metal_essence.json b/src/main/resources/assets/dawncraft/models/item/metal_essence.json new file mode 100644 index 0000000..42d3763 --- /dev/null +++ b/src/main/resources/assets/dawncraft/models/item/metal_essence.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "dawncraft:items/metal_essence" + }, + "display": { + "thirdperson": { + "rotation": [ 0, 90, -35 ], + "translation": [ 0, 1.25, -3.5 ], + "scale": [ 0.85, 0.85, 0.85 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/dawncraft/models/item/water_essence.json b/src/main/resources/assets/dawncraft/models/item/water_essence.json new file mode 100644 index 0000000..23fce5a --- /dev/null +++ b/src/main/resources/assets/dawncraft/models/item/water_essence.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "dawncraft:items/water_essence" + }, + "display": { + "thirdperson": { + "rotation": [ 0, 90, -35 ], + "translation": [ 0, 1.25, -3.5 ], + "scale": [ 0.85, 0.85, 0.85 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/dawncraft/models/item/wood_essence.json b/src/main/resources/assets/dawncraft/models/item/wood_essence.json new file mode 100644 index 0000000..7e96ca9 --- /dev/null +++ b/src/main/resources/assets/dawncraft/models/item/wood_essence.json @@ -0,0 +1,18 @@ +{ + "parent": "builtin/generated", + "textures": { + "layer0": "dawncraft:items/wood_essence" + }, + "display": { + "thirdperson": { + "rotation": [ 0, 90, -35 ], + "translation": [ 0, 1.25, -3.5 ], + "scale": [ 0.85, 0.85, 0.85 ] + }, + "firstperson": { + "rotation": [ 0, -135, 25 ], + "translation": [ 0, 4, 2 ], + "scale": [ 1.7, 1.7, 1.7 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/dawncraft/textures/gui/computer.png b/src/main/resources/assets/dawncraft/textures/gui/computer.png new file mode 100644 index 0000000..a7fd8be Binary files /dev/null and b/src/main/resources/assets/dawncraft/textures/gui/computer.png differ diff --git a/src/main/resources/assets/dawncraft/textures/gui/icons.png b/src/main/resources/assets/dawncraft/textures/gui/icons.png new file mode 100644 index 0000000..4209344 Binary files /dev/null and b/src/main/resources/assets/dawncraft/textures/gui/icons.png differ diff --git a/src/main/resources/assets/dawncraft/textures/gui/magic_book.png b/src/main/resources/assets/dawncraft/textures/gui/magic_book.png new file mode 100644 index 0000000..3e4ba4e Binary files /dev/null and b/src/main/resources/assets/dawncraft/textures/gui/magic_book.png differ diff --git a/src/main/resources/assets/dawncraft/textures/items/magic_book.png b/src/main/resources/assets/dawncraft/textures/items/magic_book.png new file mode 100644 index 0000000..59d51e5 Binary files /dev/null and b/src/main/resources/assets/dawncraft/textures/items/magic_book.png differ diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info index 1f978eb..15d2e9a 100644 --- a/src/main/resources/mcmod.info +++ b/src/main/resources/mcmod.info @@ -2,13 +2,14 @@ { "modid": "dawncraft", "name": "Dawn Craft Mod", - "description": "A Minecraft mod by WDawning Studio.", + "description": "A Minecraft mod by Wdawning Studio.", "version": "${version}", "mcversion": "${mcversion}", - "url": "https://github.com/Wdawning/Dawn-Craft-Mod", - "updateUrl": "https://github.com/Wdawning/Dawn-Craft-Mod", - "authorList": ["DawningW","QingChenW(Wc)"], - "credits": "Made by Wdawning Studio.", + "url": "${url}", + "updateUrl": "${updateurl}", + "updateJSON": "${updatejson}", + "authorList": ["QingChenW(Wc)"], + "credits": "Thank Mojang,MCP and Forge.", "logoFile": "assets/dawncraft/textures/wdawning_logo.png", "screenshots": [], "dependencies": [] diff --git a/updatelog.txt b/updatelog.txt new file mode 100644 index 0000000..e69de29 diff --git a/version.json b/version.json new file mode 100644 index 0000000..6e3a01e --- /dev/null +++ b/version.json @@ -0,0 +1,10 @@ +{ + "homepage": "https://github.com/Wdawning/Dawn-Craft-Mod/releases", + "1.8": { + "B0.13": "Look at github page please." + }, + "promos": { + "1.8-latest": "B0.13", + "1.8-recommended": "B0.12" + } +} \ No newline at end of file