mirror of
https://github.com/GTNewHorizons/BetterP2P.git
synced 2026-11-13 16:54:12 +00:00
Add null stack check (#37)
This commit is contained in:
1 parent
da46182412
commit
383ed2bfc2
7 files changed
+12
-11
No files matched your search
@@ -29,3 +29,4 @@ src/main/resources/mixins.*.json
|
||||
*.bat
|
||||
*.DS_Store
|
||||
!gradlew.bat
|
||||
layout.json
|
||||
+5
-5
@@ -1,13 +1,13 @@
|
||||
// Add your dependencies here
|
||||
|
||||
dependencies {
|
||||
api('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-652-GTNH:dev')
|
||||
api('com.github.GTNewHorizons:Forgelin:1.10.0-GTNH')
|
||||
api('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-688-GTNH:dev')
|
||||
api('com.github.GTNewHorizons:Forgelin:2.0.3-GTNH')
|
||||
api('com.github.GTNewHorizons:BuildCraft:7.1.44:dev')
|
||||
// Some optional P2P tunnel support
|
||||
compileOnly('net.industrial-craft:industrialcraft-2:2.2.828-experimental:api')
|
||||
devOnlyNonPublishable('com.github.GTNewHorizons:OpenComputers:1.11.16-GTNH:dev') {transitive = false}
|
||||
devOnlyNonPublishable('com.github.GTNewHorizons:OpenComputers:1.11.19-GTNH:dev') {transitive = false}
|
||||
compileOnly('pneumaticCraft:PneumaticCraft-1.7.10:1.12.7-152:api') {transitive = false}
|
||||
api('com.github.GTNewHorizons:AE2FluidCraft-Rework:1.4.99-gtnh:dev') {transitive = false}
|
||||
api('com.github.GTNewHorizons:Baubles-Expanded:2.1.9-GTNH:api')
|
||||
api('com.github.GTNewHorizons:AE2FluidCraft-Rework:1.4.114-gtnh:dev') {transitive = false}
|
||||
api('com.github.GTNewHorizons:Baubles-Expanded:2.1.15-GTNH:api')
|
||||
}
|
||||
+2
-2
@@ -14,7 +14,7 @@ modId = betterp2p
|
||||
modGroup = com.projecturanus.betterp2p
|
||||
|
||||
# Whether to use modGroup as the maven publishing group.
|
||||
# Due to a history of using JitPack, the default is com.github.GTNewHorizons for all mods.
|
||||
# When false, com.github.GTNewHorizons is used.
|
||||
useModGroupForPublishing = false
|
||||
|
||||
# Updates your build.gradle and settings.gradle automatically whenever an update is available.
|
||||
@@ -151,7 +151,7 @@ modrinthProjectId =
|
||||
# type can be one of [project, version],
|
||||
# and the name is the Modrinth project or version slug/id of the other mod.
|
||||
# Example: required-project:fplib;optional-project:gasstation;incompatible-project:gregtech
|
||||
# Note: GTNH Mixins is automatically set as a required dependency if usesMixins = true
|
||||
# Note: UniMixins is automatically set as a required dependency if usesMixins = true.
|
||||
modrinthRelations =
|
||||
|
||||
# Publishing to CurseForge requires you to set the CURSEFORGE_TOKEN environment variable to one of your CurseForge API tokens.
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ pluginManagement {
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.26'
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.43'
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.projecturanus.betterp2p.client.gui.widget
|
||||
|
||||
enum class GuiScale(inline val size: (Int) -> Int, val minHeight: Int, val unlocalizedName: String) {
|
||||
enum class GuiScale(val size: (Int) -> Int, val minHeight: Int, val unlocalizedName: String) {
|
||||
SMALL({ 4 }, 0, "gui.advanced_memory_card.gui_scale.small"),
|
||||
NORMAL({ 6 }, 326, "gui.advanced_memory_card.gui_scale.normal"),
|
||||
LARGE({ 8 }, 409, "gui.advanced_memory_card.gui_scale.large"),
|
||||
|
||||
@@ -30,7 +30,7 @@ class ServerUpdateInfoHandler : IMessageHandler<C2SUpdateMemoryInfo, IMessage?>
|
||||
val player = ctx.serverHandler.playerEntity
|
||||
val stack = player.heldItem
|
||||
|
||||
if (stack.item is ItemAdvancedMemoryCard) {
|
||||
if (stack != null && stack.item is ItemAdvancedMemoryCard) {
|
||||
ItemAdvancedMemoryCard.writeInfo(stack, message.info)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user