Skip to content

Commit

Permalink
Merge pull request #52 from UselessBullets/DeprecationRemoval
Browse files Browse the repository at this point in the history
added addition setTexture methods
  • Loading branch information
UselessBullets authored Feb 17, 2024
2 parents 70c58a3 + 5ff4afe commit 82d3a63
Showing 1 changed file with 70 additions and 9 deletions.
79 changes: 70 additions & 9 deletions src/main/java/turniplabs/halplibe/helper/BlockBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,12 @@ public final BlockBuilder addTags(Tag<Block>... tags) {

@SuppressWarnings({"unused"})
public BlockBuilder setTextures(String texture) {
int[] one = TextureHelper.getOrCreateBlockTexture(MOD_ID, texture);
return setTextures(MOD_ID, texture);
}

@SuppressWarnings({"unused"})
public BlockBuilder setTextures(String modID, String texture) {
int[] one = TextureHelper.getOrCreateBlockTexture(modID, texture);

BlockBuilder blockBuilder = this.clone();
blockBuilder.topTexture = one;
Expand All @@ -329,9 +334,15 @@ public BlockBuilder setTextures(int x, int y) {

return blockBuilder;
}

@SuppressWarnings({"unused"})
public BlockBuilder setSideTextures(String texture) {
int[] sides = TextureHelper.getOrCreateBlockTexture(MOD_ID, texture);
return setSideTextures(MOD_ID, texture);
}

@SuppressWarnings({"unused"})
public BlockBuilder setSideTextures(String modID, String texture) {
int[] sides = TextureHelper.getOrCreateBlockTexture(modID, texture);

BlockBuilder blockBuilder = this.clone();
blockBuilder.northTexture = sides;
Expand All @@ -341,6 +352,7 @@ public BlockBuilder setSideTextures(String texture) {

return blockBuilder;
}

@SuppressWarnings({"unused"})
public BlockBuilder setSideTextures(int x, int y) {
int[] sides = new int[]{x, y};
Expand All @@ -353,16 +365,23 @@ public BlockBuilder setSideTextures(int x, int y) {

return blockBuilder;
}

@SuppressWarnings({"unused"})
public BlockBuilder setTopBottomTexture(String texture) {
int[] topBottom = TextureHelper.getOrCreateBlockTexture(MOD_ID, texture);
return setTopBottomTexture(MOD_ID, texture);
}

@SuppressWarnings({"unused"})
public BlockBuilder setTopBottomTexture(String modID, String texture) {
int[] topBottom = TextureHelper.getOrCreateBlockTexture(modID, texture);

BlockBuilder blockBuilder = this.clone();
blockBuilder.topTexture = topBottom;
blockBuilder.bottomTexture = topBottom;

return blockBuilder;
}

@SuppressWarnings({"unused"})
public BlockBuilder setTopBottomTexture(int x, int y) {
int[] topBottom = new int[]{x, y};
Expand All @@ -373,72 +392,114 @@ public BlockBuilder setTopBottomTexture(int x, int y) {

return blockBuilder;
}

@SuppressWarnings({"unused"})
public BlockBuilder setTopTexture(String texture) {
return setTopTexture(MOD_ID, texture);
}

@SuppressWarnings({"unused"})
public BlockBuilder setTopTexture(String modID, String texture) {
BlockBuilder blockBuilder = this.clone();
blockBuilder.topTexture = TextureHelper.getOrCreateBlockTexture(MOD_ID, texture);
blockBuilder.topTexture = TextureHelper.getOrCreateBlockTexture(modID, texture);
return blockBuilder;
}

@SuppressWarnings({"unused"})
public BlockBuilder setTopTexture(int x, int y) {
BlockBuilder blockBuilder = this.clone();
blockBuilder.topTexture = new int[]{x, y};
return blockBuilder;
}

@SuppressWarnings({"unused"})
public BlockBuilder setBottomTexture(String texture) {
return setBottomTexture(MOD_ID, texture);
}

@SuppressWarnings({"unused"})
public BlockBuilder setBottomTexture(String modID, String texture) {
BlockBuilder blockBuilder = this.clone();
blockBuilder.bottomTexture = TextureHelper.getOrCreateBlockTexture(MOD_ID, texture);
blockBuilder.bottomTexture = TextureHelper.getOrCreateBlockTexture(modID, texture);
return blockBuilder;
}

@SuppressWarnings({"unused"})
public BlockBuilder setBottomTexture(int x, int y) {
BlockBuilder blockBuilder = this.clone();
blockBuilder.bottomTexture = new int[]{x, y};
return blockBuilder;
}

@SuppressWarnings({"unused"})
public BlockBuilder setNorthTexture(String texture) {
return setNorthTexture(MOD_ID, texture);
}

@SuppressWarnings({"unused"})
public BlockBuilder setNorthTexture(String modID, String texture) {
BlockBuilder blockBuilder = this.clone();
blockBuilder.northTexture = TextureHelper.getOrCreateBlockTexture(MOD_ID, texture);
blockBuilder.northTexture = TextureHelper.getOrCreateBlockTexture(modID, texture);
return blockBuilder;
}

@SuppressWarnings({"unused"})
public BlockBuilder setNorthTexture(int x, int y) {
BlockBuilder blockBuilder = this.clone();
blockBuilder.northTexture = new int[]{x, y};
return blockBuilder;
}

@SuppressWarnings({"unused"})
public BlockBuilder setEastTexture(String texture) {
return setEastTexture(MOD_ID, texture);
}

@SuppressWarnings({"unused"})
public BlockBuilder setEastTexture(String modID, String texture) {
BlockBuilder blockBuilder = this.clone();
blockBuilder.eastTexture = TextureHelper.getOrCreateBlockTexture(MOD_ID, texture);
blockBuilder.eastTexture = TextureHelper.getOrCreateBlockTexture(modID, texture);
return blockBuilder;
}

@SuppressWarnings({"unused"})
public BlockBuilder setEastTexture(int x, int y) {
BlockBuilder blockBuilder = this.clone();
blockBuilder.eastTexture = new int[]{x, y};
return blockBuilder;
}

@SuppressWarnings({"unused"})
public BlockBuilder setSouthTexture(String texture) {
return setSouthTexture(MOD_ID, texture);
}

@SuppressWarnings({"unused"})
public BlockBuilder setSouthTexture(String modID, String texture) {
BlockBuilder blockBuilder = this.clone();
blockBuilder.southTexture = TextureHelper.getOrCreateBlockTexture(MOD_ID, texture);
blockBuilder.southTexture = TextureHelper.getOrCreateBlockTexture(modID, texture);
return blockBuilder;
}

@SuppressWarnings({"unused"})
public BlockBuilder setSouthTexture(int x, int y) {
BlockBuilder blockBuilder = this.clone();
blockBuilder.southTexture = new int[]{x, y};
return blockBuilder;
}

@SuppressWarnings({"unused"})
public BlockBuilder setWestTexture(String texture) {
return setWestTexture(MOD_ID, texture);
}

@SuppressWarnings({"unused"})
public BlockBuilder setWestTexture(String modID, String texture) {
BlockBuilder blockBuilder = this.clone();
blockBuilder.westTexture = TextureHelper.getOrCreateBlockTexture(MOD_ID, texture);
blockBuilder.westTexture = TextureHelper.getOrCreateBlockTexture(modID, texture);
return blockBuilder;
}

@SuppressWarnings({"unused"})
public BlockBuilder setWestTexture(int x, int y) {
BlockBuilder blockBuilder = this.clone();
Expand Down

0 comments on commit 82d3a63

Please sign in to comment.