From adad63254994c58a949cba65c803fb8addc5f6be Mon Sep 17 00:00:00 2001 From: modmuss50 Date: Thu, 12 Mar 2020 20:32:03 +0000 Subject: [PATCH] initial 20w11a --- build.gradle | 16 +++++--------- .../tier1/AutoCraftingTableBlockEntity.java | 4 ++-- .../tier1/RollingMachineBlockEntity.java | 4 ++-- .../blocks/misc/BlockRubberLog.java | 2 +- .../java/techreborn/client/GuiHandler.java | 4 ++-- .../container/ContainerDestructoPack.java | 6 ++--- .../java/techreborn/client/gui/GuiManual.java | 22 +++++++++---------- .../techreborn/client/gui/GuiStorageUnit.java | 14 ++++++------ .../techreborn/client/gui/GuiTankUnit.java | 14 ++++++------ .../render/BaseDynamicFluidBakedModel.java | 2 +- .../techreborn/entities/EntityNukePrimed.java | 4 ++-- .../techreborn/init/TRArmorMaterials.java | 2 +- .../java/techreborn/init/TRBlockEntities.java | 1 - src/main/java/techreborn/init/TRContent.java | 1 - src/main/java/techreborn/init/TRToolTier.java | 2 +- .../techreborn/items/DynamicCellItem.java | 4 ++-- .../java/techreborn/items/ScrapBoxItem.java | 2 +- .../items/armor/QuantumSuitItem.java | 2 +- .../techreborn/items/tool/ChainsawItem.java | 4 ++-- .../java/techreborn/items/tool/DrillItem.java | 10 ++++----- .../techreborn/items/tool/JackhammerItem.java | 2 +- .../items/tool/advanced/RockCutterItem.java | 4 ++-- .../industrial/IndustrialJackhammerItem.java | 2 +- .../items/tool/industrial/OmniToolItem.java | 6 ++--- .../items/tool/vanilla/TRHoeItem.java | 2 +- 25 files changed, 65 insertions(+), 71 deletions(-) diff --git a/build.gradle b/build.gradle index e60c65856..3436ab8d5 100644 --- a/build.gradle +++ b/build.gradle @@ -65,15 +65,15 @@ license { group = 'TechReborn' dependencies { - minecraft "com.mojang:minecraft:20w06a" - mappings "net.fabricmc:yarn:20w06a+build.15:v2" - modImplementation "net.fabricmc:fabric-loader:0.7.8+build.184" + minecraft "com.mojang:minecraft:20w11a" + mappings "net.fabricmc:yarn:20w11a+build.1:v2" + modImplementation "net.fabricmc:fabric-loader:0.7.8+build.187" //Fabric api - modImplementation "net.fabricmc.fabric-api:fabric-api:0.4.32+build.296-1.16" + modImplementation "net.fabricmc.fabric-api:fabric-api:0.5.3+build.308-1.16" - optionalDependency ("me.shedaniel:RoughlyEnoughItems:3.2.31") - optionalDependency ('io.github.cottonmc:LibCD:2.0.1+1.15') + 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) { @@ -85,10 +85,6 @@ dependencies { modCompileOnly ('curse.maven:towelette:2842017') { transitive = false } - - modRuntime ("com.jamieswhiteshirt:developer-mode:1.0.15") { - transitive = false - } } def optionalDependency(String dep) { diff --git a/src/main/java/techreborn/blockentity/machine/tier1/AutoCraftingTableBlockEntity.java b/src/main/java/techreborn/blockentity/machine/tier1/AutoCraftingTableBlockEntity.java index 6592ffa02..dabef1695 100644 --- a/src/main/java/techreborn/blockentity/machine/tier1/AutoCraftingTableBlockEntity.java +++ b/src/main/java/techreborn/blockentity/machine/tier1/AutoCraftingTableBlockEntity.java @@ -24,7 +24,6 @@ package techreborn.blockentity.machine.tier1; -import net.minecraft.container.Container; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.inventory.CraftingInventory; import net.minecraft.item.ItemStack; @@ -33,6 +32,7 @@ import net.minecraft.recipe.CraftingRecipe; import net.minecraft.recipe.Ingredient; import net.minecraft.recipe.Recipe; import net.minecraft.recipe.RecipeType; +import net.minecraft.screen.ScreenHandler; import net.minecraft.sound.SoundCategory; import net.minecraft.util.DefaultedList; import net.minecraft.util.math.Direction; @@ -101,7 +101,7 @@ public class AutoCraftingTableBlockEntity extends PowerAcceptorBlockEntity public CraftingInventory getCraftingInventory() { if (inventoryCrafting == null) { - inventoryCrafting = new CraftingInventory(new Container(null, -1) { + inventoryCrafting = new CraftingInventory(new ScreenHandler(null, -1) { @Override public boolean canUse(PlayerEntity playerIn) { return false; diff --git a/src/main/java/techreborn/blockentity/machine/tier1/RollingMachineBlockEntity.java b/src/main/java/techreborn/blockentity/machine/tier1/RollingMachineBlockEntity.java index 58eec059a..e6ae751cd 100644 --- a/src/main/java/techreborn/blockentity/machine/tier1/RollingMachineBlockEntity.java +++ b/src/main/java/techreborn/blockentity/machine/tier1/RollingMachineBlockEntity.java @@ -24,12 +24,12 @@ package techreborn.blockentity.machine.tier1; -import net.minecraft.container.Container; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.inventory.CraftingInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.CompoundTag; import net.minecraft.recipe.Ingredient; +import net.minecraft.screen.ScreenHandler; import net.minecraft.util.math.Direction; import net.minecraft.world.World; import org.apache.commons.lang3.tuple.Pair; @@ -414,7 +414,7 @@ public class RollingMachineBlockEntity extends PowerAcceptorBlockEntity return 0; } - private static class RollingBEContainer extends Container { + private static class RollingBEContainer extends ScreenHandler { protected RollingBEContainer() { super(null, 0); diff --git a/src/main/java/techreborn/blocks/misc/BlockRubberLog.java b/src/main/java/techreborn/blocks/misc/BlockRubberLog.java index 5e1e02fc3..b918bed2b 100644 --- a/src/main/java/techreborn/blocks/misc/BlockRubberLog.java +++ b/src/main/java/techreborn/blocks/misc/BlockRubberLog.java @@ -86,7 +86,7 @@ public class BlockRubberLog extends LogBlock { } @Override - public boolean matches(Tag tagIn) { + public boolean isIn(Tag tagIn) { return tagIn == BlockTags.LOGS; } diff --git a/src/main/java/techreborn/client/GuiHandler.java b/src/main/java/techreborn/client/GuiHandler.java index 5c6ae9330..2cf219428 100644 --- a/src/main/java/techreborn/client/GuiHandler.java +++ b/src/main/java/techreborn/client/GuiHandler.java @@ -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.ContainerScreen; +import net.minecraft.client.gui.screen.ingame.ScreenWithHandler; 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 ContainerScreen getClientGuiElement(final EGui gui, final PlayerEntity player, BlockPos pos, int syncID) { + private static ScreenWithHandler getClientGuiElement(final EGui gui, final PlayerEntity player, BlockPos pos, int syncID) { final BlockEntity blockEntity = player.world.getBlockEntity(pos); if (blockEntity instanceof DataDrivenBEProvider.DataDrivenBlockEntity) { diff --git a/src/main/java/techreborn/client/container/ContainerDestructoPack.java b/src/main/java/techreborn/client/container/ContainerDestructoPack.java index 64b20b320..2d9f4a30b 100644 --- a/src/main/java/techreborn/client/container/ContainerDestructoPack.java +++ b/src/main/java/techreborn/client/container/ContainerDestructoPack.java @@ -24,15 +24,15 @@ package techreborn.client.container; -import net.minecraft.container.Container; -import net.minecraft.container.Slot; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemStack; +import net.minecraft.screen.ScreenHandler; +import net.minecraft.screen.slot.Slot; import reborncore.client.gui.slots.SlotFilteredVoid; import reborncore.common.util.RebornInventory; import techreborn.init.TRContent; -public class ContainerDestructoPack extends Container { +public class ContainerDestructoPack extends ScreenHandler { private PlayerEntity player; private RebornInventory inv; diff --git a/src/main/java/techreborn/client/gui/GuiManual.java b/src/main/java/techreborn/client/gui/GuiManual.java index ef0921560..7d4611282 100644 --- a/src/main/java/techreborn/client/gui/GuiManual.java +++ b/src/main/java/techreborn/client/gui/GuiManual.java @@ -58,26 +58,26 @@ public class GuiManual extends Screen { public void init() { int y = (height / 2) - guiHeight / 2; y+= 40; - addButton(new GuiButtonExtended((width / 2 - 30), y + 10, 60, 20, StringUtils.t("techreborn.manual.wikibtn"), var1 -> minecraft.openScreen(new ConfirmChatLinkScreen(t -> { + addButton(new GuiButtonExtended((width / 2 - 30), y + 10, 60, 20, StringUtils.t("techreborn.manual.wikibtn"), var1 -> client.openScreen(new ConfirmChatLinkScreen(t -> { if(t){ Util.getOperatingSystem().open("http://wiki.techreborn.ovh"); - this.minecraft.openScreen(this); + this.client.openScreen(this); } else { - this.minecraft.openScreen(this); + this.client.openScreen(this); } }, "http://wiki.techreborn.ovh", false)))); - addButton(new GuiButtonExtended((width / 2 - 30), y + 60, 60, 20, StringUtils.t("techreborn.manual.discordbtn"), var1 -> minecraft.openScreen(new ConfirmChatLinkScreen(t -> { + addButton(new GuiButtonExtended((width / 2 - 30), y + 60, 60, 20, StringUtils.t("techreborn.manual.discordbtn"), var1 -> client.openScreen(new ConfirmChatLinkScreen(t -> { if(t){ Util.getOperatingSystem().open("https://discord.gg/teamreborn"); - this.minecraft.openScreen(this); + this.client.openScreen(this); }else { - this.minecraft.openScreen(this); + this.client.openScreen(this); } }, "https://discord.gg/teamreborn", false)))); if(TechRebornConfig.allowManualRefund){ addButton(new GuiButtonExtended((width / 2 - 30), y + 110, 60, 20, StringUtils.t("techreborn.manual.refundbtn"), var1 -> { NetworkManager.sendToServer(ServerboundPackets.createRefundPacket()); - this.minecraft.openScreen(null); + this.client.openScreen(null); })); } } @@ -85,14 +85,14 @@ public class GuiManual extends Screen { @Override public void render(int mouseX, int mouseY, float partialTicks) { renderBackground(); - minecraft.getTextureManager().bindTexture(GuiManual.texture); + client.getTextureManager().bindTexture(GuiManual.texture); int centerX = (width / 2) - guiWidth / 2; int centerY = (height / 2) - guiHeight / 2; blit(centerX, centerY, 0, 0, guiWidth, guiHeight); - font.draw(text1, ((width / 2) - font.getStringWidth(text1) / 2), centerY + 40, 4210752); - font.draw(text2, ((width / 2) - font.getStringWidth(text2) / 2), centerY + 90, 4210752); + 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) { - font.draw(text3, ((width / 2) - font.getStringWidth(text3) / 2), centerY + 140, 4210752); + textRenderer.draw(text3, ((width / 2) - textRenderer.getStringWidth(text3) / 2), centerY + 140, 4210752); } super.render(mouseX, mouseY, partialTicks); } diff --git a/src/main/java/techreborn/client/gui/GuiStorageUnit.java b/src/main/java/techreborn/client/gui/GuiStorageUnit.java index 48d6e8527..479c82b3e 100644 --- a/src/main/java/techreborn/client/gui/GuiStorageUnit.java +++ b/src/main/java/techreborn/client/gui/GuiStorageUnit.java @@ -56,20 +56,20 @@ public class GuiStorageUnit extends GuiBase { super.drawForeground(mouseX, mouseY); if (storageEntity.isEmpty()) { - font.draw(StringUtils.t("techreborn.tooltip.unit.empty"), 10, 20, 4210752); + textRenderer.draw(StringUtils.t("techreborn.tooltip.unit.empty"), 10, 20, 4210752); } else { - font.draw(StringUtils.t("gui.techreborn.storage.store"), 10, 20, 4210752); - font.draw(storageEntity.getStoredStack().getName().asString(), 10, 30, 4210752); + textRenderer.draw(StringUtils.t("gui.techreborn.storage.store"), 10, 20, 4210752); + textRenderer.draw(storageEntity.getStoredStack().getName().asString(), 10, 30, 4210752); - font.draw(StringUtils.t("gui.techreborn.storage.amount"), 10, 50, 4210752); - font.draw(String.valueOf(storageEntity.getCurrentCapacity()), 10, 60, 4210752); + textRenderer.draw(StringUtils.t("gui.techreborn.storage.amount"), 10, 50, 4210752); + textRenderer.draw(String.valueOf(storageEntity.getCurrentCapacity()), 10, 60, 4210752); String percentFilled = String.valueOf((int) ((double) storageEntity.getCurrentCapacity() / (double) storageEntity.getMaxCapacity() * 100)); - font.draw(StringUtils.t("gui.techreborn.unit.used") + percentFilled + "%", 10, 70, 4210752); + textRenderer.draw(StringUtils.t("gui.techreborn.unit.used") + percentFilled + "%", 10, 70, 4210752); - font.draw(StringUtils.t("gui.techreborn.unit.wrenchtip"), 10, 80, 16711680); + textRenderer.draw(StringUtils.t("gui.techreborn.unit.wrenchtip"), 10, 80, 16711680); } } } diff --git a/src/main/java/techreborn/client/gui/GuiTankUnit.java b/src/main/java/techreborn/client/gui/GuiTankUnit.java index e273c2b33..236d97f46 100644 --- a/src/main/java/techreborn/client/gui/GuiTankUnit.java +++ b/src/main/java/techreborn/client/gui/GuiTankUnit.java @@ -60,20 +60,20 @@ public class GuiTankUnit extends GuiBase { FluidInstance fluid = tankEntity.getTank().getFluidInstance(); if (fluid.isEmpty()) { - font.draw(StringUtils.t("techreborn.tooltip.unit.empty"), 10, 20, 4210752); + textRenderer.draw(StringUtils.t("techreborn.tooltip.unit.empty"), 10, 20, 4210752); } else { - font.draw(StringUtils.t("gui.techreborn.tank.type"), 10, 20, 4210752); - font.draw(FluidUtil.getFluidName(fluid).replace("_", " "), 10, 30, 4210752); + textRenderer.draw(StringUtils.t("gui.techreborn.tank.type"), 10, 20, 4210752); + textRenderer.draw(FluidUtil.getFluidName(fluid).replace("_", " "), 10, 30, 4210752); - font.draw(StringUtils.t("gui.techreborn.tank.amount"), 10, 50, 4210752); - font.draw(fluid.getAmount().toString(), 10, 60, 4210752); + textRenderer.draw(StringUtils.t("gui.techreborn.tank.amount"), 10, 50, 4210752); + textRenderer.draw(fluid.getAmount().toString(), 10, 60, 4210752); String percentFilled = String.valueOf((int) ((double) fluid.getAmount().getRawValue() / (double) tankEntity.getTank().getCapacity().getRawValue() * 100)); - font.draw(StringUtils.t("gui.techreborn.unit.used") + percentFilled + "%", 10, 70, 4210752); + textRenderer.draw(StringUtils.t("gui.techreborn.unit.used") + percentFilled + "%", 10, 70, 4210752); - font.draw(StringUtils.t("gui.techreborn.unit.wrenchtip"), 10, 80, 16711680); + textRenderer.draw(StringUtils.t("gui.techreborn.unit.wrenchtip"), 10, 80, 16711680); } } diff --git a/src/main/java/techreborn/client/render/BaseDynamicFluidBakedModel.java b/src/main/java/techreborn/client/render/BaseDynamicFluidBakedModel.java index ae176436e..f7b3ccb20 100644 --- a/src/main/java/techreborn/client/render/BaseDynamicFluidBakedModel.java +++ b/src/main/java/techreborn/client/render/BaseDynamicFluidBakedModel.java @@ -76,7 +76,7 @@ public abstract class BaseDynamicFluidBakedModel implements BakedModel, FabricBa if (fluid != Fluids.EMPTY) { FluidRenderHandler fluidRenderHandler = FluidRenderHandlerRegistry.INSTANCE.get(fluid); BakedModel fluidModel = bakedModelManager.getModel(getFluidModel()); - int fluidColor = fluidRenderHandler.getFluidColor(MinecraftClient.getInstance().world, MinecraftClient.getInstance().player.getBlockPos(), fluid.getDefaultState()); + int fluidColor = fluidRenderHandler.getFluidColor(MinecraftClient.getInstance().world, MinecraftClient.getInstance().player.getSenseCenterPos(), fluid.getDefaultState()); Sprite fluidSprite = fluidRenderHandler.getFluidSprites(MinecraftClient.getInstance().world, BlockPos.ORIGIN, fluid.getDefaultState())[0]; int color = new Color((float) (fluidColor >> 16 & 255) / 255.0F, (float) (fluidColor >> 8 & 255) / 255.0F, (float) (fluidColor & 255) / 255.0F).getColor(); context.pushTransform(quad -> { diff --git a/src/main/java/techreborn/entities/EntityNukePrimed.java b/src/main/java/techreborn/entities/EntityNukePrimed.java index f2eb6618d..ed7dc8a3f 100644 --- a/src/main/java/techreborn/entities/EntityNukePrimed.java +++ b/src/main/java/techreborn/entities/EntityNukePrimed.java @@ -80,7 +80,7 @@ public class EntityNukePrimed extends TntEntity { explodeNuke(); } } else { - this.checkWaterState(); + this.updateWaterState(); this.world.addParticle(ParticleTypes.SMOKE, this.getX(), this.getY() + 0.5D, this.getZ(), 0.0D, 0.0D, 0.0D); } } @@ -89,7 +89,7 @@ public class EntityNukePrimed extends TntEntity { if (!TechRebornConfig.nukeEnabled) { return; } - RebornExplosion nukeExplosion = new RebornExplosion(getBlockPos(), world, TechRebornConfig.nukeRadius); + RebornExplosion nukeExplosion = new RebornExplosion(getSenseCenterPos(), world, TechRebornConfig.nukeRadius); nukeExplosion.setLivingBase(getCausingEntity()); nukeExplosion.explode(); } diff --git a/src/main/java/techreborn/init/TRArmorMaterials.java b/src/main/java/techreborn/init/TRArmorMaterials.java index 48915df75..ca8dd1393 100644 --- a/src/main/java/techreborn/init/TRArmorMaterials.java +++ b/src/main/java/techreborn/init/TRArmorMaterials.java @@ -108,7 +108,7 @@ public enum TRArmorMaterials implements ArmorMaterial { } @Override - public float method_24355() { + public float getKnockbackResistance() { return 0; //Knockback resitance } } diff --git a/src/main/java/techreborn/init/TRBlockEntities.java b/src/main/java/techreborn/init/TRBlockEntities.java index 78cc937b9..e88038a4c 100644 --- a/src/main/java/techreborn/init/TRBlockEntities.java +++ b/src/main/java/techreborn/init/TRBlockEntities.java @@ -35,7 +35,6 @@ import techreborn.TechReborn; import techreborn.blockentity.cable.CableBlockEntity; import techreborn.blockentity.machine.misc.DrainBlockEntity; import techreborn.blockentity.machine.multiblock.casing.MachineCasingBlockEntity; -import techreborn.blockentity.machine.multiblock.FusionControlComputerBlockEntity; import techreborn.blockentity.generator.LightningRodBlockEntity; import techreborn.blockentity.generator.PlasmaGeneratorBlockEntity; import techreborn.blockentity.generator.SolarPanelBlockEntity; diff --git a/src/main/java/techreborn/init/TRContent.java b/src/main/java/techreborn/init/TRContent.java index 56a69e26b..75ea0de7d 100644 --- a/src/main/java/techreborn/init/TRContent.java +++ b/src/main/java/techreborn/init/TRContent.java @@ -42,7 +42,6 @@ import techreborn.blockentity.machine.misc.ChargeOMatBlockEntity; import techreborn.blockentity.machine.misc.DrainBlockEntity; import techreborn.blockentity.storage.fluid.CreativeQuantumTankBlockEntity; import techreborn.blockentity.storage.fluid.QuantumTankBlockEntity; -import techreborn.blockentity.machine.tier3.IndustrialCentrifugeBlockEntity; import techreborn.blockentity.generator.LightningRodBlockEntity; import techreborn.blockentity.generator.PlasmaGeneratorBlockEntity; import techreborn.blockentity.generator.advanced.*; diff --git a/src/main/java/techreborn/init/TRToolTier.java b/src/main/java/techreborn/init/TRToolTier.java index d4794d86a..7ade34b7c 100644 --- a/src/main/java/techreborn/init/TRToolTier.java +++ b/src/main/java/techreborn/init/TRToolTier.java @@ -79,7 +79,7 @@ public enum TRToolTier implements ToolMaterial { } @Override - public float getMiningSpeed() { + public float getMiningSpeedMultiplier() { return efficiency; } diff --git a/src/main/java/techreborn/items/DynamicCellItem.java b/src/main/java/techreborn/items/DynamicCellItem.java index b57ec97b4..dffa2e41c 100644 --- a/src/main/java/techreborn/items/DynamicCellItem.java +++ b/src/main/java/techreborn/items/DynamicCellItem.java @@ -77,7 +77,7 @@ public class DynamicCellItem extends Item implements ItemFluidInfo { // Thanks vanilla :) private void playEmptyingSound(@Nullable PlayerEntity playerEntity, IWorld world, BlockPos blockPos, Fluid fluid) { - SoundEvent soundEvent = fluid.matches(FluidTags.LAVA) ? SoundEvents.ITEM_BUCKET_EMPTY_LAVA : SoundEvents.ITEM_BUCKET_EMPTY; + SoundEvent soundEvent = fluid.isIn(FluidTags.LAVA) ? SoundEvents.ITEM_BUCKET_EMPTY_LAVA : SoundEvents.ITEM_BUCKET_EMPTY; world.playSound(playerEntity, blockPos, soundEvent, SoundCategory.BLOCKS, 1.0F, 1.0F); } @@ -116,7 +116,7 @@ public class DynamicCellItem extends Item implements ItemFluidInfo { if (!blockState.isAir() && !canPlace && (!(blockState.getBlock() instanceof FluidFillable) || !((FluidFillable)blockState.getBlock()).canFillWithFluid(world, pos, blockState, fluid))) { return hitResult != null && this.placeFluid(player, world, hitResult.getBlockPos().offset(hitResult.getSide()), null, filledCell); } else { - if (world.dimension.doesWaterVaporize() && fluid.matches(FluidTags.WATER)) { + if (world.dimension.doesWaterVaporize() && fluid.isIn(FluidTags.WATER)) { int i = pos.getX(); int j = pos.getY(); int k = pos.getZ(); diff --git a/src/main/java/techreborn/items/ScrapBoxItem.java b/src/main/java/techreborn/items/ScrapBoxItem.java index bb0f966b8..d1c866620 100644 --- a/src/main/java/techreborn/items/ScrapBoxItem.java +++ b/src/main/java/techreborn/items/ScrapBoxItem.java @@ -51,7 +51,7 @@ public class ScrapBoxItem extends Item { List scrapboxRecipeList = ModRecipes.SCRAPBOX.getRecipes(world); int random = world.random.nextInt(scrapboxRecipeList.size()); ItemStack out = scrapboxRecipeList.get(random).getOutputs().get(0); - WorldUtils.dropItem(out, world, player.getBlockPos()); + WorldUtils.dropItem(out, world, player.getSenseCenterPos()); stack.decrement(1); } return new TypedActionResult<>(ActionResult.SUCCESS, stack); diff --git a/src/main/java/techreborn/items/armor/QuantumSuitItem.java b/src/main/java/techreborn/items/armor/QuantumSuitItem.java index a38cc9ec2..686c35dd3 100644 --- a/src/main/java/techreborn/items/armor/QuantumSuitItem.java +++ b/src/main/java/techreborn/items/armor/QuantumSuitItem.java @@ -96,7 +96,7 @@ public class QuantumSuitItem extends TRArmourItem implements ItemStackModifiers, if (playerEntity.abilities.flying) { Energy.of(stack).use(flyCost); } - playerEntity.onGround = true; + playerEntity.method_24830(true); } else { playerEntity.abilities.allowFlying = false; playerEntity.abilities.flying = false; diff --git a/src/main/java/techreborn/items/tool/ChainsawItem.java b/src/main/java/techreborn/items/tool/ChainsawItem.java index 9f1147a4b..74eacd685 100644 --- a/src/main/java/techreborn/items/tool/ChainsawItem.java +++ b/src/main/java/techreborn/items/tool/ChainsawItem.java @@ -73,12 +73,12 @@ public class ChainsawItem extends AxeItem implements EnergyHolder, ItemDurabilit // AxeItem @Override - public float getMiningSpeed(ItemStack stack, BlockState state) { + public float getMiningSpeedMultiplier(ItemStack stack, BlockState state) { if (Energy.of(stack).getEnergy() >= cost && (state.getMaterial() == Material.WOOD)) { return this.poweredSpeed; } - return super.getMiningSpeed(stack, state); + return super.getMiningSpeedMultiplier(stack, state); } // MiningToolItem diff --git a/src/main/java/techreborn/items/tool/DrillItem.java b/src/main/java/techreborn/items/tool/DrillItem.java index ea4420cd4..225b2ab3e 100644 --- a/src/main/java/techreborn/items/tool/DrillItem.java +++ b/src/main/java/techreborn/items/tool/DrillItem.java @@ -65,15 +65,15 @@ public class DrillItem extends PickaxeItem implements EnergyHolder, ItemDurabili // PickaxeItem @Override - public float getMiningSpeed(ItemStack stack, BlockState state) { + public float getMiningSpeedMultiplier(ItemStack stack, BlockState state) { if (Energy.of(stack).getEnergy() < cost) { - return super.getMiningSpeed(stack, state); + return super.getMiningSpeedMultiplier(stack, state); } - if (Items.WOODEN_PICKAXE.getMiningSpeed(stack, state) > 1.0F - || Items.WOODEN_SHOVEL.getMiningSpeed(stack, state) > 1.0F) { + if (Items.WOODEN_PICKAXE.getMiningSpeedMultiplier(stack, state) > 1.0F + || Items.WOODEN_SHOVEL.getMiningSpeedMultiplier(stack, state) > 1.0F) { return poweredSpeed; } - return super.getMiningSpeed(stack, state); + return super.getMiningSpeedMultiplier(stack, state); } // MiningToolItem diff --git a/src/main/java/techreborn/items/tool/JackhammerItem.java b/src/main/java/techreborn/items/tool/JackhammerItem.java index 8d486ceee..51c708f50 100644 --- a/src/main/java/techreborn/items/tool/JackhammerItem.java +++ b/src/main/java/techreborn/items/tool/JackhammerItem.java @@ -60,7 +60,7 @@ public class JackhammerItem extends PickaxeItem implements EnergyHolder, ItemDur // PickaxeItem @Override - public float getMiningSpeed(ItemStack stack, BlockState state) { + public float getMiningSpeedMultiplier(ItemStack stack, BlockState state) { if (state.getMaterial() == Material.STONE && Energy.of(stack).getEnergy() >= cost) { return miningSpeed; } diff --git a/src/main/java/techreborn/items/tool/advanced/RockCutterItem.java b/src/main/java/techreborn/items/tool/advanced/RockCutterItem.java index fa342db78..3adf7f250 100644 --- a/src/main/java/techreborn/items/tool/advanced/RockCutterItem.java +++ b/src/main/java/techreborn/items/tool/advanced/RockCutterItem.java @@ -65,11 +65,11 @@ public class RockCutterItem extends PickaxeItem implements EnergyHolder, ItemDur } @Override - public float getMiningSpeed(ItemStack stack, BlockState state) { + public float getMiningSpeedMultiplier(ItemStack stack, BlockState state) { if (Energy.of(stack).getEnergy() < cost) { return 2F; } else { - return Items.DIAMOND_PICKAXE.getMiningSpeed(stack, state); + return Items.DIAMOND_PICKAXE.getMiningSpeedMultiplier(stack, state); } } diff --git a/src/main/java/techreborn/items/tool/industrial/IndustrialJackhammerItem.java b/src/main/java/techreborn/items/tool/industrial/IndustrialJackhammerItem.java index a38fec13b..c6fd58394 100644 --- a/src/main/java/techreborn/items/tool/industrial/IndustrialJackhammerItem.java +++ b/src/main/java/techreborn/items/tool/industrial/IndustrialJackhammerItem.java @@ -124,7 +124,7 @@ public class IndustrialJackhammerItem extends JackhammerItem { // PickaxeItem @Override - public float getMiningSpeed(ItemStack stack, BlockState state) { + public float getMiningSpeedMultiplier(ItemStack stack, BlockState state) { if (state.getMaterial() == Material.STONE && Energy.of(stack).getEnergy() >= cost) { // x4 diamond mining speed return 32.0F; diff --git a/src/main/java/techreborn/items/tool/industrial/OmniToolItem.java b/src/main/java/techreborn/items/tool/industrial/OmniToolItem.java index d1f1e20f6..5b8779be3 100644 --- a/src/main/java/techreborn/items/tool/industrial/OmniToolItem.java +++ b/src/main/java/techreborn/items/tool/industrial/OmniToolItem.java @@ -75,11 +75,11 @@ public class OmniToolItem extends PickaxeItem implements EnergyHolder, ItemDurab } @Override - public float getMiningSpeed(ItemStack stack, BlockState state) { + public float getMiningSpeedMultiplier(ItemStack stack, BlockState state) { if (Energy.of(stack).getEnergy() >= cost) { - return ToolMaterials.DIAMOND.getMiningSpeed(); + return ToolMaterials.DIAMOND.getMiningSpeedMultiplier(); } - return super.getMiningSpeed(stack, state); + return super.getMiningSpeedMultiplier(stack, state); } // MiningToolItem diff --git a/src/main/java/techreborn/items/tool/vanilla/TRHoeItem.java b/src/main/java/techreborn/items/tool/vanilla/TRHoeItem.java index f63633246..5ba58df23 100644 --- a/src/main/java/techreborn/items/tool/vanilla/TRHoeItem.java +++ b/src/main/java/techreborn/items/tool/vanilla/TRHoeItem.java @@ -40,7 +40,7 @@ public class TRHoeItem extends HoeItem { } public TRHoeItem(ToolMaterial material, String repairOreDict) { - super(material, 0F, new Item.Settings().group(TechReborn.ITEMGROUP)); + super(material, 0, 0F, new Item.Settings().group(TechReborn.ITEMGROUP)); this.repairOreDict = repairOreDict; }