mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-17 19:05:16 +00:00
more cleaning
This commit is contained in:
1 parent
776d62dcbc
commit
fbbb4e3c02
10 files changed
+46
-26
No files matched your search
@@ -4,17 +4,18 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntityFurnace;
|
||||
import net.minecraftforge.event.ForgeEventFactory;
|
||||
import vazkii.botania.common.Botania;
|
||||
import vazkii.botania.common.item.block.ItemBlockMod;
|
||||
|
||||
public class ItemBlockBlaze extends ItemBlockMod {
|
||||
public ItemBlockBlaze(Block block) {
|
||||
super(block);
|
||||
public ItemBlockBlaze(Block block, Properties props) {
|
||||
super(block, props);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemBurnTime(ItemStack stack) {
|
||||
return TileEntityFurnace.getItemBurnTime(new ItemStack(Items.BLAZE_ROD))
|
||||
* (Botania.gardenOfGlassLoaded ? 5 : 10);
|
||||
public int getBurnTime(ItemStack stack) {
|
||||
int blazeTime = ForgeEventFactory.getItemBurnTime(stack, TileEntityFurnace.getBurnTimes().getOrDefault(Items.BLAZE_ROD, 0));
|
||||
return blazeTime * (Botania.gardenOfGlassLoaded ? 5 : 10);
|
||||
}
|
||||
}
|
||||
@@ -17,6 +17,7 @@ import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.pathfinding.PathType;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
@@ -43,7 +44,6 @@ public class BlockTerraPlate extends BlockMod implements ILexiconable {
|
||||
|
||||
public BlockTerraPlate(Properties builder) {
|
||||
super(builder);
|
||||
BotaniaAPI.blacklistBlockFromMagnet(this, Short.MAX_VALUE);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@@ -77,7 +77,7 @@ public class BlockTerraPlate extends BlockMod implements ILexiconable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPassable(IBlockReader world, BlockPos pos) {
|
||||
public boolean allowsMovement(@Nonnull IBlockState state, @Nonnull IBlockReader world, @Nonnull BlockPos pos, PathType type) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
+21
-8
@@ -74,19 +74,32 @@ public class SubTileMarimorphosis extends SubTileFunctional {
|
||||
public IBlockState getStoneToPut(BlockPos coords) {
|
||||
Set<Type> types = BiomeDictionary.getTypes(supertile.getWorld().getBiome(coords));
|
||||
|
||||
List<Integer> values = new ArrayList<>();
|
||||
for(int i = 0; i < TYPES.length; i++) {
|
||||
List<Block> values = new ArrayList<>();
|
||||
for (Type type : TYPES) {
|
||||
int times = 1;
|
||||
if(types.contains(TYPES[i]))
|
||||
if (types.contains(type))
|
||||
times = 12;
|
||||
|
||||
for(int j = 0; j < times; j++)
|
||||
values.add(i);
|
||||
Block block = biomeTypeToBlock(type);
|
||||
for (int j = 0; j < times; j++)
|
||||
values.add(block);
|
||||
}
|
||||
|
||||
int meta = values.get(supertile.getWorld().rand.nextInt(values.size()));
|
||||
BiomeStoneVariant variant = BiomeStoneVariant.values()[meta];
|
||||
return ModFluffBlocks.biomeStoneA.getDefaultState().with(BotaniaStateProps.BIOMESTONE_VARIANT, variant);
|
||||
return values.get(supertile.getWorld().rand.nextInt(values.size())).getDefaultState();
|
||||
}
|
||||
|
||||
private Block biomeTypeToBlock(Type biomeType) {
|
||||
switch(biomeType.getName()) {
|
||||
default: throw new IllegalArgumentException("Should have verified type is suitable already: " + biomeType);
|
||||
case "FOREST": return ModFluffBlocks.biomeStoneForest;
|
||||
case "PLAINS": return ModFluffBlocks.biomeStonePlains;
|
||||
case "MOUNTAIN": return ModFluffBlocks.biomeStoneMountain;
|
||||
case "MUSHROOM": return ModFluffBlocks.biomeStoneFungal;
|
||||
case "SWAMP": return ModFluffBlocks.biomeStoneSwamp;
|
||||
case "SANDY": return ModFluffBlocks.biomeStoneDesert;
|
||||
case "COLD": return ModFluffBlocks.biomeStoneTaiga;
|
||||
case "MESA": return ModFluffBlocks.biomeStoneMesa;
|
||||
}
|
||||
}
|
||||
|
||||
private BlockPos getCoordsToPut() {
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
package vazkii.botania.common.core.version;
|
||||
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import vazkii.botania.common.lib.LibMisc;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.InputStreamReader;
|
||||
@@ -27,7 +28,7 @@ public class ThreadVersionChecker extends Thread {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
URL url = new URL("https://raw.githubusercontent.com/Vazkii/Botania/master/version/" + MinecraftForge.MC_VERSION + ".txt");
|
||||
URL url = new URL("https://raw.githubusercontent.com/Vazkii/Botania/master/version/" + LibMisc.MC_VERSION + ".txt");
|
||||
BufferedReader r = new BufferedReader(new InputStreamReader(url.openStream()));
|
||||
VersionChecker.onlineVersion = r.readLine();
|
||||
r.close();
|
||||
|
||||
@@ -53,8 +53,9 @@ public final class VersionChecker {
|
||||
player.sendMessage(new TextComponentTranslation("botania.versioning.flavour" + player.world.rand.nextInt(FLAVOUR_MESSAGES)).setStyle(new Style().setColor(TextFormatting.LIGHT_PURPLE)));
|
||||
player.sendMessage(new TextComponentTranslation("botania.versioning.outdated", clientBuild, onlineBuild));
|
||||
|
||||
ITextComponent component = new TextComponentTranslation("botania.versioning.updateMessage").replaceAll("%version%", onlineVersion);
|
||||
player.sendMessage(component);
|
||||
// todo 1.13
|
||||
// ITextComponent component = new TextComponentTranslation("botania.versioning.updateMessage").replaceAll("%version%", onlineVersion);
|
||||
// player.sendMessage(component);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ package vazkii.botania.common.crafting;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.Ingredient;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.api.recipe.RecipeElvenTrade;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
@@ -36,11 +37,11 @@ public class ModElvenTradeRecipes {
|
||||
elvenQuartzRecipe = BotaniaAPI.registerElvenTradeRecipe(new ItemStack(ModItems.elfQuartz), new ItemStack(Items.QUARTZ));
|
||||
alfglassRecipe = BotaniaAPI.registerElvenTradeRecipe(new ItemStack(ModBlocks.elfGlass), new ItemStack(ModBlocks.manaGlass));
|
||||
|
||||
BotaniaAPI.registerElvenTradeRecipe(new ItemStack(Items.IRON_INGOT), new ItemStack(Items.IRON_INGOT));
|
||||
BotaniaAPI.registerElvenTradeRecipe(new ItemStack(Blocks.IRON_BLOCK), new ItemStack(Blocks.IRON_BLOCK));
|
||||
BotaniaAPI.registerElvenTradeRecipe(new ItemStack(Items.ENDER_PEARL), new ItemStack(Items.ENDER_PEARL));
|
||||
BotaniaAPI.registerElvenTradeRecipe(new ItemStack(Items.DIAMOND), new ItemStack(Items.DIAMOND));
|
||||
BotaniaAPI.registerElvenTradeRecipe(new ItemStack(Blocks.DIAMOND_BLOCK), new ItemStack(Blocks.DIAMOND_BLOCK));
|
||||
BotaniaAPI.registerElvenTradeRecipe(new ItemStack(Items.IRON_INGOT), Ingredient.fromItems(Items.IRON_INGOT));
|
||||
BotaniaAPI.registerElvenTradeRecipe(new ItemStack(Blocks.IRON_BLOCK), Ingredient.fromItems(Blocks.IRON_BLOCK));
|
||||
BotaniaAPI.registerElvenTradeRecipe(new ItemStack(Items.ENDER_PEARL), Ingredient.fromItems(Items.ENDER_PEARL));
|
||||
BotaniaAPI.registerElvenTradeRecipe(new ItemStack(Items.DIAMOND), Ingredient.fromItems(Items.DIAMOND));
|
||||
BotaniaAPI.registerElvenTradeRecipe(new ItemStack(Blocks.DIAMOND_BLOCK), Ingredient.fromItems(Blocks.DIAMOND_BLOCK));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -65,7 +65,7 @@ public final class ModRuneRecipes {
|
||||
|
||||
recipesWinterRune = new ArrayList<>();
|
||||
for(int i = 0; i < 16; i++)
|
||||
recipesWinterRune.add(BotaniaAPI.registerRuneAltarRecipe(new ItemStack(ModItems.runeWinter), costTier2, LibOreDict.RUNE[0], LibOreDict.RUNE[2], new ItemStack(Blocks.SNOW), new ItemStack(Blocks.SNOW), new ItemStack(Blocks.WOOL, 1, i), new ItemStack(Items.CAKE)));
|
||||
recipesWinterRune.add(BotaniaAPI.registerRuneAltarRecipe(new ItemStack(ModItems.runeWinter), costTier2, LibOreDict.RUNE[0], LibOreDict.RUNE[2], new ItemStack(Blocks.SNOW), new ItemStack(Blocks.SNOW), new ItemStack(Blocks.WOOL, 1, i), new ItemStack(Blocks.CAKE)));
|
||||
|
||||
recipeManaRune = BotaniaAPI.registerRuneAltarRecipe(new ItemStack(ModItems.runeMana), costTier2, LibOreDict.MANA_STEEL, LibOreDict.MANA_STEEL, LibOreDict.MANA_STEEL, LibOreDict.MANA_STEEL, LibOreDict.MANA_STEEL, LibOreDict.MANA_PEARL);
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ public class ItemWaterBowl extends ItemMod {
|
||||
super(builder);
|
||||
}
|
||||
|
||||
/* todo 1.13
|
||||
@Nonnull
|
||||
@Override
|
||||
public ICapabilityProvider initCapabilities(ItemStack stack, NBTTagCompound nbt) {
|
||||
@@ -52,5 +53,6 @@ public class ItemWaterBowl extends ItemMod {
|
||||
return fluid.getFluid() == FluidRegistry.WATER;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
@@ -17,7 +17,7 @@ public final class LibMisc {
|
||||
public static final String MOD_NAME = "Botania";
|
||||
public static final String BUILD = "GRADLE:BUILD";
|
||||
public static final String VERSION = "GRADLE:VERSION-" + BUILD;
|
||||
public static final int DATA_VERSION = 1;
|
||||
public static final String MC_VERSION = "1.13.2";
|
||||
public static final String DEPENDENCIES = "required-after:baubles@[1.5.2,);after:thaumcraft@[6.1.BETA21,);after:jei@[1.12.2-4.13.1.220,)";
|
||||
|
||||
// Network Contants
|
||||
|
||||
Reference in new issue
Block a user