Rubber sapling could be potted. Closes #2279

This commit is contained in:
drcrazy 2020-11-08 20:53:33 +03:00
parent 8919a3ea30
commit 3cf57044ce
5 changed files with 16 additions and 6 deletions

View file

@ -109,7 +109,6 @@ public class TechRebornClient implements ClientModInitializer {
return Collections.emptyList();
}
@Nullable
@Override
public BakedModel bake(ModelLoader loader, Function<SpriteIdentifier, Sprite> textureGetter, ModelBakeSettings rotationContainer, Identifier modelId) {
return new DynamicCellBakedModel();
@ -134,7 +133,6 @@ public class TechRebornClient implements ClientModInitializer {
return Collections.emptyList();
}
@Nullable
@Override
public BakedModel bake(ModelLoader loader, Function<SpriteIdentifier, Sprite> textureGetter, ModelBakeSettings rotationContainer, Identifier modelId) {
return new DynamicBucketBakedModel();
@ -159,6 +157,7 @@ public class TechRebornClient implements ClientModInitializer {
BlockRenderLayerMap.INSTANCE.putBlock(TRContent.RUBBER_SAPLING, RenderLayer.getCutout());
BlockRenderLayerMap.INSTANCE.putBlock(TRContent.REINFORCED_GLASS, RenderLayer.getCutout());
BlockRenderLayerMap.INSTANCE.putBlock(TRContent.Machine.RESIN_BASIN.block, RenderLayer.getCutout());
BlockRenderLayerMap.INSTANCE.putBlock(TRContent.POTTED_RUBBER_SAPLING, RenderLayer.getCutout());
BlockRenderLayerMap.INSTANCE.putBlock(TRContent.RUBBER_LEAVES, RenderLayer.getCutoutMipped());

View file

@ -24,15 +24,13 @@
package techreborn.events;
import net.minecraft.block.FenceBlock;
import net.minecraft.block.FenceGateBlock;
import net.minecraft.block.PillarBlock;
import net.minecraft.block.SlabBlock;
import net.minecraft.block.*;
import net.minecraft.entity.EquipmentSlot;
import net.minecraft.item.Item;
import net.minecraft.item.Item.Settings;
import net.minecraft.item.Items;
import net.minecraft.item.ToolMaterials;
import net.minecraft.util.Identifier;
import reborncore.RebornRegistry;
import team.reborn.energy.EnergyTier;
import techreborn.TechReborn;
@ -102,6 +100,7 @@ public class ModRegistry {
RebornRegistry.registerBlock(TRContent.RUBBER_BUTTON = InitUtils.setup(new RubberButtonBlock(), "rubber_button"), itemGroup);
RebornRegistry.registerBlock(TRContent.RUBBER_PRESSURE_PLATE = InitUtils.setup(new RubberPressurePlateBlock(), "rubber_pressure_plate"), itemGroup);
RebornRegistry.registerBlock(TRContent.RUBBER_DOOR = InitUtils.setup(new RubberDoorBlock(), "rubber_door"), itemGroup);
RebornRegistry.registerBlockNoItem(TRContent.POTTED_RUBBER_SAPLING = InitUtils.setup(new FlowerPotBlock(TRContent.RUBBER_SAPLING, AbstractBlock.Settings.of(Material.SUPPORTED).breakInstantly().nonOpaque()), "potted_rubber_sapling"), new Identifier(TechReborn.MOD_ID, "potted_rubber_sapling"));
TechReborn.LOGGER.debug("TechReborns Blocks Loaded");
}

View file

@ -114,6 +114,7 @@ public class TRContent {
public static Block RUBBER_LOG_STRIPPED;
public static Block RUBBER_WOOD;
public static Block STRIPPED_RUBBER_WOOD;
public static Block POTTED_RUBBER_SAPLING;
// Armor
public static Item CLOAKING_DEVICE;

View file

@ -0,0 +1,5 @@
{
"variants": {
"": { "model": "techreborn:block/rubber/potted_rubber_sapling" }
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "minecraft:block/flower_pot_cross",
"textures": {
"plant": "techreborn:block/rubber_sapling"
}
}