Native controller fullbright. #1860
@@ -8,6 +8,7 @@ import com.raoulvdberge.refinedstorage.block.info.BlockInfoBuilder;
|
|||||||
import com.raoulvdberge.refinedstorage.item.itemblock.ItemBlockController;
|
import com.raoulvdberge.refinedstorage.item.itemblock.ItemBlockController;
|
||||||
import com.raoulvdberge.refinedstorage.render.IModelRegistration;
|
import com.raoulvdberge.refinedstorage.render.IModelRegistration;
|
||||||
import com.raoulvdberge.refinedstorage.render.meshdefinition.ItemMeshDefinitionController;
|
import com.raoulvdberge.refinedstorage.render.meshdefinition.ItemMeshDefinitionController;
|
||||||
|
import com.raoulvdberge.refinedstorage.render.model.baked.BakedModelFullbright;
|
||||||
import com.raoulvdberge.refinedstorage.tile.TileController;
|
import com.raoulvdberge.refinedstorage.tile.TileController;
|
||||||
import net.minecraft.block.properties.PropertyEnum;
|
import net.minecraft.block.properties.PropertyEnum;
|
||||||
import net.minecraft.block.state.BlockStateContainer;
|
import net.minecraft.block.state.BlockStateContainer;
|
||||||
@@ -19,6 +20,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
import net.minecraft.util.BlockRenderLayer;
|
||||||
import net.minecraft.util.EnumFacing;
|
import net.minecraft.util.EnumFacing;
|
||||||
import net.minecraft.util.EnumHand;
|
import net.minecraft.util.EnumHand;
|
||||||
import net.minecraft.util.NonNullList;
|
import net.minecraft.util.NonNullList;
|
||||||
@@ -36,12 +38,24 @@ public class BlockController extends BlockNodeProxy {
|
|||||||
super(BlockInfoBuilder.forId("controller").tileEntity(TileController::new).create());
|
super(BlockInfoBuilder.forId("controller").tileEntity(TileController::new).create());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BlockRenderLayer getBlockLayer() {
|
||||||
|
return BlockRenderLayer.CUTOUT;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerModels(IModelRegistration modelRegistration) {
|
public void registerModels(IModelRegistration modelRegistration) {
|
||||||
modelRegistration.setModelMeshDefinition(this, new ItemMeshDefinitionController());
|
modelRegistration.setModelMeshDefinition(this, new ItemMeshDefinitionController());
|
||||||
|
|
||||||
modelRegistration.setStateMapper(this, new StateMap.Builder().ignore(TYPE).build());
|
modelRegistration.setStateMapper(this, new StateMap.Builder().ignore(TYPE).build());
|
||||||
|
|
||||||
|
modelRegistration.addBakedModelOverride(info.getId(), base -> new BakedModelFullbright(
|
||||||
|
base,
|
||||||
|
RS.ID + ":blocks/controller/cutouts/nearly_off",
|
||||||
|
RS.ID + ":blocks/controller/cutouts/nearly_on",
|
||||||
|
RS.ID + ":blocks/controller/cutouts/on"
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -33,11 +33,11 @@ public class BlockSecurityManager extends BlockNode {
|
|||||||
|
|
||||||
modelRegistration.addBakedModelOverride(info.getId(), base -> new BakedModelFullbright(
|
modelRegistration.addBakedModelOverride(info.getId(), base -> new BakedModelFullbright(
|
||||||
base,
|
base,
|
||||||
"refinedstorage:blocks/security_manager/cutouts/top_connected",
|
RS.ID + ":blocks/security_manager/cutouts/top_connected",
|
||||||
"refinedstorage:blocks/security_manager/cutouts/front_connected",
|
RS.ID + ":blocks/security_manager/cutouts/front_connected",
|
||||||
"refinedstorage:blocks/security_manager/cutouts/left_connected",
|
RS.ID + ":blocks/security_manager/cutouts/left_connected",
|
||||||
"refinedstorage:blocks/security_manager/cutouts/back_connected",
|
RS.ID + ":blocks/security_manager/cutouts/back_connected",
|
||||||
"refinedstorage:blocks/security_manager/cutouts/right_connected"
|
RS.ID + ":blocks/security_manager/cutouts/right_connected"
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
{
|
{
|
||||||
"forge_marker": 1,
|
"forge_marker": 1,
|
||||||
"defaults": {
|
"defaults": {
|
||||||
"model": "cube_all",
|
"model": "refinedstorage:cube_all_cutout",
|
||||||
"textures": {
|
"textures": {
|
||||||
"particle": "refinedstorage:blocks/controller_off",
|
"particle": "refinedstorage:blocks/controller/controller_off",
|
||||||
"all": "refinedstorage:blocks/controller_off"
|
"all": "refinedstorage:blocks/controller/controller_off",
|
||||||
|
"cutout": "refinedstorage:blocks/controller/cutouts/off"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"variants": {
|
"variants": {
|
||||||
@@ -17,18 +18,25 @@
|
|||||||
"off": {
|
"off": {
|
||||||
},
|
},
|
||||||
"nearly_off": {
|
"nearly_off": {
|
||||||
|
"model": "refinedstorage:controller_nearly_on_off",
|
||||||
"textures": {
|
"textures": {
|
||||||
"all": "refinedstorage:blocks/controller_nearly_off"
|
"all": "refinedstorage:blocks/controller/controller",
|
||||||
|
"cutout": "refinedstorage:blocks/controller/cutouts/nearly_off",
|
||||||
|
"cutout_gray": "refinedstorage:blocks/controller/cutouts/nearly_off_gray"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nearly_on": {
|
"nearly_on": {
|
||||||
|
"model": "refinedstorage:controller_nearly_on_off",
|
||||||
"textures": {
|
"textures": {
|
||||||
"all": "refinedstorage:blocks/controller_nearly_on"
|
"all": "refinedstorage:blocks/controller/controller",
|
||||||
|
"cutout": "refinedstorage:blocks/controller/cutouts/nearly_on",
|
||||||
|
"cutout_gray": "refinedstorage:blocks/controller/cutouts/nearly_on_gray"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"on": {
|
"on": {
|
||||||
"textures": {
|
"textures": {
|
||||||
"all": "refinedstorage:blocks/controller_on"
|
"all": "refinedstorage:blocks/controller/controller",
|
||||||
|
"cutout": "refinedstorage:blocks/controller/cutouts/on"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,119 @@
|
|||||||
|
{
|
||||||
|
"parent": "block/cube",
|
||||||
|
"elements": [
|
||||||
|
{
|
||||||
|
"from": [
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"to": [
|
||||||
|
16,
|
||||||
|
16,
|
||||||
|
16
|
||||||
|
],
|
||||||
|
"faces": {
|
||||||
|
"down": {
|
||||||
|
"texture": "#all",
|
||||||
|
"cullface": "down"
|
||||||
|
},
|
||||||
|
"up": {
|
||||||
|
"texture": "#all",
|
||||||
|
"cullface": "up"
|
||||||
|
},
|
||||||
|
"north": {
|
||||||
|
"texture": "#all",
|
||||||
|
"cullface": "north"
|
||||||
|
},
|
||||||
|
"south": {
|
||||||
|
"texture": "#all",
|
||||||
|
"cullface": "south"
|
||||||
|
},
|
||||||
|
"west": {
|
||||||
|
"texture": "#all",
|
||||||
|
"cullface": "west"
|
||||||
|
},
|
||||||
|
"east": {
|
||||||
|
"texture": "#all",
|
||||||
|
"cullface": "east"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"to": [
|
||||||
|
16,
|
||||||
|
16,
|
||||||
|
16
|
||||||
|
],
|
||||||
|
"faces": {
|
||||||
|
"up": {
|
||||||
|
"texture": "#cutout",
|
||||||
|
"cullface": "up"
|
||||||
|
},
|
||||||
|
"down": {
|
||||||
|
"texture": "#cutout",
|
||||||
|
"cullface": "down"
|
||||||
|
},
|
||||||
|
"north": {
|
||||||
|
"texture": "#cutout",
|
||||||
|
"cullface": "north"
|
||||||
|
},
|
||||||
|
"south": {
|
||||||
|
"texture": "#cutout",
|
||||||
|
"cullface": "south"
|
||||||
|
},
|
||||||
|
"west": {
|
||||||
|
"texture": "#cutout",
|
||||||
|
"cullface": "west"
|
||||||
|
},
|
||||||
|
"east": {
|
||||||
|
"texture": "#cutout",
|
||||||
|
"cullface": "east"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"to": [
|
||||||
|
16,
|
||||||
|
16,
|
||||||
|
16
|
||||||
|
],
|
||||||
|
"faces": {
|
||||||
|
"up": {
|
||||||
|
"texture": "#cutout_gray",
|
||||||
|
"cullface": "up"
|
||||||
|
},
|
||||||
|
"down": {
|
||||||
|
"texture": "#cutout_gray",
|
||||||
|
"cullface": "down"
|
||||||
|
},
|
||||||
|
"north": {
|
||||||
|
"texture": "#cutout_gray",
|
||||||
|
"cullface": "north"
|
||||||
|
},
|
||||||
|
"south": {
|
||||||
|
"texture": "#cutout_gray",
|
||||||
|
"cullface": "south"
|
||||||
|
},
|
||||||
|
"west": {
|
||||||
|
"texture": "#cutout_gray",
|
||||||
|
"cullface": "west"
|
||||||
|
},
|
||||||
|
"east": {
|
||||||
|
"texture": "#cutout_gray",
|
||||||
|
"cullface": "east"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
{
|
||||||
|
"parent": "block/cube",
|
||||||
|
"elements": [
|
||||||
|
{
|
||||||
|
"from": [
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"to": [
|
||||||
|
16,
|
||||||
|
16,
|
||||||
|
16
|
||||||
|
],
|
||||||
|
"faces": {
|
||||||
|
"down": {
|
||||||
|
"texture": "#all",
|
||||||
|
"cullface": "down"
|
||||||
|
},
|
||||||
|
"up": {
|
||||||
|
"texture": "#all",
|
||||||
|
"cullface": "up"
|
||||||
|
},
|
||||||
|
"north": {
|
||||||
|
"texture": "#all",
|
||||||
|
"cullface": "north"
|
||||||
|
},
|
||||||
|
"south": {
|
||||||
|
"texture": "#all",
|
||||||
|
"cullface": "south"
|
||||||
|
},
|
||||||
|
"west": {
|
||||||
|
"texture": "#all",
|
||||||
|
"cullface": "west"
|
||||||
|
},
|
||||||
|
"east": {
|
||||||
|
"texture": "#all",
|
||||||
|
"cullface": "east"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": [
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"to": [
|
||||||
|
16,
|
||||||
|
16,
|
||||||
|
16
|
||||||
|
],
|
||||||
|
"faces": {
|
||||||
|
"up": {
|
||||||
|
"texture": "#cutout",
|
||||||
|
"cullface": "up"
|
||||||
|
},
|
||||||
|
"down": {
|
||||||
|
"texture": "#cutout",
|
||||||
|
"cullface": "down"
|
||||||
|
},
|
||||||
|
"north": {
|
||||||
|
"texture": "#cutout",
|
||||||
|
"cullface": "north"
|
||||||
|
},
|
||||||
|
"south": {
|
||||||
|
"texture": "#cutout",
|
||||||
|
"cullface": "south"
|
||||||
|
},
|
||||||
|
"west": {
|
||||||
|
"texture": "#cutout",
|
||||||
|
"cullface": "west"
|
||||||
|
},
|
||||||
|
"east": {
|
||||||
|
"texture": "#cutout",
|
||||||
|
"cullface": "east"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -50,7 +50,6 @@
|
|||||||
16,
|
16,
|
||||||
16
|
16
|
||||||
],
|
],
|
||||||
"shade": false,
|
|
||||||
"faces": {
|
"faces": {
|
||||||
"up": {
|
"up": {
|
||||||
"texture": "#cutout_up",
|
"texture": "#cutout_up",
|
||||||
|
|||||||
|
After Width: | Height: | Size: 673 B |
|
After Width: | Height: | Size: 556 B |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 645 B |
@@ -1,11 +1,4 @@
|
|||||||
{
|
{
|
||||||
"ctm": {
|
|
||||||
"ctm_version": 1,
|
|
||||||
"layer": "CUTOUT",
|
|
||||||
"extra": {
|
|
||||||
"light": 15
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"animation": {
|
"animation": {
|
||||||
"frametime": 1,
|
"frametime": 1,
|
||||||
"frames": [
|
"frames": [
|
||||||
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 645 B |
|
After Width: | Height: | Size: 392 B |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
@@ -1,11 +1,4 @@
|
|||||||
{
|
{
|
||||||
"ctm": {
|
|
||||||
"ctm_version": 1,
|
|
||||||
"layer": "CUTOUT",
|
|
||||||
"extra": {
|
|
||||||
"light": 15
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"animation": {
|
"animation": {
|
||||||
"frametime": 2,
|
"frametime": 2,
|
||||||
"frames": [
|
"frames": [
|
||||||
|
Before Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
@@ -1,26 +0,0 @@
|
|||||||
{
|
|
||||||
"ctm": {
|
|
||||||
"ctm_version": 1,
|
|
||||||
"layer": "CUTOUT",
|
|
||||||
"extra": {
|
|
||||||
"light": 15
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"animation": {
|
|
||||||
"frametime": 2,
|
|
||||||
"frames": [
|
|
||||||
0,
|
|
||||||
1,
|
|
||||||
2,
|
|
||||||
3,
|
|
||||||
4,
|
|
||||||
5,
|
|
||||||
6,
|
|
||||||
7,
|
|
||||||
8,
|
|
||||||
9,
|
|
||||||
10,
|
|
||||||
11
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 3.6 KiB |