make most textures non-translucent

This commit is contained in:
Sen 2025-07-25 11:40:17 +02:00
parent 95948c7602
commit 1f149583d5
Signed by: sen
GPG key ID: 3AC50A6F47D1B722
49 changed files with 22 additions and 79 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 203 B

After

Width:  |  Height:  |  Size: 4.7 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 B

After

Width:  |  Height:  |  Size: 4.5 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 206 B

After

Width:  |  Height:  |  Size: 5 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 B

After

Width:  |  Height:  |  Size: 4.6 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 205 B

After

Width:  |  Height:  |  Size: 4.8 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 B

After

Width:  |  Height:  |  Size: 4.5 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 205 B

After

Width:  |  Height:  |  Size: 4.9 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 B

After

Width:  |  Height:  |  Size: 4.6 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 203 B

After

Width:  |  Height:  |  Size: 4.8 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 B

After

Width:  |  Height:  |  Size: 4.5 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 204 B

After

Width:  |  Height:  |  Size: 4.9 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 B

After

Width:  |  Height:  |  Size: 4.6 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 150 B

After

Width:  |  Height:  |  Size: 4.6 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 204 B

After

Width:  |  Height:  |  Size: 4.9 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 B

After

Width:  |  Height:  |  Size: 4.6 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 206 B

After

Width:  |  Height:  |  Size: 5 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 B

After

Width:  |  Height:  |  Size: 4.6 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 206 B

After

Width:  |  Height:  |  Size: 5 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 B

After

Width:  |  Height:  |  Size: 4.6 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 206 B

After

Width:  |  Height:  |  Size: 4.9 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 B

After

Width:  |  Height:  |  Size: 4.6 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 206 B

After

Width:  |  Height:  |  Size: 4.9 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 B

After

Width:  |  Height:  |  Size: 4.6 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 206 B

After

Width:  |  Height:  |  Size: 4.9 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 B

After

Width:  |  Height:  |  Size: 4.6 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 204 B

After

Width:  |  Height:  |  Size: 4.9 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 B

After

Width:  |  Height:  |  Size: 4.5 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 202 B

After

Width:  |  Height:  |  Size: 4.8 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 B

After

Width:  |  Height:  |  Size: 4.5 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 787 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 322 B

After

Width:  |  Height:  |  Size: 4.7 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 205 B

After

Width:  |  Height:  |  Size: 4.9 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 B

After

Width:  |  Height:  |  Size: 4.6 KiB

Before After
Before After

View file

@ -1,27 +0,0 @@
package common.block;
import common.model.BlockLayer;
import common.util.BlockPos;
import common.util.Facing;
import common.world.IWorldAccess;
import common.world.State;
public class BlockTranslucent extends Block {
public BlockTranslucent(Material material) {
super(material);
}
public final boolean isOpaqueCube() {
return false;
}
public final BlockLayer getRenderLayer() {
return BlockLayer.TRANSLUCENT;
}
public boolean canRender(IWorldAccess world, BlockPos pos, Facing side) {
State state = world.getState(pos);
Block block = state.getBlock();
return block != this && super.canRender(world, pos, side);
}
}

View file

@ -7,7 +7,6 @@ import common.block.Material;
import common.block.natural.BlockFire;
import common.entity.Entity;
import common.init.Blocks;
import common.model.BlockLayer;
import common.model.Model;
import common.model.ModelProvider;
import common.properties.Property;
@ -111,10 +110,6 @@ public class BlockPortal extends Block
return false;
}
public BlockLayer getRenderLayer() {
return BlockLayer.TRANSLUCENT;
}
public boolean tryIgnitePortal(World worldIn, BlockPos pos)
{
BlockPortal.Size size = new BlockPortal.Size(worldIn, pos, Facing.Axis.X, this);

View file

@ -1,10 +1,6 @@
package common.block.artificial;
import common.color.DyeColor;
import common.model.BlockLayer;
import common.model.Model;
import common.model.ModelProvider;
import common.world.State;
public class BlockStainedGlass extends BlockGlass {
public static final BlockStainedGlass[] GLASS = new BlockStainedGlass[DyeColor.values().length];
@ -23,12 +19,4 @@ public class BlockStainedGlass extends BlockGlass {
public DyeColor getColor() {
return this.color;
}
public BlockLayer getRenderLayer() {
return BlockLayer.TRANSLUCENT;
}
public Model getModel(ModelProvider provider, String name, State state) {
return provider.getModel(this.color.getName() + "_glass").add().all();
}
}

View file

@ -3,7 +3,6 @@ package common.block.artificial;
import common.block.Material;
import common.color.DyeColor;
import common.item.CheatTab;
import common.model.BlockLayer;
import common.properties.Property;
public class BlockStainedGlassPane extends BlockPane
@ -29,11 +28,6 @@ public class BlockStainedGlassPane extends BlockPane
return this.color;
}
public BlockLayer getRenderLayer()
{
return BlockLayer.TRANSLUCENT;
}
protected Property[] getProperties()
{
return new Property[] {NORTH, EAST, WEST, SOUTH};

View file

@ -1,21 +1,24 @@
package common.block.natural;
import common.block.BlockTranslucent;
import common.block.Block;
import common.block.Material;
import common.enchantment.EnchantmentHelper;
import common.entity.npc.EntityNPC;
import common.init.Blocks;
import common.item.CheatTab;
import common.model.BlockLayer;
import common.rng.Random;
import common.tileentity.TileEntity;
import common.util.BlockPos;
import common.util.Facing;
import common.vars.Vars;
import common.world.LightType;
import common.world.State;
import common.world.World;
import common.world.AWorldServer;
import common.world.IWorldAccess;
public class BlockIce extends BlockTranslucent {
public class BlockIce extends Block {
public BlockIce() {
super(Material.TRANSLUCENT);
this.setSlipperiness(0.98F);
@ -23,6 +26,20 @@ public class BlockIce extends BlockTranslucent {
this.setTab(CheatTab.NATURE);
}
public boolean isOpaqueCube() {
return false;
}
public BlockLayer getRenderLayer() {
return BlockLayer.CUTOUT;
}
public boolean canRender(IWorldAccess world, BlockPos pos, Facing side) {
State state = world.getState(pos);
Block block = state.getBlock();
return block != this && super.canRender(world, pos, side);
}
public void postBroken(World world, EntityNPC player, BlockPos pos, State state, TileEntity tile) {
if(this.canSilkHarvest() && EnchantmentHelper.getSilkTouchModifier(player)) {
super.postBroken(world, player, pos, state, tile);

View file

@ -1,36 +1,16 @@
package common.block.natural;
import common.block.BlockTranslucent;
import common.block.Block;
import common.block.Material;
import common.entity.Entity;
import common.item.CheatTab;
import common.model.Model;
import common.model.ModelProvider;
import common.util.BlockPos;
import common.world.State;
import common.world.World;
public class BlockSlime extends BlockTranslucent {
private static final Model slime = ModelProvider.getModelProvider().getModel("slime")
.add(0, 0, 0, 16, 16, 16)
.d().uv(0, 0, 16, 16).noCull()
.u().uv(0, 0, 16, 16).noCull()
.n().uv(0, 0, 16, 16).noCull()
.s().uv(0, 0, 16, 16).noCull()
.w().uv(0, 0, 16, 16).noCull()
.e().uv(0, 0, 16, 16).noCull()
.add(3, 3, 3, 13, 13, 13)
.d().uv(3, 3, 13, 13).noCull()
.u().uv(3, 3, 13, 13).noCull()
.n().uv(3, 3, 13, 13).noCull()
.s().uv(3, 3, 13, 13).noCull()
.w().uv(3, 3, 13, 13).noCull()
.e().uv(3, 3, 13, 13).noCull()
;
public class BlockSlime extends Block {
public BlockSlime() {
super(Material.LOOSE);
this.setTab(CheatTab.TECHNOLOGY);
this.setTab(CheatTab.NATURE);
this.setSlipperiness(0.8F);
}
@ -56,8 +36,4 @@ public class BlockSlime extends BlockTranslucent {
}
super.onCollideMove(world, pos, entity);
}
public Model getModel(ModelProvider provider, String name, State state) {
return slime;
}
}