mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-26 14:52:58 +00:00
Glow Panels render in item form, use getEffectiveSide() instead of isRemote when checking packet security
This commit is contained in:
1 parent
64f60150df
commit
c002ac6d8a
67 files changed
+394
-169
No files matched your search
@@ -0,0 +1,76 @@
|
||||
package mekanism.client.render.ctm;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
|
||||
/**
|
||||
* Chisel Face, basically a list of IChiselTexture's
|
||||
*/
|
||||
public final class CTMFace {
|
||||
|
||||
private List<TextureCTM> textureList;
|
||||
|
||||
private List<CTMFace> childFaces;
|
||||
|
||||
private EnumWorldBlockLayer layer;
|
||||
|
||||
public CTMFace() {
|
||||
this(new ArrayList<>(), new ArrayList<>());
|
||||
}
|
||||
|
||||
public CTMFace(EnumWorldBlockLayer layer) {
|
||||
this();
|
||||
setLayer(layer);
|
||||
}
|
||||
|
||||
public CTMFace(List<TextureCTM> textureList, List<CTMFace> childFaces) {
|
||||
this.textureList = textureList;
|
||||
this.childFaces = childFaces;
|
||||
}
|
||||
|
||||
public List<TextureCTM> getTextureList(){
|
||||
List<TextureCTM> list = new ArrayList<>();
|
||||
list.addAll(this.textureList);
|
||||
for (CTMFace face : childFaces){
|
||||
list.addAll(face.getTextureList());
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public void addTexture(TextureCTM texture){
|
||||
this.textureList.add(texture);
|
||||
}
|
||||
|
||||
public void addChildFace(CTMFace face){
|
||||
this.childFaces.add(face);
|
||||
}
|
||||
|
||||
public boolean removeTexture(TextureCTM texture){
|
||||
return this.textureList.remove(texture);
|
||||
}
|
||||
|
||||
public boolean removeChildFace(CTMFace face){
|
||||
return this.childFaces.remove(face);
|
||||
}
|
||||
|
||||
public TextureAtlasSprite getParticle(){
|
||||
if (textureList.get(0) != null) {
|
||||
return textureList.get(0).getParticle();
|
||||
}
|
||||
else {
|
||||
return childFaces.get(0).getParticle();
|
||||
}
|
||||
}
|
||||
|
||||
public void setLayer(EnumWorldBlockLayer layer){
|
||||
this.layer = layer;
|
||||
}
|
||||
|
||||
public EnumWorldBlockLayer getLayer(){
|
||||
return this.layer;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user