Minecraft(我的世界)中文论坛

标题: Day's 水桶插件开发教程 第一章 准备工作&序言

作者: whatafcukday    时间: 2015-4-30 21:18
标题: Day's 水桶插件开发教程 第一章 准备工作&序言
Days 水桶插件开发教程第一章 准备工作AND序言
讲的不好欢迎指正
很多人想知道,写插件,要具备什么条件?
1.精力,时间,坚持不懈的精神。 (开发插件是一项又耗费时间又耗费精力的事情,数小时的编写后 数小时的调试经常烦躁的让人想骂街,要做好心理准备,没有毅力的....)
2.会看英文! / 较高的语言组织能力! MC是外国游戏这点你没法否认。
3.对计算机有较大的兴趣,插件代码经常数百行 数千行的都有,一看到就烦的你怎么学?
4.不!要!一!整!天!坐!在!电!脑!前!写!代!码! 不然你会后悔的!
要是你具备了这些条件 那好我们开始第一步:
了解JAVA:
JAVA,是一种可以撰写跨平台应用软件的面向对象的程序设计语言,以人认识世界的方式来设计编程的方式。
编写mc插件需要一定的java基础 java基础不好的童鞋请先去
这里给一些术语解释: (引用 +倒霉の忍者+ 教程的一部分!谢谢!


:JAVA程序的基本组成成分,基于面向对象思想,一些具有相同特点的事物被抽象化成一个类;
比如宝马有速度,有价格,有名称..等等属性,奔驰也有....,我们把他们归为car类
对象(实例):从类中具体化(实例化)的具有该类特点的某一个事物;
比如,车,设定他速度是xxx 名称xxx 价格xxx 让这些属性具体化,演变成一个实例
句柄(引用,指针):你不能直接操作对象,因此你需要一个句柄来确定是哪个对象并操作。
构造器:一般需要调用构造器才能实例化出一个对象;
成员变量(属性):事物具有的特点被储存在属性里,可以被一个类所拥有,也可以被每一个单独对象所拥有
函数(方法):你与事物之间的交互用方法来完成;
静态:属于类,也就是所有对象共同拥有的部分被称为静态成员。
非静态:属于每一个单独对象的部分被称为非静态成员(这个成员可能名称相同但内容不同)。


序言结束。
准备工作:
安装Eclipse
什么是Eclipse?
Java IDE的一种 (集成开发环境,内附各种功能,简化了编译调试的过程)
下载地址: http://www.eclipse.org/downloads/
下载安装第一个便可。
汉化: 打开eclipse->help->Install new Software->add
后弹出框框第一栏随意,在第二个输入栏输入
http://archive.eclipse.org/technology/babel/update-site/R0.12.0/luna/
加载完毕后弹出语言列表,找到Chinese(Simplified) 打钩->Next
然后加载ing,弹出什么鬼全部点OK,next即可
(看不懂自个网上找教程去!)

作业:
了解并学习java基础
安装并汉化eclipse


作者: Mr.tang    时间: 2015-4-30 22:49
写得不错,这个作业也留得不错
作者: whatafcukday    时间: 2015-4-30 22:56
Mr.tang 发表于 2015-4-30 22:49
写得不错,这个作业也留得不错

谢谢
作者: fujinyang    时间: 2015-4-30 23:11
期待第二章
作者: whatafcukday    时间: 2015-4-30 23:13
fujinyang 发表于 2015-4-30 23:11
期待第二章

已经发了!论坛这个审核机制真是蛋疼。。。
索引贴经常更新很难弄。。
http://www.mcbbs.net/thread-439936-1-1.html
作者: q1272686154    时间: 2015-5-1 02:15
233 不错哦,lz继续加油~
作者: mingtfarc    时间: 2015-5-1 09:36
lz,eclipse最好别汉化,我的汉化了之后刚开10秒就没法输入代码了 点什么都没反应{:10_503:}
作者: whatafcukday    时间: 2015-5-1 09:37
mingtfarc 发表于 2015-5-1 09:36
lz,eclipse最好别汉化,我的汉化了之后刚开10秒就没法输入代码了 点什么都没反应 ...

不知道。。我的非常正常啊?
作者: mingtfarc    时间: 2015-5-1 10:19
whatafcukday 发表于 2015-5-1 09:37
不知道。。我的非常正常啊?

win7都有这个问题 而且有的时候点导入导出就不好使
作者: zero28    时间: 2015-5-1 11:37
请问楼主面向的是有编程基础的人呢还是没有编程基础的人呢
作者: whatafcukday    时间: 2015-5-1 13:53
zero28 发表于 2015-5-1 11:37
请问楼主面向的是有编程基础的人呢还是没有编程基础的人呢

面向有编程基础的,但是这个基础要求的不是特别高,循环和if 字符串之类的会就可以了 主要是了解机制
作者: whatafcukday    时间: 2015-5-2 16:10
连人都没有吗? 果断让我失去了更新的动力啊。。
作者: gaogao22    时间: 2015-5-17 17:40
whatafcukday 发表于 2015-5-2 16:10
连人都没有吗? 果断让我失去了更新的动力啊。。

汉化后没法新建Java项目了

作者: whatafcukday    时间: 2015-5-17 18:39
gaogao22 发表于 2015-5-17 17:40
汉化后没法新建Java项目了

。。是么,那就别汉化咯
作者: 可可可可可乐    时间: 2015-7-18 11:24
本帖最后由 可可可可可乐 于 2015-7-18 11:26 编辑

哦 sorry 看错了 是捐助

作者: wsd81377    时间: 2015-7-18 12:57
哎呦不错哦
作者: 可可可可可乐    时间: 2015-7-18 16:23
汉化以后打不开了
作者: shy1194944283    时间: 2015-7-28 19:25
那么NetBeans怎么弄。
作者: shy1194944283    时间: 2015-7-28 19:28
那么NetBeans怎么弄。
作者: whatafcukday    时间: 2015-7-30 08:53
shy1194944283 发表于 2015-7-28 19:25
那么NetBeans怎么弄。

自己动手丰衣足食   一样的过程 界面换了而已
作者: pig2014    时间: 2015-8-2 17:25
mingtfarc 发表于 2015-5-1 09:36
lz,eclipse最好别汉化,我的汉化了之后刚开10秒就没法输入代码了 点什么都没反应 ...

嗯嗯
  1. !SESSION 2015-08-02 17:03:18.875 -----------------------------------------------
  2. eclipse.buildId=4.5.0.I20150603-2000
  3. java.version=1.8.0_40
  4. java.vendor=Oracle Corporation
  5. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=zh_CN
  6. Framework arguments:  -product org.eclipse.epp.package.jee.product
  7. Command-line arguments:  -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.jee.product

  8. !ENTRY org.eclipse.egit.ui 2 0 2015-08-02 17:08:52.406
  9. !MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git
  10. user global configuration and to define the default location to store repositories: 'C:\Documents and Settings\Administrator'. If this is
  11. not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and
  12. EGit might behave differently since they see different configuration options.
  13. This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
  14. !SESSION 2015-08-02 17:17:22.921 -----------------------------------------------
  15. eclipse.buildId=4.5.0.I20150603-2000
  16. java.version=1.8.0_40
  17. java.vendor=Oracle Corporation
  18. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=zh_CN
  19. Framework arguments:  -product org.eclipse.epp.package.jee.product -product org.eclipse.epp.package.jee.product
  20. Command-line arguments:  -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.jee.product -data file:/F:/eclipse/ -product org.eclipse.epp.package.jee.product

  21. !ENTRY org.eclipse.osgi 4 0 2015-08-02 17:17:59.593
  22. !MESSAGE 应用程序错误
  23. !STACK 1
  24. java.lang.LinkageError: loader constraint violation: when resolving method "org.eclipse.e4.ui.bindings.internal.BindingTable.addBinding(Lorg/eclipse/jface/bindings/Binding;)V" the class loader (instance of org/eclipse/osgi/internal/loader/EquinoxClassLoader) of the current class, org/eclipse/e4/ui/workbench/swt/util/BindingProcessingAddon, and the class loader (instance of org/eclipse/osgi/internal/loader/EquinoxClassLoader) for the method's defining class, org/eclipse/e4/ui/bindings/internal/BindingTable, have different Class objects for the type org/eclipse/jface/bindings/Binding used in the signature
  25.         at org.eclipse.e4.ui.workbench.swt.util.BindingProcessingAddon.defineBinding(BindingProcessingAddon.java:192)
  26.         at org.eclipse.e4.ui.workbench.swt.util.BindingProcessingAddon.defineBindingTable(BindingProcessingAddon.java:176)
  27.         at org.eclipse.e4.ui.workbench.swt.util.BindingProcessingAddon.defineBindingTables(BindingProcessingAddon.java:154)
  28.         at org.eclipse.e4.ui.workbench.swt.util.BindingProcessingAddon.init(BindingProcessingAddon.java:102)
  29.         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  30.         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  31.         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  32.         at java.lang.reflect.Method.invoke(Unknown Source)
  33.         at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
  34.         at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:898)
  35.         at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:121)
  36.         at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:345)
  37.         at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:278)
  38.         at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:186)
  39.         at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:107)
  40.         at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:73)
  41.         at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:50)
  42.         at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createE4Workbench(E4Application.java:283)
  43.         at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:620)
  44.         at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
  45.         at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:598)
  46.         at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
  47.         at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:139)
  48.         at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
  49.         at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
  50.         at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
  51.         at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
  52.         at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
  53.         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  54.         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  55.         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  56.         at java.lang.reflect.Method.invoke(Unknown Source)
  57.         at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
  58.         at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
  59.         at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
  60. !SESSION 2015-08-02 17:18:54.390 -----------------------------------------------
  61. eclipse.buildId=4.5.0.I20150603-2000
  62. java.version=1.8.0_40
  63. java.vendor=Oracle Corporation
  64. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=zh_CN
  65. Framework arguments:  -product org.eclipse.epp.package.jee.product
  66. Command-line arguments:  -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.jee.product

  67. !ENTRY org.eclipse.osgi 4 0 2015-08-02 17:18:59.296
  68. !MESSAGE 应用程序错误
  69. !STACK 1
  70. java.lang.LinkageError: loader constraint violation: when resolving method "org.eclipse.e4.ui.bindings.internal.BindingTable.addBinding(Lorg/eclipse/jface/bindings/Binding;)V" the class loader (instance of org/eclipse/osgi/internal/loader/EquinoxClassLoader) of the current class, org/eclipse/e4/ui/workbench/swt/util/BindingProcessingAddon, and the class loader (instance of org/eclipse/osgi/internal/loader/EquinoxClassLoader) for the method's defining class, org/eclipse/e4/ui/bindings/internal/BindingTable, have different Class objects for the type org/eclipse/jface/bindings/Binding used in the signature
  71.         at org.eclipse.e4.ui.workbench.swt.util.BindingProcessingAddon.defineBinding(BindingProcessingAddon.java:192)
  72.         at org.eclipse.e4.ui.workbench.swt.util.BindingProcessingAddon.defineBindingTable(BindingProcessingAddon.java:176)
  73.         at org.eclipse.e4.ui.workbench.swt.util.BindingProcessingAddon.defineBindingTables(BindingProcessingAddon.java:154)
  74.         at org.eclipse.e4.ui.workbench.swt.util.BindingProcessingAddon.init(BindingProcessingAddon.java:102)
  75.         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  76.         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  77.         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  78.         at java.lang.reflect.Method.invoke(Unknown Source)
  79.         at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
  80.         at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:898)
  81.         at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:121)
  82.         at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:345)
  83.         at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:278)
  84.         at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:186)
  85.         at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:107)
  86.         at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:73)
  87.         at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:50)
  88.         at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createE4Workbench(E4Application.java:283)
  89.         at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:620)
  90.         at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
  91.         at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:598)
  92.         at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
  93.         at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:139)
  94.         at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
  95.         at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
  96.         at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
  97.         at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
  98.         at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
  99.         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  100.         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  101.         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  102.         at java.lang.reflect.Method.invoke(Unknown Source)
  103.         at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
  104.         at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
  105.         at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
复制代码

2333..
谁告诉我该怎么做?@ whatafcukday



作者: yanjiaqin    时间: 2016-1-11 21:11
楼主,可以给个java基础网址么(其实楼主大大亲自教我也好哦~QQ:2364728692
作者: 川龙族泽哥    时间: 2016-2-6 18:34
好深奥的说
作者: 1315453150    时间: 2016-10-3 11:53
妈的,那个软件要钱买
作者: INKDRRAK    时间: 2017-8-8 19:38
1315453150 发表于 2016-10-3 11:53
妈的,那个软件要钱买

不用,那个是捐助,意思就是爱给不给
等一会就会弹出下载窗口的