Start changes model loading (early WIP)

This commit is contained in:
Aleksey 2021-05-10 22:21:51 +03:00
parent 807e25c907
commit ce98c5857e
57 changed files with 122 additions and 97 deletions

View file

@ -60,7 +60,7 @@ public class BulbVineLanternBlock extends EndLanternBlock implements IRenderType
}
@Override
public String getModelPattern(String block) {
public String getModelString(String block) {
ResourceLocation blockId = Registry.BLOCK.getKey(this);
Map<String, String> map = Maps.newHashMap();
map.put("%glow%", getGlowTexture());

View file

@ -46,7 +46,7 @@ public class ChandelierBlock extends AttachedBlock implements IRenderTypeable, B
}
@Override
public String getModelPattern(String block) {
public String getModelString(String block) {
ResourceLocation blockId = Registry.BLOCK.getKey(this);
if (block.contains("item")) {
return Patterns.createJson(Patterns.ITEM_GENERATED, "item/" + blockId.getPath());

View file

@ -93,7 +93,7 @@ public class EmeraldIceBlock extends HalfTransparentBlock implements IRenderType
}
@Override
public String getModelPattern(String block) {
public String getModelString(String block) {
ResourceLocation blockId = Registry.BLOCK.getKey(this);
return Patterns.createJson(Patterns.BLOCK_BASE, blockId.getPath(), block);
}

View file

@ -55,7 +55,7 @@ public class EndPathBlock extends BlockBaseNotFull {
}
@Override
public String getModelPattern(String block) {
public String getModelString(String block) {
String name = Registry.BLOCK.getKey(this).getPath();
Map<String, String> map = Maps.newHashMap();
map.put("%top%", name + "_top");

View file

@ -17,7 +17,7 @@ public class EndPedestal extends PedestalBlock {
}
@Override
public String getModelPattern(String block) {
public String getModelString(String block) {
ResourceLocation blockId = Registry.BLOCK.getKey(parent);
String name = blockId.getPath();
Map<String, String> textures = new HashMap<String, String>() {

View file

@ -95,7 +95,7 @@ public class EndTerrainBlock extends BlockBase {
}
@Override
public String getModelPattern(String block) {
public String getModelString(String block) {
String name = Registry.BLOCK.getKey(this).getPath();
Map<String, String> map = Maps.newHashMap();
map.put("%top%", "betterend:block/" + name + "_top");

View file

@ -36,7 +36,7 @@ public class HydraluxPetalColoredBlock extends HydraluxPetalBlock implements ICo
}
@Override
public String getModelPattern(String block) {
public String getModelString(String block) {
String path = "betterend:block/block_petal_colored";
return Patterns.createJson(Patterns.BLOCK_PETAL_COLORED, path, path);
}

View file

@ -73,7 +73,7 @@ public class JellyshroomCapBlock extends SlimeBlock implements IRenderTypeable,
}
@Override
public String getModelPattern(String block) {
public String getModelString(String block) {
return Patterns.createJson(Patterns.BLOCK_COLORED, "jellyshroom_cap");
}

View file

@ -16,7 +16,7 @@ public class PedestalVanilla extends PedestalBlock {
}
@Override
public String getModelPattern(String block) {
public String getModelString(String block) {
ResourceLocation blockId = Registry.BLOCK.getKey(parent);
String name = blockId.getPath().replace("_block", "");
Map<String, String> textures = new HashMap<String, String>() {

View file

@ -74,7 +74,7 @@ public class UmbrellaTreeMembraneBlock extends SlimeBlock implements IRenderType
}
@Override
public String getModelPattern(String block) {
public String getModelString(String block) {
ResourceLocation blockId = Registry.BLOCK.getKey(this);
return Patterns.createJson(Patterns.BLOCK_BASE, blockId.getPath(), block);
}

View file

@ -12,7 +12,7 @@ public class BarkBlock extends EndPillarBlock {
}
@Override
public String getModelPattern(String block) {
public String getModelString(String block) {
ResourceLocation blockId = Registry.BLOCK.getKey(this);
return Patterns.createJson(Patterns.BLOCK_BASE, getName(blockId), blockId.getPath());
}

View file

@ -61,7 +61,7 @@ public class EndAnvilBlock extends AnvilBlock implements BlockPatterned {
}
@Override
public String getModelPattern(String block) {
public String getModelString(String block) {
ResourceLocation blockId = Registry.BLOCK.getKey(this);
Map<String, String> map = Maps.newHashMap();
map.put("%anvil%", blockId.getPath());

View file

@ -95,7 +95,7 @@ public class EndBarrelBlock extends BarrelBlock implements BlockPatterned {
}
@Override
public String getModelPattern(String block) {
public String getModelString(String block) {
String texture = Registry.BLOCK.getKey(this).getPath();
if (block.contains("open")) {
return Patterns.createJson(Patterns.BLOCK_BARREL_OPEN, texture, texture);

View file

@ -40,7 +40,7 @@ public class EndBookshelfBlock extends BlockBase {
}
@Override
public String getModelPattern(String block) {
public String getModelString(String block) {
ResourceLocation blockId = Registry.BLOCK.getKey(this);
return Patterns.createJson(Patterns.BLOCK_BOOKSHELF, getName(blockId), blockId.getPath());
}

View file

@ -35,7 +35,7 @@ public class EndChainBlock extends ChainBlock implements BlockPatterned, IRender
}
@Override
public String getModelPattern(String block) {
public String getModelString(String block) {
ResourceLocation blockId = Registry.BLOCK.getKey(this);
if (block.contains("item")) {
return Patterns.createJson(Patterns.ITEM_GENERATED, "item/" + blockId.getPath());

View file

@ -49,7 +49,7 @@ public class EndChestBlock extends ChestBlock implements BlockPatterned {
}
@Override
public String getModelPattern(String path) {
public String getModelString(String path) {
ResourceLocation blockId = Registry.BLOCK.getKey(this);
ResourceLocation parentId = Registry.BLOCK.getKey(parent);
if (path.contains("item")) {

View file

@ -32,7 +32,7 @@ public class EndComposterBlock extends ComposterBlock implements BlockPatterned
}
@Override
public String getModelPattern(String block) {
public String getModelString(String block) {
ResourceLocation blockId = Registry.BLOCK.getKey(this);
String blockName = blockId.getPath();
return Patterns.createJson(Patterns.BLOCK_COMPOSTER, blockName);

View file

@ -33,7 +33,7 @@ public class EndCraftingTableBlock extends CraftingTableBlock implements BlockPa
}
@Override
public String getModelPattern(String block) {
public String getModelString(String block) {
ResourceLocation blockId = Registry.BLOCK.getKey(this);
String blockName = blockId.getPath();
return Patterns.createJson(Patterns.BLOCK_SIDED, new HashMap<String, String>() {

View file

@ -43,7 +43,7 @@ public class EndDoorBlock extends DoorBlock implements IRenderTypeable, BlockPat
}
@Override
public String getModelPattern(String block) {
public String getModelString(String block) {
String blockId = Registry.BLOCK.getKey(this).getPath();
if (block.contains("item")) {
return Patterns.createJson(Patterns.ITEM_GENERATED, block);

View file

@ -36,7 +36,7 @@ public class EndFenceBlock extends FenceBlock implements BlockPatterned {
}
@Override
public String getModelPattern(String block) {
public String getModelString(String block) {
ResourceLocation blockId = Registry.BLOCK.getKey(this);
ResourceLocation parentId = Registry.BLOCK.getKey(parent);
if (block.contains("item")) {

View file

@ -57,7 +57,7 @@ public class EndFurnaceBlock extends FurnaceBlock implements BlockPatterned, IRe
}
@Override
public String getModelPattern(String block) {
public String getModelString(String block) {
ResourceLocation blockId = Registry.BLOCK.getKey(this);
Map<String, String> map = Maps.newHashMap();
map.put("%top%", blockId.getPath() + "_top");

View file

@ -36,7 +36,7 @@ public class EndGateBlock extends FenceGateBlock implements BlockPatterned {
}
@Override
public String getModelPattern(String block) {
public String getModelString(String block) {
ResourceLocation blockId = Registry.BLOCK.getKey(this);
ResourceLocation parentId = Registry.BLOCK.getKey(parent);
if (block.contains("wall")) {

View file

@ -144,7 +144,7 @@ public class EndLadderBlock extends BlockBaseNotFull implements IRenderTypeable,
}
@Override
public String getModelPattern(String block) {
public String getModelString(String block) {
ResourceLocation blockId = Registry.BLOCK.getKey(this);
if (block.contains("item")) {
return Patterns.createJson(Patterns.ITEM_BLOCK, blockId.getPath());

View file

@ -60,7 +60,7 @@ public class EndLeavesBlock extends LeavesBlock implements BlockPatterned, IRend
}
@Override
public String getModelPattern(String block) {
public String getModelString(String block) {
String blockId = Registry.BLOCK.getKey(this).getPath();
return Patterns.createJson(Patterns.BLOCK_BASE, blockId, blockId);
}

View file

@ -37,7 +37,7 @@ public class EndMetalPaneBlock extends IronBarsBlock implements BlockPatterned,
}
@Override
public String getModelPattern(String block) {
public String getModelString(String block) {
ResourceLocation blockId = Registry.BLOCK.getKey(this);
if (block.contains("item")) {
return Patterns.createJson(Patterns.ITEM_BLOCK, blockId.getPath());

View file

@ -36,7 +36,7 @@ public class EndMetalPlateBlock extends WeightedPressurePlateBlock implements Bl
}
@Override
public String getModelPattern(String block) {
public String getModelString(String block) {
ResourceLocation blockId = Registry.BLOCK.getKey(this);
ResourceLocation parentId = Registry.BLOCK.getKey(parent);
if (block.contains("down")) {

View file

@ -78,7 +78,7 @@ public class EndOreBlock extends OreBlock implements BlockPatterned {
}
@Override
public String getModelPattern(String block) {
public String getModelString(String block) {
ResourceLocation blockId = Registry.BLOCK.getKey(this);
return Patterns.createJson(Patterns.BLOCK_BASE, blockId.getPath(), block);
}

View file

@ -36,7 +36,7 @@ public class EndPillarBlock extends RotatedPillarBlock implements BlockPatterned
}
@Override
public String getModelPattern(String block) {
public String getModelString(String block) {
String texture = Registry.BLOCK.getKey(this).getPath();
return Patterns.createJson(Patterns.BLOCK_PILLAR, texture, texture);
}

View file

@ -36,7 +36,7 @@ public class EndPlateBlock extends PressurePlateBlock implements BlockPatterned
}
@Override
public String getModelPattern(String block) {
public String getModelString(String block) {
ResourceLocation blockId = Registry.BLOCK.getKey(this);
ResourceLocation parentId = Registry.BLOCK.getKey(parent);
if (block.contains("down")) {

View file

@ -152,7 +152,7 @@ public class EndSignBlock extends SignBlock implements BlockPatterned, ISpetialI
}
@Override
public String getModelPattern(String path) {
public String getModelString(String path) {
ResourceLocation parentId = Registry.BLOCK.getKey(parent);
if (path.contains("item")) {
return Patterns.createJson(Patterns.ITEM_GENERATED, path);

View file

@ -36,7 +36,7 @@ public class EndSlabBlock extends SlabBlock implements BlockPatterned {
}
@Override
public String getModelPattern(String block) {
public String getModelString(String block) {
ResourceLocation blockId = Registry.BLOCK.getKey(this);
ResourceLocation parentId = Registry.BLOCK.getKey(parent);
return Patterns.createJson(Patterns.BLOCK_SLAB, parentId.getPath(), blockId.getPath());

View file

@ -37,7 +37,7 @@ public class EndStairsBlock extends StairBlock implements BlockPatterned {
}
@Override
public String getModelPattern(String block) {
public String getModelString(String block) {
ResourceLocation blockId = Registry.BLOCK.getKey(this);
ResourceLocation parentId = Registry.BLOCK.getKey(parent);
if (block.contains("inner")) {

View file

@ -36,7 +36,7 @@ public class EndStoneButtonBlock extends StoneButtonBlock implements BlockPatter
}
@Override
public String getModelPattern(String block) {
public String getModelString(String block) {
ResourceLocation blockId = Registry.BLOCK.getKey(this);
ResourceLocation parentId = Registry.BLOCK.getKey(parent);
if (block.contains("item")) {

View file

@ -40,7 +40,7 @@ public class EndTrapdoorBlock extends TrapDoorBlock implements IRenderTypeable,
}
@Override
public String getModelPattern(String block) {
public String getModelString(String block) {
ResourceLocation blockId = Registry.BLOCK.getKey(this);
String name = blockId.getPath();
return Patterns.createJson(Patterns.BLOCK_TRAPDOOR, new HashMap<String, String>() {

View file

@ -37,7 +37,7 @@ public class EndWallBlock extends WallBlock implements BlockPatterned {
}
@Override
public String getModelPattern(String block) {
public String getModelString(String block) {
ResourceLocation blockId = Registry.BLOCK.getKey(this);
ResourceLocation parentId = Registry.BLOCK.getKey(parent);
if (block.contains("item")) {

View file

@ -36,7 +36,7 @@ public class EndWoodenButtonBlock extends WoodButtonBlock implements BlockPatter
}
@Override
public String getModelPattern(String block) {
public String getModelString(String block) {
ResourceLocation blockId = Registry.BLOCK.getKey(this);
ResourceLocation parentId = Registry.BLOCK.getKey(parent);
if (block.contains("item")) {

View file

@ -104,7 +104,7 @@ public abstract class FeatureSaplingBlock extends BlockBaseNotFull implements Bo
}
@Override
public String getModelPattern(String block) {
public String getModelString(String block) {
if (block.contains("item")) {
block = block.split("/")[1];
return Patterns.createJson(Patterns.ITEM_BLOCK, block);

View file

@ -341,7 +341,7 @@ public class PedestalBlock extends BlockBaseNotFull implements EntityBlock {
}
@Override
public String getModelPattern(String block) {
public String getModelString(String block) {
ResourceLocation blockId = Registry.BLOCK.getKey(parent);
String name = blockId.getPath();
Map<String, String> textures = new HashMap<String, String>() {

View file

@ -43,7 +43,7 @@ public class SimpleLeavesBlock extends BlockBaseNotFull implements IRenderTypeab
}
@Override
public String getModelPattern(String block) {
public String getModelString(String block) {
String texture = Registry.BLOCK.getKey(this).getPath();
return Patterns.createJson(Patterns.BLOCK_BASE, texture, texture);
}

View file

@ -192,7 +192,7 @@ public class StalactiteBlock extends BlockBaseNotFull implements SimpleWaterlogg
}
@Override
public String getModelPattern(String block) {
public String getModelString(String block) {
ResourceLocation blockId = Registry.BLOCK.getKey(this);
if (block.contains("item")) {
return Patterns.createJson(Patterns.ITEM_GENERATED, "item/" + blockId.getPath());

View file

@ -68,7 +68,7 @@ public class StoneLanternBlock extends EndLanternBlock implements IColorProvider
}
@Override
public String getModelPattern(String block) {
public String getModelString(String block) {
String texture = Registry.BLOCK.getKey(this).getPath();
if (block.contains("ceil")) {
return Patterns.createJson(Patterns.BLOCK_STONE_LANTERN_CEIL, texture, texture);

View file

@ -49,7 +49,7 @@ public class TripleTerrainBlock extends EndTerrainBlock {
}
@Override
public String getModelPattern(String block) {
public String getModelString(String block) {
String name = Registry.BLOCK.getKey(this).getPath();
if (block.endsWith("_middle")) {
return Patterns.createJson(Patterns.BLOCK_BASE, name + "_top", name + "_top");