Fix lighting problem with custom spout blocks
This commit is contained in:
parent
5329577d85
commit
f37048915a
1 changed files with 3 additions and 1 deletions
|
|
@ -14,6 +14,7 @@ import java.util.List;
|
||||||
|
|
||||||
import javax.imageio.ImageIO;
|
import javax.imageio.ImageIO;
|
||||||
|
|
||||||
|
import org.bukkit.Material;
|
||||||
import org.dynmap.Log;
|
import org.dynmap.Log;
|
||||||
import org.getspout.spoutapi.block.design.BlockDesign;
|
import org.getspout.spoutapi.block.design.BlockDesign;
|
||||||
import org.getspout.spoutapi.block.design.GenericBlockDesign;
|
import org.getspout.spoutapi.block.design.GenericBlockDesign;
|
||||||
|
|
@ -73,6 +74,7 @@ public class SpoutPluginBlocks {
|
||||||
for(CustomBlock b : cb) {
|
for(CustomBlock b : cb) {
|
||||||
BlockDesign bd = b.getBlockDesign();
|
BlockDesign bd = b.getBlockDesign();
|
||||||
String blkid = bd.getTexturePlugin() + "." + b.getName();
|
String blkid = bd.getTexturePlugin() + "." + b.getName();
|
||||||
|
blkid = blkid.replace(' ', '_');
|
||||||
/* If not GenericCubiodBlockDesign, we don't handle it */
|
/* If not GenericCubiodBlockDesign, we don't handle it */
|
||||||
if((bd instanceof GenericCuboidBlockDesign) == false) {
|
if((bd instanceof GenericCuboidBlockDesign) == false) {
|
||||||
Log.info("Block " + blkid + " not suppored - only cubiod blocks");
|
Log.info("Block " + blkid + " not suppored - only cubiod blocks");
|
||||||
|
|
@ -166,7 +168,7 @@ public class SpoutPluginBlocks {
|
||||||
blks.add(b);
|
blks.add(b);
|
||||||
|
|
||||||
sb.append("block:id=" + b.getCustomId() + ",data=*,bottom=" + txtidx[0] + ",west=" +txtidx[1] + ",south=" + txtidx[2] + ",east=" + txtidx[3] + ",north="+txtidx[4]+",top="+txtidx[5]);
|
sb.append("block:id=" + b.getCustomId() + ",data=*,bottom=" + txtidx[0] + ",west=" +txtidx[1] + ",south=" + txtidx[2] + ",east=" + txtidx[3] + ",north="+txtidx[4]+",top="+txtidx[5]);
|
||||||
if(b.isOpaque() == false)
|
if(b.getBlockId() == Material.GLASS.getId())
|
||||||
sb.append(",transparency=TRANSPARENT");
|
sb.append(",transparency=TRANSPARENT");
|
||||||
sb.append(",txtid=" + txfileid + "\n");
|
sb.append(",txtid=" + txfileid + "\n");
|
||||||
cnt++;
|
cnt++;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue