mirror of
https://github.com/GTNewHorizons/ForgeMultipart.git
synced 2026-11-28 07:56:11 +00:00
Added buttons
Moved cuboid render function to CCC-Public Fixed a redstone transmission bug Added Tick Scheduler
This commit is contained in:
1 parent
283a723e38
commit
38adcdbee1
19 files changed
+561
-162
No files matched your search
@@ -20,10 +20,11 @@ import cpw.mods.fml.common.TickType
|
||||
import scala.collection.JavaConverters._
|
||||
import java.util.List
|
||||
import net.minecraft.entity.player.EntityPlayerMP
|
||||
import net.minecraftforge.event.EventPriority
|
||||
|
||||
object MultipartEventHandler extends IConnectionHandler with ITickHandler
|
||||
{
|
||||
@ForgeSubscribe
|
||||
@ForgeSubscribe(priority = EventPriority.HIGHEST)
|
||||
def tileEntityLoad(event:ChunkDataEvent.Load)
|
||||
{
|
||||
MultipartSaveLoad.loadTiles(event.getChunk())
|
||||
@@ -67,8 +68,11 @@ object MultipartEventHandler extends IConnectionHandler with ITickHandler
|
||||
def tickStart(tickType:EnumSet[TickType], data:Object*){}
|
||||
def tickEnd(tickType:EnumSet[TickType], data:Object*)
|
||||
{
|
||||
MultipartSPH.onTickEnd(
|
||||
MinecraftServer.getServer.getConfigurationManager.playerEntityList
|
||||
.asInstanceOf[List[EntityPlayerMP]].asScala)
|
||||
if(tickType.contains(TickType.SERVER))
|
||||
{
|
||||
MultipartSPH.onTickEnd(
|
||||
MinecraftServer.getServer.getConfigurationManager.playerEntityList
|
||||
.asInstanceOf[List[EntityPlayerMP]].asScala)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -25,6 +25,8 @@ import cpw.mods.fml.common.registry.TickRegistry
|
||||
import net.minecraft.block.Block
|
||||
import net.minecraft.world.ChunkCoordIntPair
|
||||
import codechicken.core.vec.BlockCoord
|
||||
import codechicken.core.world.WorldExtensionManager
|
||||
import codechicken.multipart.TickScheduler
|
||||
|
||||
class MultipartProxy_serverImpl
|
||||
{
|
||||
@@ -48,6 +50,8 @@ class MultipartProxy_serverImpl
|
||||
PacketCustom.assignHandler(MultipartSPH.channel, MultipartSPH)
|
||||
NetworkRegistry.instance.registerConnectionHandler(MultipartEventHandler)
|
||||
TickRegistry.registerTickHandler(MultipartEventHandler, Side.SERVER)
|
||||
|
||||
WorldExtensionManager.registerWorldExtension(TickScheduler)
|
||||
}
|
||||
|
||||
def getFreeBlockID(preferred:Int):Int =
|
||||
|
||||
Reference in new issue
Block a user