mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-22 13:09:42 +00:00
Bunch of TE particle textures. Fix a bellows crash and teru teru bozu not working with sunflower
This commit is contained in:
1 parent
6c9a01978a
commit
80bd63be0b
15 files changed
+151
-17
No files matched your search
@@ -12,6 +12,7 @@ import com.google.common.collect.ImmutableList;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockDoublePlant;
|
||||
import net.minecraft.block.BlockFlower;
|
||||
import net.minecraft.block.BlockSkull;
|
||||
import net.minecraft.block.BlockSlab;
|
||||
import net.minecraft.block.BlockWall;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
@@ -561,7 +562,7 @@ public final class ModelHandler {
|
||||
registerItemModelMetas(blackHoleTalisman, LibItemNames.BLACK_HOLE_TALISMAN, 2);
|
||||
registerItemModelMetas(slimeBottle, LibItemNames.SLIME_BOTTLE, 2);
|
||||
registerItemModelMetas(grassSeeds, LibItemNames.GRASS_SEEDS, 9);
|
||||
registerItemModelMetas(quartz, LibItemNames.QUARTZ, 8);
|
||||
registerItemModelMetas(quartz, LibItemNames.QUARTZ, 7);
|
||||
registerItemModelMetas(cosmetic, LibItemNames.COSMETIC, 32);
|
||||
registerItemModelMetas(craftPattern, LibItemNames.CRAFT_PATTERN, 9);
|
||||
registerItemModelMetas(virus, LibItemNames.VIRUS, 2);
|
||||
@@ -762,6 +763,14 @@ public final class ModelHandler {
|
||||
for (Block b : otherFullSlabs) {
|
||||
ModelLoader.setCustomStateMapper(b, (new StateMap.Builder()).ignore(BlockModSlab.DUMMY, BlockSlab.HALF).build());
|
||||
}
|
||||
|
||||
// Ignore everything in TESR items to suppress missing model errors
|
||||
ModelLoader.setCustomStateMapper(ModBlocks.avatar, new StateMap.Builder().ignore(BotaniaStateProps.CARDINALS).build());
|
||||
ModelLoader.setCustomStateMapper(ModBlocks.bellows, new StateMap.Builder().ignore(BotaniaStateProps.CARDINALS).build());
|
||||
ModelLoader.setCustomStateMapper(ModBlocks.brewery, new StateMap.Builder().ignore(BotaniaStateProps.POWERED).build());
|
||||
ModelLoader.setCustomStateMapper(ModBlocks.gaiaHead, new StateMap.Builder().ignore(BlockSkull.FACING, BlockSkull.NODROP).build());
|
||||
ModelLoader.setCustomStateMapper(ModBlocks.hourglass, new StateMap.Builder().ignore(BotaniaStateProps.POWERED).build());
|
||||
ModelLoader.setCustomStateMapper(ModBlocks.pump, new StateMap.Builder().ignore(BotaniaStateProps.CARDINALS).build());
|
||||
}
|
||||
|
||||
private static void registerMushrooms() {
|
||||
|
||||
@@ -43,18 +43,9 @@ public class RenderTileSkullOverride extends TileEntitySkullRenderer {
|
||||
|
||||
public void render(TileEntitySkull skull, float par1, float par2, float par3, EnumFacing par4, float par5, int par6, GameProfile gameProfile, int digProgress) {
|
||||
boolean gaia = skull == null || skull instanceof TileGaiaHead;
|
||||
if(par6 == 3 || gaia) {
|
||||
ResourceLocation resourcelocation = DefaultPlayerSkin.getDefaultSkinLegacy();
|
||||
if(gaia) {
|
||||
Minecraft minecraft = Minecraft.getMinecraft();
|
||||
if(gaia)
|
||||
resourcelocation = minecraft.thePlayer.getLocationSkin();
|
||||
else if(gameProfile != null) {
|
||||
Map map = minecraft.getSkinManager().loadSkinFromCache(gameProfile);
|
||||
|
||||
if (map.containsKey(MinecraftProfileTexture.Type.SKIN)) {
|
||||
resourcelocation = minecraft.getSkinManager().loadSkin((MinecraftProfileTexture)map.get(MinecraftProfileTexture.Type.SKIN), MinecraftProfileTexture.Type.SKIN);
|
||||
}
|
||||
}
|
||||
ResourceLocation resourcelocation = minecraft.thePlayer.getLocationSkin();
|
||||
bindTexture(resourcelocation);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.disableCull();
|
||||
@@ -81,13 +72,11 @@ public class RenderTileSkullOverride extends TileEntitySkullRenderer {
|
||||
GlStateManager.enableRescaleNormal();
|
||||
GlStateManager.scale(-1.0F, -1.0F, 1.0F);
|
||||
GlStateManager.enableAlpha();
|
||||
if(gaia)
|
||||
ShaderHelper.useShader(ShaderHelper.doppleganger, RenderDoppleganger.defaultCallback);
|
||||
ShaderHelper.useShader(ShaderHelper.doppleganger, RenderDoppleganger.defaultCallback);
|
||||
|
||||
modelSkull.render(null, 0F, 0F, 0F, par5, 0F, 0.0625F);
|
||||
|
||||
if(gaia)
|
||||
ShaderHelper.releaseShader();
|
||||
ShaderHelper.releaseShader();
|
||||
GlStateManager.popMatrix();
|
||||
} else super.renderSkull(par1, par2, par3, par4, par5, par6, gameProfile, digProgress);
|
||||
}
|
||||
|
||||
@@ -26,7 +26,9 @@ import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.world.Explosion;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import vazkii.botania.common.block.tile.TileFakeAir;
|
||||
import vazkii.botania.common.item.block.ItemBlockPool;
|
||||
import vazkii.botania.common.lib.LibBlockNames;
|
||||
|
||||
public class BlockFakeAir extends BlockModContainer {
|
||||
@@ -43,6 +45,17 @@ public class BlockFakeAir extends BlockModContainer {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean shouldRegisterInNameSet() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Block setUnlocalizedName(String par1Str) {
|
||||
GameRegistry.registerBlock(this, null, par1Str);
|
||||
return super.setUnlocalizedName(par1Str);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(World world, BlockPos pos, IBlockState state, Block block) {
|
||||
if(shouldRemove(world, pos))
|
||||
|
||||
@@ -39,7 +39,7 @@ public class BlockTeruTeruBozu extends BlockModContainer implements ILexiconable
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEntityCollidedWithBlock(World world, BlockPos pos, Entity e) {
|
||||
public void onEntityCollidedWithBlock(World world, BlockPos pos, IBlockState state, Entity e) {
|
||||
if(!world.isRemote && e instanceof EntityItem) {
|
||||
EntityItem item = (EntityItem) e;
|
||||
ItemStack stack = item.getEntityItem();
|
||||
|
||||
@@ -55,6 +55,9 @@ public class BlockBellows extends BlockModContainer implements ILexiconable {
|
||||
|
||||
@Override
|
||||
public IBlockState getStateFromMeta(int meta) {
|
||||
if (meta < 2 || meta > 5) {
|
||||
meta = 2;
|
||||
}
|
||||
return getDefaultState().withProperty(BotaniaStateProps.CARDINALS, EnumFacing.getFront(meta));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user