mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-17 11:15:12 -04:00
use 1.12.2 versions
updating old function names to 1.12.2
This commit is contained in:
parent
142a4e2c07
commit
4dff124cb4
@ -1,19 +1,19 @@
|
|||||||
minecraft.version=1.12.1
|
minecraft.version=1.12.2
|
||||||
minecraft.mappings=snapshot_20170812
|
minecraft.mappings=snapshot_20180213
|
||||||
forge.version=14.22.0.2452
|
forge.version=14.23.2.2616
|
||||||
|
|
||||||
mod.name=OpenComputers
|
mod.name=OpenComputers
|
||||||
mod.group=li.cil.oc
|
mod.group=li.cil.oc
|
||||||
mod.version=1.7.1
|
mod.version=1.7.1
|
||||||
|
|
||||||
ae2.version=rv5-stable-2
|
ae2.version=rv5-stable-4
|
||||||
cc.version=1.80pr1-build0
|
cc.version=1.80pr1-build0
|
||||||
extracells.cf=2500/596
|
extracells.cf=2500/596
|
||||||
extracells.version=api-1.12.2-2.5.3a25
|
extracells.version=api-1.12.2-2.5.3a25
|
||||||
forestry.version=5.5.0.157
|
forestry.version=5.5.0.157
|
||||||
hwyla.version=1.8.20-B35_1.12
|
hwyla.version=1.8.20-B35_1.12
|
||||||
ic2.version=2.8.26-ex112
|
ic2.version=2.8.26-ex112
|
||||||
jei.version=4.7.5.87
|
jei.version=4.8.5.151
|
||||||
mcmp.version=2.2.2_38
|
mcmp.version=2.2.2_38
|
||||||
mekanism.version=1.12.1-9.4.1.326
|
mekanism.version=1.12.1-9.4.1.326
|
||||||
tis3d.version=1.3.0.12
|
tis3d.version=1.3.0.12
|
||||||
|
@ -86,7 +86,7 @@ object ColorHandler {
|
|||||||
|
|
||||||
def register(handler: (ItemStack, Int) => Int, items: Item*): Unit = {
|
def register(handler: (ItemStack, Int) => Int, items: Item*): Unit = {
|
||||||
Minecraft.getMinecraft.getItemColors.registerItemColorHandler(new IItemColor {
|
Minecraft.getMinecraft.getItemColors.registerItemColorHandler(new IItemColor {
|
||||||
override def getColorFromItemstack(stack: ItemStack, tintIndex: Int): Int = handler(stack, tintIndex)
|
override def colorMultiplier(stack: ItemStack, tintIndex: Int): Int = handler(stack, tintIndex)
|
||||||
}, items: _*)
|
}, items: _*)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -142,7 +142,7 @@ class Drone(world: World) extends Entity(world) with MachineHost with internal.D
|
|||||||
|
|
||||||
override def isItemValidForSlot(slot: Int, stack: ItemStack): Boolean = slot >= 0 && slot < getSizeInventory
|
override def isItemValidForSlot(slot: Int, stack: ItemStack): Boolean = slot >= 0 && slot < getSizeInventory
|
||||||
|
|
||||||
override def isUsableByPlayer(player: EntityPlayer): Boolean = player.getDistanceSqToEntity(Drone.this) < 64
|
override def isUsableByPlayer(player: EntityPlayer): Boolean = player.getDistanceSq(Drone.this) < 64
|
||||||
}
|
}
|
||||||
val tank = new MultiTank {
|
val tank = new MultiTank {
|
||||||
override def tankCount: Int = components.components.count {
|
override def tankCount: Int = components.components.count {
|
||||||
|
@ -61,7 +61,7 @@ object DisintegrationProvider extends ScalaProvider("c4e7e3c2-8069-4fbb-b08e-74b
|
|||||||
val event = new PlayerInteractEvent.LeftClickBlock(player, pos.toBlockPos, null, null)
|
val event = new PlayerInteractEvent.LeftClickBlock(player, pos.toBlockPos, null, null)
|
||||||
MinecraftForge.EVENT_BUS.post(event)
|
MinecraftForge.EVENT_BUS.post(event)
|
||||||
val allowed = !event.isCanceled && event.getUseBlock != Event.Result.DENY && event.getUseItem != Event.Result.DENY
|
val allowed = !event.isCanceled && event.getUseBlock != Event.Result.DENY && event.getUseItem != Event.Result.DENY
|
||||||
val adventureOk = !world.getWorldInfo.getGameType.isAdventure || player.canPlayerEdit(pos.toBlockPos, null, player.getHeldItemMainhand)
|
val adventureOk = !world.getWorldInfo.getGameType.hasLimitedInteractions || player.canPlayerEdit(pos.toBlockPos, null, player.getHeldItemMainhand)
|
||||||
if (allowed && adventureOk && !world.isAirBlock(pos)) {
|
if (allowed && adventureOk && !world.isAirBlock(pos)) {
|
||||||
val blockState = world.getBlockState(pos.toBlockPos)
|
val blockState = world.getBlockState(pos.toBlockPos)
|
||||||
val hardness = blockState.getBlock.getPlayerRelativeBlockHardness(world.getBlockState(pos.toBlockPos), player, world, pos.toBlockPos)
|
val hardness = blockState.getBlock.getPlayerRelativeBlockHardness(world.getBlockState(pos.toBlockPos), player, world, pos.toBlockPos)
|
||||||
|
@ -73,7 +73,7 @@ class ModPluginOpenComputers extends IModPlugin {
|
|||||||
)
|
)
|
||||||
|
|
||||||
subtypeRegistry.registerSubtypeInterpreter(Items.get(Constants.ItemName.Floppy).item(), new ISubtypeInterpreter {
|
subtypeRegistry.registerSubtypeInterpreter(Items.get(Constants.ItemName.Floppy).item(), new ISubtypeInterpreter {
|
||||||
override def getSubtypeInfo(stack: ItemStack): String = {
|
override def apply(stack: ItemStack): String = {
|
||||||
if (!stack.hasTagCompound) return null
|
if (!stack.hasTagCompound) return null
|
||||||
val compound: NBTTagCompound = stack.getTagCompound
|
val compound: NBTTagCompound = stack.getTagCompound
|
||||||
val data = new NBTTagCompound
|
val data = new NBTTagCompound
|
||||||
|
@ -61,7 +61,7 @@ class Inventory(playerEntity: EntityPlayer, val agent: internal.Agent) extends I
|
|||||||
|
|
||||||
override def canHarvestBlock(state: IBlockState): Boolean = state.getMaterial.isToolNotRequired || (!getCurrentItem.isEmpty && getCurrentItem.canHarvestBlock(state))
|
override def canHarvestBlock(state: IBlockState): Boolean = state.getMaterial.isToolNotRequired || (!getCurrentItem.isEmpty && getCurrentItem.canHarvestBlock(state))
|
||||||
|
|
||||||
override def getStrVsBlock(state: IBlockState): Float = if (getCurrentItem.isEmpty) 1f else getCurrentItem.getStrVsBlock(state)
|
override def getDestroySpeed(state: IBlockState): Float = if (getCurrentItem.isEmpty) 1f else getCurrentItem.getDestroySpeed(state)
|
||||||
|
|
||||||
override def writeToNBT(nbt: NBTTagList): NBTTagList = nbt
|
override def writeToNBT(nbt: NBTTagList): NBTTagList = nbt
|
||||||
|
|
||||||
|
@ -351,7 +351,7 @@ class Player(val agent: internal.Agent) extends FakePlayer(agent.world.asInstanc
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
if (world.getWorldInfo.getGameType.isAdventure && !canPlayerEdit(pos, side, stack)) {
|
if (world.getWorldInfo.getGameType.hasLimitedInteractions && !canPlayerEdit(pos, side, stack)) {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -308,7 +308,7 @@ trait Agent extends traits.WorldControl with traits.InventoryControl with traits
|
|||||||
player.side.getFrontOffsetZ * range)
|
player.side.getFrontOffsetZ * range)
|
||||||
val hit = world.rayTraceBlocks(origin, target)
|
val hit = world.rayTraceBlocks(origin, target)
|
||||||
player.closestEntity(classOf[Entity]) match {
|
player.closestEntity(classOf[Entity]) match {
|
||||||
case Some(entity@(_: EntityLivingBase | _: EntityMinecart | _: entity.Drone)) if hit == null || new Vec3d(player.posX, player.posY, player.posZ).distanceTo(hit.hitVec) > player.getDistanceToEntity(entity) => new RayTraceResult(entity)
|
case Some(entity@(_: EntityLivingBase | _: EntityMinecart | _: entity.Drone)) if hit == null || new Vec3d(player.posX, player.posY, player.posZ).distanceTo(hit.hitVec) > player.getDistance(entity) => new RayTraceResult(entity)
|
||||||
case _ => hit
|
case _ => hit
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -60,7 +60,7 @@ class UpgradeLeash(val host: Entity) extends AbstractManagedEnvironment with tra
|
|||||||
val bounds = nearBounds.union(farBounds)
|
val bounds = nearBounds.union(farBounds)
|
||||||
entitiesInBounds[EntityLiving](classOf[EntityLiving], bounds).find(_.canBeLeashedTo(fakePlayer)) match {
|
entitiesInBounds[EntityLiving](classOf[EntityLiving], bounds).find(_.canBeLeashedTo(fakePlayer)) match {
|
||||||
case Some(entity) =>
|
case Some(entity) =>
|
||||||
entity.setLeashedToEntity(host, true)
|
entity.setLeashHolder(host, true)
|
||||||
leashedEntities += entity.getUniqueID
|
leashedEntities += entity.getUniqueID
|
||||||
context.pause(0.1)
|
context.pause(0.1)
|
||||||
result(true)
|
result(true)
|
||||||
@ -83,7 +83,7 @@ class UpgradeLeash(val host: Entity) extends AbstractManagedEnvironment with tra
|
|||||||
|
|
||||||
private def unleashAll() {
|
private def unleashAll() {
|
||||||
entitiesInBounds(classOf[EntityLiving], position.bounds.grow(5, 5, 5)).foreach(entity => {
|
entitiesInBounds(classOf[EntityLiving], position.bounds.grow(5, 5, 5)).foreach(entity => {
|
||||||
if (leashedEntities.contains(entity.getUniqueID) && entity.getLeashedToEntity == host) {
|
if (leashedEntities.contains(entity.getUniqueID) && entity.getLeashHolder == host) {
|
||||||
entity.clearLeashed(true, false)
|
entity.clearLeashed(true, false)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -102,7 +102,7 @@ class UpgradeLeash(val host: Entity) extends AbstractManagedEnvironment with tra
|
|||||||
val foundEntities = mutable.Set.empty[UUID]
|
val foundEntities = mutable.Set.empty[UUID]
|
||||||
entitiesInBounds(classOf[EntityLiving], position.bounds.grow(5, 5, 5)).foreach(entity => {
|
entitiesInBounds(classOf[EntityLiving], position.bounds.grow(5, 5, 5)).foreach(entity => {
|
||||||
if (leashedEntities.contains(entity.getUniqueID)) {
|
if (leashedEntities.contains(entity.getUniqueID)) {
|
||||||
entity.setLeashedToEntity(host, true)
|
entity.setLeashHolder(host, true)
|
||||||
foundEntities += entity.getUniqueID
|
foundEntities += entity.getUniqueID
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user