Add some basic spotless formatting rules.
This commit is contained in:
parent
d2e4b92984
commit
4c037bd80b
127 changed files with 590 additions and 654 deletions
|
@ -24,7 +24,6 @@
|
|||
|
||||
package techreborn;
|
||||
|
||||
import com.mojang.datafixers.util.Pair;
|
||||
import net.fabricmc.api.ClientModInitializer;
|
||||
import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap;
|
||||
import net.fabricmc.fabric.api.client.model.ModelLoadingRegistry;
|
||||
|
@ -36,7 +35,6 @@ import net.minecraft.client.render.RenderLayer;
|
|||
import net.minecraft.client.render.model.BakedModel;
|
||||
import net.minecraft.client.render.model.Baker;
|
||||
import net.minecraft.client.render.model.ModelBakeSettings;
|
||||
import net.minecraft.client.render.model.ModelLoader;
|
||||
import net.minecraft.client.render.model.UnbakedModel;
|
||||
import net.minecraft.client.render.model.json.JsonUnbakedModel;
|
||||
import net.minecraft.client.texture.Sprite;
|
||||
|
@ -50,7 +48,6 @@ import net.minecraft.item.Item;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.registry.Registries;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.registry.Registry;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import reborncore.client.ClientJumpEvent;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
|
@ -81,7 +78,6 @@ import techreborn.items.tool.industrial.NanosaberItem;
|
|||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
import java.util.function.Function;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
|
|
|
@ -26,7 +26,6 @@ package techreborn.client;
|
|||
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.fabricmc.fabric.api.client.screenhandler.v1.ScreenRegistry;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.client.gui.screen.ingame.HandledScreen;
|
||||
import net.minecraft.client.gui.screen.ingame.HandledScreens;
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
package techreborn.client.compat.rei.fluidgenerator;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import me.shedaniel.math.Point;
|
||||
import me.shedaniel.math.Rectangle;
|
||||
import me.shedaniel.rei.api.client.ClientHelper;
|
||||
import me.shedaniel.rei.api.client.gui.Renderer;
|
||||
|
|
|
@ -44,7 +44,6 @@ import net.minecraft.registry.Registries;
|
|||
import net.minecraft.text.Text;
|
||||
import net.minecraft.util.Formatting;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.registry.Registry;
|
||||
import reborncore.api.IListInfoProvider;
|
||||
import reborncore.common.BaseBlockEntityProvider;
|
||||
import techreborn.blocks.cable.CableBlock;
|
||||
|
|
|
@ -62,7 +62,7 @@ public class GuiBlockPlacer extends GuiBase<BuiltScreenHandler> {
|
|||
protected void drawForeground(MatrixStack matrixStack, final int mouseX, final int mouseY) {
|
||||
super.drawForeground(matrixStack, mouseX, mouseY);
|
||||
final Layer layer = Layer.FOREGROUND;
|
||||
|
||||
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxStoredPower(), mouseX, mouseY, 0, layer);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,9 +54,9 @@ public class GuiChunkLoader extends GuiBase<BuiltScreenHandler> {
|
|||
addDrawableChild(new GuiButtonUpDown(x + 64 + 36, y + 40, this, b -> onClick(-5), UpDownButtonType.FASTREWIND));
|
||||
|
||||
addDrawableChild(ButtonWidget.builder(Text.literal("Toggle Loaded Chunks"), b -> ClientChunkManager.toggleLoadedChunks(blockEntity.getPos()))
|
||||
.position(x + 10, y + 70)
|
||||
.size(155, 20)
|
||||
.build());
|
||||
.position(x + 10, y + 70)
|
||||
.size(155, 20)
|
||||
.build());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -64,4 +64,4 @@ public class GuiDieselGenerator extends GuiBase<BuiltScreenHandler> {
|
|||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -107,4 +107,4 @@ public class GuiGreenhouseController extends GuiBase<BuiltScreenHandler> {
|
|||
public void onClick(GuiButtonExtended button, Double x, Double y) {
|
||||
blockEntity.renderMultiblock ^= !hideGuiElements();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -60,4 +60,4 @@ public class GuiGrinder extends GuiBase<BuiltScreenHandler> {
|
|||
builder.drawProgressBar(matrixStack, this, blockEntity.getProgressScaled(100), 100, 76, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
||||
builder.drawMultiEnergyBar(matrixStack, this, 9, 19, (int) blockEntity.getEnergy(), (int) blockEntity.getMaxStoredPower(), mouseX, mouseY, 0, layer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,4 +65,4 @@ public class GuiIndustrialElectrolyzer extends GuiBase<BuiltScreenHandler> {
|
|||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -94,5 +94,3 @@ public class GuiManual extends Screen {
|
|||
super.render(matrixStack, mouseX, mouseY, partialTicks);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ import java.util.HashMap;
|
|||
public class TurbineRenderer implements BlockEntityRenderer<WindMillBlockEntity> {
|
||||
private static final TurbineModel MODEL = new TurbineModel();
|
||||
public static final Identifier TEXTURE = new Identifier("techreborn:textures/block/machines/generators/wind_mill_turbine.png");
|
||||
|
||||
|
||||
public TurbineRenderer(BlockEntityRendererFactory.Context ctx) {
|
||||
}
|
||||
|
||||
|
|
|
@ -49,10 +49,10 @@ import techreborn.datagen.worldgen.TRWorldGenProvider
|
|||
|
||||
class TechRebornDataGen implements DataGeneratorEntrypoint {
|
||||
|
||||
@Override
|
||||
void onInitializeDataGenerator(FabricDataGenerator fabricDataGenerator) {
|
||||
@Override
|
||||
void onInitializeDataGenerator(FabricDataGenerator fabricDataGenerator) {
|
||||
def pack = fabricDataGenerator.createPack()
|
||||
|
||||
|
||||
def add = { FabricDataGenerator.Pack.RegistryDependentFactory factory ->
|
||||
pack.addProvider factory
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ class TechRebornDataGen implements DataGeneratorEntrypoint {
|
|||
add TRPointOfInterestTagProvider::new
|
||||
|
||||
add TRBlockTagProvider::new
|
||||
// tags before all else, very important!!
|
||||
// tags before all else, very important!!
|
||||
add SmeltingRecipesProvider::new
|
||||
add CraftingRecipesProvider::new
|
||||
|
||||
|
@ -76,9 +76,9 @@ class TechRebornDataGen implements DataGeneratorEntrypoint {
|
|||
|
||||
add ModelProvider::new
|
||||
add BlockLootTableProvider::new
|
||||
|
||||
|
||||
add TRWorldGenProvider::new
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
String getEffectiveModId() {
|
||||
|
|
|
@ -43,74 +43,74 @@ import java.util.concurrent.CompletableFuture
|
|||
import java.util.function.Consumer
|
||||
|
||||
abstract class TechRebornRecipesProvider extends FabricRecipeProvider {
|
||||
protected Consumer<RecipeJsonProvider> exporter
|
||||
TechRebornRecipesProvider(FabricDataOutput output, CompletableFuture<RegistryWrapper.WrapperLookup> registriesFuture) {
|
||||
super(output)
|
||||
}
|
||||
protected Consumer<RecipeJsonProvider> exporter
|
||||
TechRebornRecipesProvider(FabricDataOutput output, CompletableFuture<RegistryWrapper.WrapperLookup> registriesFuture) {
|
||||
super(output)
|
||||
}
|
||||
|
||||
@Override
|
||||
final void generate(Consumer<RecipeJsonProvider> exporter) {
|
||||
this.exporter = exporter
|
||||
generateRecipes()
|
||||
}
|
||||
@Override
|
||||
final void generate(Consumer<RecipeJsonProvider> exporter) {
|
||||
this.exporter = exporter
|
||||
generateRecipes()
|
||||
}
|
||||
|
||||
abstract void generateRecipes()
|
||||
abstract void generateRecipes()
|
||||
|
||||
static Ingredient createIngredient(def input) {
|
||||
if (input instanceof Ingredient) {
|
||||
if (input instanceof Ingredient) {
|
||||
return input
|
||||
}
|
||||
if (input instanceof ItemConvertible) {
|
||||
return Ingredient.ofItems(input)
|
||||
} else if (input instanceof TagKey) {
|
||||
return Ingredient.fromTag(input)
|
||||
}
|
||||
return Ingredient.ofItems(input)
|
||||
} else if (input instanceof TagKey) {
|
||||
return Ingredient.fromTag(input)
|
||||
}
|
||||
|
||||
throw new IllegalArgumentException()
|
||||
}
|
||||
throw new IllegalArgumentException()
|
||||
}
|
||||
|
||||
static String getCriterionName(def input) {
|
||||
if (input instanceof ItemConvertible) {
|
||||
return hasItem(input)
|
||||
} else if (input instanceof TagKey) {
|
||||
return "has_tag_" + input.id().toUnderscoreSeparatedString()
|
||||
}
|
||||
static String getCriterionName(def input) {
|
||||
if (input instanceof ItemConvertible) {
|
||||
return hasItem(input)
|
||||
} else if (input instanceof TagKey) {
|
||||
return "has_tag_" + input.id().toUnderscoreSeparatedString()
|
||||
}
|
||||
|
||||
throw new IllegalArgumentException()
|
||||
}
|
||||
throw new IllegalArgumentException()
|
||||
}
|
||||
|
||||
static CriterionConditions getCriterionConditions(def input) {
|
||||
if (input instanceof ItemConvertible) {
|
||||
return conditionsFromItem(input)
|
||||
} else if (input instanceof TagKey) {
|
||||
return conditionsFromTag(input)
|
||||
}
|
||||
static CriterionConditions getCriterionConditions(def input) {
|
||||
if (input instanceof ItemConvertible) {
|
||||
return conditionsFromItem(input)
|
||||
} else if (input instanceof TagKey) {
|
||||
return conditionsFromTag(input)
|
||||
}
|
||||
|
||||
throw new IllegalArgumentException()
|
||||
}
|
||||
throw new IllegalArgumentException()
|
||||
}
|
||||
|
||||
static String getInputPath(def input) {
|
||||
if (input instanceof ItemConvertible) {
|
||||
return getItemPath(input)
|
||||
} else if (input instanceof TagKey) {
|
||||
return input.id().toString().replace(":", "_")
|
||||
}
|
||||
|
||||
throw new IllegalArgumentException()
|
||||
}
|
||||
|
||||
static String getName(def input) {
|
||||
if (input instanceof ItemConvertible) {
|
||||
static String getInputPath(def input) {
|
||||
if (input instanceof ItemConvertible) {
|
||||
return getItemPath(input)
|
||||
} else if (input instanceof TagKey) {
|
||||
String name = input.id().toString()
|
||||
if (name.contains(":"))
|
||||
name = name.substring(name.indexOf(":")+1)
|
||||
return name
|
||||
}
|
||||
} else if (input instanceof TagKey) {
|
||||
return input.id().toString().replace(":", "_")
|
||||
}
|
||||
|
||||
throw new IllegalArgumentException()
|
||||
}
|
||||
throw new IllegalArgumentException()
|
||||
}
|
||||
|
||||
static String getName(def input) {
|
||||
if (input instanceof ItemConvertible) {
|
||||
return getItemPath(input)
|
||||
} else if (input instanceof TagKey) {
|
||||
String name = input.id().toString()
|
||||
if (name.contains(":"))
|
||||
name = name.substring(name.indexOf(":")+1)
|
||||
return name
|
||||
}
|
||||
|
||||
throw new IllegalArgumentException()
|
||||
}
|
||||
|
||||
static String getNamePart1(def input) {
|
||||
String name
|
||||
|
@ -160,9 +160,9 @@ abstract class TechRebornRecipesProvider extends FabricRecipeProvider {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected Identifier getRecipeIdentifier(Identifier identifier) {
|
||||
return new Identifier("techreborn", super.getRecipeIdentifier(identifier).path)
|
||||
}
|
||||
protected Identifier getRecipeIdentifier(Identifier identifier) {
|
||||
return new Identifier("techreborn", super.getRecipeIdentifier(identifier).path)
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
|
|
|
@ -83,104 +83,104 @@ class CraftingRecipesProvider extends TechRebornRecipesProvider {
|
|||
offerWallRecipe(block.asTag(), block.getWallBlock(), "crafting_table/storage_block/")
|
||||
offerWallRecipeStonecutter(block.asTag(), block.getWallBlock(), "crafting_table/storage_block/")
|
||||
}
|
||||
generateToolRecipes()
|
||||
generateArmorRecipes()
|
||||
generateToolRecipes()
|
||||
generateArmorRecipes()
|
||||
}
|
||||
|
||||
def generateToolRecipes() {
|
||||
// add axes
|
||||
[
|
||||
(TRContent.Ingots.BRONZE.asTag()): TRContent.BRONZE_AXE,
|
||||
(TRContent.Gems.PERIDOT) : TRContent.PERIDOT_AXE,
|
||||
(TRContent.Gems.RUBY) : TRContent.RUBY_AXE,
|
||||
(TRContent.Gems.SAPPHIRE) : TRContent.SAPPHIRE_AXE
|
||||
].each { material, axe ->
|
||||
offerAxeRecipe(material, axe, "crafting_table/tool/")
|
||||
}
|
||||
// add hoes
|
||||
[
|
||||
(TRContent.Ingots.BRONZE.asTag()): TRContent.BRONZE_HOE,
|
||||
(TRContent.Gems.PERIDOT) : TRContent.PERIDOT_HOE,
|
||||
(TRContent.Gems.RUBY) : TRContent.RUBY_HOE,
|
||||
(TRContent.Gems.SAPPHIRE) : TRContent.SAPPHIRE_HOE
|
||||
].each { material, hoe ->
|
||||
offerHoeRecipe(material, hoe, "crafting_table/tool/")
|
||||
}
|
||||
// add pickaxes
|
||||
[
|
||||
(TRContent.Ingots.BRONZE.asTag()): TRContent.BRONZE_PICKAXE,
|
||||
(TRContent.Gems.PERIDOT) : TRContent.PERIDOT_PICKAXE,
|
||||
(TRContent.Gems.RUBY) : TRContent.RUBY_PICKAXE,
|
||||
(TRContent.Gems.SAPPHIRE) : TRContent.SAPPHIRE_PICKAXE
|
||||
].each { material, pickaxe ->
|
||||
offerPickaxeRecipe(material, pickaxe, "crafting_table/tool/")
|
||||
}
|
||||
// add shovels
|
||||
[
|
||||
(TRContent.Ingots.BRONZE.asTag()): TRContent.BRONZE_SPADE,
|
||||
(TRContent.Gems.PERIDOT) : TRContent.PERIDOT_SPADE,
|
||||
(TRContent.Gems.RUBY) : TRContent.RUBY_SPADE,
|
||||
(TRContent.Gems.SAPPHIRE) : TRContent.SAPPHIRE_SPADE
|
||||
].each { material, shovel ->
|
||||
offerShovelRecipe(material, shovel, "crafting_table/tool/", "spade")
|
||||
}
|
||||
// add swords
|
||||
[
|
||||
(TRContent.Ingots.BRONZE.asTag()): TRContent.BRONZE_SWORD,
|
||||
(TRContent.Gems.PERIDOT) : TRContent.PERIDOT_SWORD,
|
||||
(TRContent.Gems.RUBY) : TRContent.RUBY_SWORD,
|
||||
(TRContent.Gems.SAPPHIRE) : TRContent.SAPPHIRE_SWORD
|
||||
].each { material, sword ->
|
||||
offerSwordRecipe(material, sword, "crafting_table/tool/")
|
||||
}
|
||||
}
|
||||
def generateToolRecipes() {
|
||||
// add axes
|
||||
[
|
||||
(TRContent.Ingots.BRONZE.asTag()): TRContent.BRONZE_AXE,
|
||||
(TRContent.Gems.PERIDOT) : TRContent.PERIDOT_AXE,
|
||||
(TRContent.Gems.RUBY) : TRContent.RUBY_AXE,
|
||||
(TRContent.Gems.SAPPHIRE) : TRContent.SAPPHIRE_AXE
|
||||
].each { material, axe ->
|
||||
offerAxeRecipe(material, axe, "crafting_table/tool/")
|
||||
}
|
||||
// add hoes
|
||||
[
|
||||
(TRContent.Ingots.BRONZE.asTag()): TRContent.BRONZE_HOE,
|
||||
(TRContent.Gems.PERIDOT) : TRContent.PERIDOT_HOE,
|
||||
(TRContent.Gems.RUBY) : TRContent.RUBY_HOE,
|
||||
(TRContent.Gems.SAPPHIRE) : TRContent.SAPPHIRE_HOE
|
||||
].each { material, hoe ->
|
||||
offerHoeRecipe(material, hoe, "crafting_table/tool/")
|
||||
}
|
||||
// add pickaxes
|
||||
[
|
||||
(TRContent.Ingots.BRONZE.asTag()): TRContent.BRONZE_PICKAXE,
|
||||
(TRContent.Gems.PERIDOT) : TRContent.PERIDOT_PICKAXE,
|
||||
(TRContent.Gems.RUBY) : TRContent.RUBY_PICKAXE,
|
||||
(TRContent.Gems.SAPPHIRE) : TRContent.SAPPHIRE_PICKAXE
|
||||
].each { material, pickaxe ->
|
||||
offerPickaxeRecipe(material, pickaxe, "crafting_table/tool/")
|
||||
}
|
||||
// add shovels
|
||||
[
|
||||
(TRContent.Ingots.BRONZE.asTag()): TRContent.BRONZE_SPADE,
|
||||
(TRContent.Gems.PERIDOT) : TRContent.PERIDOT_SPADE,
|
||||
(TRContent.Gems.RUBY) : TRContent.RUBY_SPADE,
|
||||
(TRContent.Gems.SAPPHIRE) : TRContent.SAPPHIRE_SPADE
|
||||
].each { material, shovel ->
|
||||
offerShovelRecipe(material, shovel, "crafting_table/tool/", "spade")
|
||||
}
|
||||
// add swords
|
||||
[
|
||||
(TRContent.Ingots.BRONZE.asTag()): TRContent.BRONZE_SWORD,
|
||||
(TRContent.Gems.PERIDOT) : TRContent.PERIDOT_SWORD,
|
||||
(TRContent.Gems.RUBY) : TRContent.RUBY_SWORD,
|
||||
(TRContent.Gems.SAPPHIRE) : TRContent.SAPPHIRE_SWORD
|
||||
].each { material, sword ->
|
||||
offerSwordRecipe(material, sword, "crafting_table/tool/")
|
||||
}
|
||||
}
|
||||
|
||||
def generateArmorRecipes() {
|
||||
// add boots
|
||||
[
|
||||
(TRContent.Ingots.BRONZE.asTag()): TRContent.BRONZE_BOOTS,
|
||||
(TRContent.Gems.PERIDOT) : TRContent.PERIDOT_BOOTS,
|
||||
(TRContent.Gems.RUBY) : TRContent.RUBY_BOOTS,
|
||||
(TRContent.Gems.SAPPHIRE) : TRContent.SAPPHIRE_BOOTS,
|
||||
(TRContent.Ingots.SILVER) : TRContent.SILVER_BOOTS,
|
||||
(TRContent.Ingots.STEEL) : TRContent.STEEL_BOOTS
|
||||
].each { material, boots ->
|
||||
offerBootsRecipe(material, boots, "crafting_table/armor/")
|
||||
}
|
||||
// add chestplate
|
||||
[
|
||||
(TRContent.Ingots.BRONZE.asTag()): TRContent.BRONZE_CHESTPLATE,
|
||||
(TRContent.Gems.PERIDOT) : TRContent.PERIDOT_CHESTPLATE,
|
||||
(TRContent.Gems.RUBY) : TRContent.RUBY_CHESTPLATE,
|
||||
(TRContent.Gems.SAPPHIRE) : TRContent.SAPPHIRE_CHESTPLATE,
|
||||
(TRContent.Ingots.SILVER) : TRContent.SILVER_CHESTPLATE,
|
||||
(TRContent.Ingots.STEEL) : TRContent.STEEL_CHESTPLATE
|
||||
].each { material, chestplate ->
|
||||
offerChestplateRecipe(material, chestplate, "crafting_table/armor/")
|
||||
}
|
||||
// add helmets
|
||||
[
|
||||
(TRContent.Ingots.BRONZE.asTag()): TRContent.BRONZE_HELMET,
|
||||
(TRContent.Gems.PERIDOT) : TRContent.PERIDOT_HELMET,
|
||||
(TRContent.Gems.RUBY) : TRContent.RUBY_HELMET,
|
||||
(TRContent.Gems.SAPPHIRE) : TRContent.SAPPHIRE_HELMET,
|
||||
(TRContent.Ingots.SILVER) : TRContent.SILVER_HELMET,
|
||||
(TRContent.Ingots.STEEL) : TRContent.STEEL_HELMET
|
||||
].each { material, helmet ->
|
||||
offerHelmetRecipe(material, helmet, "crafting_table/armor/")
|
||||
}
|
||||
// add leggings
|
||||
[
|
||||
(TRContent.Ingots.BRONZE.asTag()): TRContent.BRONZE_LEGGINGS,
|
||||
(TRContent.Gems.PERIDOT) : TRContent.PERIDOT_LEGGINGS,
|
||||
(TRContent.Gems.RUBY) : TRContent.RUBY_LEGGINGS,
|
||||
(TRContent.Gems.SAPPHIRE) : TRContent.SAPPHIRE_LEGGINGS,
|
||||
(TRContent.Ingots.SILVER) : TRContent.SILVER_LEGGINGS,
|
||||
(TRContent.Ingots.STEEL) : TRContent.STEEL_LEGGINGS
|
||||
].each { material, leggings ->
|
||||
offerLeggingsRecipe(material, leggings, "crafting_table/armor/")
|
||||
}
|
||||
}
|
||||
def generateArmorRecipes() {
|
||||
// add boots
|
||||
[
|
||||
(TRContent.Ingots.BRONZE.asTag()): TRContent.BRONZE_BOOTS,
|
||||
(TRContent.Gems.PERIDOT) : TRContent.PERIDOT_BOOTS,
|
||||
(TRContent.Gems.RUBY) : TRContent.RUBY_BOOTS,
|
||||
(TRContent.Gems.SAPPHIRE) : TRContent.SAPPHIRE_BOOTS,
|
||||
(TRContent.Ingots.SILVER) : TRContent.SILVER_BOOTS,
|
||||
(TRContent.Ingots.STEEL) : TRContent.STEEL_BOOTS
|
||||
].each { material, boots ->
|
||||
offerBootsRecipe(material, boots, "crafting_table/armor/")
|
||||
}
|
||||
// add chestplate
|
||||
[
|
||||
(TRContent.Ingots.BRONZE.asTag()): TRContent.BRONZE_CHESTPLATE,
|
||||
(TRContent.Gems.PERIDOT) : TRContent.PERIDOT_CHESTPLATE,
|
||||
(TRContent.Gems.RUBY) : TRContent.RUBY_CHESTPLATE,
|
||||
(TRContent.Gems.SAPPHIRE) : TRContent.SAPPHIRE_CHESTPLATE,
|
||||
(TRContent.Ingots.SILVER) : TRContent.SILVER_CHESTPLATE,
|
||||
(TRContent.Ingots.STEEL) : TRContent.STEEL_CHESTPLATE
|
||||
].each { material, chestplate ->
|
||||
offerChestplateRecipe(material, chestplate, "crafting_table/armor/")
|
||||
}
|
||||
// add helmets
|
||||
[
|
||||
(TRContent.Ingots.BRONZE.asTag()): TRContent.BRONZE_HELMET,
|
||||
(TRContent.Gems.PERIDOT) : TRContent.PERIDOT_HELMET,
|
||||
(TRContent.Gems.RUBY) : TRContent.RUBY_HELMET,
|
||||
(TRContent.Gems.SAPPHIRE) : TRContent.SAPPHIRE_HELMET,
|
||||
(TRContent.Ingots.SILVER) : TRContent.SILVER_HELMET,
|
||||
(TRContent.Ingots.STEEL) : TRContent.STEEL_HELMET
|
||||
].each { material, helmet ->
|
||||
offerHelmetRecipe(material, helmet, "crafting_table/armor/")
|
||||
}
|
||||
// add leggings
|
||||
[
|
||||
(TRContent.Ingots.BRONZE.asTag()): TRContent.BRONZE_LEGGINGS,
|
||||
(TRContent.Gems.PERIDOT) : TRContent.PERIDOT_LEGGINGS,
|
||||
(TRContent.Gems.RUBY) : TRContent.RUBY_LEGGINGS,
|
||||
(TRContent.Gems.SAPPHIRE) : TRContent.SAPPHIRE_LEGGINGS,
|
||||
(TRContent.Ingots.SILVER) : TRContent.SILVER_LEGGINGS,
|
||||
(TRContent.Ingots.STEEL) : TRContent.STEEL_LEGGINGS
|
||||
].each { material, leggings ->
|
||||
offerLeggingsRecipe(material, leggings, "crafting_table/armor/")
|
||||
}
|
||||
}
|
||||
|
||||
def static recipeNameString(String prefix, def input, def output, String source = null, String result = null) {
|
||||
StringBuilder s = new StringBuilder()
|
||||
|
@ -196,37 +196,37 @@ class CraftingRecipesProvider extends TechRebornRecipesProvider {
|
|||
return s.toString()
|
||||
}
|
||||
|
||||
def offerMonoShapelessRecipe(def input, int inputSize, ItemConvertible output, int outputSize, String source, prefix = "", String result = null, RecipeCategory category = RecipeCategory.MISC) {
|
||||
def offerMonoShapelessRecipe(def input, int inputSize, ItemConvertible output, int outputSize, String source, prefix = "", String result = null, RecipeCategory category = RecipeCategory.MISC) {
|
||||
new ShapelessRecipeJsonBuilder(category, output, outputSize).input(createIngredient(input), inputSize)
|
||||
.criterion(getCriterionName(input), getCriterionConditions(input))
|
||||
.offerTo(this.exporter, new Identifier(TechReborn.MOD_ID, recipeNameString(prefix, input, output, source, result)))
|
||||
}
|
||||
.criterion(getCriterionName(input), getCriterionConditions(input))
|
||||
.offerTo(this.exporter, new Identifier(TechReborn.MOD_ID, recipeNameString(prefix, input, output, source, result)))
|
||||
}
|
||||
|
||||
def static materialTypeString(String prefix, def material, String type, Function<?, String> modifier) {
|
||||
StringBuilder s = new StringBuilder()
|
||||
s.append(prefix)
|
||||
s.append(modifier.apply(material))
|
||||
s.append('_')
|
||||
s.append(type)
|
||||
return s.toString()
|
||||
}
|
||||
def static materialTypeString(String prefix, def material, String type, Function<?, String> modifier) {
|
||||
StringBuilder s = new StringBuilder()
|
||||
s.append(prefix)
|
||||
s.append(modifier.apply(material))
|
||||
s.append('_')
|
||||
s.append(type)
|
||||
return s.toString()
|
||||
}
|
||||
|
||||
def static createMonoShapeRecipe(def input, ItemConvertible output, char character, int outputAmount = 1, RecipeCategory category = RecipeCategory.MISC) {
|
||||
return new ShapedRecipeJsonBuilder(category, output, outputAmount)
|
||||
.input(character, createIngredient(input))
|
||||
.criterion(getCriterionName(input), getCriterionConditions(input))
|
||||
}
|
||||
def static createMonoShapeRecipe(def input, ItemConvertible output, char character, int outputAmount = 1, RecipeCategory category = RecipeCategory.MISC) {
|
||||
return new ShapedRecipeJsonBuilder(category, output, outputAmount)
|
||||
.input(character, createIngredient(input))
|
||||
.criterion(getCriterionName(input), getCriterionConditions(input))
|
||||
}
|
||||
|
||||
def static createDuoShapeRecipe(def input1, def input2, ItemConvertible output, char char1, char char2, boolean crit1 = true, boolean crit2 = false, RecipeCategory category = RecipeCategory.MISC) {
|
||||
ShapedRecipeJsonBuilder factory = ShapedRecipeJsonBuilder.create(category, output)
|
||||
.input(char1, createIngredient(input1))
|
||||
.input(char2, createIngredient(input2))
|
||||
if (crit1)
|
||||
factory = factory.criterion(getCriterionName(input1), getCriterionConditions(input1))
|
||||
if (crit2)
|
||||
factory = factory.criterion(getCriterionName(input2), getCriterionConditions(input2))
|
||||
return factory
|
||||
}
|
||||
def static createDuoShapeRecipe(def input1, def input2, ItemConvertible output, char char1, char char2, boolean crit1 = true, boolean crit2 = false, RecipeCategory category = RecipeCategory.MISC) {
|
||||
ShapedRecipeJsonBuilder factory = ShapedRecipeJsonBuilder.create(category, output)
|
||||
.input(char1, createIngredient(input1))
|
||||
.input(char2, createIngredient(input2))
|
||||
if (crit1)
|
||||
factory = factory.criterion(getCriterionName(input1), getCriterionConditions(input1))
|
||||
if (crit2)
|
||||
factory = factory.criterion(getCriterionName(input2), getCriterionConditions(input2))
|
||||
return factory
|
||||
}
|
||||
|
||||
def static createStonecutterRecipe(def input, ItemConvertible output, int outputAmount = 1, RecipeCategory category = RecipeCategory.MISC) {
|
||||
return new SingleItemRecipeJsonBuilder(category, RecipeSerializer.STONECUTTING, createIngredient(input), output, outputAmount)
|
||||
|
@ -269,80 +269,80 @@ class CraftingRecipesProvider extends TechRebornRecipesProvider {
|
|||
.offerTo(this.exporter, new Identifier(TechReborn.MOD_ID, materialTypeString(prefix, material, "wall", TechRebornRecipesProvider::getName) + "_stonecutter"))
|
||||
}
|
||||
|
||||
def offerAxeRecipe(def material, ItemConvertible output, prefix = "", String type = "axe") {
|
||||
createDuoShapeRecipe(material, Items.STICK, output,
|
||||
'X' as char, '#' as char)
|
||||
.pattern("XX")
|
||||
.pattern("X#")
|
||||
.pattern(" #")
|
||||
.offerTo(this.exporter, new Identifier(TechReborn.MOD_ID, materialTypeString(prefix, material, type, TechRebornRecipesProvider::getNamePart1)))
|
||||
}
|
||||
def offerAxeRecipe(def material, ItemConvertible output, prefix = "", String type = "axe") {
|
||||
createDuoShapeRecipe(material, Items.STICK, output,
|
||||
'X' as char, '#' as char)
|
||||
.pattern("XX")
|
||||
.pattern("X#")
|
||||
.pattern(" #")
|
||||
.offerTo(this.exporter, new Identifier(TechReborn.MOD_ID, materialTypeString(prefix, material, type, TechRebornRecipesProvider::getNamePart1)))
|
||||
}
|
||||
|
||||
def offerHoeRecipe(def material, ItemConvertible output, prefix = "", String type = "hoe") {
|
||||
createDuoShapeRecipe(material, Items.STICK, output,
|
||||
'X' as char, '#' as char)
|
||||
.pattern("XX")
|
||||
.pattern(" #")
|
||||
.pattern(" #")
|
||||
.offerTo(this.exporter, new Identifier(TechReborn.MOD_ID, materialTypeString(prefix, material, type, TechRebornRecipesProvider::getNamePart1)))
|
||||
}
|
||||
def offerHoeRecipe(def material, ItemConvertible output, prefix = "", String type = "hoe") {
|
||||
createDuoShapeRecipe(material, Items.STICK, output,
|
||||
'X' as char, '#' as char)
|
||||
.pattern("XX")
|
||||
.pattern(" #")
|
||||
.pattern(" #")
|
||||
.offerTo(this.exporter, new Identifier(TechReborn.MOD_ID, materialTypeString(prefix, material, type, TechRebornRecipesProvider::getNamePart1)))
|
||||
}
|
||||
|
||||
def offerPickaxeRecipe(def material, ItemConvertible output, prefix = "", String type = "pickaxe") {
|
||||
createDuoShapeRecipe(material, Items.STICK, output,
|
||||
'X' as char, '#' as char)
|
||||
.pattern("XXX")
|
||||
.pattern(" # ")
|
||||
.pattern(" # ")
|
||||
.offerTo(this.exporter, new Identifier(TechReborn.MOD_ID, materialTypeString(prefix, material, type, TechRebornRecipesProvider::getNamePart1)))
|
||||
}
|
||||
def offerPickaxeRecipe(def material, ItemConvertible output, prefix = "", String type = "pickaxe") {
|
||||
createDuoShapeRecipe(material, Items.STICK, output,
|
||||
'X' as char, '#' as char)
|
||||
.pattern("XXX")
|
||||
.pattern(" # ")
|
||||
.pattern(" # ")
|
||||
.offerTo(this.exporter, new Identifier(TechReborn.MOD_ID, materialTypeString(prefix, material, type, TechRebornRecipesProvider::getNamePart1)))
|
||||
}
|
||||
|
||||
def offerShovelRecipe(def material, ItemConvertible output, prefix = "", String type = "shovel") {
|
||||
createDuoShapeRecipe(material, Items.STICK, output,
|
||||
'X' as char, '#' as char)
|
||||
.pattern("X")
|
||||
.pattern("#")
|
||||
.pattern("#")
|
||||
.offerTo(this.exporter, new Identifier(TechReborn.MOD_ID, materialTypeString(prefix, material, type, TechRebornRecipesProvider::getNamePart1)))
|
||||
}
|
||||
def offerShovelRecipe(def material, ItemConvertible output, prefix = "", String type = "shovel") {
|
||||
createDuoShapeRecipe(material, Items.STICK, output,
|
||||
'X' as char, '#' as char)
|
||||
.pattern("X")
|
||||
.pattern("#")
|
||||
.pattern("#")
|
||||
.offerTo(this.exporter, new Identifier(TechReborn.MOD_ID, materialTypeString(prefix, material, type, TechRebornRecipesProvider::getNamePart1)))
|
||||
}
|
||||
|
||||
def offerSwordRecipe(def material, ItemConvertible output, prefix = "", String type = "sword") {
|
||||
createDuoShapeRecipe(material, Items.STICK, output,
|
||||
'X' as char, '#' as char)
|
||||
.pattern("X")
|
||||
.pattern("X")
|
||||
.pattern("#")
|
||||
.offerTo(this.exporter, new Identifier(TechReborn.MOD_ID, materialTypeString(prefix, material, type, TechRebornRecipesProvider::getNamePart1)))
|
||||
}
|
||||
def offerSwordRecipe(def material, ItemConvertible output, prefix = "", String type = "sword") {
|
||||
createDuoShapeRecipe(material, Items.STICK, output,
|
||||
'X' as char, '#' as char)
|
||||
.pattern("X")
|
||||
.pattern("X")
|
||||
.pattern("#")
|
||||
.offerTo(this.exporter, new Identifier(TechReborn.MOD_ID, materialTypeString(prefix, material, type, TechRebornRecipesProvider::getNamePart1)))
|
||||
}
|
||||
|
||||
def offerBootsRecipe(def material, ItemConvertible output, prefix = "", String type = "boots") {
|
||||
createMonoShapeRecipe(material, output, 'X' as char)
|
||||
.pattern("X X")
|
||||
.pattern("X X")
|
||||
.offerTo(this.exporter, new Identifier(TechReborn.MOD_ID, materialTypeString(prefix, material, type, TechRebornRecipesProvider::getNamePart1)))
|
||||
}
|
||||
def offerBootsRecipe(def material, ItemConvertible output, prefix = "", String type = "boots") {
|
||||
createMonoShapeRecipe(material, output, 'X' as char)
|
||||
.pattern("X X")
|
||||
.pattern("X X")
|
||||
.offerTo(this.exporter, new Identifier(TechReborn.MOD_ID, materialTypeString(prefix, material, type, TechRebornRecipesProvider::getNamePart1)))
|
||||
}
|
||||
|
||||
def offerChestplateRecipe(def material, ItemConvertible output, prefix = "", String type = "chestplate") {
|
||||
createMonoShapeRecipe(material, output, 'X' as char)
|
||||
.pattern("X X")
|
||||
.pattern("XXX")
|
||||
.pattern("XXX")
|
||||
.offerTo(this.exporter, new Identifier(TechReborn.MOD_ID, materialTypeString(prefix, material, type, TechRebornRecipesProvider::getNamePart1)))
|
||||
}
|
||||
def offerChestplateRecipe(def material, ItemConvertible output, prefix = "", String type = "chestplate") {
|
||||
createMonoShapeRecipe(material, output, 'X' as char)
|
||||
.pattern("X X")
|
||||
.pattern("XXX")
|
||||
.pattern("XXX")
|
||||
.offerTo(this.exporter, new Identifier(TechReborn.MOD_ID, materialTypeString(prefix, material, type, TechRebornRecipesProvider::getNamePart1)))
|
||||
}
|
||||
|
||||
def offerHelmetRecipe(def material, ItemConvertible output, prefix = "", String type = "helmet") {
|
||||
createMonoShapeRecipe(material, output, 'X' as char)
|
||||
.pattern("XXX")
|
||||
.pattern("X X")
|
||||
.offerTo(this.exporter, new Identifier(TechReborn.MOD_ID, materialTypeString(prefix, material, type, TechRebornRecipesProvider::getNamePart1)))
|
||||
}
|
||||
def offerHelmetRecipe(def material, ItemConvertible output, prefix = "", String type = "helmet") {
|
||||
createMonoShapeRecipe(material, output, 'X' as char)
|
||||
.pattern("XXX")
|
||||
.pattern("X X")
|
||||
.offerTo(this.exporter, new Identifier(TechReborn.MOD_ID, materialTypeString(prefix, material, type, TechRebornRecipesProvider::getNamePart1)))
|
||||
}
|
||||
|
||||
def offerLeggingsRecipe(def material, ItemConvertible output, prefix = "", String type = "leggings") {
|
||||
createMonoShapeRecipe(material, output, 'X' as char)
|
||||
.pattern("XXX")
|
||||
.pattern("X X")
|
||||
.pattern("X X")
|
||||
.offerTo(this.exporter, new Identifier(TechReborn.MOD_ID, materialTypeString(prefix, material, type, TechRebornRecipesProvider::getNamePart1)))
|
||||
}
|
||||
def offerLeggingsRecipe(def material, ItemConvertible output, prefix = "", String type = "leggings") {
|
||||
createMonoShapeRecipe(material, output, 'X' as char)
|
||||
.pattern("XXX")
|
||||
.pattern("X X")
|
||||
.pattern("X X")
|
||||
.offerTo(this.exporter, new Identifier(TechReborn.MOD_ID, materialTypeString(prefix, material, type, TechRebornRecipesProvider::getNamePart1)))
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -57,4 +57,4 @@ abstract class MachineRecipeWithFluidJsonFactory<R extends RebornFluidRecipe> ex
|
|||
if (fluid == null)
|
||||
throw new IllegalStateException("recipe has no valid fluid type specified")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ import java.util.concurrent.CompletableFuture
|
|||
|
||||
class AssemblingMachineRecipesProvider extends TechRebornRecipesProvider {
|
||||
|
||||
AssemblingMachineRecipesProvider(FabricDataOutput output, CompletableFuture<RegistryWrapper.WrapperLookup> registriesFuture) {
|
||||
AssemblingMachineRecipesProvider(FabricDataOutput output, CompletableFuture<RegistryWrapper.WrapperLookup> registriesFuture) {
|
||||
super(output, registriesFuture)
|
||||
}
|
||||
|
||||
|
|
|
@ -65,4 +65,4 @@ class BlastFurnaceRecipeJsonFactory extends MachineRecipeJsonFactory<BlastFurnac
|
|||
throw new IllegalStateException("recipe has no heat value")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ class BlastFurnaceRecipesProvider extends TechRebornRecipesProvider {
|
|||
generateGlassFromGlassPane()
|
||||
generateAnvil()
|
||||
}
|
||||
|
||||
|
||||
void generateBoots() {
|
||||
final int count = 2
|
||||
[
|
||||
|
@ -308,4 +308,4 @@ class BlastFurnaceRecipesProvider extends TechRebornRecipesProvider {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -68,4 +68,4 @@ class CompressorRecipesProvider extends TechRebornRecipesProvider {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -122,7 +122,7 @@ class ExtractorRecipesProvider extends TechRebornRecipesProvider {
|
|||
Items.MILK_BUCKET,
|
||||
Items.LAVA_BUCKET,
|
||||
Items.POWDER_SNOW_BUCKET,
|
||||
Items.WATER_BUCKET
|
||||
Items.WATER_BUCKET
|
||||
].each {bucket ->
|
||||
offerExtractorRecipe {
|
||||
ingredients bucket
|
||||
|
@ -138,7 +138,7 @@ class ExtractorRecipesProvider extends TechRebornRecipesProvider {
|
|||
Items.EXPERIENCE_BOTTLE,
|
||||
Items.HONEY_BOTTLE,
|
||||
Items.LINGERING_POTION,
|
||||
Items.POTION,
|
||||
Items.POTION,
|
||||
Items.SPLASH_POTION
|
||||
].each {bottle ->
|
||||
offerExtractorRecipe {
|
||||
|
@ -160,4 +160,4 @@ class ExtractorRecipesProvider extends TechRebornRecipesProvider {
|
|||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -186,7 +186,7 @@ class GrinderRecipesProvider extends TechRebornRecipesProvider {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void generateConcretePowder() {
|
||||
[
|
||||
(Items.BLACK_CONCRETE): Items.BLACK_CONCRETE_POWDER,
|
||||
|
@ -253,4 +253,4 @@ class GrinderRecipesProvider extends TechRebornRecipesProvider {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,4 +52,4 @@ class IndustrialGrinderRecipeJsonFactory extends MachineRecipeWithFluidJsonFacto
|
|||
protected IndustrialGrinderRecipe createRecipe(Identifier identifier) {
|
||||
return new IndustrialGrinderRecipe(ModRecipes.INDUSTRIAL_GRINDER, identifier, ingredients, outputs, power, time, new FluidInstance(fluid, FluidValue.fromMillibuckets(fluidAmount)))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -354,4 +354,4 @@ class IndustrialGrinderRecipesProvider extends TechRebornRecipesProvider {
|
|||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,4 +53,4 @@ class IndustrialSawmillRecipeJsonFactory extends MachineRecipeWithFluidJsonFacto
|
|||
protected IndustrialSawmillRecipe createRecipe(Identifier identifier) {
|
||||
return new IndustrialSawmillRecipe(ModRecipes.INDUSTRIAL_SAWMILL, identifier, ingredients, outputs, power, time, new FluidInstance(fluid, FluidValue.fromMillibuckets(fluidAmount)))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -195,4 +195,4 @@ class IndustrialSawmillRecipesProvider extends TechRebornRecipesProvider {
|
|||
criterion getCriterionName(ItemTags.WOODEN_BUTTONS), getCriterionConditions(ItemTags.WOODEN_BUTTONS)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,84 +40,84 @@ import java.nio.file.Paths
|
|||
import java.util.List
|
||||
|
||||
class OreDistributionVisualiser {
|
||||
private static final Color[] colors = new Color[] {
|
||||
Color.black,
|
||||
Color.red,
|
||||
Color.pink,
|
||||
Color.orange,
|
||||
Color.yellow,
|
||||
Color.green,
|
||||
Color.magenta,
|
||||
Color.cyan,
|
||||
Color.blue
|
||||
}
|
||||
private static final Color[] colors = new Color[] {
|
||||
Color.black,
|
||||
Color.red,
|
||||
Color.pink,
|
||||
Color.orange,
|
||||
Color.yellow,
|
||||
Color.green,
|
||||
Color.magenta,
|
||||
Color.cyan,
|
||||
Color.blue
|
||||
}
|
||||
|
||||
static void main(String[] args) {
|
||||
// Start the game up enough
|
||||
SharedConstants.createGameVersion()
|
||||
Bootstrap.initialize()
|
||||
static void main(String[] args) {
|
||||
// Start the game up enough
|
||||
SharedConstants.createGameVersion()
|
||||
Bootstrap.initialize()
|
||||
|
||||
generateOreDistributionVisualization()
|
||||
}
|
||||
generateOreDistributionVisualization()
|
||||
}
|
||||
|
||||
static void generateOreDistributionVisualization() throws IOException {
|
||||
def heightContext = new FixedHeightContext(-64, 360)
|
||||
static void generateOreDistributionVisualization() throws IOException {
|
||||
def heightContext = new FixedHeightContext(-64, 360)
|
||||
|
||||
BufferedImage bi = new BufferedImage(450, 220, BufferedImage.TYPE_INT_ARGB)
|
||||
Graphics2D png = bi.createGraphics()
|
||||
Font font = new Font("TimesRoman", Font.BOLD, 20)
|
||||
png.setFont(font)
|
||||
BufferedImage bi = new BufferedImage(450, 220, BufferedImage.TYPE_INT_ARGB)
|
||||
Graphics2D png = bi.createGraphics()
|
||||
Font font = new Font("TimesRoman", Font.BOLD, 20)
|
||||
png.setFont(font)
|
||||
|
||||
png.setPaint(Color.black)
|
||||
// Draw 0
|
||||
png.drawLine(0, -heightContext.minY, (overworldOres().size() * 10) + 20, -heightContext.minY)
|
||||
png.setPaint(Color.black)
|
||||
// Draw 0
|
||||
png.drawLine(0, -heightContext.minY, (overworldOres().size() * 10) + 20, -heightContext.minY)
|
||||
|
||||
png.setPaint(Color.blue)
|
||||
// Draw ground
|
||||
png.drawLine(0, -heightContext.minY + 64, (overworldOres().size() * 10) + 20, -heightContext.minY + 64)
|
||||
png.setPaint(Color.blue)
|
||||
// Draw ground
|
||||
png.drawLine(0, -heightContext.minY + 64, (overworldOres().size() * 10) + 20, -heightContext.minY + 64)
|
||||
|
||||
int c = 1
|
||||
for (OreDistribution value : overworldOres()) {
|
||||
png.setPaint(colors[c])
|
||||
int c = 1
|
||||
for (OreDistribution value : overworldOres()) {
|
||||
png.setPaint(colors[c])
|
||||
|
||||
def yMin = value.minOffset.getY(heightContext) + -heightContext.minY
|
||||
def yMax = -heightContext.minY + value.maxY
|
||||
def yMin = value.minOffset.getY(heightContext) + -heightContext.minY
|
||||
def yMax = -heightContext.minY + value.maxY
|
||||
|
||||
png.fill3DRect(c * 10, yMin, 10, yMax - yMin, true)
|
||||
png.fill3DRect(c * 10, yMin, 10, yMax - yMin, true)
|
||||
|
||||
png.drawString(value.name() + "(%d -> %d)".formatted(value.minOffset.getY(heightContext), value.maxY), 190, 25 * c)
|
||||
png.drawString(value.name() + "(%d -> %d)".formatted(value.minOffset.getY(heightContext), value.maxY), 190, 25 * c)
|
||||
|
||||
c += 1
|
||||
}
|
||||
c += 1
|
||||
}
|
||||
|
||||
ImageIO.write(bi, "PNG", Paths.get("ore_distribution.png").toFile())
|
||||
}
|
||||
ImageIO.write(bi, "PNG", Paths.get("ore_distribution.png").toFile())
|
||||
}
|
||||
|
||||
private static List<OreDistribution> overworldOres() {
|
||||
return Arrays.stream(OreDistribution.values())
|
||||
.filter(ore -> ore.dimension == TargetDimension.OVERWORLD)
|
||||
.toList()
|
||||
}
|
||||
private static List<OreDistribution> overworldOres() {
|
||||
return Arrays.stream(OreDistribution.values())
|
||||
.filter(ore -> ore.dimension == TargetDimension.OVERWORLD)
|
||||
.toList()
|
||||
}
|
||||
|
||||
private static class FixedHeightContext extends HeightContext {
|
||||
final int minY
|
||||
final int height
|
||||
private static class FixedHeightContext extends HeightContext {
|
||||
final int minY
|
||||
final int height
|
||||
|
||||
FixedHeightContext(int minY, int height) {
|
||||
super(new DebugChunkGenerator(BuiltinRegistries.BIOME), EmptyBlockView.INSTANCE)
|
||||
FixedHeightContext(int minY, int height) {
|
||||
super(new DebugChunkGenerator(BuiltinRegistries.BIOME), EmptyBlockView.INSTANCE)
|
||||
|
||||
this.minY = minY
|
||||
this.height = height
|
||||
}
|
||||
this.minY = minY
|
||||
this.height = height
|
||||
}
|
||||
|
||||
@Override
|
||||
int getMinY() {
|
||||
return minY
|
||||
}
|
||||
@Override
|
||||
int getMinY() {
|
||||
return minY
|
||||
}
|
||||
|
||||
@Override
|
||||
int getHeight() {
|
||||
return height
|
||||
}
|
||||
}
|
||||
@Override
|
||||
int getHeight() {
|
||||
return height
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,9 +37,9 @@ import java.lang.reflect.Method
|
|||
*/
|
||||
@Slf4j
|
||||
abstract class TRGameTest implements FabricGameTest {
|
||||
@Override
|
||||
void invokeTestMethod(TestContext context, Method method) {
|
||||
try {
|
||||
@Override
|
||||
void invokeTestMethod(TestContext context, Method method) {
|
||||
try {
|
||||
method.invoke(this, new TRTestContext(context))
|
||||
} catch (TRGameTestException gameTestException) {
|
||||
log.error("Test ${method.name} failed with message ${gameTestException.message}", gameTestException.cause)
|
||||
|
@ -49,7 +49,7 @@ abstract class TRGameTest implements FabricGameTest {
|
|||
log.error("Test ${method.name} failed", throwable)
|
||||
throw throwable
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static class TRGameTestException extends AssertionError {
|
||||
TRGameTestException(String message, Throwable cause) {
|
||||
|
|
|
@ -32,28 +32,28 @@ import reborncore.common.blockentity.MachineBaseBlockEntity
|
|||
import techreborn.init.TRContent
|
||||
|
||||
class TRTestContext extends TestContext {
|
||||
TRTestContext(TestContext parentContext) {
|
||||
//noinspection GroovyAccessibility
|
||||
super(parentContext.test)
|
||||
}
|
||||
TRTestContext(TestContext parentContext) {
|
||||
//noinspection GroovyAccessibility
|
||||
super(parentContext.test)
|
||||
}
|
||||
|
||||
/**
|
||||
* Place a machine with a creative solar panel
|
||||
*/
|
||||
def poweredMachine(TRContent.Machine machine, @DelegatesTo(MachineContext) Closure machineContextClosure) {
|
||||
def machinePos = new BlockPos(0, 2, 0)
|
||||
setBlockState(machinePos, machine.block)
|
||||
setBlockState(machinePos.down(), TRContent.SolarPanels.CREATIVE.block)
|
||||
/**
|
||||
* Place a machine with a creative solar panel
|
||||
*/
|
||||
def poweredMachine(TRContent.Machine machine, @DelegatesTo(MachineContext) Closure machineContextClosure) {
|
||||
def machinePos = new BlockPos(0, 2, 0)
|
||||
setBlockState(machinePos, machine.block)
|
||||
setBlockState(machinePos.down(), TRContent.SolarPanels.CREATIVE.block)
|
||||
|
||||
waitAndRun(5) {
|
||||
try {
|
||||
new MachineContext(machinePos).with(machineContextClosure)
|
||||
} catch (e) {
|
||||
e.printStackTrace()
|
||||
throw e
|
||||
}
|
||||
}
|
||||
}
|
||||
waitAndRun(5) {
|
||||
try {
|
||||
new MachineContext(machinePos).with(machineContextClosure)
|
||||
} catch (e) {
|
||||
e.printStackTrace()
|
||||
throw e
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def machine(TRContent.Machine machine, @DelegatesTo(MachineContext) Closure machineContextClosure) {
|
||||
def machinePos = new BlockPos(0, 1, 0)
|
||||
|
@ -69,59 +69,59 @@ class TRTestContext extends TestContext {
|
|||
}
|
||||
}
|
||||
|
||||
class MachineContext {
|
||||
final BlockPos machinePos
|
||||
class MachineContext {
|
||||
final BlockPos machinePos
|
||||
|
||||
MachineContext(BlockPos machinePos) {
|
||||
this.machinePos = machinePos
|
||||
}
|
||||
MachineContext(BlockPos machinePos) {
|
||||
this.machinePos = machinePos
|
||||
}
|
||||
|
||||
def input(ItemConvertible item, int slot = -1) {
|
||||
this.input(new ItemStack(item), slot)
|
||||
}
|
||||
def input(ItemConvertible item, int slot = -1) {
|
||||
this.input(new ItemStack(item), slot)
|
||||
}
|
||||
|
||||
def input(ItemStack stack, int slot = -1) {
|
||||
if (slot == -1) {
|
||||
// If not slot is provided use the first input slot
|
||||
slot = blockEntity.crafter.inputSlots[0]
|
||||
}
|
||||
def input(ItemStack stack, int slot = -1) {
|
||||
if (slot == -1) {
|
||||
// If not slot is provided use the first input slot
|
||||
slot = blockEntity.crafter.inputSlots[0]
|
||||
}
|
||||
|
||||
blockEntity.inventory.setStack(slot, stack)
|
||||
}
|
||||
blockEntity.inventory.setStack(slot, stack)
|
||||
}
|
||||
|
||||
def expectOutput(ItemConvertible item, int ticks, int slot = -1) {
|
||||
expectOutput(new ItemStack(item), ticks, slot)
|
||||
}
|
||||
def expectOutput(ItemConvertible item, int ticks, int slot = -1) {
|
||||
expectOutput(new ItemStack(item), ticks, slot)
|
||||
}
|
||||
|
||||
def expectOutput(ItemStack stack, int ticks, int slot = -1) {
|
||||
if (slot == -1) {
|
||||
// If not slot is provided use the first output slot
|
||||
slot = blockEntity.crafter.outputSlots[0]
|
||||
}
|
||||
def expectOutput(ItemStack stack, int ticks, int slot = -1) {
|
||||
if (slot == -1) {
|
||||
// If not slot is provided use the first output slot
|
||||
slot = blockEntity.crafter.outputSlots[0]
|
||||
}
|
||||
|
||||
addFinalTaskWithDuration(ticks) {
|
||||
if (!blockEntity.inventory.getStack(slot).isItemEqual(stack)) {
|
||||
throwGameTestException("Failed to find $stack in slot $slot")
|
||||
}
|
||||
}
|
||||
}
|
||||
addFinalTaskWithDuration(ticks) {
|
||||
if (!blockEntity.inventory.getStack(slot).isItemEqual(stack)) {
|
||||
throwGameTestException("Failed to find $stack in slot $slot")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def withUpgrades(TRContent.Upgrades upgrade, int count = -1) {
|
||||
count = (count != -1 ? count : blockEntity.getUpgradeSlotCount()) -1
|
||||
def withUpgrades(TRContent.Upgrades upgrade, int count = -1) {
|
||||
count = (count != -1 ? count : blockEntity.getUpgradeSlotCount()) -1
|
||||
|
||||
(0..count).each {
|
||||
blockEntity.upgradeInventory.setStack(it, new ItemStack(upgrade))
|
||||
}
|
||||
}
|
||||
(0..count).each {
|
||||
blockEntity.upgradeInventory.setStack(it, new ItemStack(upgrade))
|
||||
}
|
||||
}
|
||||
|
||||
MachineBaseBlockEntity getBlockEntity() {
|
||||
def be = getBlockEntity(machinePos)
|
||||
def be = getBlockEntity(machinePos)
|
||||
|
||||
if (!be) {
|
||||
throwPositionedException("Failed to get machine block entity", machinePos)
|
||||
}
|
||||
if (!be) {
|
||||
throwPositionedException("Failed to get machine block entity", machinePos)
|
||||
}
|
||||
|
||||
return be as MachineBaseBlockEntity
|
||||
}
|
||||
}
|
||||
return be as MachineBaseBlockEntity
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,17 +31,17 @@ import techreborn.test.TRGameTest
|
|||
import techreborn.test.TRTestContext
|
||||
|
||||
class GrinderTest extends TRGameTest {
|
||||
@GameTest(templateName = "fabric-gametest-api-v1:empty", tickLimit = 150)
|
||||
def testGrind2OCs(TRTestContext context) {
|
||||
/**
|
||||
* Test that grinder with 2 overclocker upgrades grinds coal into coal dust in 116 ticks
|
||||
*/
|
||||
context.poweredMachine(TRContent.Machine.GRINDER) {
|
||||
input(Items.COAL)
|
||||
@GameTest(templateName = "fabric-gametest-api-v1:empty", tickLimit = 150)
|
||||
def testGrind2OCs(TRTestContext context) {
|
||||
/**
|
||||
* Test that grinder with 2 overclocker upgrades grinds coal into coal dust in 116 ticks
|
||||
*/
|
||||
context.poweredMachine(TRContent.Machine.GRINDER) {
|
||||
input(Items.COAL)
|
||||
|
||||
withUpgrades(TRContent.Upgrades.OVERCLOCKER, 2)
|
||||
withUpgrades(TRContent.Upgrades.OVERCLOCKER, 2)
|
||||
|
||||
expectOutput(TRContent.Dusts.COAL, 116)
|
||||
}
|
||||
}
|
||||
expectOutput(TRContent.Dusts.COAL, 116)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,18 +33,18 @@ import techreborn.test.TRGameTest
|
|||
import techreborn.test.TRTestContext
|
||||
|
||||
class IronAlloyFurnaceTest extends TRGameTest {
|
||||
@GameTest(templateName = "fabric-gametest-api-v1:empty", tickLimit = 2000)
|
||||
def testIronAlloyFurnaceElectrumAlloyIngot(TRTestContext context) {
|
||||
/**
|
||||
* Test that the Iron Alloy Furnace smelts a gold ingot and a silver ingot into an electrum alloy ingot in 200
|
||||
@GameTest(templateName = "fabric-gametest-api-v1:empty", tickLimit = 2000)
|
||||
def testIronAlloyFurnaceElectrumAlloyIngot(TRTestContext context) {
|
||||
/**
|
||||
* Test that the Iron Alloy Furnace smelts a gold ingot and a silver ingot into an electrum alloy ingot in 200
|
||||
* Verifies: Issue #2850
|
||||
*/
|
||||
context.machine(TRContent.Machine.IRON_ALLOY_FURNACE) {
|
||||
*/
|
||||
context.machine(TRContent.Machine.IRON_ALLOY_FURNACE) {
|
||||
input(Items.COAL_BLOCK, IronAlloyFurnaceBlockEntity.FUEL_SLOT)
|
||||
input(Items.GOLD_INGOT, IronAlloyFurnaceBlockEntity.INPUT_SLOT_1)
|
||||
input(TRContent.Ingots.SILVER, IronAlloyFurnaceBlockEntity.INPUT_SLOT_2)
|
||||
input(Items.GOLD_INGOT, IronAlloyFurnaceBlockEntity.INPUT_SLOT_1)
|
||||
input(TRContent.Ingots.SILVER, IronAlloyFurnaceBlockEntity.INPUT_SLOT_2)
|
||||
|
||||
expectOutput(TRContent.Ingots.ELECTRUM, (int) (200 / TechRebornConfig.cookingScale), IronAlloyFurnaceBlockEntity.OUTPUT_SLOT)
|
||||
}
|
||||
}
|
||||
expectOutput(TRContent.Ingots.ELECTRUM, (int) (200 / TechRebornConfig.cookingScale), IronAlloyFurnaceBlockEntity.OUTPUT_SLOT)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,17 +48,17 @@ class IronFurnaceTest extends TRGameTest {
|
|||
}
|
||||
}
|
||||
|
||||
@GameTest(templateName = "fabric-gametest-api-v1:empty", tickLimit = 2000)
|
||||
def testIronFurnaceSmeltRawIronBlock(TRTestContext context) {
|
||||
/**
|
||||
* Test that the Iron Furnace smelts a raw iron block into an iron block in 1500 ticks instead of 200
|
||||
@GameTest(templateName = "fabric-gametest-api-v1:empty", tickLimit = 2000)
|
||||
def testIronFurnaceSmeltRawIronBlock(TRTestContext context) {
|
||||
/**
|
||||
* Test that the Iron Furnace smelts a raw iron block into an iron block in 1500 ticks instead of 200
|
||||
* Verifies: Issue #2850
|
||||
*/
|
||||
context.machine(TRContent.Machine.IRON_FURNACE) {
|
||||
*/
|
||||
context.machine(TRContent.Machine.IRON_FURNACE) {
|
||||
input(Items.COAL_BLOCK, IronFurnaceBlockEntity.FUEL_SLOT)
|
||||
input(Items.RAW_IRON_BLOCK, IronFurnaceBlockEntity.INPUT_SLOT)
|
||||
input(Items.RAW_IRON_BLOCK, IronFurnaceBlockEntity.INPUT_SLOT)
|
||||
|
||||
expectOutput(Items.IRON_BLOCK, (int) (1500 / TechRebornConfig.cookingScale), IronFurnaceBlockEntity.OUTPUT_SLOT)
|
||||
}
|
||||
}
|
||||
expectOutput(Items.IRON_BLOCK, (int) (1500 / TechRebornConfig.cookingScale), IronFurnaceBlockEntity.OUTPUT_SLOT)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ import net.minecraft.fluid.Fluid;
|
|||
import reborncore.common.fluid.FluidUtils;
|
||||
|
||||
public record FluidGeneratorRecipe(Fluid fluid, int energyPerMb,
|
||||
EFluidGenerator generatorType) {
|
||||
EFluidGenerator generatorType) {
|
||||
|
||||
public int getEnergyPerBucket() {
|
||||
return energyPerMb * 1000;
|
||||
|
|
|
@ -35,9 +35,6 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.nbt.NbtCompound;
|
||||
import net.minecraft.nbt.NbtHelper;
|
||||
import net.minecraft.network.packet.s2c.play.BlockEntityUpdateS2CPacket;
|
||||
import net.minecraft.registry.Registries;
|
||||
import net.minecraft.registry.RegistryKeys;
|
||||
import net.minecraft.registry.RegistryWrapper;
|
||||
import net.minecraft.server.world.ServerWorld;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.util.Formatting;
|
||||
|
|
|
@ -133,7 +133,7 @@ public abstract class BaseFluidGeneratorBlockEntity extends PowerAcceptorBlockEn
|
|||
}
|
||||
|
||||
protected boolean tryAddingEnergy(int amount) {
|
||||
if (getFreeSpace() > 0) {
|
||||
if (getFreeSpace() > 0) {
|
||||
addEnergy(amount);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -121,8 +121,8 @@ public class SolarPanelBlockEntity extends PowerAcceptorBlockEntity implements I
|
|||
// Ok, we are actively generating power, but check for a few conditions that would restrict
|
||||
// the generation to minimal production...
|
||||
if (!world.getDimension().hasSkyLight() || // No light source in dimension (e.g. nether or end)
|
||||
(skyAngle > 0.25 && skyAngle < 0.75) || // Light source is below horizon
|
||||
(world.isRaining() || world.isThundering())) { // Weather is present
|
||||
(skyAngle > 0.25 && skyAngle < 0.75) || // Light source is below horizon
|
||||
(world.isRaining() || world.isThundering())) { // Weather is present
|
||||
return getPanel().generationRateN;
|
||||
}
|
||||
|
||||
|
|
|
@ -62,9 +62,9 @@ public class AlarmBlockEntity extends BlockEntity
|
|||
|
||||
if (entity instanceof ServerPlayerEntity serverPlayerEntity) {
|
||||
serverPlayerEntity.sendMessage(Text.translatable("techreborn.message.alarm")
|
||||
.formatted(Formatting.GRAY)
|
||||
.append(" Alarm ")
|
||||
.append(String.valueOf(selectedSound)), true);
|
||||
.formatted(Formatting.GRAY)
|
||||
.append(" Alarm ")
|
||||
.append(String.valueOf(selectedSound)), true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -73,4 +73,4 @@ public class DistillationTowerBlockEntity extends GenericMachineBlockEntity impl
|
|||
public boolean canCraft(RebornRecipe rebornRecipe) {
|
||||
return isMultiblockValid();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -123,4 +123,4 @@ public class IndustrialSawmillBlockEntity extends GenericMachineBlockEntity impl
|
|||
.addInventory().create(this, syncID);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ public class VacuumFreezerBlockEntity extends GenericMachineBlockEntity implemen
|
|||
.fill(0, 2, 0, 3, 3, 3, advanced);
|
||||
}
|
||||
|
||||
// IContainerProvider
|
||||
// IContainerProvider
|
||||
@Override
|
||||
public BuiltScreenHandler createScreenHandler(int syncID, final PlayerEntity player) {
|
||||
return new ScreenHandlerBuilder("vacuumfreezer").player(player.getInventory()).inventory().hotbar().addInventory()
|
||||
|
@ -78,4 +78,4 @@ public class VacuumFreezerBlockEntity extends GenericMachineBlockEntity implemen
|
|||
|
||||
return super.canCraft(rebornRecipe);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -62,4 +62,4 @@ public interface BlockProcessable extends IUpgradeHandler, RedstoneConfigurable,
|
|||
default boolean canPlaySound() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,4 +55,4 @@ public class ChemicalReactorBlockEntity extends GenericMachineBlockEntity implem
|
|||
.addInventory().blockEntity(this).slot(0, 34, 47).slot(1, 126, 47).outputSlot(2, 80, 47).energySlot(3, 8, 72)
|
||||
.syncEnergyValue().syncCrafterValue().addInventory().create(this, syncID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,4 +55,4 @@ public class CompressorBlockEntity extends GenericMachineBlockEntity implements
|
|||
.blockEntity(this).slot(0, 55, 45).outputSlot(1, 101, 45).energySlot(2, 8, 72).syncEnergyValue()
|
||||
.syncCrafterValue().addInventory().create(this, syncID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,4 +54,4 @@ public class GrinderBlockEntity extends GenericMachineBlockEntity implements Bui
|
|||
.slot(0, 55, 45).outputSlot(1, 101, 45).energySlot(2, 8, 72).syncEnergyValue().syncCrafterValue()
|
||||
.addInventory().create(this, syncID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -60,4 +60,4 @@ public class IndustrialElectrolyzerBlockEntity extends GenericMachineBlockEntity
|
|||
.outputSlot(2, 51, 24).outputSlot(3, 71, 24).outputSlot(4, 91, 24).outputSlot(5, 111, 24)
|
||||
.energySlot(6, 8, 72).syncEnergyValue().syncCrafterValue().addInventory().create(this, syncID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,7 +30,6 @@ import net.minecraft.item.Item;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.registry.Registries;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.registry.Registry;
|
||||
import reborncore.api.blockentity.IUpgrade;
|
||||
import reborncore.common.screen.BuiltScreenHandler;
|
||||
import reborncore.common.screen.BuiltScreenHandlerProvider;
|
||||
|
|
|
@ -60,4 +60,4 @@ public class ScrapboxinatorBlockEntity extends GenericMachineBlockEntity impleme
|
|||
.blockEntity(this).filterSlot(0, 55, 45, stack -> stack.getItem() == TRContent.SCRAP_BOX).outputSlot(1, 101, 45)
|
||||
.energySlot(2, 8, 72).syncEnergyValue().syncCrafterValue().addInventory().create(this, syncID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -60,4 +60,4 @@ public class IndustrialCentrifugeBlockEntity extends GenericMachineBlockEntity i
|
|||
.outputSlot(4, 120, 44).outputSlot(5, 101, 63).energySlot(6, 8, 72).syncEnergyValue()
|
||||
.syncCrafterValue().addInventory().create(this, syncID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -117,7 +117,7 @@ public class MatterFabricatorBlockEntity extends PowerAcceptorBlockEntity
|
|||
if (world == null || world.isClient) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
this.charge(11);
|
||||
|
||||
for (int i = 0; i < 6; i++) {
|
||||
|
|
|
@ -52,4 +52,4 @@ public class HighVoltageSUBlockEntity extends EnergyStorageBlockEntity implement
|
|||
.complete(8, 18).addArmor().addInventory().blockEntity(this).energySlot(0, 62, 45).energySlot(1, 98, 45)
|
||||
.syncEnergyValue().addInventory().create(this, syncID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,4 +53,4 @@ public class MediumVoltageSUBlockEntity extends EnergyStorageBlockEntity impleme
|
|||
.syncEnergyValue().addInventory().create(this, syncID);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -81,7 +81,7 @@ public class TankUnitBaseBlockEntity extends MachineBaseBlockEntity implements I
|
|||
dropStack.getOrCreateNbt().put("blockEntity", blockEntity);
|
||||
return dropStack;
|
||||
}
|
||||
|
||||
|
||||
protected boolean canDrainTransfer(){
|
||||
if (inventory == null || inventory.size() < 2){
|
||||
return false;
|
||||
|
@ -96,7 +96,7 @@ public class TankUnitBaseBlockEntity extends MachineBaseBlockEntity implements I
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// MachineBaseBlockEntity
|
||||
@Override
|
||||
public void tick(World world, BlockPos pos, BlockState state, MachineBaseBlockEntity blockEntity) {
|
||||
|
|
|
@ -173,4 +173,4 @@ public class TransformerBlockEntity extends PowerAcceptorBlockEntity implements
|
|||
.formatted(Formatting.GOLD)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ public class BlockFusionCoil extends Block {
|
|||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public ActionResult onUse(BlockState state, World worldIn, BlockPos pos, PlayerEntity playerIn,
|
||||
Hand hand, BlockHitResult hitResult) {
|
||||
Hand hand, BlockHitResult hitResult) {
|
||||
|
||||
ItemStack tool = playerIn.getStackInHand(Hand.MAIN_HAND);
|
||||
if (tool.isEmpty()) return ActionResult.PASS;
|
||||
|
@ -83,4 +83,4 @@ public class BlockFusionCoil extends Block {
|
|||
super.appendTooltip(stack, worldIn, tooltip, flagIn);
|
||||
tooltip.add(Text.translatable("techreborn.tooltip.fusion_coil").formatted(Formatting.BLUE));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ public class BlockFusionControlComputer extends BlockMachineBase {
|
|||
|
||||
@Override
|
||||
public ActionResult onUse(BlockState state, World worldIn, BlockPos pos, PlayerEntity playerIn,
|
||||
Hand hand, BlockHitResult hitResult) {
|
||||
Hand hand, BlockHitResult hitResult) {
|
||||
final FusionControlComputerBlockEntity blockEntityFusionControlComputer = (FusionControlComputerBlockEntity) worldIn.getBlockEntity(pos);
|
||||
if (!playerIn.getStackInHand(hand).isEmpty() && (playerIn.getStackInHand(hand).getItem() == TRContent.Machine.FUSION_COIL.asItem())) {
|
||||
List<BlockPos> coils = Torus.generate(blockEntityFusionControlComputer.getPos(), blockEntityFusionControlComputer.size);
|
||||
|
|
|
@ -123,12 +123,12 @@ public class PlayerDetectorBlock extends BlockMachineBase {
|
|||
|
||||
if (playerIn instanceof ServerPlayerEntity serverPlayerEntity) {
|
||||
serverPlayerEntity.sendMessage(Text.translatable("techreborn.message.detects")
|
||||
.formatted(Formatting.GRAY)
|
||||
.append(" ")
|
||||
.append(
|
||||
Text.literal(StringUtils.toFirstCapital(newType.asString()))
|
||||
.formatted(color)
|
||||
), true);
|
||||
.formatted(Formatting.GRAY)
|
||||
.append(" ")
|
||||
.append(
|
||||
Text.literal(StringUtils.toFirstCapital(newType.asString()))
|
||||
.formatted(color)
|
||||
), true);
|
||||
}
|
||||
|
||||
if (getGui() != null && !playerIn.isSneaking()) {
|
||||
|
|
|
@ -128,7 +128,7 @@ public class BlockRubberLog extends PillarBlock {
|
|||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public ActionResult onUse(BlockState state, World worldIn, BlockPos pos, PlayerEntity playerIn,
|
||||
Hand hand, BlockHitResult hitResult) {
|
||||
Hand hand, BlockHitResult hitResult) {
|
||||
ItemStack stack = playerIn.getStackInHand(Hand.MAIN_HAND);
|
||||
if (stack.isEmpty()) {
|
||||
return ActionResult.PASS;
|
||||
|
|
|
@ -33,4 +33,4 @@ public class BlockRubberPlankStair extends StairsBlock {
|
|||
public BlockRubberPlankStair() {
|
||||
super(TRContent.RUBBER_PLANKS.getDefaultState(), Block.Settings.copy(TRContent.RUBBER_PLANKS));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ public abstract class BlockTransformer extends BaseBlockEntityProvider {
|
|||
// BaseTileBlock
|
||||
@Override
|
||||
public void onPlaced(World worldIn, BlockPos pos, BlockState state, LivingEntity placer,
|
||||
ItemStack stack) {
|
||||
ItemStack stack) {
|
||||
super.onPlaced(worldIn, pos, state, placer, stack);
|
||||
Direction facing = placer.getHorizontalFacing().getOpposite();
|
||||
if (placer.getPitch() < -50) {
|
||||
|
|
|
@ -86,7 +86,7 @@ public enum ModFluids implements ItemConvertible {
|
|||
this.identifier = new Identifier(TechReborn.MOD_ID, this.toString().toLowerCase(Locale.ROOT));
|
||||
|
||||
FluidSettings fluidSettings = FluidSettings.create();
|
||||
|
||||
|
||||
Identifier texture_still = new Identifier(TechReborn.MOD_ID, "block/fluids/" + this.toString().toLowerCase(Locale.ROOT) + "_still");
|
||||
Identifier texture_flowing = new Identifier(TechReborn.MOD_ID, "block/fluids/" + this.toString().toLowerCase(Locale.ROOT) + "_flowing");
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ public enum TRArmorMaterials implements ArmorMaterial {
|
|||
private final String name;
|
||||
|
||||
TRArmorMaterials(int maxDamageFactor, int[] damageReductionAmountArray, int enchantability,
|
||||
SoundEvent soundEvent, float toughness, float knockbackResistance, Supplier<Ingredient> repairMaterialIn) {
|
||||
SoundEvent soundEvent, float toughness, float knockbackResistance, Supplier<Ingredient> repairMaterialIn) {
|
||||
this.maxDamageFactor = maxDamageFactor;
|
||||
this.damageReductionAmountArray = damageReductionAmountArray;
|
||||
this.enchantability = enchantability;
|
||||
|
@ -84,7 +84,7 @@ public enum TRArmorMaterials implements ArmorMaterial {
|
|||
}
|
||||
|
||||
TRArmorMaterials(int maxDamageFactor, int[] damageReductionAmountArray, int enchantability,
|
||||
SoundEvent soundEvent, float toughness, Supplier<Ingredient> repairMaterialIn) {
|
||||
SoundEvent soundEvent, float toughness, Supplier<Ingredient> repairMaterialIn) {
|
||||
this(maxDamageFactor, damageReductionAmountArray, enchantability, soundEvent, toughness, 0.0F, repairMaterialIn);
|
||||
}
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ public class TRItemGroup {
|
|||
ItemGroupEvents.modifyEntriesEvent(ItemGroups.INGREDIENTS).register(TRItemGroup::addIngredients);
|
||||
ItemGroupEvents.modifyEntriesEvent(ItemGroups.OPERATOR).register(TRItemGroup::addOperator);
|
||||
}
|
||||
|
||||
|
||||
private static final ItemConvertible[] rubberOrderSmall = new ItemConvertible[]{
|
||||
TRContent.RUBBER_LOG,
|
||||
TRContent.RUBBER_LOG_STRIPPED,
|
||||
|
@ -157,7 +157,7 @@ public class TRItemGroup {
|
|||
entries.add(storageUnit.upgrader);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// armor and traditional tools
|
||||
entries.add(TRContent.BRONZE_HELMET);
|
||||
entries.add(TRContent.BRONZE_CHESTPLATE);
|
||||
|
@ -229,7 +229,7 @@ public class TRItemGroup {
|
|||
addPoweredItem(TRContent.QUANTUM_CHESTPLATE, entries, null, true);
|
||||
addPoweredItem(TRContent.QUANTUM_LEGGINGS, entries, null, true);
|
||||
addPoweredItem(TRContent.QUANTUM_BOOTS, entries, null, true);
|
||||
|
||||
|
||||
addNanosaber(entries, null, false);
|
||||
|
||||
addPoweredItem(TRContent.LITHIUM_ION_BATPACK, entries, null, true);
|
||||
|
@ -241,9 +241,9 @@ public class TRItemGroup {
|
|||
addPoweredItem(TRContent.ENERGY_CRYSTAL, entries, null, true);
|
||||
addPoweredItem(TRContent.LAPOTRON_CRYSTAL, entries, null, true);
|
||||
addPoweredItem(TRContent.LAPOTRONIC_ORB, entries, null, true);
|
||||
|
||||
|
||||
entries.add(TRContent.GPS);
|
||||
|
||||
|
||||
entries.add(TRContent.MANUAL);
|
||||
entries.add(TRContent.DEBUG_TOOL);
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ public enum TRToolTier implements ToolMaterial {
|
|||
private final Lazy<Ingredient> repairMaterial;
|
||||
|
||||
TRToolTier(int miningLevel, int itemDurability, float miningSpeed, float attackDamage,
|
||||
int enchantability, Supplier<Ingredient> repairMaterialIn) {
|
||||
int enchantability, Supplier<Ingredient> repairMaterialIn) {
|
||||
this.miningLevel = miningLevel;
|
||||
this.itemDurability = itemDurability;
|
||||
this.miningSpeed = miningSpeed;
|
||||
|
|
|
@ -66,16 +66,16 @@ public class FrequencyTransmitterItem extends Item {
|
|||
|
||||
if (context.getPlayer() instanceof ServerPlayerEntity serverPlayerEntity) {
|
||||
serverPlayerEntity.sendMessage(Text.translatable("techreborn.message.setTo")
|
||||
.append(Text.literal(" X:").formatted(Formatting.GRAY))
|
||||
.append(Text.literal(String.valueOf(pos.getX())).formatted(Formatting.GOLD))
|
||||
.append(Text.literal(" Y:").formatted(Formatting.GRAY))
|
||||
.append(Text.literal(String.valueOf(pos.getY())).formatted(Formatting.GOLD))
|
||||
.append(Text.literal(" Z:").formatted(Formatting.GRAY))
|
||||
.append(Text.literal(String.valueOf(pos.getZ())).formatted(Formatting.GOLD))
|
||||
.append(" ")
|
||||
.append(Text.translatable("techreborn.message.in").formatted(Formatting.GRAY))
|
||||
.append(" ")
|
||||
.append(Text.literal(getDimName(globalPos.getDimension()).toString()).formatted(Formatting.GOLD)), true);
|
||||
.append(Text.literal(" X:").formatted(Formatting.GRAY))
|
||||
.append(Text.literal(String.valueOf(pos.getX())).formatted(Formatting.GOLD))
|
||||
.append(Text.literal(" Y:").formatted(Formatting.GRAY))
|
||||
.append(Text.literal(String.valueOf(pos.getY())).formatted(Formatting.GOLD))
|
||||
.append(Text.literal(" Z:").formatted(Formatting.GRAY))
|
||||
.append(Text.literal(String.valueOf(pos.getZ())).formatted(Formatting.GOLD))
|
||||
.append(" ")
|
||||
.append(Text.translatable("techreborn.message.in").formatted(Formatting.GRAY))
|
||||
.append(" ")
|
||||
.append(Text.literal(getDimName(globalPos.getDimension()).toString()).formatted(Formatting.GOLD)), true);
|
||||
}
|
||||
|
||||
return ActionResult.SUCCESS;
|
||||
|
@ -97,12 +97,12 @@ public class FrequencyTransmitterItem extends Item {
|
|||
|
||||
if (player instanceof ServerPlayerEntity serverPlayerEntity) {
|
||||
serverPlayerEntity.sendMessage(Text.translatable("techreborn.message.coordsHaveBeen")
|
||||
.formatted(Formatting.GRAY)
|
||||
.append(" ")
|
||||
.append(
|
||||
Text.translatable("techreborn.message.cleared")
|
||||
.formatted(Formatting.GOLD)
|
||||
), true);
|
||||
.formatted(Formatting.GRAY)
|
||||
.append(" ")
|
||||
.append(
|
||||
Text.translatable("techreborn.message.cleared")
|
||||
.formatted(Formatting.GOLD)
|
||||
), true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -48,11 +48,11 @@ public class GpsItem extends Item {
|
|||
if (player instanceof ServerPlayerEntity serverPlayerEntity) {
|
||||
BlockPos pos = player.getBlockPos();
|
||||
serverPlayerEntity.sendMessage(Text.literal(" X:").formatted(Formatting.GRAY)
|
||||
.append(Text.literal(String.valueOf(pos.getX())).formatted(Formatting.GOLD))
|
||||
.append(Text.literal(" Y:").formatted(Formatting.GRAY))
|
||||
.append(Text.literal(String.valueOf(pos.getY())).formatted(Formatting.GOLD))
|
||||
.append(Text.literal(" Z:").formatted(Formatting.GRAY))
|
||||
.append(Text.literal(String.valueOf(pos.getZ())).formatted(Formatting.GOLD)), true);
|
||||
.append(Text.literal(String.valueOf(pos.getX())).formatted(Formatting.GOLD))
|
||||
.append(Text.literal(" Y:").formatted(Formatting.GRAY))
|
||||
.append(Text.literal(String.valueOf(pos.getY())).formatted(Formatting.GOLD))
|
||||
.append(Text.literal(" Z:").formatted(Formatting.GRAY))
|
||||
.append(Text.literal(String.valueOf(pos.getZ())).formatted(Formatting.GOLD)), true);
|
||||
return new TypedActionResult<>(ActionResult.SUCCESS, stack);
|
||||
}
|
||||
return new TypedActionResult<>(ActionResult.PASS, stack);
|
||||
|
|
|
@ -33,7 +33,6 @@ import net.minecraft.util.TypedActionResult;
|
|||
import net.minecraft.world.World;
|
||||
import reborncore.common.crafting.RebornRecipe;
|
||||
import reborncore.common.util.WorldUtils;
|
||||
import techreborn.TechReborn;
|
||||
import techreborn.init.ModRecipes;
|
||||
|
||||
import java.util.List;
|
||||
|
|
|
@ -31,7 +31,6 @@ import org.jetbrains.annotations.Nullable;
|
|||
import reborncore.api.blockentity.IUpgrade;
|
||||
import reborncore.common.blockentity.MachineBaseBlockEntity;
|
||||
import reborncore.common.recipes.IUpgradeHandler;
|
||||
import techreborn.TechReborn;
|
||||
|
||||
public class UpgradeItem extends Item implements IUpgrade {
|
||||
|
||||
|
@ -53,4 +52,4 @@ public class UpgradeItem extends Item implements IUpgrade {
|
|||
ItemStack stack) {
|
||||
behavior.process(blockEntity, handler, stack);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,14 +29,11 @@ import net.minecraft.entity.EquipmentSlot;
|
|||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ArmorItem;
|
||||
import net.minecraft.item.ArmorMaterial;
|
||||
import net.minecraft.item.ItemGroup;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.collection.DefaultedList;
|
||||
import net.minecraft.world.World;
|
||||
import reborncore.common.powerSystem.RcEnergyItem;
|
||||
import reborncore.common.powerSystem.RcEnergyTier;
|
||||
import reborncore.common.util.ItemUtils;
|
||||
import techreborn.utils.InitUtils;
|
||||
|
||||
public class BatpackItem extends ArmorItem implements RcEnergyItem {
|
||||
|
||||
|
|
|
@ -27,18 +27,14 @@ package techreborn.items.armor;
|
|||
import net.minecraft.entity.EquipmentSlot;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemGroup;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.collection.DefaultedList;
|
||||
import reborncore.api.items.ArmorBlockEntityTicker;
|
||||
import reborncore.api.items.ArmorRemoveHandler;
|
||||
import reborncore.common.powerSystem.RcEnergyItem;
|
||||
import reborncore.common.powerSystem.RcEnergyTier;
|
||||
import reborncore.common.util.ItemUtils;
|
||||
import techreborn.TechReborn;
|
||||
import techreborn.config.TechRebornConfig;
|
||||
import techreborn.init.TRArmorMaterials;
|
||||
import techreborn.utils.InitUtils;
|
||||
|
||||
public class CloakingDeviceItem extends TRArmourItem implements RcEnergyItem, ArmorBlockEntityTicker, ArmorRemoveHandler {
|
||||
|
||||
|
|
|
@ -30,14 +30,11 @@ import net.minecraft.enchantment.EnchantmentHelper;
|
|||
import net.minecraft.enchantment.Enchantments;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.item.*;
|
||||
import net.minecraft.util.collection.DefaultedList;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import reborncore.common.powerSystem.RcEnergyItem;
|
||||
import reborncore.common.powerSystem.RcEnergyTier;
|
||||
import reborncore.common.util.ItemUtils;
|
||||
import techreborn.TechReborn;
|
||||
import techreborn.utils.InitUtils;
|
||||
import techreborn.utils.ToolsUtil;
|
||||
|
||||
public class JackhammerItem extends PickaxeItem implements RcEnergyItem {
|
||||
|
|
|
@ -35,4 +35,4 @@ public enum MiningLevel {
|
|||
MiningLevel(int intLevel) {
|
||||
this.intLevel = intLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,7 +40,6 @@ import net.minecraft.util.Formatting;
|
|||
import net.minecraft.world.World;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import reborncore.common.util.WorldUtils;
|
||||
import techreborn.TechReborn;
|
||||
import techreborn.blockentity.cable.CableBlockEntity;
|
||||
import techreborn.blocks.cable.CableBlock;
|
||||
import techreborn.init.TRContent;
|
||||
|
|
|
@ -25,15 +25,11 @@
|
|||
package techreborn.items.tool.basic;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemGroup;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.collection.DefaultedList;
|
||||
import reborncore.common.powerSystem.RcEnergyItem;
|
||||
import reborncore.common.powerSystem.RcEnergyTier;
|
||||
import reborncore.common.util.ItemUtils;
|
||||
import techreborn.TechReborn;
|
||||
import techreborn.config.TechRebornConfig;
|
||||
import techreborn.utils.InitUtils;
|
||||
|
||||
/**
|
||||
* Created by modmuss50 on 05/11/2016.
|
||||
|
|
|
@ -29,24 +29,20 @@ import net.minecraft.block.Material;
|
|||
import net.minecraft.client.item.TooltipContext;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemGroup;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.TypedActionResult;
|
||||
import net.minecraft.util.collection.DefaultedList;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import reborncore.common.powerSystem.RcEnergyTier;
|
||||
import reborncore.common.util.ItemUtils;
|
||||
import techreborn.config.TechRebornConfig;
|
||||
import techreborn.init.TRContent;
|
||||
import techreborn.init.TRToolMaterials;
|
||||
import techreborn.items.tool.DrillItem;
|
||||
import techreborn.items.tool.MiningLevel;
|
||||
import techreborn.utils.InitUtils;
|
||||
import techreborn.utils.ToolsUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
|
|
@ -29,25 +29,21 @@ import net.minecraft.entity.LivingEntity;
|
|||
import net.minecraft.entity.damage.DamageSource;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemGroup;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ItemUsageContext;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.item.MiningToolItem;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.collection.DefaultedList;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import reborncore.common.powerSystem.RcEnergyItem;
|
||||
import reborncore.common.powerSystem.RcEnergyTier;
|
||||
import reborncore.common.util.ItemUtils;
|
||||
import reborncore.common.util.TorchHelper;
|
||||
import techreborn.TechReborn;
|
||||
import techreborn.config.TechRebornConfig;
|
||||
import techreborn.init.TRContent;
|
||||
import techreborn.init.TRToolMaterials;
|
||||
import techreborn.items.tool.MiningLevel;
|
||||
import techreborn.utils.InitUtils;
|
||||
|
||||
public class OmniToolItem extends MiningToolItem implements RcEnergyItem {
|
||||
public final int maxCharge = TechRebornConfig.omniToolCharge;
|
||||
|
|
|
@ -29,7 +29,6 @@ import net.minecraft.item.Item;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ToolMaterial;
|
||||
import reborncore.common.util.ItemUtils;
|
||||
import techreborn.TechReborn;
|
||||
|
||||
public class TRHoeItem extends HoeItem {
|
||||
|
||||
|
|
|
@ -29,7 +29,6 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.item.ShovelItem;
|
||||
import net.minecraft.item.ToolMaterial;
|
||||
import reborncore.common.util.ItemUtils;
|
||||
import techreborn.TechReborn;
|
||||
|
||||
public class TRSpadeItem extends ShovelItem {
|
||||
|
||||
|
|
|
@ -24,22 +24,18 @@
|
|||
|
||||
package techreborn.utils;
|
||||
|
||||
import net.fabricmc.fabric.api.itemgroup.v1.FabricItemGroupEntries;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.block.AbstractBlock;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.MapColor;
|
||||
import net.minecraft.block.Material;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.registry.Registries;
|
||||
import net.minecraft.sound.BlockSoundGroup;
|
||||
import net.minecraft.sound.SoundEvent;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.collection.DefaultedList;
|
||||
import net.minecraft.registry.Registry;
|
||||
import reborncore.RebornRegistry;
|
||||
import reborncore.common.powerSystem.RcEnergyItem;
|
||||
import techreborn.TechReborn;
|
||||
|
||||
public class InitUtils {
|
||||
|
|
|
@ -31,7 +31,6 @@ import net.minecraft.entity.player.PlayerEntity;
|
|||
import net.minecraft.inventory.CraftingInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.registry.Registries;
|
||||
import net.minecraft.registry.Registry;
|
||||
import reborncore.api.events.ItemCraftCallback;
|
||||
import reborncore.common.powerSystem.RcEnergyItem;
|
||||
import techreborn.TechReborn;
|
||||
|
|
|
@ -32,7 +32,6 @@ import net.minecraft.enchantment.Enchantments;
|
|||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.registry.tag.BlockTags;
|
||||
import net.minecraft.util.hit.BlockHitResult;
|
||||
import net.minecraft.util.hit.HitResult;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
|
|
@ -30,7 +30,6 @@ import net.minecraft.registry.Registries;
|
|||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.world.ServerWorld;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.registry.Registry;
|
||||
import net.minecraft.registry.RegistryKey;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.gen.HeightContext;
|
||||
|
|
|
@ -116,4 +116,4 @@ public class WorldGenerator {
|
|||
|
||||
return (biomeModificationContext) -> biomeModificationContext.getGenerationSettings().addFeature(GenerationStep.Feature.LAKES, OIL_LAKE_PLACED_FEATURE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue