Fixed block rendering types

This commit is contained in:
Forstride 2019-12-26 02:14:28 -05:00
parent cd43eceda6
commit 7b727bfbcf

View file

@ -13,14 +13,18 @@ import biomesoplenty.common.util.inventory.ItemGroupBOP;
import net.minecraft.block.*;
import net.minecraft.block.material.Material;
import net.minecraft.block.material.MaterialColor;
import net.minecraft.client.renderer.RenderType;
import net.minecraft.client.renderer.RenderTypeLookup;
import net.minecraft.item.BlockItem;
import net.minecraft.item.Item;
import net.minecraft.potion.Effects;
import net.minecraft.util.SoundEvents;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.common.ToolType;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.loading.FMLEnvironment;
import net.minecraftforge.registries.ForgeRegistries;
import static biomesoplenty.api.block.BOPBlocks.*;
@ -313,6 +317,130 @@ public class ModBlocks
potted_sprout = registerBlockNoGroup(new FlowerPotBlock(sprout, Block.Properties.create(Material.MISCELLANEOUS).zeroHardnessAndResistance()), "potted_sprout");
potted_toadstool = registerBlockNoGroup(new FlowerPotBlock(toadstool, Block.Properties.create(Material.MISCELLANEOUS).zeroHardnessAndResistance()), "potted_toadstool");
potted_glowshroom = registerBlockNoGroup(new FlowerPotBlock(glowshroom, Block.Properties.create(Material.MISCELLANEOUS).zeroHardnessAndResistance().lightValue(6)), "potted_glowshroom");
if (FMLEnvironment.dist == Dist.CLIENT)
{
RenderType transparentRenderType = RenderType.func_228641_d_();
RenderType cutoutRenderType = RenderType.func_228643_e_();
RenderType translucentRenderType = RenderType.func_228645_f_();
RenderTypeLookup.setRenderLayer(origin_leaves, transparentRenderType);
RenderTypeLookup.setRenderLayer(flowering_oak_leaves, transparentRenderType);
RenderTypeLookup.setRenderLayer(yellow_autumn_leaves, transparentRenderType);
RenderTypeLookup.setRenderLayer(orange_autumn_leaves, transparentRenderType);
RenderTypeLookup.setRenderLayer(maple_leaves, transparentRenderType);
RenderTypeLookup.setRenderLayer(fir_leaves, transparentRenderType);
RenderTypeLookup.setRenderLayer(redwood_leaves, transparentRenderType);
RenderTypeLookup.setRenderLayer(white_cherry_leaves, transparentRenderType);
RenderTypeLookup.setRenderLayer(pink_cherry_leaves, transparentRenderType);
RenderTypeLookup.setRenderLayer(mahogany_leaves, transparentRenderType);
RenderTypeLookup.setRenderLayer(jacaranda_leaves, transparentRenderType);
RenderTypeLookup.setRenderLayer(palm_leaves, transparentRenderType);
RenderTypeLookup.setRenderLayer(willow_leaves, transparentRenderType);
RenderTypeLookup.setRenderLayer(dead_leaves, transparentRenderType);
RenderTypeLookup.setRenderLayer(magic_leaves, transparentRenderType);
RenderTypeLookup.setRenderLayer(umbran_leaves, transparentRenderType);
RenderTypeLookup.setRenderLayer(hellbark_leaves, transparentRenderType);
RenderTypeLookup.setRenderLayer(origin_sapling, cutoutRenderType);
RenderTypeLookup.setRenderLayer(flowering_oak_sapling, cutoutRenderType);
RenderTypeLookup.setRenderLayer(yellow_autumn_sapling, cutoutRenderType);
RenderTypeLookup.setRenderLayer(orange_autumn_sapling, cutoutRenderType);
RenderTypeLookup.setRenderLayer(maple_sapling, cutoutRenderType);
RenderTypeLookup.setRenderLayer(fir_sapling, cutoutRenderType);
RenderTypeLookup.setRenderLayer(redwood_sapling, cutoutRenderType);
RenderTypeLookup.setRenderLayer(white_cherry_sapling, cutoutRenderType);
RenderTypeLookup.setRenderLayer(pink_cherry_sapling, cutoutRenderType);
RenderTypeLookup.setRenderLayer(mahogany_sapling, cutoutRenderType);
RenderTypeLookup.setRenderLayer(jacaranda_sapling, cutoutRenderType);
RenderTypeLookup.setRenderLayer(palm_sapling, cutoutRenderType);
RenderTypeLookup.setRenderLayer(willow_sapling, cutoutRenderType);
RenderTypeLookup.setRenderLayer(dead_sapling, cutoutRenderType);
RenderTypeLookup.setRenderLayer(magic_sapling, cutoutRenderType);
RenderTypeLookup.setRenderLayer(umbran_sapling, cutoutRenderType);
RenderTypeLookup.setRenderLayer(hellbark_sapling, cutoutRenderType);
RenderTypeLookup.setRenderLayer(rose, cutoutRenderType);
RenderTypeLookup.setRenderLayer(violet, cutoutRenderType);
RenderTypeLookup.setRenderLayer(lavender, cutoutRenderType);
RenderTypeLookup.setRenderLayer(wildflower, cutoutRenderType);
RenderTypeLookup.setRenderLayer(orange_cosmos, cutoutRenderType);
RenderTypeLookup.setRenderLayer(pink_daffodil, cutoutRenderType);
RenderTypeLookup.setRenderLayer(pink_hibiscus, cutoutRenderType);
RenderTypeLookup.setRenderLayer(glowflower, cutoutRenderType);
RenderTypeLookup.setRenderLayer(wilted_lily, cutoutRenderType);
RenderTypeLookup.setRenderLayer(burning_blossom, cutoutRenderType);
RenderTypeLookup.setRenderLayer(blue_hydrangea, cutoutRenderType);
RenderTypeLookup.setRenderLayer(goldenrod, cutoutRenderType);
RenderTypeLookup.setRenderLayer(willow_vine, cutoutRenderType);
RenderTypeLookup.setRenderLayer(sprout, cutoutRenderType);
RenderTypeLookup.setRenderLayer(bush, cutoutRenderType);
RenderTypeLookup.setRenderLayer(barley, cutoutRenderType);
RenderTypeLookup.setRenderLayer(dune_grass, cutoutRenderType);
RenderTypeLookup.setRenderLayer(desert_grass, cutoutRenderType);
RenderTypeLookup.setRenderLayer(dead_grass, cutoutRenderType);
RenderTypeLookup.setRenderLayer(cattail, cutoutRenderType);
RenderTypeLookup.setRenderLayer(tall_cattail, cutoutRenderType);
RenderTypeLookup.setRenderLayer(reed, cutoutRenderType);
RenderTypeLookup.setRenderLayer(watergrass, cutoutRenderType);
RenderTypeLookup.setRenderLayer(mangrove_root, cutoutRenderType);
RenderTypeLookup.setRenderLayer(bramble, cutoutRenderType);
RenderTypeLookup.setRenderLayer(toadstool, cutoutRenderType);
RenderTypeLookup.setRenderLayer(glowshroom, cutoutRenderType);
RenderTypeLookup.setRenderLayer(potted_origin_sapling, cutoutRenderType);
RenderTypeLookup.setRenderLayer(potted_flowering_oak_sapling, cutoutRenderType);
RenderTypeLookup.setRenderLayer(potted_yellow_autumn_sapling, cutoutRenderType);
RenderTypeLookup.setRenderLayer(potted_orange_autumn_sapling, cutoutRenderType);
RenderTypeLookup.setRenderLayer(potted_maple_sapling, cutoutRenderType);
RenderTypeLookup.setRenderLayer(potted_fir_sapling, cutoutRenderType);
RenderTypeLookup.setRenderLayer(potted_redwood_sapling, cutoutRenderType);
RenderTypeLookup.setRenderLayer(potted_white_cherry_sapling, cutoutRenderType);
RenderTypeLookup.setRenderLayer(potted_pink_cherry_sapling, cutoutRenderType);
RenderTypeLookup.setRenderLayer(potted_mahogany_sapling, cutoutRenderType);
RenderTypeLookup.setRenderLayer(potted_jacaranda_sapling, cutoutRenderType);
RenderTypeLookup.setRenderLayer(potted_palm_sapling, cutoutRenderType);
RenderTypeLookup.setRenderLayer(potted_willow_sapling, cutoutRenderType);
RenderTypeLookup.setRenderLayer(potted_dead_sapling, cutoutRenderType);
RenderTypeLookup.setRenderLayer(potted_magic_sapling, cutoutRenderType);
RenderTypeLookup.setRenderLayer(potted_umbran_sapling, cutoutRenderType);
RenderTypeLookup.setRenderLayer(potted_hellbark_sapling, cutoutRenderType);
RenderTypeLookup.setRenderLayer(potted_rose, cutoutRenderType);
RenderTypeLookup.setRenderLayer(potted_violet, cutoutRenderType);
RenderTypeLookup.setRenderLayer(potted_lavender, cutoutRenderType);
RenderTypeLookup.setRenderLayer(potted_wildflower, cutoutRenderType);
RenderTypeLookup.setRenderLayer(potted_orange_cosmos, cutoutRenderType);
RenderTypeLookup.setRenderLayer(potted_pink_daffodil, cutoutRenderType);
RenderTypeLookup.setRenderLayer(potted_pink_hibiscus, cutoutRenderType);
RenderTypeLookup.setRenderLayer(potted_glowflower, cutoutRenderType);
RenderTypeLookup.setRenderLayer(potted_wilted_lily, cutoutRenderType);
RenderTypeLookup.setRenderLayer(potted_burning_blossom, cutoutRenderType);
RenderTypeLookup.setRenderLayer(potted_sprout, cutoutRenderType);
RenderTypeLookup.setRenderLayer(potted_toadstool, cutoutRenderType);
RenderTypeLookup.setRenderLayer(potted_glowshroom, cutoutRenderType);
RenderTypeLookup.setRenderLayer(fir_door, cutoutRenderType);
RenderTypeLookup.setRenderLayer(redwood_door, cutoutRenderType);
RenderTypeLookup.setRenderLayer(cherry_door, cutoutRenderType);
RenderTypeLookup.setRenderLayer(mahogany_door, cutoutRenderType);
RenderTypeLookup.setRenderLayer(jacaranda_door, cutoutRenderType);
RenderTypeLookup.setRenderLayer(palm_door, cutoutRenderType);
RenderTypeLookup.setRenderLayer(willow_door, cutoutRenderType);
RenderTypeLookup.setRenderLayer(dead_door, cutoutRenderType);
RenderTypeLookup.setRenderLayer(magic_door, cutoutRenderType);
RenderTypeLookup.setRenderLayer(umbran_door, cutoutRenderType);
RenderTypeLookup.setRenderLayer(hellbark_door, cutoutRenderType);
RenderTypeLookup.setRenderLayer(fir_trapdoor, cutoutRenderType);
RenderTypeLookup.setRenderLayer(redwood_trapdoor, cutoutRenderType);
RenderTypeLookup.setRenderLayer(cherry_trapdoor, cutoutRenderType);
RenderTypeLookup.setRenderLayer(mahogany_trapdoor, cutoutRenderType);
RenderTypeLookup.setRenderLayer(jacaranda_trapdoor, cutoutRenderType);
RenderTypeLookup.setRenderLayer(palm_trapdoor, cutoutRenderType);
RenderTypeLookup.setRenderLayer(willow_trapdoor, cutoutRenderType);
RenderTypeLookup.setRenderLayer(dead_trapdoor, cutoutRenderType);
RenderTypeLookup.setRenderLayer(magic_trapdoor, cutoutRenderType);
RenderTypeLookup.setRenderLayer(umbran_trapdoor, cutoutRenderType);
RenderTypeLookup.setRenderLayer(hellbark_trapdoor, cutoutRenderType);
}
}
public static Block registerBlock(Block block, String name)