Moved to RebornCore

This commit is contained in:
modmuss50 2015-11-08 12:15:45 +00:00
parent 50a830a101
commit 8abf6e5282
313 changed files with 3987 additions and 16508 deletions

View file

@ -11,6 +11,7 @@ import net.minecraft.client.resources.IResourceManager;
import net.minecraft.client.resources.data.AnimationMetadataSection;
import net.minecraft.util.IIcon;
import net.minecraft.util.ResourceLocation;
import reborncore.client.texture.ConnectedTexture;
import techreborn.lib.ModInfo;
import javax.imageio.ImageIO;
@ -42,17 +43,17 @@ public class CasingConnectedTextureGenerator extends TextureAtlasSprite {
for (int i = 0; i < type_data.length; i += 1) {
int x = (i % w);
int y = (i - x) / w;
if(getAlpha(edge_data[i]) != 0){
if(y <= 1 && connectedTexture.isUp()){
if (getAlpha(edge_data[i]) != 0) {
if (y <= 1 && connectedTexture.isUp()) {
new_data[i] = edge_data[i];
}
if(y >= 14 && connectedTexture.isDown()){
if (y >= 14 && connectedTexture.isDown()) {
new_data[i] = edge_data[i];
}
if(x <= 1 && connectedTexture.isRight()){
if (x <= 1 && connectedTexture.isRight()) {
new_data[i] = edge_data[i];
}
if(x >= 14 && connectedTexture.isLeft()){
if (x >= 14 && connectedTexture.isLeft()) {
new_data[i] = edge_data[i];
}
}
@ -109,7 +110,7 @@ public class CasingConnectedTextureGenerator extends TextureAtlasSprite {
output_image = new BufferedImage(w, h, 2);
int[] type_data = new int[w * w];
int[] edge_data = new int[w * w];
for (int y = 0; y < h; y += w) {
type_image[0].getRGB(0, y, w, w, type_data, 0, w);
edge_image[0].getRGB(0, y, w, w, edge_data, 0, w);

View file

@ -1,47 +0,0 @@
package techreborn.client.texture;
public class ConnectedTexture {
private boolean up, down, left, right;
public ConnectedTexture(boolean up, boolean down, boolean left, boolean right) {
this.up = up;
this.down = down;
this.left = left;
this.right = right;
}
public boolean isUp() {
return up;
}
public void setUp(boolean up) {
this.up = up;
}
public boolean isDown() {
return down;
}
public void setDown(boolean down) {
this.down = down;
}
public boolean isLeft() {
return left;
}
public void setLeft(boolean left) {
this.left = left;
}
public boolean isRight() {
return right;
}
public void setRight(boolean right) {
this.right = right;
}
}

View file

@ -9,6 +9,7 @@ import net.minecraft.client.resources.IResourceManager;
import net.minecraft.client.resources.data.AnimationMetadataSection;
import net.minecraft.util.IIcon;
import net.minecraft.util.ResourceLocation;
import reborncore.client.texture.ConnectedTexture;
import techreborn.lib.ModInfo;
import javax.imageio.ImageIO;
@ -45,17 +46,17 @@ public class LesuConnectedTextureGenerator extends TextureAtlasSprite {
for (int i = 0; i < type_data.length; i += 1) {
int x = (i % w);
int y = (i - x) / w;
if(getAlpha(edge_data[i]) != 0){
if(y <= 1 && connectedTexture.isUp()){
if (getAlpha(edge_data[i]) != 0) {
if (y <= 1 && connectedTexture.isUp()) {
new_data[i] = edge_data[i];
}
if(y >= 14 && connectedTexture.isDown()){
if (y >= 14 && connectedTexture.isDown()) {
new_data[i] = edge_data[i];
}
if(x <= 1 && connectedTexture.isRight()){
if (x <= 1 && connectedTexture.isRight()) {
new_data[i] = edge_data[i];
}
if(x >= 14 && connectedTexture.isLeft()){
if (x >= 14 && connectedTexture.isLeft()) {
new_data[i] = edge_data[i];
}
}
@ -112,7 +113,7 @@ public class LesuConnectedTextureGenerator extends TextureAtlasSprite {
output_image = new BufferedImage(w, h, 2);
int[] type_data = new int[w * w];
int[] edge_data = new int[w * w];
for (int y = 0; y < h; y += w) {
try {
type_image[0].getRGB(0, y, w, w, type_data, 0, w);