20w12a
This commit is contained in:
parent
99b2755887
commit
e4fb1773f3
31 changed files with 56 additions and 56 deletions
12
build.gradle
12
build.gradle
|
@ -65,19 +65,19 @@ license {
|
|||
group = 'TechReborn'
|
||||
|
||||
dependencies {
|
||||
minecraft "com.mojang:minecraft:20w11a"
|
||||
mappings "net.fabricmc:yarn:20w11a+build.1:v2"
|
||||
minecraft "com.mojang:minecraft:20w12a"
|
||||
mappings "net.fabricmc:yarn:20w12a+build.3:v2"
|
||||
modImplementation "net.fabricmc:fabric-loader:0.7.8+build.187"
|
||||
|
||||
//Fabric api
|
||||
modImplementation "net.fabricmc.fabric-api:fabric-api:0.5.3+build.308-1.16"
|
||||
modImplementation "net.fabricmc.fabric-api:fabric-api:0.5.5+build.311-1.16"
|
||||
|
||||
optionalDependency ("me.shedaniel:RoughlyEnoughItems:4.0.12-unstable")
|
||||
optionalDependency ('io.github.cottonmc:LibCD:2.3.0+1.15.2')
|
||||
|
||||
def rcVersion = 'RebornCore:RebornCore-1.16:+'
|
||||
modApi (rcVersion) {
|
||||
exclude group: "net.fabricmc"
|
||||
exclude group: "net.fabricmc.fabric-api"
|
||||
}
|
||||
include rcVersion
|
||||
|
||||
|
@ -89,11 +89,11 @@ dependencies {
|
|||
|
||||
def optionalDependency(String dep) {
|
||||
dependencies.modRuntime (dep) {
|
||||
exclude group: "net.fabricmc"
|
||||
exclude group: "net.fabricmc.fabric-api"
|
||||
exclude module: "nbt-crafting"
|
||||
}
|
||||
dependencies.modCompileOnly (dep) {
|
||||
exclude group: "net.fabricmc"
|
||||
exclude group: "net.fabricmc.fabric-api"
|
||||
exclude module: "nbt-crafting"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,9 +27,9 @@ package techreborn.api.recipe.recipes;
|
|||
import com.google.gson.JsonObject;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.DefaultedList;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.JsonHelper;
|
||||
import net.minecraft.util.collection.DefaultedList;
|
||||
import reborncore.common.crafting.RebornRecipe;
|
||||
import reborncore.common.crafting.RebornRecipeType;
|
||||
import reborncore.common.crafting.ingredient.RebornIngredient;
|
||||
|
|
|
@ -28,8 +28,8 @@ import net.minecraft.block.entity.BlockEntity;
|
|||
import net.minecraft.fluid.Fluid;
|
||||
import net.minecraft.fluid.Fluids;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.DefaultedList;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.collection.DefaultedList;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import reborncore.common.crafting.RebornFluidRecipe;
|
||||
import reborncore.common.crafting.RebornRecipeType;
|
||||
|
|
|
@ -27,9 +27,9 @@ package techreborn.api.recipe.recipes;
|
|||
import com.google.gson.JsonObject;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.DefaultedList;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.JsonHelper;
|
||||
import net.minecraft.util.collection.DefaultedList;
|
||||
import reborncore.common.crafting.RebornRecipe;
|
||||
import reborncore.common.crafting.RebornRecipeType;
|
||||
import reborncore.common.crafting.ingredient.RebornIngredient;
|
||||
|
|
|
@ -26,8 +26,8 @@ package techreborn.api.recipe.recipes;
|
|||
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.DefaultedList;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.collection.DefaultedList;
|
||||
import reborncore.common.crafting.RebornFluidRecipe;
|
||||
import reborncore.common.crafting.RebornRecipeType;
|
||||
import reborncore.common.crafting.ingredient.RebornIngredient;
|
||||
|
|
|
@ -26,8 +26,8 @@ package techreborn.api.recipe.recipes;
|
|||
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.DefaultedList;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.collection.DefaultedList;
|
||||
import reborncore.common.crafting.RebornFluidRecipe;
|
||||
import reborncore.common.crafting.RebornRecipeType;
|
||||
import reborncore.common.crafting.ingredient.RebornIngredient;
|
||||
|
|
|
@ -28,13 +28,13 @@ import com.google.gson.JsonObject;
|
|||
import net.minecraft.inventory.CraftingInventory;
|
||||
import net.minecraft.inventory.Inventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.recipe.Ingredient;
|
||||
import net.minecraft.recipe.RecipeSerializer;
|
||||
import net.minecraft.recipe.ShapedRecipe;
|
||||
import net.minecraft.util.DefaultedList;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.JsonHelper;
|
||||
import net.minecraft.util.PacketByteBuf;
|
||||
import net.minecraft.util.collection.DefaultedList;
|
||||
import net.minecraft.world.World;
|
||||
import reborncore.common.crafting.RebornRecipe;
|
||||
import reborncore.common.crafting.RebornRecipeType;
|
||||
|
|
|
@ -33,7 +33,7 @@ import net.minecraft.recipe.Ingredient;
|
|||
import net.minecraft.recipe.RecipeType;
|
||||
import net.minecraft.screen.ScreenHandler;
|
||||
import net.minecraft.sound.SoundCategory;
|
||||
import net.minecraft.util.DefaultedList;
|
||||
import net.minecraft.util.collection.DefaultedList;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
import reborncore.api.IToolDrop;
|
||||
|
|
|
@ -50,6 +50,7 @@ import reborncore.common.util.WrenchUtils;
|
|||
import techreborn.blockentity.lighting.LampBlockEntity;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.function.ToIntFunction;
|
||||
|
||||
public class BlockLamp extends BaseBlockEntityProvider {
|
||||
|
||||
|
@ -61,7 +62,10 @@ public class BlockLamp extends BaseBlockEntityProvider {
|
|||
private static int brightness = 15;
|
||||
|
||||
public BlockLamp(int cost, double depth, double width) {
|
||||
super(FabricBlockSettings.of(Material.REDSTONE_LAMP).strength(2f, 2f).lightLevel(brightness).build());
|
||||
super(AbstractBlock.Settings.of(Material.REDSTONE_LAMP)
|
||||
.strength(2f, 2f)
|
||||
.lightLevel(value -> value.get(ACTIVE) ? brightness : 0)
|
||||
);
|
||||
this.shape = genCuboidShapes(depth, width);
|
||||
this.cost = cost;
|
||||
this.setDefaultState(this.getStateManager().getDefaultState().with(FACING, Direction.NORTH).with(ACTIVE, false));
|
||||
|
@ -131,12 +135,7 @@ public class BlockLamp extends BaseBlockEntityProvider {
|
|||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLuminance(BlockState state) {
|
||||
return state.get(ACTIVE) ? brightness : 0;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BlockRenderType getRenderType(BlockState state) {
|
||||
return BlockRenderType.MODEL;
|
||||
|
|
|
@ -28,9 +28,6 @@ import net.fabricmc.fabric.api.block.FabricBlockSettings;
|
|||
import net.fabricmc.fabric.api.registry.FlammableBlockRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.block.FireBlock;
|
||||
import net.minecraft.block.LogBlock;
|
||||
import net.minecraft.block.Material;
|
||||
import net.minecraft.block.MaterialColor;
|
||||
import net.minecraft.block.PillarBlock;
|
||||
|
@ -68,13 +65,16 @@ import java.util.Random;
|
|||
/**
|
||||
* Created by modmuss50 on 19/02/2016.
|
||||
*/
|
||||
public class BlockRubberLog extends LogBlock {
|
||||
public class BlockRubberLog extends PillarBlock {
|
||||
|
||||
public static DirectionProperty SAP_SIDE = Properties.HORIZONTAL_FACING;
|
||||
public static BooleanProperty HAS_SAP = BooleanProperty.of("hassap");
|
||||
|
||||
public BlockRubberLog() {
|
||||
super(MaterialColor.SPRUCE, FabricBlockSettings.of(Material.WOOD, MaterialColor.BROWN).strength(2.0F, 2f).sounds(BlockSoundGroup.WOOD).ticksRandomly().build());
|
||||
super(Settings.method_26240(Material.WOOD, (blockState) -> MaterialColor.SPRUCE)
|
||||
.strength(2.0F, 2f)
|
||||
.sounds(BlockSoundGroup.WOOD)
|
||||
.ticksRandomly());
|
||||
this.setDefaultState(this.getDefaultState().with(SAP_SIDE, Direction.NORTH).with(HAS_SAP, false).with(AXIS, Direction.Axis.Y));
|
||||
FlammableBlockRegistry.getDefaultInstance().add(this, 5, 5);
|
||||
}
|
||||
|
@ -97,7 +97,7 @@ public class BlockRubberLog extends LogBlock {
|
|||
if (worldIn instanceof ServerWorld && worldIn.isRegionLoaded(pos.add(-j, -j, -j), pos.add(j, j, j))) {
|
||||
for (BlockPos blockpos : BlockPos.iterate(pos.add(-i, -i, -i), pos.add(i, i, i))) {
|
||||
BlockState state1 = worldIn.getBlockState(blockpos);
|
||||
if (state1.matches(BlockTags.LEAVES)) {
|
||||
if (state1.isIn(BlockTags.LEAVES)) {
|
||||
state1.scheduledTick((ServerWorld) worldIn, blockpos, worldIn.getRandom());
|
||||
state1.randomTick((ServerWorld) worldIn, blockpos, worldIn.getRandom());
|
||||
}
|
||||
|
@ -107,8 +107,8 @@ public class BlockRubberLog extends LogBlock {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void scheduledTick(BlockState state, ServerWorld worldIn, BlockPos pos, Random random) {
|
||||
super.scheduledTick(state, worldIn, pos, random);
|
||||
public void randomTick(BlockState state, ServerWorld worldIn, BlockPos pos, Random random) {
|
||||
super.randomTick(state, worldIn, pos, random);
|
||||
if (state.get(AXIS) != Direction.Axis.Y) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ import net.fabricmc.api.Environment;
|
|||
import net.fabricmc.fabric.api.client.screen.ScreenProviderRegistry;
|
||||
import net.fabricmc.fabric.api.container.ContainerProviderRegistry;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.client.gui.screen.ingame.ScreenWithHandler;
|
||||
import net.minecraft.client.gui.screen.ingame.HandledScreen;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import reborncore.RebornCore;
|
||||
|
@ -74,7 +74,7 @@ public class GuiHandler {
|
|||
}
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
private static ScreenWithHandler<?> getClientGuiElement(final EGui gui, final PlayerEntity player, BlockPos pos, int syncID) {
|
||||
private static HandledScreen<?> getClientGuiElement(final EGui gui, final PlayerEntity player, BlockPos pos, int syncID) {
|
||||
final BlockEntity blockEntity = player.world.getBlockEntity(pos);
|
||||
|
||||
if (blockEntity instanceof DataDrivenBEProvider.DataDrivenBlockEntity) {
|
||||
|
|
|
@ -69,7 +69,7 @@ public class GuiGreenhouseController extends GuiBase<BuiltScreenHandler> {
|
|||
|
||||
if (!blockEntity.getMultiBlock()) {
|
||||
getMinecraft().getTextureManager().bindTexture(new Identifier("techreborn", "textures/item/part/digital_display.png"));
|
||||
blit(x + 68, y + 22, 0, 0, 16, 16, 16, 16);
|
||||
drawTexture(x + 68, y + 22, 0, 0, 16, 16, 16, 16);
|
||||
if (isPointInRect(68, 22, 16, 16, mouseX, mouseY)) {
|
||||
List<String> list = Arrays.asList(StringUtils.t("techreborn.tooltip.greenhouse.upgrade_available").split("\\r?\\n"));
|
||||
RenderSystem.pushMatrix();
|
||||
|
|
|
@ -88,7 +88,7 @@ public class GuiManual extends Screen {
|
|||
client.getTextureManager().bindTexture(GuiManual.texture);
|
||||
int centerX = (width / 2) - guiWidth / 2;
|
||||
int centerY = (height / 2) - guiHeight / 2;
|
||||
blit(centerX, centerY, 0, 0, guiWidth, guiHeight);
|
||||
drawTexture(centerX, centerY, 0, 0, guiWidth, guiHeight);
|
||||
textRenderer.draw(text1, ((width / 2) - textRenderer.getStringWidth(text1) / 2), centerY + 40, 4210752);
|
||||
textRenderer.draw(text2, ((width / 2) - textRenderer.getStringWidth(text2) / 2), centerY + 90, 4210752);
|
||||
if (TechRebornConfig.allowManualRefund) {
|
||||
|
|
|
@ -38,8 +38,8 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.recipe.Ingredient;
|
||||
import net.minecraft.recipe.ShapedRecipe;
|
||||
import net.minecraft.resource.ResourceManager;
|
||||
import net.minecraft.util.DefaultedList;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.collection.DefaultedList;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import reborncore.common.crafting.RebornRecipe;
|
||||
import reborncore.common.crafting.RebornRecipeType;
|
||||
|
|
|
@ -86,7 +86,7 @@ public class ModRegistry {
|
|||
RebornRegistry.registerBlock(TRContent.REINFORCED_GLASS = InitUtils.setup(new BlockReinforcedGlass(), "reinforced_glass"), itemGroup);
|
||||
RebornRegistry.registerBlock(TRContent.RUBBER_LEAVES = InitUtils.setup(new BlockRubberLeaves(), "rubber_leaves"), itemGroup);
|
||||
RebornRegistry.registerBlock(TRContent.RUBBER_LOG = InitUtils.setup(new BlockRubberLog(), "rubber_log"), itemGroup);
|
||||
RebornRegistry.registerBlock(TRContent.RUBBER_LOG_STRIPPED = InitUtils.setup(new LogBlock(MaterialColor.SPRUCE, InitUtils.setupRubberBlockSettings(2.0F, 15.0F)), "rubber_log_stripped"), itemGroup);
|
||||
RebornRegistry.registerBlock(TRContent.RUBBER_LOG_STRIPPED = InitUtils.setup(new PillarBlock(InitUtils.setupRubberBlockSettings(2.0F, 15.0F)), "rubber_log_stripped"), itemGroup);
|
||||
RebornRegistry.registerBlock(TRContent.RUBBER_PLANKS = InitUtils.setup(new BlockRubberPlank(), "rubber_planks"), itemGroup);
|
||||
RebornRegistry.registerBlock(TRContent.RUBBER_SAPLING = InitUtils.setup(new BlockRubberSapling(), "rubber_sapling"), itemGroup);
|
||||
RebornRegistry.registerBlock(TRContent.RUBBER_PLANK_SLAB = InitUtils.setup(new SlabBlock(InitUtils.setupRubberBlockSettings(2.0F, 15.0F)), "rubber_plank_slab"), itemGroup);
|
||||
|
|
|
@ -27,8 +27,8 @@ package techreborn.items;
|
|||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemGroup;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.DefaultedList;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.collection.DefaultedList;
|
||||
import reborncore.common.powerSystem.PowerSystem;
|
||||
import reborncore.common.util.ItemDurabilityExtensions;
|
||||
import reborncore.common.util.ItemUtils;
|
||||
|
|
|
@ -43,10 +43,10 @@ import net.minecraft.sound.SoundEvents;
|
|||
import net.minecraft.tag.FluidTags;
|
||||
import net.minecraft.text.LiteralText;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.util.DefaultedList;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.TypedActionResult;
|
||||
import net.minecraft.util.collection.DefaultedList;
|
||||
import net.minecraft.util.hit.BlockHitResult;
|
||||
import net.minecraft.util.hit.HitResult;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
|
|
@ -33,7 +33,7 @@ import net.minecraft.item.ArmorItem;
|
|||
import net.minecraft.item.ArmorMaterial;
|
||||
import net.minecraft.item.ItemGroup;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.DefaultedList;
|
||||
import net.minecraft.util.collection.DefaultedList;
|
||||
import net.minecraft.world.World;
|
||||
import reborncore.common.powerSystem.PowerSystem;
|
||||
import reborncore.common.util.ItemDurabilityExtensions;
|
||||
|
|
|
@ -31,7 +31,7 @@ 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.DefaultedList;
|
||||
import net.minecraft.util.collection.DefaultedList;
|
||||
import reborncore.api.items.ArmorRemoveHandler;
|
||||
import reborncore.api.items.ArmorTickable;
|
||||
import reborncore.common.powerSystem.PowerSystem;
|
||||
|
|
|
@ -38,7 +38,7 @@ import net.minecraft.item.ArmorMaterial;
|
|||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemGroup;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.DefaultedList;
|
||||
import net.minecraft.util.collection.DefaultedList;
|
||||
import reborncore.api.items.ArmorFovHandler;
|
||||
import reborncore.api.items.ArmorRemoveHandler;
|
||||
import reborncore.api.items.ArmorTickable;
|
||||
|
@ -96,7 +96,7 @@ public class QuantumSuitItem extends TRArmourItem implements ItemStackModifiers,
|
|||
if (playerEntity.abilities.flying) {
|
||||
Energy.of(stack).use(flyCost);
|
||||
}
|
||||
playerEntity.method_24830(true);
|
||||
playerEntity.setOnGround(true);
|
||||
} else {
|
||||
playerEntity.abilities.allowFlying = false;
|
||||
playerEntity.abilities.flying = false;
|
||||
|
|
|
@ -30,8 +30,8 @@ import net.minecraft.enchantment.EnchantmentHelper;
|
|||
import net.minecraft.enchantment.Enchantments;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.item.*;
|
||||
import net.minecraft.util.DefaultedList;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.collection.DefaultedList;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import reborncore.common.powerSystem.PowerSystem;
|
||||
|
|
|
@ -29,7 +29,7 @@ import net.minecraft.enchantment.EnchantmentHelper;
|
|||
import net.minecraft.enchantment.Enchantments;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.item.*;
|
||||
import net.minecraft.util.DefaultedList;
|
||||
import net.minecraft.util.collection.DefaultedList;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import reborncore.common.powerSystem.PowerSystem;
|
||||
|
|
|
@ -30,7 +30,7 @@ import net.minecraft.enchantment.EnchantmentHelper;
|
|||
import net.minecraft.enchantment.Enchantments;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.item.*;
|
||||
import net.minecraft.util.DefaultedList;
|
||||
import net.minecraft.util.collection.DefaultedList;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import reborncore.common.powerSystem.PowerSystem;
|
||||
|
|
|
@ -38,8 +38,8 @@ public class PaintingToolItem extends Item {
|
|||
|
||||
BlockState blockState = context.getWorld().getBlockState(context.getBlockPos());
|
||||
if (player.isSneaking()) {
|
||||
if (blockState.isSimpleFullBlock(context.getWorld(), context.getBlockPos())
|
||||
&& blockState.getBlock().getDefaultState().isSimpleFullBlock(context.getWorld(), context.getBlockPos())) {
|
||||
if (blockState.method_26216(context.getWorld(), context.getBlockPos())
|
||||
&& blockState.getBlock().getDefaultState().method_26216(context.getWorld(), context.getBlockPos())) {
|
||||
context.getStack().getOrCreateTag().put("cover", NbtHelper.fromBlockState(blockState));
|
||||
return ActionResult.SUCCESS;
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ import net.minecraft.enchantment.Enchantments;
|
|||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.*;
|
||||
import net.minecraft.util.DefaultedList;
|
||||
import net.minecraft.util.collection.DefaultedList;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import reborncore.common.powerSystem.PowerSystem;
|
||||
|
|
|
@ -29,7 +29,7 @@ import net.fabricmc.api.Environment;
|
|||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemGroup;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.DefaultedList;
|
||||
import net.minecraft.util.collection.DefaultedList;
|
||||
import reborncore.common.powerSystem.PowerSystem;
|
||||
import reborncore.common.util.ItemDurabilityExtensions;
|
||||
import reborncore.common.util.ItemUtils;
|
||||
|
|
|
@ -37,9 +37,9 @@ import net.minecraft.item.Items;
|
|||
import net.minecraft.item.ToolMaterials;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.DefaultedList;
|
||||
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 reborncore.common.util.ItemUtils;
|
||||
|
|
|
@ -38,6 +38,7 @@ import net.minecraft.item.*;
|
|||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.util.*;
|
||||
import net.minecraft.util.collection.DefaultedList;
|
||||
import net.minecraft.world.World;
|
||||
import reborncore.api.items.ItemStackModifiers;
|
||||
import reborncore.common.powerSystem.PowerSystem;
|
||||
|
|
|
@ -35,8 +35,8 @@ import net.minecraft.item.*;
|
|||
import net.minecraft.text.LiteralText;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.DefaultedList;
|
||||
import net.minecraft.util.Formatting;
|
||||
import net.minecraft.util.collection.DefaultedList;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import reborncore.common.powerSystem.PowerSystem;
|
||||
|
|
|
@ -25,16 +25,16 @@
|
|||
package techreborn.utils;
|
||||
|
||||
import net.fabricmc.fabric.api.block.FabricBlockSettings;
|
||||
import net.minecraft.block.AbstractBlock;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.Block.Settings;
|
||||
import net.minecraft.block.Material;
|
||||
import net.minecraft.block.MaterialColor;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.sound.BlockSoundGroup;
|
||||
import net.minecraft.sound.SoundEvent;
|
||||
import net.minecraft.util.DefaultedList;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.collection.DefaultedList;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import reborncore.RebornRegistry;
|
||||
import team.reborn.energy.Energy;
|
||||
|
@ -66,7 +66,7 @@ public class InitUtils {
|
|||
itemList.add(charged);
|
||||
}
|
||||
|
||||
public static Settings setupRubberBlockSettings(boolean noCollision, float hardness, float resistance) {
|
||||
public static AbstractBlock.Settings setupRubberBlockSettings(boolean noCollision, float hardness, float resistance) {
|
||||
|
||||
FabricBlockSettings settings = FabricBlockSettings.of(Material.WOOD, MaterialColor.SPRUCE);
|
||||
settings.strength(hardness, resistance);
|
||||
|
@ -74,11 +74,11 @@ public class InitUtils {
|
|||
if (noCollision) {
|
||||
settings.noCollision();
|
||||
}
|
||||
|
||||
settings.materialColor(MaterialColor.SPRUCE);
|
||||
return settings.build();
|
||||
}
|
||||
|
||||
public static Settings setupRubberBlockSettings(float hardness, float resistance) {
|
||||
public static AbstractBlock.Settings setupRubberBlockSettings(float hardness, float resistance) {
|
||||
return setupRubberBlockSettings(false, hardness, resistance);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ public final class PoweredCraftingHandler implements ItemCraftCallback {
|
|||
if (ingredient.isEmpty()){
|
||||
continue;
|
||||
}
|
||||
EnchantmentHelper.getEnchantments(ingredient).forEach((key, value) -> map.merge(key, value, (v1, v2) -> v1 > v2 ? v1 : v2));
|
||||
EnchantmentHelper.get(ingredient).forEach((key, value) -> map.merge(key, value, (v1, v2) -> v1 > v2 ? v1 : v2));
|
||||
}
|
||||
if (!map.isEmpty()){
|
||||
EnchantmentHelper.set(map, stack);
|
||||
|
|
Loading…
Reference in a new issue