Detector, disk manipulator and wireless transmitter fullbright. #1860

This commit is contained in:
raoulvdberge
2018-07-12 03:29:07 +02:00
parent 13d6e7f2b9
commit f2d393d1f2
39 changed files with 380 additions and 269 deletions

View File

@@ -1,9 +1,11 @@
package com.raoulvdberge.refinedstorage.block;
import com.raoulvdberge.refinedstorage.RS;
import com.raoulvdberge.refinedstorage.RSGui;
import com.raoulvdberge.refinedstorage.block.info.BlockInfoBuilder;
import com.raoulvdberge.refinedstorage.render.IModelRegistration;
import com.raoulvdberge.refinedstorage.render.collision.constants.ConstantsDetector;
import com.raoulvdberge.refinedstorage.render.model.baked.BakedModelFullbright;
import com.raoulvdberge.refinedstorage.tile.TileDetector;
import net.minecraft.block.properties.PropertyBool;
import net.minecraft.block.state.BlockFaceShape;
@@ -33,6 +35,8 @@ public class BlockDetector extends BlockNode {
@SideOnly(Side.CLIENT)
public void registerModels(IModelRegistration modelRegistration) {
modelRegistration.setModel(this, 0, new ModelResourceLocation(info.getId(), "inventory"));
modelRegistration.addBakedModelOverride(info.getId(), base -> new BakedModelFullbright(base, RS.ID + ":blocks/detector/cutouts/on"));
}
@Override

View File

@@ -13,6 +13,7 @@ import net.minecraft.block.state.IBlockState;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockRenderLayer;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.math.BlockPos;
@@ -39,6 +40,11 @@ public class BlockDiskManipulator extends BlockNode {
modelRegistration.addModelLoader(() -> new CustomModelLoaderDefault(info.getId(), ModelDiskManipulator::new));
}
@Override
public BlockRenderLayer getBlockLayer() {
return BlockRenderLayer.CUTOUT;
}
@Override
@Nullable
public BlockDirection getDirection() {

View File

@@ -1,9 +1,11 @@
package com.raoulvdberge.refinedstorage.block;
import com.raoulvdberge.refinedstorage.RS;
import com.raoulvdberge.refinedstorage.RSGui;
import com.raoulvdberge.refinedstorage.block.info.BlockInfoBuilder;
import com.raoulvdberge.refinedstorage.render.IModelRegistration;
import com.raoulvdberge.refinedstorage.render.collision.constants.ConstantsWirelessTransmitter;
import com.raoulvdberge.refinedstorage.render.model.baked.BakedModelFullbright;
import com.raoulvdberge.refinedstorage.tile.TileWirelessTransmitter;
import net.minecraft.block.Block;
import net.minecraft.block.state.BlockFaceShape;
@@ -36,6 +38,8 @@ public class BlockWirelessTransmitter extends BlockNode {
@SideOnly(Side.CLIENT)
public void registerModels(IModelRegistration modelRegistration) {
modelRegistration.setModel(this, 0, new ModelResourceLocation(info.getId(), "inventory"));
modelRegistration.addBakedModelOverride(info.getId(), base -> new BakedModelFullbright(base, RS.ID + ":blocks/wireless_transmitter/cutouts/connected"));
}
@Override

View File

@@ -2,6 +2,7 @@ package com.raoulvdberge.refinedstorage.render.model;
import com.raoulvdberge.refinedstorage.RS;
import com.raoulvdberge.refinedstorage.render.model.baked.BakedModelDiskManipulator;
import com.raoulvdberge.refinedstorage.render.model.baked.BakedModelFullbright;
import net.minecraft.client.renderer.block.model.IBakedModel;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.client.renderer.vertex.VertexFormat;
@@ -17,6 +18,7 @@ import java.util.List;
import java.util.function.Function;
public class ModelDiskManipulator implements IModel {
private static final ResourceLocation MODEL_BASE_CUTOUT = new ResourceLocation(RS.ID + ":block/cube_north_cutout");
private static final ResourceLocation MODEL_BASE_CONNECTED = new ResourceLocation(RS.ID + ":block/disk_manipulator_connected");
private static final ResourceLocation MODEL_BASE_DISCONNECTED = new ResourceLocation(RS.ID + ":block/disk_manipulator_disconnected");
@@ -25,13 +27,11 @@ public class ModelDiskManipulator implements IModel {
private static final ResourceLocation MODEL_DISK_FULL = new ResourceLocation(RS.ID + ":block/disk_full");
private static final ResourceLocation MODEL_DISK_DISCONNECTED = new ResourceLocation(RS.ID + ":block/disk_disconnected");
// TODO: Remove?
private static final ResourceLocation TEXTURE_BASE_CONNECTED_GLOW = new ResourceLocation(RS.ID + ":blocks/disk_manipulator_connected_glow");
@Override
public Collection<ResourceLocation> getDependencies() {
List<ResourceLocation> dependencies = new ArrayList<>();
dependencies.add(MODEL_BASE_CUTOUT);
dependencies.add(MODEL_BASE_CONNECTED);
dependencies.add(MODEL_BASE_DISCONNECTED);
dependencies.add(MODEL_DISK);
@@ -44,7 +44,7 @@ public class ModelDiskManipulator implements IModel {
@Override
public Collection<ResourceLocation> getTextures() {
return Collections.singletonList(TEXTURE_BASE_CONNECTED_GLOW);
return Collections.emptyList();
}
@Override
@@ -67,7 +67,7 @@ public class ModelDiskManipulator implements IModel {
}
return new BakedModelDiskManipulator(
baseModelConnected.bake(state, format, bakedTextureGetter),
new BakedModelFullbright(baseModelConnected.bake(state, format, bakedTextureGetter), RS.ID + ":blocks/disk_manipulator/cutouts/connected"),
baseModelDisconnected.bake(state, format, bakedTextureGetter),
diskModel.bake(state, format, bakedTextureGetter),
diskModelNearCapacity.bake(state, format, bakedTextureGetter),

View File

@@ -1,7 +1,7 @@
{
"forge_marker": 1,
"defaults": {
"model": "refinedstorage:cube_cutout_north",
"model": "refinedstorage:cube_north_cutout",
"textures": {
"particle": "refinedstorage:blocks/side",
"north": "refinedstorage:blocks/crafter_manager/front",

View File

@@ -1,7 +1,7 @@
{
"forge_marker": 1,
"defaults": {
"model": "refinedstorage:cube_cutout_north",
"model": "refinedstorage:cube_north_cutout",
"textures": {
"particle": "refinedstorage:blocks/crafting_monitor/front",
"north": "refinedstorage:blocks/crafting_monitor/front",

View File

@@ -2,11 +2,11 @@
"forge_marker": 1,
"defaults": {
"textures": {
"particle": "refinedstorage:blocks/detector_top",
"torch": "refinedstorage:blocks/detector_side_off",
"side": "refinedstorage:blocks/detector_side_off",
"top": "refinedstorage:blocks/detector_top",
"bottom": "refinedstorage:blocks/detector_bottom"
"side": "refinedstorage:blocks/detector/side",
"bottom": "refinedstorage:blocks/detector/bottom",
"top": "refinedstorage:blocks/detector/top",
"torch": "refinedstorage:blocks/detector/cutouts/off",
"particle": "refinedstorage:blocks/detector/side"
},
"model": "refinedstorage:detector"
},
@@ -19,7 +19,7 @@
"powered": {
"true": {
"textures": {
"torch": "refinedstorage:blocks/detector_side_on"
"torch": "refinedstorage:blocks/detector/cutouts/on"
}
},
"false": {

View File

@@ -1,7 +1,7 @@
{
"forge_marker": 1,
"defaults": {
"model": "refinedstorage:cube_cutout_north",
"model": "refinedstorage:cube_north_cutout",
"textures": {
"particle": "refinedstorage:blocks/side",
"east": "refinedstorage:blocks/grid/left",

View File

@@ -1,9 +1,10 @@
{
"forge_marker": 1,
"defaults": {
"model": "torch",
"model": "refinedstorage:wireless_transmitter",
"textures": {
"torch": "refinedstorage:blocks/wireless_transmitter_disconnected"
"torch": "refinedstorage:blocks/wireless_transmitter/wireless_transmitter",
"cutout": "refinedstorage:blocks/wireless_transmitter/cutouts/disconnected"
}
},
"variants": {
@@ -15,7 +16,7 @@
"connected": {
"true": {
"textures": {
"torch": "refinedstorage:blocks/wireless_transmitter_connected"
"cutout": "refinedstorage:blocks/wireless_transmitter/cutouts/connected"
}
},
"false": {

View File

@@ -1,210 +1,201 @@
{
"__comment": "Model made by CyanideX",
"credit": "Made with Blockbench",
"elements": [
{
"name": "Element",
"name": "Handle",
"from": [
7.0,
5.0,
7.0
7,
5,
7
],
"to": [
9.0,
10.0,
9.0
9,
8,
9
],
"shade": false,
"faces": {
"north": {
"texture": "#torch",
"uv": [
7.0,
5.0,
9.0,
11.0
]
7,
7,
9,
11
],
"texture": "#side"
},
"east": {
"texture": "#torch",
"uv": [
7.0,
5.0,
9.0,
11.0
]
7,
7,
9,
11
],
"texture": "#side"
},
"south": {
"texture": "#torch",
"uv": [
7.0,
5.0,
9.0,
11.0
]
7,
7,
9,
11
],
"texture": "#side"
},
"west": {
"texture": "#torch",
"uv": [
7.0,
5.0,
9.0,
11.0
]
7,
7,
9,
11
],
"texture": "#side"
},
"up": {
"texture": "#torch",
"uv": [
7.0,
5.0,
9.0,
7.0
]
},
"down": {
"texture": "#torch",
"uv": [
7.0,
7.0,
9.0,
9.0
]
7,
7,
9,
9
],
"texture": "#side"
}
}
},
{
"name": "Element",
"name": "Torch",
"from": [
7.0,
5.0,
6.0
7,
5,
6
],
"to": [
9.0,
11.0,
10.0
9,
11,
10
],
"shade": false,
"faces": {
"east": {
"texture": "#torch",
"uv": [
6.0,
4.0,
10.0,
11.0
]
6,
4,
10,
12
],
"texture": "#torch"
},
"west": {
"texture": "#torch",
"uv": [
6.0,
4.0,
10.0,
11.0
]
6,
4,
10,
12
],
"texture": "#torch"
}
}
},
{
"name": "Element",
"name": "Torch",
"from": [
6.0,
5.0,
7.0
6,
5,
7
],
"to": [
10.0,
11.0,
9.0
10,
11,
9
],
"shade": false,
"faces": {
"north": {
"texture": "#torch",
"uv": [
6.0,
4.0,
10.0,
11.0
]
6,
4,
10,
12
],
"texture": "#torch"
},
"south": {
"texture": "#torch",
"uv": [
6.0,
4.0,
10.0,
11.0
]
6,
4,
10,
12
],
"texture": "#torch"
}
}
},
{
"name": "base",
"name": "Base",
"from": [
0.0,
0.0,
0.0
0,
0,
0
],
"to": [
16.0,
5.0,
16.0
16,
5,
16
],
"faces": {
"north": {
"texture": "#side",
"uv": [
0.0,
11.0,
16.0,
16.0
]
0,
11,
16,
16
],
"texture": "#side"
},
"east": {
"texture": "#side",
"uv": [
0.0,
11.0,
16.0,
16.0
]
0,
11,
16,
16
],
"texture": "#side"
},
"south": {
"texture": "#side",
"uv": [
0.0,
11.0,
16.0,
16.0
]
0,
11,
16,
16
],
"texture": "#side"
},
"west": {
"texture": "#side",
"uv": [
0.0,
11.0,
16.0,
16.0
]
0,
11,
16,
16
],
"texture": "#side"
},
"up": {
"texture": "#top",
"uv": [
0.0,
0.0,
16.0,
16.0
]
0,
0,
16,
16
],
"texture": "#top"
},
"down": {
"texture": "#bottom",
"uv": [
0.0,
0.0,
16.0,
16.0
]
0,
0,
16,
16
],
"texture": "#bottom"
}
}
}

View File

@@ -1,50 +1,13 @@
{
"parent": "block/block",
"parent": "refinedstorage:block/cube_north_cutout",
"textures": {
"particle": "refinedstorage:blocks/disk_manipulator_connected",
"front": "refinedstorage:blocks/disk_manipulator_connected",
"bottom": "refinedstorage:blocks/side",
"top": "refinedstorage:blocks/side",
"side": "refinedstorage:blocks/side"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [
16,
16,
16
],
"faces": {
"down": {
"texture": "#bottom",
"cullface": "down"
},
"up": {
"texture": "#top",
"cullface": "up"
},
"north": {
"texture": "#front",
"cullface": "north"
},
"south": {
"texture": "#side",
"cullface": "south"
},
"west": {
"texture": "#side",
"cullface": "west"
},
"east": {
"texture": "#side",
"cullface": "east"
"particle": "refinedstorage:blocks/disk_manipulator/disk_manipulator",
"north": "refinedstorage:blocks/disk_manipulator/disk_manipulator",
"east": "refinedstorage:blocks/side",
"south": "refinedstorage:blocks/side",
"west": "refinedstorage:blocks/side",
"up": "refinedstorage:blocks/side",
"down": "refinedstorage:blocks/side",
"cutout": "refinedstorage:blocks/disk_manipulator/cutouts/connected"
}
}
}
]
}

View File

@@ -1,50 +1,13 @@
{
"parent": "block/block",
"parent": "refinedstorage:block/cube_north_cutout",
"textures": {
"particle": "refinedstorage:blocks/disk_manipulator_disconnected",
"front": "refinedstorage:blocks/disk_manipulator_disconnected",
"bottom": "refinedstorage:blocks/side",
"top": "refinedstorage:blocks/side",
"side": "refinedstorage:blocks/side"
},
"elements": [
{
"from": [
0,
0,
0
],
"to": [
16,
16,
16
],
"faces": {
"down": {
"texture": "#bottom",
"cullface": "down"
},
"up": {
"texture": "#top",
"cullface": "up"
},
"north": {
"texture": "#front",
"cullface": "north"
},
"south": {
"texture": "#side",
"cullface": "south"
},
"west": {
"texture": "#side",
"cullface": "west"
},
"east": {
"texture": "#side",
"cullface": "east"
"particle": "refinedstorage:blocks/disk_manipulator/disk_manipulator",
"north": "refinedstorage:blocks/disk_manipulator/disk_manipulator",
"east": "refinedstorage:blocks/side",
"south": "refinedstorage:blocks/side",
"west": "refinedstorage:blocks/side",
"up": "refinedstorage:blocks/side",
"down": "refinedstorage:blocks/side",
"cutout": "refinedstorage:blocks/disk_manipulator/cutouts/disconnected"
}
}
}
]
}

View File

@@ -0,0 +1,206 @@
{
"ambientocclusion": false,
"textures": {
"particle": "#torch"
},
"elements": [
{
"from": [
7,
0,
7
],
"to": [
9,
10,
9
],
"shade": false,
"faces": {
"down": {
"uv": [
7,
13,
9,
15
],
"texture": "#torch"
},
"up": {
"uv": [
7,
6,
9,
8
],
"texture": "#torch"
}
}
},
{
"from": [
7,
0,
0
],
"to": [
9,
16,
16
],
"shade": false,
"faces": {
"west": {
"uv": [
0,
0,
16,
16
],
"texture": "#torch"
},
"east": {
"uv": [
0,
0,
16,
16
],
"texture": "#torch"
}
}
},
{
"from": [
0,
0,
7
],
"to": [
16,
16,
9
],
"shade": false,
"faces": {
"north": {
"uv": [
0,
0,
16,
16
],
"texture": "#torch"
},
"south": {
"uv": [
0,
0,
16,
16
],
"texture": "#torch"
}
}
},
{
"from": [
7,
0,
7
],
"to": [
9,
10,
9
],
"shade": false,
"faces": {
"down": {
"uv": [
7,
13,
9,
15
],
"texture": "#cutout"
},
"up": {
"uv": [
7,
6,
9,
8
],
"texture": "#cutout"
}
}
},
{
"from": [
7,
0,
0
],
"to": [
9,
16,
16
],
"shade": false,
"faces": {
"west": {
"uv": [
0,
0,
16,
16
],
"texture": "#cutout"
},
"east": {
"uv": [
0,
0,
16,
16
],
"texture": "#cutout"
}
}
},
{
"from": [
0,
0,
7
],
"to": [
16,
16,
9
],
"shade": false,
"faces": {
"north": {
"uv": [
0,
0,
16,
16
],
"texture": "#cutout"
},
"south": {
"uv": [
0,
0,
16,
16
],
"texture": "#cutout"
}
}
}
]
}

View File

@@ -1,8 +1,8 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"ECE",
"RMR",
"ERE",
"CMC",
"EPE"
],
"key": {
@@ -13,7 +13,7 @@
"item": "minecraft:comparator"
},
"R": {
"item": "minecraft:redstone"
"item": "minecraft:redstone_torch"
},
"M": {
"item": "refinedstorage:machine_casing"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 433 B

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -1,9 +0,0 @@
{
"ctm": {
"ctm_version": 1,
"layer": "CUTOUT",
"extra": {
"light": 15
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 625 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -1,9 +0,0 @@
{
"ctm": {
"ctm_version": 1,
"layer": "CUTOUT",
"extra": {
"light": 15
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 280 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -1,9 +0,0 @@
{
"ctm": {
"ctm_version": 1,
"layer": "CUTOUT",
"extra": {
"light": 15
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB