Crafter Manager, crafting monitor and grid fullbright. #1860

This commit is contained in:
raoulvdberge
2018-07-11 23:10:14 +02:00
parent 11183280e0
commit 13d6e7f2b9
60 changed files with 144 additions and 95 deletions

View File

@@ -1,15 +1,18 @@
package com.raoulvdberge.refinedstorage.block;
import com.raoulvdberge.refinedstorage.RS;
import com.raoulvdberge.refinedstorage.RSGui;
import com.raoulvdberge.refinedstorage.api.network.security.Permission;
import com.raoulvdberge.refinedstorage.block.info.BlockDirection;
import com.raoulvdberge.refinedstorage.block.info.BlockInfoBuilder;
import com.raoulvdberge.refinedstorage.render.IModelRegistration;
import com.raoulvdberge.refinedstorage.render.model.baked.BakedModelFullbright;
import com.raoulvdberge.refinedstorage.tile.TileCrafterManager;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.util.BlockRenderLayer;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.math.BlockPos;
@@ -28,6 +31,13 @@ public class BlockCrafterManager extends BlockNode {
@SideOnly(Side.CLIENT)
public void registerModels(IModelRegistration modelRegistration) {
modelRegistration.setModel(this, 0, new ModelResourceLocation(info.getId(), "connected=false,direction=north"));
modelRegistration.addBakedModelOverride(info.getId(), base -> new BakedModelFullbright(base, RS.ID + ":blocks/crafter_manager/cutouts/front_connected"));
}
@Override
public BlockRenderLayer getBlockLayer() {
return BlockRenderLayer.CUTOUT;
}
@Override

View File

@@ -1,14 +1,17 @@
package com.raoulvdberge.refinedstorage.block;
import com.raoulvdberge.refinedstorage.RS;
import com.raoulvdberge.refinedstorage.RSGui;
import com.raoulvdberge.refinedstorage.api.network.security.Permission;
import com.raoulvdberge.refinedstorage.block.info.BlockDirection;
import com.raoulvdberge.refinedstorage.block.info.BlockInfoBuilder;
import com.raoulvdberge.refinedstorage.render.IModelRegistration;
import com.raoulvdberge.refinedstorage.render.model.baked.BakedModelFullbright;
import com.raoulvdberge.refinedstorage.tile.craftingmonitor.TileCraftingMonitor;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.BlockRenderLayer;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.math.BlockPos;
@@ -27,6 +30,13 @@ public class BlockCraftingMonitor 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/crafting_monitor/cutouts/front_connected"));
}
@Override
public BlockRenderLayer getBlockLayer() {
return BlockRenderLayer.CUTOUT;
}
@Override

View File

@@ -1,11 +1,13 @@
package com.raoulvdberge.refinedstorage.block;
import com.raoulvdberge.refinedstorage.RS;
import com.raoulvdberge.refinedstorage.RSGui;
import com.raoulvdberge.refinedstorage.api.network.grid.GridType;
import com.raoulvdberge.refinedstorage.block.info.BlockDirection;
import com.raoulvdberge.refinedstorage.block.info.BlockInfoBuilder;
import com.raoulvdberge.refinedstorage.item.itemblock.ItemBlockBase;
import com.raoulvdberge.refinedstorage.render.IModelRegistration;
import com.raoulvdberge.refinedstorage.render.model.baked.BakedModelFullbright;
import com.raoulvdberge.refinedstorage.tile.grid.TileGrid;
import net.minecraft.block.properties.PropertyEnum;
import net.minecraft.block.state.BlockStateContainer;
@@ -15,6 +17,7 @@ import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockRenderLayer;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.NonNullList;
@@ -39,6 +42,19 @@ public class BlockGrid extends BlockNode {
modelRegistration.setModel(this, GridType.CRAFTING.getId(), new ModelResourceLocation(info.getId(), "connected=false,direction=north,type=crafting"));
modelRegistration.setModel(this, GridType.PATTERN.getId(), new ModelResourceLocation(info.getId(), "connected=false,direction=north,type=pattern"));
modelRegistration.setModel(this, GridType.FLUID.getId(), new ModelResourceLocation(info.getId(), "connected=false,direction=north,type=fluid"));
modelRegistration.addBakedModelOverride(info.getId(), base -> new BakedModelFullbright(
base,
RS.ID + ":blocks/grid/cutouts/front_connected",
RS.ID + ":blocks/grid/cutouts/crafting_front_connected",
RS.ID + ":blocks/grid/cutouts/pattern_front_connected",
RS.ID + ":blocks/grid/cutouts/fluid_front_connected"
));
}
@Override
public BlockRenderLayer getBlockLayer() {
return BlockRenderLayer.CUTOUT;
}
@Override

View File

@@ -1,14 +1,15 @@
{
"forge_marker": 1,
"defaults": {
"model": "cube",
"model": "refinedstorage:cube_cutout_north",
"textures": {
"particle": "refinedstorage:blocks/side",
"north": "refinedstorage:blocks/crafter_manager_front",
"east": "refinedstorage:blocks/grid_left",
"south": "refinedstorage:blocks/grid_back",
"west": "refinedstorage:blocks/grid_right",
"up": "refinedstorage:blocks/grid_top",
"north": "refinedstorage:blocks/crafter_manager/front",
"east": "refinedstorage:blocks/crafter_manager/left",
"south": "refinedstorage:blocks/crafter_manager/back",
"west": "refinedstorage:blocks/crafter_manager/right",
"up": "refinedstorage:blocks/crafter_manager/top",
"cutout": "refinedstorage:blocks/crafter_manager/cutouts/front_disconnected",
"down": "refinedstorage:blocks/bottom"
}
},
@@ -16,7 +17,7 @@
"connected": {
"true": {
"textures": {
"north": "refinedstorage:blocks/crafter_manager_front_connected"
"cutout": "refinedstorage:blocks/crafter_manager/cutouts/front_connected"
}
},
"false": {

View File

@@ -1,15 +1,16 @@
{
"forge_marker": 1,
"defaults": {
"model": "cube",
"model": "refinedstorage:cube_cutout_north",
"textures": {
"particle": "refinedstorage:blocks/crafting_monitor_front",
"north": "refinedstorage:blocks/crafting_monitor_front",
"east": "refinedstorage:blocks/crafting_monitor_left",
"south": "refinedstorage:blocks/crafting_monitor_back",
"west": "refinedstorage:blocks/crafting_monitor_right",
"up": "refinedstorage:blocks/crafting_monitor_top",
"down": "refinedstorage:blocks/bottom"
"particle": "refinedstorage:blocks/crafting_monitor/front",
"north": "refinedstorage:blocks/crafting_monitor/front",
"east": "refinedstorage:blocks/crafting_monitor/left",
"south": "refinedstorage:blocks/crafting_monitor/back",
"west": "refinedstorage:blocks/crafting_monitor/right",
"up": "refinedstorage:blocks/crafting_monitor/top",
"down": "refinedstorage:blocks/bottom",
"cutout": "refinedstorage:blocks/crafting_monitor/cutouts/front_disconnected"
}
},
"variants": {
@@ -22,7 +23,7 @@
"connected": {
"true": {
"textures": {
"north": "refinedstorage:blocks/crafting_monitor_front_connected"
"cutout": "refinedstorage:blocks/crafting_monitor/cutouts/front_connected"
}
},
"false": {

View File

@@ -1,60 +1,64 @@
{
"forge_marker": 1,
"defaults": {
"model": "cube",
"model": "refinedstorage:cube_cutout_north",
"textures": {
"particle": "refinedstorage:blocks/side",
"north": "refinedstorage:blocks/grid_disconnected",
"east": "refinedstorage:blocks/grid_left",
"south": "refinedstorage:blocks/grid_back",
"west": "refinedstorage:blocks/grid_right",
"up": "refinedstorage:blocks/grid_top",
"down": "refinedstorage:blocks/bottom"
"east": "refinedstorage:blocks/grid/left",
"south": "refinedstorage:blocks/grid/back",
"west": "refinedstorage:blocks/grid/right",
"up": "refinedstorage:blocks/grid/top",
"down": "refinedstorage:blocks/bottom",
"north_normal": "refinedstorage:blocks/grid/front",
"north_crafting": "refinedstorage:blocks/grid/crafting_front",
"north_pattern": "refinedstorage:blocks/grid/pattern_front",
"north_fluid": "refinedstorage:blocks/grid/fluid_front",
"cutout_normal": "refinedstorage:blocks/grid/cutouts/front_disconnected",
"cutout_crafting": "refinedstorage:blocks/grid/cutouts/crafting_front_disconnected",
"cutout_pattern": "refinedstorage:blocks/grid/cutouts/pattern_front_disconnected",
"cutout_fluid": "refinedstorage:blocks/grid/cutouts/fluid_front_disconnected"
}
},
"variants": {
"connected": {
"true": {
"textures": {
"north_normal": "refinedstorage:blocks/grid_front_connected",
"north_crafting": "refinedstorage:blocks/grid_crafting_front_connected",
"north_pattern": "refinedstorage:blocks/grid_pattern_front_connected",
"north_fluid": "refinedstorage:blocks/grid_fluid_front_connected"
"cutout_normal": "refinedstorage:blocks/grid/cutouts/front_connected",
"cutout_crafting": "refinedstorage:blocks/grid/cutouts/crafting_front_connected",
"cutout_pattern": "refinedstorage:blocks/grid/cutouts/pattern_front_connected",
"cutout_fluid": "refinedstorage:blocks/grid/cutouts/fluid_front_connected"
}
},
"false": {
"textures": {
"north_normal": "refinedstorage:blocks/grid_front",
"north_crafting": "refinedstorage:blocks/grid_crafting_front",
"north_pattern": "refinedstorage:blocks/grid_pattern_front",
"north_fluid": "refinedstorage:blocks/grid_fluid_front"
}
}
},
"type": {
"normal": {
"textures": {
"north": "#north_normal"
"north": "#north_normal",
"cutout": "#cutout_normal"
}
},
"crafting": {
"textures": {
"north": "#north_crafting"
"north": "#north_crafting",
"cutout": "#cutout_crafting"
}
},
"pattern": {
"textures": {
"north": "#north_pattern"
"north": "#north_pattern",
"cutout": "#cutout_pattern"
}
},
"fluid": {
"textures": {
"north": "#north_fluid",
"east": "refinedstorage:blocks/grid_fluid_left",
"south": "refinedstorage:blocks/grid_fluid_back",
"west": "refinedstorage:blocks/grid_fluid_right",
"up": "refinedstorage:blocks/grid_fluid_top",
"down": "refinedstorage:blocks/bottom"
"cutout": "#cutout_fluid",
"east": "refinedstorage:blocks/grid/fluid_left",
"south": "refinedstorage:blocks/grid/fluid_back",
"west": "refinedstorage:blocks/grid/fluid_right",
"up": "refinedstorage:blocks/grid/fluid_top"
}
}
},

View File

@@ -0,0 +1,61 @@
{
"parent": "block/cube",
"elements": [
{
"from": [
0,
0,
0
],
"to": [
16,
16,
16
],
"faces": {
"down": {
"texture": "#down",
"cullface": "down"
},
"up": {
"texture": "#up",
"cullface": "up"
},
"north": {
"texture": "#north",
"cullface": "north"
},
"south": {
"texture": "#south",
"cullface": "south"
},
"west": {
"texture": "#west",
"cullface": "west"
},
"east": {
"texture": "#east",
"cullface": "east"
}
}
},
{
"from": [
0,
0,
0
],
"to": [
16,
16,
16
],
"faces": {
"north": {
"texture": "#cutout",
"cullface": "north"
}
}
}
]
}

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 313 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 541 B

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 596 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 794 B

View File

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

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 324 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 554 B

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 554 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 338 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 312 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 323 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 330 B

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 555 B

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 554 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 554 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

View File

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

View File

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

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: 1.3 KiB

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
}
}
}