Skip to content

Commit

Permalink
Fix strange crash
Browse files Browse the repository at this point in the history
  • Loading branch information
voidsong-dragonfly committed Sep 26, 2021
1 parent a8d66cc commit 6720f01
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import groovy.json.JsonOutput

def mainVersion = "1.8"
def buildNumber = "37"
def buildNumber = "38"

// For those who want the bleeding edge
buildscript {
Expand Down
4 changes: 2 additions & 2 deletions changelog.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"1.10.2-recommended": "1.4-18",
"1.11.2-latest": "1.5-19",
"1.11.2-recommended": "1.5-19",
"1.12.2-latest": "1.7-36",
"1.12.2-recommended": "1.7-36"
"1.12.2-latest": "1.7-35",
"1.12.2-recommended": "1.7-35"
},
"1.10.2": {
"1.1-3": " - fixed incompatibility with IE build 48\n - reduced the amount of calls to core IE classes to make such incompatibilities less likely\n - fixed localization of the creative tab",
Expand Down
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
###Minecraft 1.12.2

####Version 1.7-35
- Fixed a crash with rendering _something_ in JEI in specific circumstances. Dunno what, but it sure did happen

####Version 1.7-36
- Added an RGB indicator light, controlled by 3 (independent) RS signals
- Fixed a bug allowing for unfinished control panels to be duplicated
Expand Down
12 changes: 7 additions & 5 deletions src/main/java/malte0811/industrialwires/client/ClientProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -481,14 +481,16 @@ public boolean isValidTextureSource(ItemStack stack) {
null, null);
TextureAtlasSprite sprite = texModel.getParticleTexture();
//noinspection ConstantConditions
if (sprite == null || sprite.hasAnimationMetadata()) {
if (sprite == null || sprite.hasAnimationMetadata() || sprite.getFrameTextureData(0) == null) {
return false;
}
int[][] data = sprite.getFrameTextureData(0);
for (int x = 0; x < data.length; x++) {
for (int y = 0; y < data[x].length; y++) {
if ((data[x][y] >>> 24) != 255) {
return false;
for (int[] datum : data) {
if (datum != null ) {
for (int i : datum) {
if ((i >>> 24) != 255) {
return false;
}
}
}
}
Expand Down

0 comments on commit 6720f01

Please sign in to comment.