Reformated
This commit is contained in:
parent
fc1da134e7
commit
60e8008cb7
416 changed files with 5772 additions and 4573 deletions
|
@ -1,5 +1,11 @@
|
|||
package org.betterx.betterend.complexmaterials;
|
||||
|
||||
import org.betterx.bclib.recipes.GridRecipe;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.betterend.BetterEnd;
|
||||
import org.betterx.betterend.config.Configs;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.world.item.DyeColor;
|
||||
import net.minecraft.world.item.DyeItem;
|
||||
|
@ -10,11 +16,6 @@ import net.minecraft.world.level.material.MaterialColor;
|
|||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
import org.betterx.bclib.recipes.GridRecipe;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.betterend.BetterEnd;
|
||||
import org.betterx.betterend.config.Configs;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
|
@ -28,11 +29,13 @@ public class ColoredMaterial {
|
|||
this(constructor, source, COLORS, DYES, craftEight);
|
||||
}
|
||||
|
||||
public ColoredMaterial(Function<FabricBlockSettings, Block> constructor,
|
||||
Block source,
|
||||
Map<Integer, String> colors,
|
||||
Map<Integer, ItemLike> dyes,
|
||||
boolean craftEight) {
|
||||
public ColoredMaterial(
|
||||
Function<FabricBlockSettings, Block> constructor,
|
||||
Block source,
|
||||
Map<Integer, String> colors,
|
||||
Map<Integer, ItemLike> dyes,
|
||||
boolean craftEight
|
||||
) {
|
||||
String id = Registry.BLOCK.getKey(source).getPath();
|
||||
colors.forEach((color, name) -> {
|
||||
String blockName = id + "_" + name;
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
package org.betterx.betterend.complexmaterials;
|
||||
|
||||
import net.minecraft.world.level.block.Block;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import org.betterx.bclib.api.v2.tag.NamedBlockTags;
|
||||
import org.betterx.bclib.api.v2.tag.NamedItemTags;
|
||||
import org.betterx.bclib.api.v2.tag.TagAPI;
|
||||
|
@ -19,6 +15,10 @@ import org.betterx.betterend.config.Configs;
|
|||
import org.betterx.betterend.recipe.CraftingRecipes;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
import net.minecraft.world.level.block.Block;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
public class CrystalSubblocksMaterial {
|
||||
public final Block polished;
|
||||
public final Block tiles;
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
package org.betterx.betterend.complexmaterials;
|
||||
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.material.MaterialColor;
|
||||
|
||||
import org.betterx.bclib.complexmaterials.WoodenComplexMaterial;
|
||||
import org.betterx.betterend.BetterEnd;
|
||||
import org.betterx.betterend.config.Configs;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.material.MaterialColor;
|
||||
|
||||
public class EndWoodenComplexMaterial extends WoodenComplexMaterial {
|
||||
private Block bark;
|
||||
private Block log;
|
||||
|
@ -19,9 +19,11 @@ public class EndWoodenComplexMaterial extends WoodenComplexMaterial {
|
|||
}
|
||||
|
||||
public EndWoodenComplexMaterial init() {
|
||||
return (EndWoodenComplexMaterial) super.init(EndBlocks.getBlockRegistry(),
|
||||
EndItems.getItemRegistry(),
|
||||
Configs.RECIPE_CONFIG);
|
||||
return (EndWoodenComplexMaterial) super.init(
|
||||
EndBlocks.getBlockRegistry(),
|
||||
EndItems.getItemRegistry(),
|
||||
Configs.RECIPE_CONFIG
|
||||
);
|
||||
}
|
||||
|
||||
public boolean isTreeLog(Block block) {
|
||||
|
|
|
@ -1,20 +1,5 @@
|
|||
package org.betterx.betterend.complexmaterials;
|
||||
|
||||
import net.minecraft.tags.TagKey;
|
||||
import net.minecraft.world.entity.EquipmentSlot;
|
||||
import net.minecraft.world.item.ArmorMaterial;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.item.Item.Properties;
|
||||
import net.minecraft.world.item.Items;
|
||||
import net.minecraft.world.item.Tier;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.SoundType;
|
||||
import net.minecraft.world.level.block.state.BlockBehaviour;
|
||||
import net.minecraft.world.level.material.MaterialColor;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import org.betterx.bclib.api.v2.tag.CommonBlockTags;
|
||||
import org.betterx.bclib.api.v2.tag.NamedBlockTags;
|
||||
import org.betterx.bclib.api.v2.tag.NamedItemTags;
|
||||
|
@ -42,6 +27,21 @@ import org.betterx.betterend.recipe.builders.AlloyingRecipe;
|
|||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
|
||||
import net.minecraft.tags.TagKey;
|
||||
import net.minecraft.world.entity.EquipmentSlot;
|
||||
import net.minecraft.world.item.ArmorMaterial;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.item.Item.Properties;
|
||||
import net.minecraft.world.item.Items;
|
||||
import net.minecraft.world.item.Tier;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.SoundType;
|
||||
import net.minecraft.world.level.block.state.BlockBehaviour;
|
||||
import net.minecraft.world.level.material.MaterialColor;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
public class MetalMaterial {
|
||||
public final Block ore;
|
||||
public final Block block;
|
||||
|
@ -97,12 +97,14 @@ public class MetalMaterial {
|
|||
);
|
||||
}
|
||||
|
||||
public static MetalMaterial makeNormal(String name,
|
||||
MaterialColor color,
|
||||
float hardness,
|
||||
float resistance,
|
||||
Tier material,
|
||||
ArmorMaterial armor) {
|
||||
public static MetalMaterial makeNormal(
|
||||
String name,
|
||||
MaterialColor color,
|
||||
float hardness,
|
||||
float resistance,
|
||||
Tier material,
|
||||
ArmorMaterial armor
|
||||
) {
|
||||
return new MetalMaterial(
|
||||
name,
|
||||
true,
|
||||
|
@ -127,12 +129,14 @@ public class MetalMaterial {
|
|||
);
|
||||
}
|
||||
|
||||
public static MetalMaterial makeOreless(String name,
|
||||
MaterialColor color,
|
||||
float hardness,
|
||||
float resistance,
|
||||
Tier material,
|
||||
ArmorMaterial armor) {
|
||||
public static MetalMaterial makeOreless(
|
||||
String name,
|
||||
MaterialColor color,
|
||||
float hardness,
|
||||
float resistance,
|
||||
Tier material,
|
||||
ArmorMaterial armor
|
||||
) {
|
||||
return new MetalMaterial(
|
||||
name,
|
||||
false,
|
||||
|
@ -146,12 +150,14 @@ public class MetalMaterial {
|
|||
);
|
||||
}
|
||||
|
||||
private MetalMaterial(String name,
|
||||
boolean hasOre,
|
||||
FabricBlockSettings settings,
|
||||
Properties itemSettings,
|
||||
Tier material,
|
||||
ArmorMaterial armor) {
|
||||
private MetalMaterial(
|
||||
String name,
|
||||
boolean hasOre,
|
||||
FabricBlockSettings settings,
|
||||
Properties itemSettings,
|
||||
Tier material,
|
||||
ArmorMaterial armor
|
||||
) {
|
||||
BlockBehaviour.Properties lanternProperties = FabricBlockSettings.copyOf(settings)
|
||||
.hardness(1)
|
||||
.resistance(1)
|
||||
|
@ -198,24 +204,24 @@ public class MetalMaterial {
|
|||
hammer = EndItems.registerEndTool(
|
||||
name + "_hammer",
|
||||
new EndHammerItem(material, 5.0F, -3.2F, 0.3D, itemSettings)
|
||||
);
|
||||
);
|
||||
|
||||
forgedPlate = EndItems.registerEndItem(name + "_forged_plate");
|
||||
helmet = EndItems.registerEndItem(name + "_helmet", new EndArmorItem(armor, EquipmentSlot.HEAD, itemSettings));
|
||||
chestplate = EndItems.registerEndItem(
|
||||
name + "_chestplate",
|
||||
new EndArmorItem(armor, EquipmentSlot.CHEST, itemSettings)
|
||||
);
|
||||
);
|
||||
leggings = EndItems.registerEndItem(
|
||||
name + "_leggings",
|
||||
new EndArmorItem(armor, EquipmentSlot.LEGS, itemSettings)
|
||||
);
|
||||
);
|
||||
boots = EndItems.registerEndItem(name + "_boots", new EndArmorItem(armor, EquipmentSlot.FEET, itemSettings));
|
||||
|
||||
anvilBlock = EndBlocks.registerBlock(
|
||||
name + "_anvil",
|
||||
new EndAnvilBlock(this, block.defaultMaterialColor(), level)
|
||||
);
|
||||
);
|
||||
|
||||
if (hasOre) {
|
||||
FurnaceRecipe.make(BetterEnd.MOD_ID, name + "_ingot_furnace_ore", ore, ingot)
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
package org.betterx.betterend.complexmaterials;
|
||||
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.material.MaterialColor;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
import org.betterx.bclib.api.v2.tag.*;
|
||||
import org.betterx.bclib.blocks.*;
|
||||
import org.betterx.bclib.recipes.GridRecipe;
|
||||
|
@ -18,6 +12,12 @@ import org.betterx.betterend.recipe.CraftingRecipes;
|
|||
import org.betterx.betterend.registry.EndBlocks;
|
||||
import org.betterx.betterend.registry.EndItems;
|
||||
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.material.MaterialColor;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
public class StoneMaterial {
|
||||
public final Block stone;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue