Skip to content
This repository has been archived by the owner on Jun 12, 2018. It is now read-only.

Commit

Permalink
added example scala mod
Browse files Browse the repository at this point in the history
Signed-off-by: Anthony Anderson <[email protected]>
  • Loading branch information
0xilly committed Jun 20, 2017
1 parent 598cc9d commit 5071e43
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 2 deletions.
23 changes: 23 additions & 0 deletions example/io/github/illyohs/scorg/example/ExampleClientProxy.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* Anthony Anderson (Illyohs)
* Copyright (c) 2017.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation version 2.1
* of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package io.github.illyohs.scorg.example

class ExampleClientProxy extends ExampleServerProxy {

}
45 changes: 45 additions & 0 deletions example/io/github/illyohs/scorg/example/ExampleScalaMod.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* Anthony Anderson (Illyohs)
* Copyright (c) 2017.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation version 2.1
* of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package io.github.illyohs.scorg.example

@Mod(name = "ExampleScalaMod", modid = "examplescalamod", version = "1.0.0", modLanguageAdapter = "io.github.illyohs.scorg.ScalaAdapter")
//This must be an object block
object ExampleScalaMod {

@Instance("examplescalamod")
var instance = this

@SidedProxy(modId = "examplescalamod", serverSide = "io.github.illyohs.scorg.example.ExampleServerProxy", clientSide = "io.github.illyohs.scorg.example.ExampleServerProxy")
var proxy:ExampleServerProxy = null

@EventHandler
def preInit(event:FMLPreInitializationEvent): Unit = {

}

@EventHandler
def init(event:FMLInitializationEvent): Unit = {

}

@EventHandler
def postInit(event:FMLPostInitializationEvent): Unit = {

}
}
23 changes: 23 additions & 0 deletions example/io/github/illyohs/scorg/example/ExampleServerProxy.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* Anthony Anderson (Illyohs)
* Copyright (c) 2017.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation version 2.1
* of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package io.github.illyohs.scorg.example

class ExampleServerProxy {

}
2 changes: 0 additions & 2 deletions src/main/scala/io/github/illyohs/scorg/ScalaAdapter.scala
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/


package io.github.illyohs.scorg

import java.lang.reflect.{Field, Method}
Expand Down

0 comments on commit 5071e43

Please sign in to comment.