Not enough Connected Textures

- Added decorative casing blocks
- Added 'layered' variants for all stone types
This commit is contained in:
simibubi 2020-01-21 01:52:23 +01:00
parent e902d269f4
commit 7b4d17daab
69 changed files with 423 additions and 18 deletions

View file

@ -12,6 +12,7 @@ import com.simibubi.create.foundation.block.connected.CTSpriteShifter.CTType;
import com.simibubi.create.foundation.utility.Lang;
import com.simibubi.create.foundation.world.OxidizingBlock;
import com.simibubi.create.modules.IModule;
import com.simibubi.create.modules.contraptions.CasingBlock;
import com.simibubi.create.modules.contraptions.components.actors.DrillBlock;
import com.simibubi.create.modules.contraptions.components.actors.DrillBlock.DrillHeadBlock;
import com.simibubi.create.modules.contraptions.components.actors.HarvesterBlock;
@ -92,6 +93,7 @@ import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.color.BlockColors;
import net.minecraft.item.BlockItem;
import net.minecraft.item.Item;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.common.ToolType;
@ -162,6 +164,10 @@ public enum AllBlocks {
CART_ASSEMBLER(new CartAssemblerBlock()),
MINECART_ANCHOR(new MinecartAnchorBlock()),
ANDESITE_CASING(new CasingBlock("andesite_casing")),
COPPER_CASING(new CasingBlock("copper_casing")),
BRASS_CASING(new CasingBlock("crafter_top")),
__LOGISTICS__(),
CONTACT(new ContactBlock()),
REDSTONE_BRIDGE(new RedstoneLinkBlock()),
@ -206,9 +212,20 @@ public enum AllBlocks {
TILED_GLASS_PANE(new GlassPaneBlock(Properties.from(Blocks.GLASS))),
FRAMED_GLASS(new CTGlassBlock(true)),
ANDESITE_BRICKS(new Block(Properties.from(Blocks.ANDESITE))),
DIORITE_BRICKS(new Block(Properties.from(Blocks.DIORITE))),
GRANITE_BRICKS(new Block(Properties.from(Blocks.GRANITE))),
GRANITE_LAYERS(new LayeredCTBlock(Properties.from(Blocks.GRANITE),
CTSpriteShifter.get(CTType.HORIZONTAL, "granite_layers"),
CTSpriteShifter.get(CTType.OMNIDIRECTIONAL, new ResourceLocation("block/polished_granite"), "polished_granite"))),
DIORITE_BRICKS(new Block(Properties.from(Blocks.DIORITE))),
DIORITE_LAYERS(new LayeredCTBlock(Properties.from(Blocks.DIORITE),
CTSpriteShifter.get(CTType.HORIZONTAL, "diorite_layers"),
CTSpriteShifter.get(CTType.OMNIDIRECTIONAL, new ResourceLocation("block/polished_diorite"), "polished_diorite"))),
ANDESITE_BRICKS(new Block(Properties.from(Blocks.ANDESITE))),
ANDESITE_LAYERS(new LayeredCTBlock(Properties.from(Blocks.ANDESITE),
CTSpriteShifter.get(CTType.HORIZONTAL, "andesite_layers"),
CTSpriteShifter.get(CTType.OMNIDIRECTIONAL, new ResourceLocation("block/polished_andesite"),
"polished_andesite"))),
GABBRO(new Block(Properties.from(Blocks.GRANITE)), ComesWith.STAIRS, ComesWith.SLAB, ComesWith.WALL),
POLISHED_GABBRO(new Block(Properties.from(GABBRO.block))),
GABBRO_BRICKS(new Block(Properties.from(GABBRO.block)), ComesWith.STAIRS, ComesWith.WALL),
@ -216,6 +233,9 @@ public enum AllBlocks {
INDENTED_GABBRO(new Block(Properties.from(GABBRO.block)), ComesWith.SLAB),
SLIGHTLY_MOSSY_GABBRO_BRICKS(new Block(Properties.from(GABBRO.block))),
MOSSY_GABBRO_BRICKS(new Block(Properties.from(GABBRO.block))),
GABBRO_LAYERS(
new LayeredCTBlock(Properties.from(GABBRO.block), CTSpriteShifter.get(CTType.HORIZONTAL, "gabbro_layers"),
CTSpriteShifter.get(CTType.OMNIDIRECTIONAL, "polished_gabbro"))),
LIMESAND(new FallingBlock(Properties.from(Blocks.SAND))),
LIMESTONE(new Block(Properties.from(Blocks.SANDSTONE)), ComesWith.STAIRS, ComesWith.SLAB, ComesWith.WALL),
LIMESTONE_BRICKS(new Block(Properties.from(LIMESTONE.block)), ComesWith.STAIRS, ComesWith.SLAB, ComesWith.WALL),
@ -229,10 +249,16 @@ public enum AllBlocks {
ComesWith.WALL),
POLISHED_WEATHERED_LIMESTONE(new Block(Properties.from(WEATHERED_LIMESTONE.block)), ComesWith.SLAB),
WEATHERED_LIMESTONE_PILLAR(new RotatedPillarBlock(Properties.from(WEATHERED_LIMESTONE.block))),
WEATHERED_LIMESTONE_LAYERS(new LayeredCTBlock(Properties.from(WEATHERED_LIMESTONE.block),
CTSpriteShifter.get(CTType.HORIZONTAL, "weathered_limestone_layers"),
CTSpriteShifter.get(CTType.OMNIDIRECTIONAL, "polished_weathered_limestone"))),
DOLOMITE(new Block(Properties.from(Blocks.QUARTZ_BLOCK)), ComesWith.STAIRS, ComesWith.SLAB, ComesWith.WALL),
DOLOMITE_BRICKS(new Block(Properties.from(DOLOMITE.block))),
POLISHED_DOLOMITE(new Block(Properties.from(DOLOMITE.block))),
DOLOMITE_PILLAR(new RotatedPillarBlock(Properties.from(DOLOMITE.block))),
DOLOMITE_LAYERS(new LayeredCTBlock(Properties.from(DOLOMITE.block),
CTSpriteShifter.get(CTType.HORIZONTAL, "dolomite_layers"),
CTSpriteShifter.get(CTType.OMNIDIRECTIONAL, "polished_dolomite"))),
VOLCANIC_ROCK(new VolcanicRockBlock()),

View file

@ -15,17 +15,20 @@ public class CTSpriteShifter extends SpriteShifter {
return get(type, blockTextureName, blockTextureName);
}
public static CTSpriteShiftEntry get(CTType type, String blockTextureName, String connectedTextureName) {
String originalLocation = "block/" + blockTextureName;
return get(type, new ResourceLocation(Create.ID, "block/" + blockTextureName), connectedTextureName);
}
public static CTSpriteShiftEntry get(CTType type, ResourceLocation blockTexture, String connectedTextureName) {
String targetLocation = "block/connected/" + connectedTextureName;
String key = type.name() + ":" + originalLocation + "->" + targetLocation;
String key = type.name() + ":" + blockTexture.getNamespace() + ":" + blockTexture.getPath() + "->" + targetLocation;
if (textures.containsKey(key))
return (CTSpriteShiftEntry) textures.get(key);
CTSpriteShiftEntry entry = create(type);
ResourceLocation originalTextureLocation = new ResourceLocation(Create.ID, originalLocation);
ResourceLocation targetTextureLocation = new ResourceLocation(Create.ID, targetLocation);
entry.set(originalTextureLocation, targetTextureLocation);
entry.set(blockTexture, targetTextureLocation);
textures.put(key, entry);
return entry;

View file

@ -1,11 +0,0 @@
package com.simibubi.create.foundation.world;
import net.minecraft.block.Blocks;
public class CopperOreBlock extends OxidizingBlock {
public CopperOreBlock() {
super(Properties.from(Blocks.IRON_ORE), 1);
}
}

View file

@ -0,0 +1,33 @@
package com.simibubi.create.modules.contraptions;
import com.simibubi.create.foundation.block.connected.CTSpriteShifter;
import com.simibubi.create.foundation.block.connected.ConnectedTextureBehaviour;
import com.simibubi.create.foundation.block.connected.IHaveConnectedTextures;
import com.simibubi.create.foundation.block.connected.StandardCTBehaviour;
import com.simibubi.create.foundation.block.connected.CTSpriteShifter.CTType;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraftforge.common.ToolType;
public class CasingBlock extends Block implements IHaveConnectedTextures {
String textureFrom;
public CasingBlock(String textureFrom) {
super(Properties.from(Blocks.ANDESITE));
this.textureFrom = textureFrom;
}
@Override
public boolean isToolEffective(BlockState state, ToolType tool) {
return tool == ToolType.PICKAXE || tool == ToolType.AXE;
}
@Override
public ConnectedTextureBehaviour getBehaviour() {
return new StandardCTBehaviour(CTSpriteShifter.get(CTType.OMNIDIRECTIONAL, textureFrom, getRegistryName().getPath()));
}
}

View file

@ -0,0 +1,5 @@
{
"variants": {
"": { "model": "create:block/andesite_casing" }
}
}

View file

@ -0,0 +1,5 @@
{
"variants": {
"": { "model": "create:block/palettes/andesite_layers" }
}
}

View file

@ -0,0 +1,5 @@
{
"variants": {
"": { "model": "create:block/brass_casing" }
}
}

View file

@ -0,0 +1,5 @@
{
"variants": {
"": { "model": "create:block/copper_casing" }
}
}

View file

@ -0,0 +1,5 @@
{
"variants": {
"": { "model": "create:block/palettes/diorite_layers" }
}
}

View file

@ -0,0 +1,5 @@
{
"variants": {
"": { "model": "create:block/palettes/dolomite_layers" }
}
}

View file

@ -0,0 +1,5 @@
{
"variants": {
"": { "model": "create:block/palettes/gabbro_layers" }
}
}

View file

@ -0,0 +1,5 @@
{
"variants": {
"": { "model": "create:block/palettes/granite_layers" }
}
}

View file

@ -0,0 +1,5 @@
{
"variants": {
"": { "model": "create:block/palettes/weathered_limestone_layers" }
}
}

View file

@ -69,6 +69,10 @@
"block.create.copper_ore": "Copper Ore",
"block.create.zinc_ore": "Zinc Ore",
"block.create.andesite_casing": "Andesite Casing",
"block.create.brass_casing": "Brass Casing",
"block.create.copper_casing": "Copper Casing",
"block.create.cogwheel": "Cogwheel",
"block.create.large_cogwheel": "Large Cogwheel",
"block.create.turntable": "Turntable",
@ -127,8 +131,11 @@
"block.create.window_in_a_block": "Block with Glass Pane",
"block.create.andesite_bricks": "Andesite Bricks",
"block.create.andesite_layers": "Layered Andesite",
"block.create.diorite_bricks": "Diorite Bricks",
"block.create.diorite_layers": "Layered Diorite",
"block.create.granite_bricks": "Granite Bricks",
"block.create.granite_layers": "Layered Granite",
"block.create.volcanic_rock": "Basalt",
@ -146,6 +153,7 @@
"block.create.indented_gabbro_slab": "Indented Gabbro Slab",
"block.create.slightly_mossy_gabbro_bricks": "Mossy Gabbro Bricks",
"block.create.mossy_gabbro_bricks": "Overgrown Gabbro Bricks",
"block.create.gabbro_layers": "Layered Gabbro",
"block.create.weathered_limestone": "Weathered Limestone",
"block.create.weathered_limestone_stairs": "Weathered Limestone Stairs",
@ -158,6 +166,7 @@
"block.create.weathered_limestone_bricks_wall": "Weathered Limestone Brick Wall",
"block.create.weathered_limestone_bricks_slab": "Weathered Limestone Brick Slab",
"block.create.weathered_limestone_pillar": "Weathered Limestone Pillar",
"block.create.weathered_limestone_layers": "Weathered Layered Limestone",
"block.create.dolomite_pillar": "Dolomite Pillar",
"block.create.dolomite": "Dolomite",
@ -169,6 +178,7 @@
"block.create.dolomite_bricks_stairs": "Dolomite Brick Stairs",
"block.create.dolomite_bricks_slab": "Dolomite Brick Slab",
"block.create.polished_dolomite": "Polished Dolomite",
"block.create.dolomite_layers": "Layered Dolomite",
"block.create.limesand": "Limesand",
"block.create.limestone": "Limestone",
@ -182,7 +192,7 @@
"block.create.polished_limestone": "Polished Limestone",
"block.create.polished_limestone_slab": "Polished Limestone Slab",
"block.create.limestone_pillar": "Limestone Pillar",
"block.create.limestone_layers": "Limestone Layers",
"block.create.limestone_layers": "Layered Limestone",
"block.create.schematicannon": "Schematicannon",
"block.create.schematic_table": "Schematic Table",

View file

@ -0,0 +1,6 @@
{
"parent": "block/cube_all",
"textures": {
"all": "create:block/andesite_casing"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "block/cube_all",
"textures": {
"all": "create:block/crafter_top"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "block/cube_all",
"textures": {
"all": "create:block/copper_casing"
}
}

View file

@ -0,0 +1,7 @@
{
"parent": "block/cube_column",
"textures": {
"end": "block/polished_andesite",
"side": "create:block/andesite_layers"
}
}

View file

@ -0,0 +1,7 @@
{
"parent": "block/cube_column",
"textures": {
"end": "block/polished_diorite",
"side": "create:block/diorite_layers"
}
}

View file

@ -0,0 +1,7 @@
{
"parent": "block/cube_column",
"textures": {
"end": "create:block/polished_dolomite",
"side": "create:block/dolomite_layers"
}
}

View file

@ -0,0 +1,7 @@
{
"parent": "block/cube_column",
"textures": {
"end": "create:block/polished_gabbro",
"side": "create:block/gabbro_layers"
}
}

View file

@ -0,0 +1,7 @@
{
"parent": "block/cube_column",
"textures": {
"end": "block/polished_granite",
"side": "create:block/granite_layers"
}
}

View file

@ -0,0 +1,7 @@
{
"parent": "block/cube_column",
"textures": {
"end": "create:block/polished_weathered_limestone",
"side": "create:block/weathered_limestone_layers"
}
}

View file

@ -0,0 +1,3 @@
{
"parent": "create:block/andesite_casing"
}

View file

@ -0,0 +1,3 @@
{
"parent": "create:block/palettes/andesite_layers"
}

View file

@ -0,0 +1,3 @@
{
"parent": "create:block/brass_casing"
}

View file

@ -0,0 +1,3 @@
{
"parent": "create:block/copper_casing"
}

View file

@ -0,0 +1,3 @@
{
"parent": "create:block/palettes/diorite_layers"
}

View file

@ -0,0 +1,3 @@
{
"parent": "create:block/palettes/dolomite_layers"
}

View file

@ -0,0 +1,3 @@
{
"parent": "create:block/palettes/gabbro_layers"
}

View file

@ -0,0 +1,3 @@
{
"parent": "create:block/palettes/granite_layers"
}

View file

@ -0,0 +1,3 @@
{
"parent": "create:block/palettes/weathered_limestone_layers"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 567 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 506 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 993 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 892 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 867 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 407 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1,004 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 554 B

After

Width:  |  Height:  |  Size: 640 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 503 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 634 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 744 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 311 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 671 B

After

Width:  |  Height:  |  Size: 631 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 774 B

After

Width:  |  Height:  |  Size: 661 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 668 B

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "create:andesite_layers"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "create:diorite_layers"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "create:dolomite_layers"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "create:gabbro_layers"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "create:granite_layers"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "create:weathered_limestone_layers"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -0,0 +1,14 @@
{
"type": "minecraft:stonecutting",
"ingredient": {
"item": "minecraft:andesite"
},
"result": "create:andesite_layers",
"count": 1,
"conditions": [
{
"type": "create:module",
"module": "palettes"
}
]
}

View file

@ -0,0 +1,14 @@
{
"type": "minecraft:stonecutting",
"ingredient": {
"item": "minecraft:diorite"
},
"result": "create:diorite_layers",
"count": 1,
"conditions": [
{
"type": "create:module",
"module": "palettes"
}
]
}

View file

@ -0,0 +1,14 @@
{
"type": "minecraft:stonecutting",
"ingredient": {
"item": "create:dolomite"
},
"result": "create:dolomite_layers",
"count": 1,
"conditions": [
{
"type": "create:module",
"module": "palettes"
}
]
}

View file

@ -0,0 +1,14 @@
{
"type": "minecraft:stonecutting",
"ingredient": {
"item": "create:gabbro"
},
"result": "create:gabbro_layers",
"count": 1,
"conditions": [
{
"type": "create:module",
"module": "palettes"
}
]
}

View file

@ -0,0 +1,14 @@
{
"type": "minecraft:stonecutting",
"ingredient": {
"item": "minecraft:granite"
},
"result": "create:granite_layers",
"count": 1,
"conditions": [
{
"type": "create:module",
"module": "palettes"
}
]
}

View file

@ -0,0 +1,14 @@
{
"type": "minecraft:stonecutting",
"ingredient": {
"item": "create:limestone"
},
"result": "create:limestone_layers",
"count": 1,
"conditions": [
{
"type": "create:module",
"module": "palettes"
}
]
}

View file

@ -0,0 +1,14 @@
{
"type": "minecraft:stonecutting",
"ingredient": {
"item": "create:weathered_limestone"
},
"result": "create:weathered_limestone_layers",
"count": 1,
"conditions": [
{
"type": "create:module",
"module": "palettes"
}
]
}